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
Example output:
$ ip addr
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
In the output you can find a bunch of useful information about each of the interfaces:
1: lo
– interface index and name (lo stands for loopback)<LOOPBACK,UP,LOWER_UP>
– statuses of the interface. For other interfaces, you may find here values likeBROADCAST
,MULTICAST
etc.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)qdisc noqueue
– the queuing disciplinestate UNKNOWN
– state of the interface (here UNKNOWN, but for other interfaces may be UP or DOWN)group default
– group name that this interface belongs toqlen 1000
– length of the transmit queue (in this case it’s 1000 packets)link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
– MAC address and broadcast addressinet 127.0.0.1/8 scope host lo
– IPv4 address with netmask (127.0.0.1/8) scope (host)inet6 ::1/128 scope host
– IPv6 address with netmask (::1/128) and scope (host)