Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the meaning of route command output information in Linux

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

The purpose of this article is to share with you what route command output information means in Linux. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Using the Linux route command without any parameters under Linux will display the real routing table, and the output may be as follows:

Kernel IP routing tableDestination Gateway Genmask Flage Metric Ref Use Iface

192.168.100.0 * 255.255.255.0 U 00 etn0

127.0.0.0 * 255.255.255.0 U 0 000 l0

Default 192.168.100.5 0.0.0.0 UG 00 0 eth0

The output on this host consists of three lines (below the header line):

The ◆ * line indicates where network traffic destined for 192.168.100.0 (the network associated with the eth0 device) is sent.

The second line of ◆ indicates where to send network traffic to 127.0.0.1 (localhost or self-ring network device address).

The third line of the ◆ indicates where to send data other than the above two; because the system does not know how to reach the sending address of these packets, these packets must pass through the gateway.

Take another look at the columns of the output of the Linux route command:

◆ Destination: the network range used by the routing table entry. If the destination address of an IP packet is some part of the network of a line in the route output, then this entry will be used to route the packet.

◆ Gateway: refers to a host that accepts packets sent to a specified Destination. Because this output is from a host (not a computer that acts as a dedicated router), the routing field can be an asterisk (*) or a default gateway; an asterisk indicates that the Destination is on the network to which the host belongs (and therefore no routing is required), and the default gateway refers to a specified IP to which all non-local traffic is sent.

◆ Flags:9 single-letter flag bits that represent information about routing table entries. U indicates that the route is started; G indicates that the route points to the gateway, and most other flags (which can be found in the online help manual of the route command by typing manroute) are used only for specialized routers, not a stand-alone machine, indicating how routes are created and updated through the routing daemon.

◆ Metric: the number of transfers (the number of routers) required to reach the specified network, which is not useful in the Linux kernel.

◆ Ref: the number of references to this route, which is not useful in the Linux kernel.

◆ Use: the number of times this router has been searched by routing software, you can roughly estimate the network traffic to a specified network address.

◆ Iface: indicates the destination address and specifies which network excuse the packets from the network should be sent to.

Thank you for reading! This is the end of the article on "what is the meaning of the output information of route commands in Linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report