摘要
数据传输速度是嵌入式系统应用中不可忽视的一个重要因素,特别是在大数据网络中将起到决定性的作用,双网卡在网络带宽较低的环境下可以显著提升嵌入式设备的传输速度。介绍了一种在嵌入式Linux系统下利用原始套接字构建双网卡网络环境的方法,该方法通过原始套接字获取网卡接口信息,并对数据链路层的数据进行操作;在传输层使用UDP协议收发数据;在应用层增加对UDP包的确认机制,保证数据正确地传输,并且采用多线程技术将数据包按照各网卡的带宽动态分配。测试结果表明,该方法能够有效地利用双网卡的带宽资源,提升整体网络数据的传输速度,适合应用于大数据传输应用。
The data transmission rate is a decisive factor for applications of embedded systems,especially in the network with large data exchange.Dual NICs can significantly improve the transmission rate of embedded devices in the environments with low bandwidth.This paper presents an approach that is raw socket in embedded Linux system is used to build dual NICs network.By this way,the information of the network interfaces are obtained via raw sockets and the data on the data link layer is processed directly.While using the UDP protocol to send and receive data on the transport layer,the acknowledgment mechanism upon the application layer is added to ensure the proper data transmission.During transmission,the data is dynamically allocated considering the bandwidth of each NIC,and the data transmissions are controlled by multi-threading.The test results show that this method could effectively utilize Dual NICs bandwidth resources and improve transfer rate of the whole network,and is suitable for applications with large data transmission.
出处
《电子测量与仪器学报》
CSCD
2014年第9期1027-1032,共6页
Journal of Electronic Measurement and Instrumentation