How to Understand route table information in Windows

Source: Internet
Author: User

When using a vro, you will often encounter problems, which are reflected in the route table information. When this article is about route table information, you may be wondering why I asked you to execute the IPCONFIG/ALL command. The reason for this is that you generally never read the route table information unless your machine has a problem. If you encounter a problem, the best way to diagnose a router failure is to compare the information provided by IPCONFIG with the information stored in the routing table.

The IPCONFIG/ALL screen displays some basic TCP/IP information, such as IP addresses and default gateways. However, the route table information is not so easy to understand. Therefore, I have to spend some time discussing how to read the route table information and what it means. To understand the meaning of the information in these columns, you need to know a little about how the router works. The router works to coordinate the communication between one network and the other. Therefore, a vro contains multiple NICs, each of which is connected to different CIDR blocks.

When a user sends a data packet to a different network segment outside the local machine, the data packet will be sent to the router. The router will decide which network segment the data packet should be forwarded. It does not matter if the router is connected to two or more network segments. The decision-making process is the same, and the decision-making process is based on the route table information. If you want to view the content displayed on the screen after executing the "Route Print" command, you will find that the Route table is divided into five columns. The first column is the destination network address. Lists all the CIDR blocks connected to the vro. The netmask column provides the subnet mask of the network segment, rather than the subnet mask of the network adapter connected to the network segment. This basically allows the router to determine the destination network address class. The third column is the gateway. Once the vro determines the destination network to which the packet will be forwarded, The vro will view the gateway list. The gateway table tells the router which IP address the packet should be forwarded to achieve the destination network.

The interface column tells the vro which Nic is connected to the appropriate destination network. Technically, the interface column only tells the IP address assigned to the NIC by the router. The network adapter connects the router to the destination network. However, the router is very smart and knows which physical Nic the address is bound.

The last column is the measurement. Measurement itself is a science. However, I will try to explain to you briefly what they do. One of the best ways I have heard of interpreting this is to use the airport vocabulary. Imagine that I need to fly from Garot, North Carolina to Miami, Florida. Because Garot airport is very large, I have many options to go to Miami. I can take a flight from Northwest Airlines. The flight took me to Detroit in Michigan and then flew from Detroit to Miami. I can also fly to Houston on a continental airline flight and then to Miami. Another option is to fly directly to Miami on an American Airline plane. Which line should I choose? In real life, there are many factors worth considering, such as the plane ticket price and departure time. However, let's assume that everything is the same. If the flights are the same except for the routes, I will select the least stopover flights. It will make me reach the destination at the fastest speed. Due to the small number of stays, there will be fewer opportunities for problems in connection, and problems such as lost luggage will also be reduced.

Routing works in the same way. In many cases, a vro has many ways to send a data packet. In this case, it is meaningful to send data packets in the shortest (or the most reliable) path. This is where measurement plays a role. Windows generally does not view measurement columns unless there are many paths to a destination. If there are multiple paths, Windows will view the measurement column to determine the shortest path. This is a very simple explanation. However, this explanation illustrates the key points.

Additional Route Selection

The F switch is optional. This switch tells Windows to clear all gateway input records in route table information. If this-F switch is used with other commands, all gateway input records will be cleared before other commands in this command are executed. The-p switch keeps the specified route unchanged. Generally, when the server is restarted, any ROUTE you specify using the "ROUTE" command will be deleted. The-p switch tells Windows to retain this route, even if the system restarts. The command section of the "ROUTE" command parameter is relatively simple. This command set contains four options: PRINT, ADD, DELETE, and CHANGE. I have introduced the "ROUTE PRINT" command to you. This command contains other options. For example, you can use wildcards with this command. For example, if you only need to output a ROUTE related to the 192. x subnet, you can use this command: "route print 192 *".

The "route delete" command works very similar to "route print. Simply enter the "route delete" command, and then enter the destination address and gateway you want to DELETE from the ROUTE table information. For example, if you want to DELETE the 192.0.0.0 gateway, you can enter this command: "route delete 192.0.0.0 ". The basic parameters of the "route change" and "route add" commands are the same. When you enter this command, you must specify the destination, subnet mask, and gateway. You can also specify a measurement and an interface. However, this is optional. For example, if you want to ADD a destination using the lowest parameter, you can enter the following command: route add 147.0.0.0 255.0.0.0 148.100.100.100

In this command, 147.0.0.0 is your newly added destination address. 255.0.0.0 is the subnet mask of the destination address, and 148.100.100.100 is the gateway. You can use the METRIC and IF parameters to expand the functionality of this command. For example: route add 147.0.0.0 255.0.0.0 148.100.100.100 METRIC 1 IF 1, measurement of this parameter can be selected. However, it specifies the number of measurement or route hops. The IF parameter indicates which Nic is used by Windows. In this special case, Windows uses the NIC bound to Windows as interface 1. IF you do not use the IF parameter, Windows will search for the best available Nic.

Conclusion

In this article, I explained how to use the "ROUTE" command to display Windows ROUTE tables, and how to modify these ROUTE table information if necessary. If you need some extra help, enter "ROUTE /?" Command to get more parameter examples.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.