Original Article Is From :- http://windowsitpro.com/networking/q-when-i-add-static-ip-route-what-value-do-i-use-interface
For Windows 7 , You need to run command prompt as Administrator !!!
A. The Windows IP subsystem uses IP configuration information (e.g., subnets, gateways) to automatically create a routing table that dictates how the OS will send IP packets to other host systems.
Related: IP Configuration Selection and Windows Interface Changes
To view the routing table on your system, open a command prompt and type
route print
You'll see a routing table similar to the following sample table:
=======================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...00 10 a4 8b 4b 8e ...... Intel(R) PRO/100+ MiniPCI - Packet Scheduler Miniport
0x4 ...44 45 53 54 42 00 ...... Nortel IPSECSHM Adapter - Packet Scheduler Miniport
0x20003 ...00 04 5a 0c 96 db ...... Instant Wireless - Network PC CARD #2 - Packet Scheduler Miniport
=======================================================================
=======================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.100 30
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
192.168.1.0 255.255.255.0 192.168.1.100 192.168.1.100 30
192.168.1.100 255.255.255.255 127.0.0.1 127.0.0.1 30
192.168.1.255 255.255.255.255 192.168.1.100 192.168.1.100 30
224.0.0.0 240.0.0.0 192.168.1.100 192.168.1.100 30
255.255.255.255 255.255.255.255 192.168.1.100 2 1
255.255.255.255 255.255.255.255 192.168.1.100 192.168.1.100 1
255.255.255.255 255.255.255.255 192.168.1.100 4 1
Default Gateway: 192.168.1.1
=======================================================================
Persistent Routes:
None
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...00 10 a4 8b 4b 8e ...... Intel(R) PRO/100+ MiniPCI - Packet Scheduler Miniport
0x4 ...44 45 53 54 42 00 ...... Nortel IPSECSHM Adapter - Packet Scheduler Miniport
0x20003 ...00 04 5a 0c 96 db ...... Instant Wireless - Network PC CARD #2 - Packet Scheduler Miniport
=======================================================================
=======================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.100 30
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
192.168.1.0 255.255.255.0 192.168.1.100 192.168.1.100 30
192.168.1.100 255.255.255.255 127.0.0.1 127.0.0.1 30
192.168.1.255 255.255.255.255 192.168.1.100 192.168.1.100 30
224.0.0.0 240.0.0.0 192.168.1.100 192.168.1.100 30
255.255.255.255 255.255.255.255 192.168.1.100 2 1
255.255.255.255 255.255.255.255 192.168.1.100 192.168.1.100 1
255.255.255.255 255.255.255.255 192.168.1.100 4 1
Default Gateway: 192.168.1.1
=======================================================================
Persistent Routes:
None
Occasionally, the automatically generated routing table will be inaccurate and you might want to use the Route Add command to force a particular route for some IP traffic. You can obtain information about this command by typing
route /?
at the command prompt, but the basic syntax is
route \[-p\] add mask metric if
For example,
route -p add 0.0.0.0 mask 0.0.0.0 192.168.1.1 metric 1 if 0x20003
This sample command uses the -p option to add a persistent route (i.e., 0.0.0.0) that will still be in place, even after a reboot, to all destinations. This persistent route will use the 192.168.1.1 gateway with the highest priority (i.e., metric 1) on interface 0x20003 (i.e., wireless network). The last piece of this information is the interface. Determining which value to use for the interface can sometimes be confusing. Basically, you use the Interface List value that appears in the first part of the routing table. In the sample table above, the valid values are 0x1, 0x2, 0x4, and 0x20003. Although this information is easy to obtain, the first part of the routing table often scrolls off screen, leaving users unsure of what value to use.
No comments:
Post a Comment