How to Change the IP tables in devices in NetSim using SDN Commands

In the example the IP tables in the nodes and routers on an SDN network are modified using SDN CLI commands. The network model in this example consists of the following configuration:

  • A subnet with 2 wired nodes, 5 routers, and a unicast application running on one of the wired nodes.
  • SDN controller running on one of the router.
  • Set Transport Protocol to TCP in Application icon present in the top ribbon/toolbar. Open Flow protocol is enabled on all wired nodes and routers.
  • A unicast application set from Wired_Node_1 to Wired_Node_2.
  • OSPF is the routing protocol in the routers.
  • The node SDN_Controller is configured to be the SDN controller.
  • Simulation time is set to 500 seconds.
  • Plots, Packet trace, and Event trace is enabled.

To simulate SDN and change the IP tables:
Open NetSim and Select Examples > Software Defined Networks > Internetworks StaticRoute then click on the tile in the middle panel to load the example as shown in below

Figure3-13

The following network diagram illustrates the network setup related to this example as shown below Figure.

Figure3-14

  1. Click on the Application icon present in the top ribbon/toolbar.
    a. CBR Application from Wired Node 1 to Wired Node 2 with 50 Mbps Generation Rate (Packet Size: 1460Bytes, Inter Arrival Time: 233.6µs).
    b. Application Start time is 30 sec.
    c. Set Transport Protocol to TCP.
  2. Plots, Packet Trace and Event Trace features are enabled.
  3. Simulate SDN. To do so:
    a. Click the Run button. The Run Simulation pop-up window appears.
    b. Simulation time is set to 500 Seconds.
    c. In the Run time Interaction tab, Interactive Simulation option is set to True.
  4. Right-click SDN_Controller and click NetSim Console. NetSim simulates SDN.
  5. Interpret the results.
    a. Click View Animation and see the Packet Animation.
    The packets reach Wired_Node_2 via Wired_Node_1 > Router 3 > SDN_Controller > Router 6 as shown in below Figure .
    Figure3-15
    b. Click View Results on the tool bar, Link metrics in the left area and check the Detailed View check box in the Link_Metrics_Table pop-up window.
    You will not see data packet transmissions in Links 2, 3, and 4 as shown in below Figure.
    Figure3-16
  6. Configure static routes on Router_3 such that all traffic bound for the 11.4.1.2 subnet will go to a gateway 11.2.1.2, that is, from Router_3 > Router_4 > Router_5 > Router_6.
    To configure the static routes for Router_3:
    a. Simulate the network again.
    b. Now, right-click SDN_Controller and click NetSim Console.
    Now, the client (NetSimCLI.exe) starts and attempts to establish a connection with NetSimCore.exe.
    NetSim CLI console opens.
    c. Type the following commands on the NetSim CLI console, in the <DeviceName with Device_ID> route add <destination IP address> MASK <subnet mask> <gateway IP address> <metric> if <interface #> format.
    ROUTER_3 route add 11.5.1.2 mask 255.255.255.255 11.2.1.2 metric 1 if 2
    d. (Optional) To check the static routes on ROUTER_3, type ROUTER_3 route print. The following image illustrates step (c) and (d) as shown below Figure.
    Figure3-17
  7. Interpret the results.
    a. Click View Animation and see the Packet Animation.
    b. The packets reach Wired_Node_2 via Router 3 > Router_4 > Router_5 > Router 6.
    c. Click View Results on the tool bar, Link metrics in the left area and check the Detailed
         View check box in the Link_Metrics_Table pop-up window.
         You will see data packet transmissions in Links 2, 3, and 4.
    The following figure illustrates step (7c) as shown in below.
    Figure3-18
    d. In the simulation results window click on the Open Packet trace option in the left area. Once the packet trace opens, apply display filters to the CONTROL_PACKET_TYPE/APP_NAME column to show only OPENFLOW_COMMAND and OPENFLOW_RESPONSE packets.
    You will see that OpenFlow packets flow between Router_3 to SDN_Controller.
  8. In Router_3 under appilication layer use routing protocol as RIP
  9. Configure static routes for Router_3 as follows:
    a. Simulate SDN (Refer step 4).
    b. Right-click SDN_Controller and click NetSim Console.
         Now, the client (NetSimCLI.exe) starts and tries to establish a connection with NetSimCore.exe. NetSim CLI console opens.
    c. Type the following commands on the NetSim CLI console, in the <DeviceName with Device_ID> route add <destination IP address> MASK <subnet mask> <gateway IP address> <metric> if <interface #> format.
    ROUTER_3 route add 11.5.1.2 mask 255.255.255.255 11.6.1.2 metric 1 if 3
  10. Interpret the results.
    a. Click View Animation and see the Packet Animation. The packets reach Wired_Node_2 via Router 3 > SDN_Controller > Router_6.