Linux network knowledge: analyze the route table-Linux Enterprise Application-Linux server application information. For details, see the following section. Each machine on the network has a route table, which lists some networks and corresponding gateway machines. To select the route for the packet to be transmitted to a specific machine, the IP address first looks at the network part of the destination address. If there is a record of this network in the route table, the IP address selects the packet to be transmitted through the corresponding gateway. Otherwise, the packet is transmitted through the default gateway.
The following uses the netstat-nr command to view the route table information:
Destination Gateway add Flags RefCnt use Iface
129.18.76.0 129.18.76.21 UN 0 23442 ETH0
Default 129.18.76.99 UGN 0 23442 eth0
127.0.0.1 127.0.0.1 UH 0 232 LO
129.18.76.21 127.0.0.1 UH 0 232 LO
The first entry in the route table indicates the network of the Local Machine 129.18.76. Any packets sent from the local machine to this network will go through 129.18.76.21.
The second is the default route, which is applicable to packages where the destination network or node address is not in the route table. In this example, 129.18.76.99 is the only way for subnet 129.18.76 to communicate with other networks.
The third address is 127.0.0.1 and several loopback addresses. This address applies when the machine wants to establish a TCP/IP connection with itself. It uses lo as the interface device.
The last one indicates the IP address of the local machine. It uses 127.0.0.1 as its gateway.
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