{"title":"使用DPDK扩展ns-3中的网络仿真支持","authors":"Harsh Patel, Hrishikesh Hiraskar, M. Tahiliani","doi":"10.1145/3321349.3321358","DOIUrl":null,"url":null,"abstract":"ns-3 network simulator provides support for network emulation by enabling simulated nodes to communicate with real hosts by using a network device called EmuFdNetDevice. Network emulation is an important feature in ns-3 and can be used to validate its models by comparing the emulation results to those obtained from real testbeds. Typically, ns-3 uses raw sockets of host's kernel stack to support network emulation. However, there is an active interest to enhance ns-3's network emulation features by using kernel bypass libraries. Recently, a new network device called NetmapNetDevice has been proposed for ns-3 to enable its interaction with netmap. In this paper, we extend network emulation support in ns-3 by using Data Plane Development Kit (DPDK). DPDK provides a set of fast packet processing libraries to bypass host network stack and obtain a direct access to Network Interface Card (NIC). We propose a new network device in ns-3 called DpdkNetDevice, intermediating between ns-3 Internet stack and DPDK environment to read/write packets from/to the NIC. We validate the working of DpdkNetDevice by performing various experiments and comparing results obtained from it to those obtained from EmuFdNetDevice and NetmapNetDevice. We observe that network emulations using DpdkNetDevice on a Gigabit Ethernet NIC provide higher throughput with significantly lesser CPU cycles per packet.","PeriodicalId":166981,"journal":{"name":"Proceedings of the 2019 Workshop on ns-3","volume":"99 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2019-06-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"4","resultStr":"{\"title\":\"Extending Network Emulation Support in ns-3 using DPDK\",\"authors\":\"Harsh Patel, Hrishikesh Hiraskar, M. Tahiliani\",\"doi\":\"10.1145/3321349.3321358\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"ns-3 network simulator provides support for network emulation by enabling simulated nodes to communicate with real hosts by using a network device called EmuFdNetDevice. Network emulation is an important feature in ns-3 and can be used to validate its models by comparing the emulation results to those obtained from real testbeds. Typically, ns-3 uses raw sockets of host's kernel stack to support network emulation. However, there is an active interest to enhance ns-3's network emulation features by using kernel bypass libraries. Recently, a new network device called NetmapNetDevice has been proposed for ns-3 to enable its interaction with netmap. In this paper, we extend network emulation support in ns-3 by using Data Plane Development Kit (DPDK). DPDK provides a set of fast packet processing libraries to bypass host network stack and obtain a direct access to Network Interface Card (NIC). We propose a new network device in ns-3 called DpdkNetDevice, intermediating between ns-3 Internet stack and DPDK environment to read/write packets from/to the NIC. We validate the working of DpdkNetDevice by performing various experiments and comparing results obtained from it to those obtained from EmuFdNetDevice and NetmapNetDevice. We observe that network emulations using DpdkNetDevice on a Gigabit Ethernet NIC provide higher throughput with significantly lesser CPU cycles per packet.\",\"PeriodicalId\":166981,\"journal\":{\"name\":\"Proceedings of the 2019 Workshop on ns-3\",\"volume\":\"99 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2019-06-19\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"4\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 2019 Workshop on ns-3\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3321349.3321358\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 2019 Workshop on ns-3","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3321349.3321358","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 4
摘要
ns-3网络模拟器通过使用称为EmuFdNetDevice的网络设备使模拟节点能够与真实主机通信,从而为网络仿真提供支持。网络仿真是ns-3的一个重要特性,可以通过将仿真结果与实际试验台的仿真结果进行比较来验证其模型。通常,ns-3使用主机内核堆栈的原始套接字来支持网络仿真。然而,通过使用内核旁路库来增强ns-3的网络仿真特性是一种积极的兴趣。最近,一种名为NetmapNetDevice的新型网络设备被提出用于ns-3,使其能够与netmap进行交互。本文利用数据平面开发工具包(Data Plane Development Kit, DPDK)扩展了ns-3的网络仿真支持。DPDK提供了一套快速数据包处理库,可以绕过主机网络栈,直接访问网卡。我们在ns-3中提出了一种新的网络设备DpdkNetDevice,它介于ns-3网络堆栈和DPDK环境之间,用于从网卡读写数据包。我们通过各种实验验证DpdkNetDevice的工作原理,并将其与EmuFdNetDevice和NetmapNetDevice的结果进行比较。我们观察到,在千兆以太网网卡上使用DpdkNetDevice的网络模拟提供了更高的吞吐量,每个数据包的CPU周期显著减少。
Extending Network Emulation Support in ns-3 using DPDK
ns-3 network simulator provides support for network emulation by enabling simulated nodes to communicate with real hosts by using a network device called EmuFdNetDevice. Network emulation is an important feature in ns-3 and can be used to validate its models by comparing the emulation results to those obtained from real testbeds. Typically, ns-3 uses raw sockets of host's kernel stack to support network emulation. However, there is an active interest to enhance ns-3's network emulation features by using kernel bypass libraries. Recently, a new network device called NetmapNetDevice has been proposed for ns-3 to enable its interaction with netmap. In this paper, we extend network emulation support in ns-3 by using Data Plane Development Kit (DPDK). DPDK provides a set of fast packet processing libraries to bypass host network stack and obtain a direct access to Network Interface Card (NIC). We propose a new network device in ns-3 called DpdkNetDevice, intermediating between ns-3 Internet stack and DPDK environment to read/write packets from/to the NIC. We validate the working of DpdkNetDevice by performing various experiments and comparing results obtained from it to those obtained from EmuFdNetDevice and NetmapNetDevice. We observe that network emulations using DpdkNetDevice on a Gigabit Ethernet NIC provide higher throughput with significantly lesser CPU cycles per packet.