Lets look at some of the common use cases of the ip command in Linux.

The route with the lower metric is preferred in this case.

The devens33andens37indicate the interface which will be used to send the packets to the router.

ethernet cables plugged

Theproto dhcpfields indicate the default route is learned from DHCP.

The second entry represents the APIPA address (Automatic Private IP Addressing)169.254.0.0/16.

It lets them communicate with other hosts in the subnet that have also failed to obtain the IP address.

ip addr command

The third and fourth entries show the internet addresses of the local networks to which the system is connected.

The192.168.10.0is the web connection that interfaceens37is attached to while the192.168.42.0is the networkens33is attached to.

Thesrcfield indicates the IP address of the interface used as the source address when sending packets through this route.

brief display of IP addresses

ip link show brief output

change mac address

interface statistcis

set mtu of interface

add IP address to interface

ip route command

ip route command

display route for an IP address

ip neighbour command

add color to ip command