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

Example Analysis of output Information of route Command under Linux

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article mainly shows you the "sample analysis of the output information of route commands under Linux", which is easy to understand and clear. I hope it can help you solve your doubts. Let me lead you to study and study the "sample analysis of the output information of route commands under Linux".

Using the route command with no parameters will display the real routing table, and the output may be as follows:

Kernel IP routing table

Destination 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 to send network traffic to 192.168.100.0 (the network associated with the eth0 device).

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

The third line 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 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 of the network should be sent to.

The above is all the contents of the article "sample Analysis of the output Information of route commands under Linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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