View route table Analysis

Source: Internet
Author: User

View the route table analysis target is the target host, subnet address, network address, or default route. The default route destination is 0.0.0.0. The combination of the netmask and the target determines the time when the route is used. For example, the host route mask is 255.255.255.255, the default route mask is 0.0.0.0, And the subnet or network route mask is between these two limit values. Mask 255.255.255.255 indicates that only precisely matched targets use this route. The mask 0.0.0.0 indicates that any target can use this route. When the mask is written in binary form, 1 indicates important (must match), and 0 indicates unimportant (no need to match ).
For example, the network mask of the target 172.16.8.0 is 255.255.248.0. This netmask indicates that the first two eight-bit bytes must be exactly matched, the first five of the third eight-bit bytes must be matched (248 = 11111000), and the last eight-bit bytes are irrelevant. The third eight-byte 172.16.8.0 (8) is 00001000 of the binary format. Do not change the first five digits (the blocked part displayed in "bold"), up to 15 or 00001111 in binary format. Therefore, routes with the target of 172.16.8.0 and the mask of 255.255.248.0 are applied to all data packets that need to reach 172.16.8.0 through 172.16.15.255. The gateway is the IP address of the next vro to which data packets are sent. On a LAN link (such as an Ethernet or card ring), the router must directly connect to the Gateway by using the interface shown in the interface bar. On the LAN connection, the gateway and interface determine the router forwarding mode at the same time. The gateway address cannot be configured for the request dialing interface. In point-to-point connections, the interface determines the router forwarding mode. The www.2cto.com interface indicates the LAN or request dialing interface used to connect to the next vro. The number of hops indicates the relative cost of using a route to reach the target. The common metric is the hop or the number of routers that pass to the target location. If there are multiple routes with the same target location, the route with the lowest number of hops is the best route. Example: [plain] Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 255.0.0.0.0 255.255.0.0 U 0 0 eth1 172.16.0.0 255.255.255.255.0.0 UG 0 0 0 0 eth1 0.0.0.0 255.255.0.0 U 0 0 eth1 0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
Author huang_xw

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.