Concepts / Ethernet and ARP

Ethernet and ARP

Interface counters

Also called show interfaces, ip -s link, input errors, CRC, runts, giants, output drops, input queue drops, carrier transitions, flap, txload

What a card has counted since it started: packets and bytes each way, and every frame it dropped or found damaged.

The problem

A link that loses some frames still looks up, so the only sign is in the numbers its card keeps.

  1. From the moment it starts, alice's card counts every packet and byte it receives (RX) and sends (TX).
  2. It also counts what went wrong: frames that arrived damaged (crc) or the wrong size (length), and packets thrown away for lack of room (dropped).
  3. The numbers only grow, so read them, send some traffic, and read them again.
  4. A number that grew between the two readings is the problem now; one that stayed the same is history.
Damage is counted where it arrives
Damage is counted where it arrives

A damaged frame is counted by the card it arrives at, as a CRC error; the sender only sees replies go missing, so read the counters at both ends. From the Cable and interface errors: read a port's state and counters, and find the bad link lab.

What you'd see

$ ip -s -s link show eth0
14: eth0@if15: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 1e:fa:0f:8d:39:1e brd ff:ff:ff:ff:ff:ff link-netnsid 0
    RX:  bytes packets errors dropped  missed   mcast
          4378      36      0       0       0       0
    RX errors:  length    crc   frame    fifo overrun
                     0      0       0       0       0
    TX:  bytes packets errors dropped carrier collsns
          2442      14      0       0       0       0
    TX errors: aborted   fifo  window heartbt transns
                     0      0       0       0       2
  • RX: row: 36 packets (4378 bytes) received since the card came up; the TX: row, 14 sent.
  • errors, dropped and the RX errors row are all 0: nothing damaged, nothing thrown away.
  • transns 2: the link changed state twice since the card was made (carrier transitions). A number that keeps climbing is a link going down and up, a flap.

Guess first

Pings to bob lose about 1 in 10, and alice's crc count grows between two readings. Where do you look first?

Show answer

At the cable and the two ports. CRC errors are frames damaged on the way in: a bad cable, noise, or a duplex mismatch. A full link would show dropped instead.

In short

IOS shows them in show interfaces, Linux in ip -s -s link. CRC errors are frames that arrived damaged (the FCS did not match): a bad cable, noise, or a duplex mismatch. Runts are frames shorter than 64 bytes, giants longer than the MTU allows. Input errors add these up. Output drops are packets the queue in front of the card had no room for: the link is full. Carrier transitions count the link going down and up, a flap. A rate is two readings of the byte counters over time. The counters only grow, so read them twice and compare (or clear counters on IOS first).

See it on real machines

Read next

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Sign in with Google or email to start.

Start this lab