Concepts / Ethernet and ARP

Ethernet and ARP

Network interface

Also called network card, NIC, eth0, link state, ip link, carrier, LOWER_UP, NO-CARRIER

A card a machine sends and receives through, switched on or off, with or without a live link.

The problem

A machine with an address still sends nothing when its card is switched off or its cable leads nowhere.

  1. ip link lists bob's cards: lo, the machine talking to itself, and eth0, his Ethernet card.
  2. UP says the card is switched on (ip link set eth0 up).
  3. LOWER_UP says its link is live: the cable leads to a working port at the other end.
  4. Pull the far end of the cable and the card stays UP but shows NO-CARRIER: switched on, with nobody to talk to.
Two flags decide whether a card can send
Two flags decide whether a card can send

UP means the card is switched on; LOWER_UP means the link under it is live. A card that is UP with no live link shows NO-CARRIER and still sends nothing.

What you'd see

$ ip link show eth0
16: eth0@if17: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
    link/ether 66:72:05:84:ed:66 brd ff:ff:ff:ff:ff:ff link-netnsid 0
  • UP inside the <…>: bob's card is switched on.
  • NO-CARRIER and state DOWN: no live link, so nothing leaves the card. With the cable back, LOWER_UP stands beside UP and the state is UP.
  • mtu 1500 and link/ether: the largest packet the card carries and its hardware address, both met later in this chapter.

Guess first

Bob switches his card off with ip link set eth0 down. Does his address 10.0.1.11 go away?

Show answer

No. The address stays on the card. The kernel drops every route through the card, and both work again when it is switched back on.

In short

A network interface is the card a machine sends and receives through: eth0 for a cable, wlan0 for Wi-Fi, lo for the machine itself. ip link lists them with two flags: UP, the card is switched on (ip link set eth0 up), and LOWER_UP, its link is live. UP without a link shows NO-CARRIER. A card that is down sends nothing and the kernel drops its routes; its addresses stay.

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 learning