Originally from: http://www.cnblogs.com/lightnear/archive/2013/02/03/2890835.html
One, the Windows Routing table interpretation
Route print-4
===========================================================================interface List 19...78 DD a4 f4 ...... Bluetooth Device (Personal area Network)11...00 5b FC ..... Intel (R) Centrino (r) advanced-n 6200AGN 13...f0 de F1f4 ... Intel (R) 82577LM Gigabit Network Connection 15...00 C0 00 01 ... VMware Virtual Ethernet Adapter for VMnet1 16...00 c0 00 08 ... VMware Virtual Ethernet Adapter for VMnet8 1...........................Software Loopback Interface 1 23...00 00 00 00 00 E0 Microsoft ISATAP Adapter 12...00 (xx) E0 Teredo Tunneling Pseudo-Interface 00 00 00 00 00 00 E0 Microsoft ISATAP Adapter #2 17...00, E0 ISATAP Adapter #4 20...00, E0 MICR, XX Osoft ISATAP Adapter #5 22...00-xx e0 Microsoft ISATAP Adapter #6 ========================================== =================================ipv4 Route table=============================================================== ============active routes:network Destination Netmask Gateway Interface Metric 0.0.0.0 0.0.0.0 192.168.0.1 192.168.1.12 26 10.108.0.0 255.255.0.0 10.108.58.1 10.108.58.18 10.108.58.0 255.255.255.0 on-lInk 10.108.58.18 276 10.108.58.18 255.255.255.255 on-link 10.108.58.18 276 10.108.58.255 255.255.255.255 on-link 10.108.58.18 276 127.0.0.0 255.0.0.0 on-link 127.0.0 .1 306 127.0.0.1 255.255.255.255 on-link 127.0.0.1 306 127.255.255.255 255.255.255.255 On-link 127.0.0.1 306 172.16.0.0 255.255.0.0 10.108.58.1 10.108.58.18 21 192. 168.0.0 255.255.252.0 on-link 192.168.1.12 281 192.168.1.12 255.255.255.255 On-link 1 92.168.1.12 281 192.168.3.255 255.255.255.255 on-link 192.168.1.12 281 192.168.10.0 255.255. 255.0 on-link 192.168.10.1 276 192.168.10.1 255.255.255.255 on-link 192.168.10.1 276 192.168.10.255 255.255.255.255 on-link 192.168.10.1 276 192.168.159.0 255.255.255.0 On-li NK 192.168.159.1276 192.168.159.1 255.255.255.255 on-link 192.168.159.1 276 192.168.159.255 255.255.255.255 O N-link 192.168.159.1 276 224.0.0.0 240.0.0.0 on-link 127.0.0.1 306 224.0.0. 0 240.0.0.0 on-link 10.108.58.18 276 224.0.0.0 240.0.0.0 on-link 192.168. 159.1 276 224.0.0.0 240.0.0.0 on-link 192.168.10.1 276 224.0.0.0 240.0.0.0 On-link 192.168.1.12 281 255.255.255.255 255.255.255.255 on-link 127.0.0.1 306 255.2 55.255.255 255.255.255.255 on-link 10.108.58.18 276 255.255.255.255 255.255.255.255 On-link 192.168.159.1 276 255.255.255.255 255.255.255.255 on-link 192.168.10.1 276 255.255.255.255 255.255 .255.255 On-link 192.168.1.12 281========================================================================= ==persistent Routes:neTwork address Netmask Gateway address Metric 172.21.10.0 255.255.255.0 172.16.56.190 1 1 0.108.0.0 255.255.0.0 10.108.58.1 1 172.16.0.0 255.255.0.0 10.108.58.1 1============ ===============================================================
Interface list: Network card lists
Active Routes: Active routing
Network Destination: Destination network segment
Netmask: Subnet mask, together with the destination network segment, defines the network address to which this route applies
Gateway, also known as the next-hop router, when sending an IP packet, the gateway defines the destination address for a specific network, the next-hop server to which the packet is sent
Interface: Interface, interface defines the network interface that the local computer uses to send packets for a specific network destination address
Metric: Hop count, hop count is used to indicate the cost of the route, typically representing the number of hops required to reach the destination address, and a hop count represents the passing of a router. Lower hop count means lower routing cost, higher priority
Persistent Routes: Manually configure static routes
Second, the Windows Routing command
Manipulates network routing tables. ROUTE [-f] [-P] [ -4|-6] command [destination] [MASK netmask] [gateway] [METRIC METRIC] [IF interface] -F Clears the routing tables of all gateway entries. If this was used in conjunction with one of the commands, the tables was cleared prior to Runni ng the command. -p when used with the ADD command, makes a route persistent across boots of the system. By default, routes was not preserved when the system was restarted. Ignored for all and commands, which always affect the appropriate persistent routes. This option isn't supported in Windows 95. -4 force using IPV4. -6 force using IPV6. Command one of These:print Prints a route ADD Adds a route DELETE Deletes a route change modifies an existing route destination SpeCifies the host. MASK specifies that's the next parameter is the ' netmask ' value. netmask Specifies a subnet mask value for this route entry. If not specified, it defaults to 255.255.255.255. Gateway specifies Gateway. Interface the interface number for the specified route. METRIC Specifies the METRIC, ie. Cost for the destination. All symbolic names used for destination is looked up in the network Databasefile NETWORKS. The symbolic names for Gateway is looked up in the host Namedatabase file HOSTS. If the command is PRINT or DELETE. Destination or gateway can be a wildcard, (wildcard are specified as a star ' * '), or the gateway argument may be omitted. If Dest contains a * or?, it is treated as a shell pattern, and onlymatching destination routes are printed. The ' * ' matches any string,and '? ' matches any one char. examples:157.*.1, 157.*, 127.*, *224*. Pattern match is a allowed in PRINT command. Diagnostic notes:invalid MASK generates An error, which is when (DEST & MASK)! = DEST. Example> Route ADD 157.0.0.0 Mask 155.0.0.0 157.55.80.1 IF 1 The route addition failed:the specified MASK parameter is invalid. (Destination & Mask)! = Destination.examples: > Route PRINT > Route PRINT-4 > Route PRINT-6 ; Route PRINT 157* .... Only prints those matching 157* > route ADD 157.0.0.0 MASK 255.0.0.0 157.55.80.1 METRIC 3 IF 2 Destinat ion^ ^mask ^gateway metric^ ^ interface^ If IF is isn't given, it tries to find the best interface for a given gateway. > Route ADD 3ffe::/32 3ffe::1 > route change 157.0.0.0 MASK 255.0.0.0 157.55.80.5 METRIC 2 IF 2 change is US Ed to modify gateway and/or metric only. > route Delete 157.0.0.0 > route delete 3ffe::/32
Route print: Print the current routing table
Route Delete: Delete a route
Route add: Adds a route that, if finally added with the –P option, means that static routes are permanently added and will not expire after reboot
Route change: Changing a route
Three, two network card configuration real
1. Network environment:
Wired: Can connect to company Intranet , can't connect to Internet
Wireless: Can connect the Internet, can not connect the company intranet default gateway to 192.168.0.1
Our goal is to connect both networks at the same time and automatically select the routing to enable both intranet and Internet access.
2. Configuration
: Delete the default settings for route delete 0.0.0.0: Outside the network by, the full walk wireless route add 0.0.0.0 mask 0.0.0.0 192.168.0.1–p: The company intranet all in the 10.108.*.* network segment, add this route add 10.108.0.0 Mask 255.255.0.0 10.108.58.1-p
It is that simple, the result is as follows (there are several other routing configurations for other purposes)
Ping, try it.
Windows routing Table configuration: Dual NIC on both internal and external networks