DEV Community

Cover image for How to read ip addr output on Linux
pikoTutorial
pikoTutorial

Posted on β€’ Originally published at pikotutorial.com

How to read ip addr output on Linux

Welcome to the next pikoTutorial !

ip command was designed to replace older networking tools like ifconfig, route or netstat. To show all the network interfaces use command:

ip addr
Enter fullscreen mode Exit fullscreen mode

Example output:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
Enter fullscreen mode Exit fullscreen mode

In the output you can find a bunch of useful information about each of the interfaces:

  1. 1: lo - interface index and name (lo stands for loopback)
  2. <LOOPBACK,UP,LOWER_UP> - statuses of the interface. For other interfaces, you may find here values like BROADCAST, MULTICAST etc.
  3. mtu 65536 - the maximum transmission unit size for the interface (in this case it's 65536 bytes, but e.g. for Ethernet networks 1500 is a typical value)
  4. qdisc noqueue - the queuing discipline
  5. state UNKNOWN - state of the interface (here UNKNOWN, but for other interfaces may be UP or DOWN)
  6. group default - group name that this interface belongs to
  7. qlen 1000 - length of the transmit queue (in this case it's 1000 packets)
  8. link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 - MAC address and broadcast address
  9. inet 127.0.0.1/8 scope host lo - IPv4 address with netmask (127.0.0.1/8) scope (host)
  10. inet6 ::1/128 scope host - IPv6 address with netmask (::1/128) and scope (host)
Retry later

Top comments (0)

Image of Docusign

πŸ› οΈ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more