Appendix B. Ethernet Layer Tools

Table of Contents

B.1. arp
B.2. arping
B.3. ip link
B.3.1. Displaying link layer characteristics with ip link show
B.3.2. Changing link layer characteristics with ip link set
B.3.3. Deactivating a device with ip link set
B.3.4. Activating a device with ip link set
B.3.5. Using ip link set to change the MTU
B.3.6. Changing the device name with ip link set
B.3.7. Changing hardware or Ethernet broadcast address with ip link set
B.4. ip neighbor
B.5. mii-tool

The section here will cover tools which manipulate, display characteristics of or probe Ethernet devices. Because Ethernet is one of the most available and widely spread networking media in use today, we'll concentrate on Ethernet rather than other link layer protocols.

As with any networking stack, the lower layers must be functioning properly in order for the higher layer protocols to operate. The tools covered in this section will provide the resources you need to verify the proper operation of your linux machine in an Ethernet environment.

You probably knew before reading this that you can look at the link light on your Ethernet switch/hub and the link light on your Ethernet card to verify a good connection. Now you can use mii-tool to ask the Ethernet driver if it agrees. Once you have verified a good media connection, you may want to set other link layer characteristics on your Ethernet device. For this, ip link is the perfect tool.

To see if anybody is using an IP address already on the Ethernet to which you are connecting, you can use arping and if you want to play with the arp tables, the arp command is there to help you accomplish your objective.