Interfaces and Link-layer Neighbors
Quick answer
Network interfaces connect the IP stack to a link or virtual network. Link state, address assignment and neighbor resolution are separate checks.
Prepare the practice environment
Run python3 lab-fixtures/networking/setup.py from the extracted package root as an ordinary user. Enter the printed private path and check pwd. Use a fresh fixture, Bash with LC_ALL=C and set -o pipefail. Python 3 is required for the fixed local socket helper. Use only loopback or synthetic data; never apply sample configuration. Manual examples require an authorized disposable VM.
How it works
An Ethernet MAC address identifies a link-layer endpoint on a local segment. ARP resolves IPv4 neighbors; IPv6 Neighbor Discovery uses ICMPv6. ip link shows administrative flags and operational state; UP does not guarantee carrier. ip neigh displays cached associations, not an inventory of every host. STALE is not necessarily a failure; FAILED indicates a failed resolution attempt. Loopback has no ordinary Ethernet neighbor requirement. ethtool examines supported Ethernet driver/link information; virtual interfaces may not support every query.
Separate three questions: has the administrator enabled the interface, is its link usable, and is the next-hop link-layer address known? For a destination outside the local subnet, neighbor resolution generally concerns the gateway rather than the final destination. A cached neighbor entry can outlive a change in link conditions. Inspect the interface and route together before interpreting a neighbor entry.
Try the examples
Only the loopback interface is inspected.
Expected stdout:
lo:The fixture is fictional, not discovered neighbors.
Expected stdout:
192.0.2.1 dev lab0 lladdr 02:00:00:00:00:01 STALE192.0.2.2 dev lab0 FAILEDA failed entry suggests checking the local link and addressing in an authorized environment.
Expected stdout:
192.0.2.2Common mistakes
Do not flush neighbor caches or change interface state just to diagnose a problem.
Practice
Explain why STALE and FAILED are different; identify the MAC and interface in the first fixture row.
Related references
Study: ip, ethtool. These are reference names, not deployed links.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Interfaces and link-layer neighbors — Knowledge Check
Apply network concepts to loopback, synthetic fixtures and VM-only scenarios.
ARP is normally used for which protocol?
What is STALE?
Does UP guarantee carrier?
What does ip neigh show?