Ethernet and ARP
Network interface
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.
ip linklists bob's cards:lo, the machine talking to itself, andeth0, his Ethernet card.UPsays the card is switched on (ip link set eth0 up).LOWER_UPsays its link is live: the cable leads to a working port at the other end.- Pull the far end of the cable and the card stays
UPbut showsNO-CARRIER: switched on, with nobody to talk to.
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
UPinside the<…>: bob's card is switched on.NO-CARRIERandstate DOWN: no live link, so nothing leaves the card. With the cable back,LOWER_UPstands besideUPand the state isUP.mtu 1500andlink/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.
Read next
- MAC address The 48-bit address of a network card, used to deliver frames within one network.
- IP address A device's address across networks: 32 bits, written as four numbers like 10.0.1.10.
- Network configuration A machine's four network settings: the card up, an address and subnet, a default route, a DNS server.
- Duplex and speed Whether a link's two ends may send at the same time, and how fast: agreed by auto-negotiation, or set by hand.
- Interface counters What a card has counted since it started: packets and bytes each way, and every frame it dropped or found damaged.