|Applicable Versions||NetSim Standard||NetSim Pro|
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 tracert command which allows to trace the route that packets take to reach the destination.
But this will be possible only if IP Forwarding is enabled in System B so that it can act 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 happens as shown below:
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 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 set up is done incorrectly, it can cause issues with your entire system and might even require a complete reinstall of Windows operating system.