SDN in NetSim
SDN is available in NetSim from version 11 onwards. NetSim 'simulates' OpenFlow protocol. OpenFlow is an open interface to remotely control the forwarding tables in network switches, routers, etc.
SDN Controller in NetSim
An SDN controller is an application in SDN that manages flow control to enable intelligent networking. SDN controller can be used to control the packet forwarding of all Layer 3 devices in the network.
SDN controller lies between the network devices and the applications. Any communication between applications and devices must go through the controller.
NetSim has inbuilt controllers that 'simulate' SDN. An SDN controller in NetSim contains a Command Line Interface (CLI) to allow you to configure properties, such as, the IP forwarding table for different devices in the network.
NetSim also provides a platform whereby users can develop various kind of commands/interface compatible to any SDN enabled device.
In NetSim, any Layer 3 device can be configured as an SDN Controller. Multiple controllers can be configured in a network scenario. The following is a list of Layer 3 devices you can configure as an SDN controller:
Internetworks – Nodes (Wired, Wireless Node),Routers
MANETs – Nodes (Wired, Wireless Node), Bridge Node (Wired, Wireless Node), Routers
WSN - Sensors and Sink Node
IOT - Sensors and Gateway (LowPAN Gateway), Nodes (Wired, Wireless Node), Routers
Cognitive Radio – CR CPE, Nodes (Wired, Wireless Node), Routers
LTE – UE, EPC, Nodes (Wired, Wireless Node), Routers
VANETs – Vehicle and RSU
5G mmWave – UE, Nodes (Wired, Wireless Node), Routers
NOTE: NetSim ‘simulates’ SDN protocol and cannot connect to real controllers such as Open Daylight.
CLI Commands for SDN in NetSim
You can use the following commands when you simulate SDN in NetSim:
Simulation-specific – Pause, PauseAt, Continue, Stop, Exit, and Reconnect.
Route – route add, route print, and route delete.
Ping Command – ping (not supported on some network types, for example, Wireless Sensor Network)
ACL configuration – ACL Enable, ACL Disable, ACL Print, and aclconfig.
Notes: CLI commands in NetSim are NOT case-sensitive. To get detailed help about how to use CLI commands in NetSim, see Section 3.14 NetSim Interactive Simulation in User Manual.
Configuring SDN in NetSim
SDN protocol parameters can be accessed and configured from the Application layer properties of the devices.
Open-flow protocol must be enabled in the devices which are configured as SDN Controller or SDN clients.
SDN Controller device must have the SDN Controller option set to True.
SDN Client devices must have the SDN Controller option set to False along with the Controller Device Name set as the SDN Controller Device Name.
Interactive Simulation option needs to be set to True in the Run time interaction tab.
When SDN commands are executed during runtime either via console or via file input, commands and response are exchanged between the controller and clients using TCP.
How to use CLI Commands for SDN
Each device in NetSim has a console which can be accessed by right clicking on the device. Users can execute supported SDN commands on the console of the SDN controller node to configure other nodes in the network. Let us look at a few examples.
Example 1: To view the IP routing table of a node that is controlled by the SDN controller, use the following command syntax: <DeviceName with Device ID> route print.
For example, type Wired_Node_2 route print and press Enter.
The following image illustrates the output for the command.
Figure-1: Printing IP routing table in Console
Example 2: To initiate ping from one node to another node where both nodes are controlled by the SDN controller, following command can be executed in the SDN controller:
<DeviceName with Device ID> Ping <DeviceName with Device ID> or <DeviceName with Device ID> Ping <IP Address>.
For example, type Router 3 ping Router 4 or Router 4 ping 11.0.0.2 and press Enter.
Figure-2: Pinging Router 4
NOTE: In order to initiate ping between the devices, ICMP protocol which is present in the Network Layer properties of the devices must be set to TRUE.
Excluded Features
Multiple controllers can be configured in NetSim. However, intercontroller communication requires the user to write their own code in NetSim.
Troubleshooting issues in executing SDN commands
When executing SDN commands in the SDN controller, there can be cases where there is no response coming back. Some of the reasons for this are listed below:
SDN Controller and SDN client are unable to communicate (not reachable).
Part of two different networks
Due to the distance between the devices in the case of wireless nodes
Failed TCP connection attempts due to high error or collision
Commands for Controller to the client and response from the client to the controller are passed as TCP packets.
The TCP connection attempt fails if the maximum connection attempt is reached.
High network traffic due to application packets exchanged during the simulation
Some suggestions to resolve issues with SDN command execution are listed below:
Connectivity between the SDN controller and clients should be ensured.
Application start time can be increased to allow necessary SDN commands to be executed prior to application traffic flow which will also avoid contention especially in the case of Wireless devices.
SDN commands can be passed as input via file-based interactive simulation for higher accuracy in terms of the time at which the commands are to be executed.