Programmable data plane with multiple devices can now be simulated
Simulation setup much easier compared to ns-3
Direct migration of simulated behaviour to real-world devices possible
Less error prone code writing.
Performance improved significantly.
5. Approach & Solution
NS4 <- NS3 + P4
• NS4 exploits P4 to
• Simplify the development of behavioral model
• Bridge the gap between Simulation and Development
• No library dependent simulator calls, leading to denser
source code
• Also NS4 is convenient simulation tool for P4 programmers.
Simulation
Behavior Model
Network
Feature
Network Devices
Simulator
Oblivious
Automatic
Compilation
6. NS4 Design Approach:
NS4 Runtime
• Every line of the configuration is translated into flow table entries
• Proactively generates flow table entries from user configuration.
• Can Modify flow entries at runtime.
NS4 Controller
• Designed to be optional
• Can populate flow table entries reactively
• Trivial entries that can be derived from network topology
• Called Automatic entries
Statistics Collector
• Creates discrete events for gathering statistical information
• Can set and reset counters for specific values in the flow tables
P4 Configurator
• Takes P4 programs and configures pipelines in NS4 Net Device
• Line-by-line translation from P4 to discrete events
Flow Table Agent
• Populates flow table entries according to NS4Runtime
andNS4Controller
• Offers statistical information to the statistics collector
Channel Manager:
• Eases communication between multiple net devices
• Downward compatibility with traditional devices given
Workflow:
1. Configure the behaviour of data plane by inputting compiled P4 programs to P4
pipeline configurator.
2. Create control plane and configure the flow table operations and statistics collection
tasks to be performed
3. Build network topology, install applications and trigger the simulation. The control
configurations are transformed into discrete events and get performed at the appointed
time.
7. 1. Case Study: SilkRoad vs SLB
• Software Load Balancer (SLB)
• Map virtual IP addresses (VIP) to direct IP
addresses (DIP)
• Load balancing done in software by dedicated
load balancing servers.
• Bringing high cost for dedicated devices
• Higher forwarding latencies due to redirection
of packets
• SilkRoad
• Implement SLB on switch ASIC with large
performance improvement
• Switches themselves decide how to forward
incoming packets.
• NS4 supports simulating SilkRoad and SLB
in a typical data center topology.
9. Conclusion:
• NS4: Enabling programmable data plane simulation
• Programmable data plane with multiple devices can now be simulated
• Simulation setup much easier compared to ns-3
• Direct migration of simulated behaviour to real-world devices possible
• Less error prone code writing.
• Performance improved significantly.
Future Work:
• Strengthen NS4 Database to fully support various element in P4.
• Improve execution efficiency of NS4 Implementation by reducing memory usage.
10. Related Work
Predecessors of NS4
• ns-1 (1989)
Terminal based, C++ & Tcl(Tool Command Language)
• ns-2 (1995)
Otcl, support sensor networks, wireless, satellites...
• ns-3 (2011)
Python besides OTcl and adherence to C++ style patterns.
Improved incorporation with other open-source network simulators.
Other network simulators (excerpt)
• OPNet
GUI, but no P4 support
• PFPSim
Supports only one P4 enabled device