Applicable for NetSim Pro and NetSim Standard.  For more information on NetSim visit: https://tetcos.com/


Applicable Releases
v10v11v12
v13


When using Windows operating systems, you may need to enable IP routing in order to set up static routing tables using ROUTE.EXE. IP Routing is the process that allows data to cross over a network of computers rather than just one. Routing is often disabled by default in Windows. 


Say, we have three systems, System A, System B, and System C connected to form a network as shown below.




System B runs NetSim Emulator and we have set static routes in System A and System C to route packets via System B. That is, System B is set as the gateway for System A and System C.  If Ping is initiated from System A to System C then it will first reach System B from where it will get routed to System C. This can also be verified using the tracert command which allows tracing the route that packets take to reach the destination.


But this will be possible only if IP Forwarding is enabled in System B to make it operate as a router. 


IP Forwarding enabled in System B


Ping from System A to System B happens as shown below:



Tracert from System A to System B displays the following:



If IP Forwarding is disabled in System B then attempts to Ping System C from System A or System A from System C will fail since System B will not be able to route the packets.


IP Forwarding disabled in System B


Ping from System A to System B fails as shown below:


Tracert from System A to System B fails as shown below



Verifying IP Forwarding settings in a windows machine


This can be verified from the command prompt.

Use the command "netsh interface ipv4 show interfaces" to get a list of interfaces.

From the list of interfaces identify the id of the active connected network interface and use the command "netsh interface ipv4 show interface <if id>" to get a list of parameters associated with that interface.


Check if forwarding is set to enabled. This is required for allowing packet forwarding/routing.


Enabling IP Forwarding in Windows Machine


If Forwarding is disabled, it needs to be manually enabled from the registry editor as explained below:

Open registry editor by typing regedit in the run window as shown below:


In the registry editor browse to  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters as shown below:

Modify the value of the parameter IPEnableRouter from 0 to 1 and close the registry editor window.

Restart your system and again execute the command "netsh interface ipv4 show interface <if id>" to verify whether IP forwarding is enabled.


Note: Use caution with the registry editor when enabling IP routing. If the setup is done incorrectly, it can cause issues with your system that might require a reinstallation of the Windows OS.


Website:  For more information on NetSim visit: https://tetcos.com/