In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to interpret the network connection information displayed by the IP command in linux, which has a certain reference value. Interested friends can refer to it. I hope you can learn a lot after reading this article.
The ip command can tell you a lot about the configuration and status of network connections, but what do all these words and numbers mean? Let's dig a little deeper and see what all the displayed values are trying to tell you.
When you use the ip a (or ip addr) command to get information about all network interfaces on the system, you will see something like this:
$ip A1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 65536 scope host valid_lft forever preferred_lft forever2: enp0s25: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 00:1e:4f:c8:43:fc brd ff:ff:ff:ff:ff : ff inet 192.168.0.24/24 brd 192.168.0.255 scope global dynamic enp0s25 valid_lft 57295sec preferred_lft 57295sec inet6 fe80::2c8e:1de0:a862:14fd/64 scope link valid_lft forever preferred_lft forever
The two interfaces on this system-lo and enp0s25-show a lot of statistics. The lo interface is clearly a loopback address loolback. We can see the loopback IPv4 address (127.0.0.1) and the loopback IPv6 (:: 1) in the list. Ordinary network interfaces are more interesting.
Why enp0s25 and not eth0?
If you want to know why it is called enp0s25 on this system, rather than the probably more familiar eth0, we can explain it a little bit.
The new naming scheme is called "predictable network interface Predictable Network Interface". It has been in use on systemd-based Linux systems for some time. The interface name depends on the physical location of the hardware. En simply means "ethernet", just as "eth" is used to correspond to eth0. P is the bus number of the Ethernet card, and s is the slot number. So enp0s25 tells us a lot about the hardware we are using.
This configuration string tells us:
BROADCAST this interface supports broadcast MULTICAST this interface supports multicast UP network interface is enabled LOWER_UP network cable is plugged in and the device is connected to the network
The other values listed also tell us a lot about interfaces, but we need to know what the words brd and qlen mean. So, what is shown here is the translation of the rest of the ip information shown above.
Mtu 1500 * Transmission unit (packet size) is 1500 bytes qdisc pfifo_fast for packet queuing state UP network interface group default interface group qlen 1000 enabled Transmission queue length MAC (hardware) address of the link/ether 00:1e:4f:c8:43:fc interface brd ff:ff:ff:ff:ff:ff broadcast address inet 192.168.0.24 and24 IPv4 address brd 192.168.0.255 wide Broadcast address scope global Global valid dynamic enp0s25 address is the useful life of dynamically assigned valid_lft 80866sec IPv4 address * lifetime inet6 fe80::2c8e:1de0:a862:14fd/64 IPv6 address scope of preferred_lft 80866sec IPv4 address Link is only valid on this device the useful life of the valid_lft forever IPv6 address the * lifetime of the preferred_lft forever IPv6 address
You may have noticed that some of the information provided by the ifconfig command is not included in the output of the ip a command-- such as statistics for transmitting packets. If you want to see a list of the number of packets sent and received and the number of conflicts, you can use the following ip command:
$ip-s link show enp0s252: enp0s25: mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 link/ether 00:1e:4f:c8:43:fc brd ff:ff:ff:ff:ff:ff RX: bytes packets errors dropped overrun mcast 224258568 418718 84376 TX: bytes packets errors dropped carrier collsns 6131373 78152 000 0
Another ip command provides information about the routing table of the system.
$ip route showdefault via 192.168.0.1 dev enp0s25 proto static metric 100169.254.0.0 metric 16 dev enp0s25 scope link metric 1000192.168.0.0 metric 24 dev enp0s25 proto kernel scope link src 192.168.0.24
The ip command is very generic. You can get useful cheat sheets from the ip command and its options from Red Hat.
Thank you for reading this article carefully. I hope the article "how to interpret the network connection information displayed by the IP command in linux" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.