On some system connected to complex and complicated network, administrator may require to configure a more advanced network topology with additional routing routes requirement. For example, customized route is required when the NIC interface does not know where to route to an IP address on network segment which does not belong to the same subnet, such as router at 192.168.1.1 to access node on 10.1.1.1 and subnet mask of 255.255.255.0. In any cases, administrator or user can add a route into TCP/IP Routing Table using DOS command prompt with route command.
Add IP Route Rules into Windows Routing Table in Command Prompt with Route Command
1. Click Start -> Run (or at Start Search in Windows Vista or Windows 7), and type in Cmd, then press Enter to open a command prompt window.
2. The syntax of route command to add a routing table entry:
route ADD [destination IP address or subnet] MASK [subnet mask] [gateway IP address] [metric] IF [interface]
Not all parts of the syntax is mandatory. Some if optional, such as metric and network interface.
Example command to add a route to 10.1.1.0/24 subnet network through 192.168.1.8 gateway router:
route ADD 10.1.1.0 MASK 255.255.255.0 192.168.1.8
To make the route persistent across boots of the system, use -p flag in addition to route add command. Else, the route is not preserved once system restarts. For example:
route -p ADD 10.1.1.0 MASK 255.255.255.0 192.168.1.8
Note: route help will display different commands and switches supported by route command.
3. Press Enter to execute the route command.
4. View the routing table to verify that the new route rule is added correctly.
Add IP Route Rules into Windows Routing Table in Command Prompt with Route Command
1. Click Start -> Run (or at Start Search in Windows Vista or Windows 7), and type in Cmd, then press Enter to open a command prompt window.
2. The syntax of route command to add a routing table entry:
route ADD [destination IP address or subnet] MASK [subnet mask] [gateway IP address] [metric] IF [interface]
Not all parts of the syntax is mandatory. Some if optional, such as metric and network interface.
Example command to add a route to 10.1.1.0/24 subnet network through 192.168.1.8 gateway router:
route ADD 10.1.1.0 MASK 255.255.255.0 192.168.1.8
To make the route persistent across boots of the system, use -p flag in addition to route add command. Else, the route is not preserved once system restarts. For example:
route -p ADD 10.1.1.0 MASK 255.255.255.0 192.168.1.8
Note: route help will display different commands and switches supported by route command.
3. Press Enter to execute the route command.
4. View the routing table to verify that the new route rule is added correctly.
Comments
Post a Comment