Network Emulation Support in ns-3 using Intel DPDK

Students: Harsh Patel and Hrishikesh Hiraskar

Mentor: Mohit P. Tahiliani

Project Overview

Network emulation is an important feature in network simulators such as ns-3 to be able to interact with real devices. ns-3 provides network emulation support by creating raw sockets and making them interact with real hosts. This process uses the host network stack which performs system calls to read/write packets from/to the NIC. In this project, we try to extend ns-3's network emulation support by integrating DPDK in ns-3.

Intel's Data Plane Development Kit (DPDK) provides a set of fast packet processing libraries which performs kernel bypassing by creating an Environment Abstraction Layer (EAL). This allows the applications in user space to interact directly with the NIC. This type of packet processing is found to be highly efficient and is able to send packets almost at the line rate.

This integration allows us to bypass the host network stack during network emulation in ns-3. We have built a module named DpdkNetDevice in ns-3 which acts as an interface between ns-3 and DPDK environments. DpdkNetDevice initializes DPDK environment by initializing the EAL, memory pool and Tx/Rx queues. After initialization, it performs kernel bypassing to write packets from ns-3 to the NIC Tx ring and read packets from NIC Rx ring to ns-3.


The project used DPDK libraries to send and recieve packets through ns-3. The complete project is available on github and the link to source code is shared below.

Steps to build the code

A wiki is made to help everyone with the complete installation of this project from scratch. This includes checking for supported NIC(s) and installing, building and configuring DPDK, cloning and building ns-3 in DPDK repository and running a sample ping application.

Online References

More details about this project and source code are available on the links given below:

Source Code Model Diagram Installation Wiki Project Timeline