Cut to the chase: So which is it? Is an IP assigned to an interface, link, or device? What distinguishes these three things? Caveat: This is a critical review of the iproute2 utilities or documentation thereof, to gain a better understanding of them (mainly, ip
).
It is often the case the networking books refer to these terms
- link
- device
- interface
The route2 utility ip
documentation defines link as follows:
link --- physical or logical network device.
Elsewhere...
A link refers a network device.
dev NAME --- name of the device to which we add the address
Commands like this assign ip addresses to "devices":
ip addr add 10.0.0.1/24 brd + dev eth0
Commands like this start "interfaces"
ip link set eth0 up
Compare the aforementioned with the following excerpts from reputable sources:
The boundary between the host and the physical link is called an interface.
Computer Networking: A Top-Down Approach by Kurose & Ross 7th Edition, p. 363.
Also
The boundary between the router and any one of its links is also called an interface.
Computer Networking: A Top-Down Approach by Kurose & Ross 7th Edition, p. 363.
Later,
[...] an IP address is technically associated with an interface, rather than with the host or router containing that interface.
My thinking
This is ambiguous. Is it fair to say that a device and interface are the same? Or does a device implement an interface? If so, then it would mean that a word like physical interface might refer directly to the device, and truly mean the same thing.
I would understand a link as the physical wire or simulated wire (wireless protocol like 802.11). By the way, I didn't even mention the term "link layer".
eth0
in my question is referred to in iproute2 docs as both an "interface" and a "device", and to confuse matters even more, it defines "link" as a network "device".eth0
is then both a layer-3 device and an interface with an IP address (and, if we follow iproute2 definitions--a link too!). I am not sure I can accept your answer, but I'll upvote it. It does not fully disambiguate the terms or address the confusion. e.g. "dev NAME - name of the device to which we add the address" conflicts with this. – Jonathan Komar Feb 20 '22 at 14:13iproute2
is arguably the de facto standard in Linux, I figured the authors could take the heat. We're on the same wavelength with regards to "link up". – Jonathan Komar Feb 20 '22 at 15:22