Configuring Static Routing in NetSim

Static Routing

Routers forward packets using either route information from route table entries that configured manually or the route information that is calculated using dynamic routing algorithms. Static routes, which define explicit paths between two routers, cannot be automatically updated; you must manually reconfigure static routes when network changes occur. Static routes use less bandwidth than dynamic routes. No CPU cycles are used to calculate and analyze routing updates.

Static routes are used in environments where network traffic is predictable and where the network design is simple. You should not use static routes in large, constantly changing networks because static routes cannot react to network changes. Most networks use dynamic routes to communicate between routers but might have one or two static routes configured for special cases. Static routes are also useful for specifying a gateway of last resort (a default router to which all unrouteable packets are sent).

How to Setup Static Routes

In NetSim, static routes can be configured either prior to the simulation or during the simulation.

Static route configuration prior to simulation:

  • Via static route GUI configuration
  • Via file input (Interactive-Simulation/SDN)

Static route configuration during the simulation:

  • Via device NetSim Console (Interactive-Simulation/ SDN)

Static route configuration via GUI

Open NetSim, Select Examples->Internetworks->Configuring Static Route then click on the tile in the middle panel to load the example as shown in Figure.

Figure4-34

The following network diagram illustrates what the NetSim UI displays when you open the example configuration file for Configuring Static Routing in NetSim as shown below Figure.

Figure4-35

Network Settings

  1. Environment Grid length: 500m * 500m.
  2. Create a Scenario as shown in above screenshot.
  3. Generate CBR Traffic Between Wired node 6 and Wired node 7 and set the transport layer protocol as UDP.
  4. The default routing protocol is OSPF in application layer of Routers.
  5. Wired link Properties are default.
  6. Enable packet trace and plots.
  7. Run simulation for 10 seconds.
  8. Observe in Animation Window packet flows from Wired Node 6 -> Router 1-> Router 5-> Router 4-> Wired Node 6 as shown in below Figure.

    Figure4-36

With Static Route#

Static routing configuration

  1. Open Router 1 properties->Network_Layer. Enable - Static IP Route ->Click on Configure Static Route IP and set the properties as per the screenshot below and click on Add and then click on OK.
    Figure4-37
    Router 1:
    route ADD 11.7.0.0 MASK 255.255.0.0 11.1.1.2 METRIC 1 IF 1 route ADD destination_ip MASK subnet_mask gateway_ip METRIC metric_value IF Interface_Id
    where
    route ADD: command to add the static route.
    destination_ip: is the Network address for the destination network.
    MASK: is the Subnet mask for the destination network.
    gateway_ip: is the IP address of the next-hop router/node.
    METRIC: is the value used to choose between two routes.
    IF: is the Interface to which the gateway_ip is connected. The default value is 1.
  2. Similarly Configure Static Route for all the routers as given in below Table.

    Devices NetworkDestination Gateway Subnet Mask Metrics Interface ID
    Router 1 11.7.0.0 11.1.1.2 255.255.0.0 1 1
    Router 2 11.7.0.0 11.2.1.2 255.255.0.0 1 2
    Router 3 11.7.0.0 11.3.1.2 255.255.0.0 1 2
    Router 4 11.7.0.0 11.7.1.2 255.255.0.0 1 3
  3. After configuring the router properties.

  4. Run the simulation for 10 seconds and check packet animation window.
  5. Observe in Animation Window packet flows from Wired Node 6 -> Router 1-> Router 2-> Router 3-> Router 4-> Wired Node 7 as shown in below Figure

Figure4-38

Disabling Static Routing

  • If static routes were configured via GUI, it can be manually removed prior to the simulation from the Static IP Routing Dialogue or from the file input.
  • If static routes were configured during the run time, the entries can be deleted using route delete command during runtime.