The idea
A gateway Router, a laptop, a desk phone and a printer each have one cable to officeSwitch, a Switch. Every device tells its neighbour who it is, on every cable, one hop only.
Steps
-
The switch's view: who is on each port
A switch moves frames without knowing what sits at the end of each cable, unless the devices tell it. Four devices hang off officeSwitch, one cable each. Ask the switch who is on each port.
officeSwitch:~# lldpcli show neighbors summary
-
An LLDP frame, field by field
One announcement, read field by field, shows what a device gives away and why it goes no further. Record one as it reaches the laptop from the switch, then read the gateway's table.
laptop:~# tcpdump -envi eth0 -c 1 -Q in ether proto 0x88cc gateway:~# lldpcli show neighbors summary
Pro
2 more steps in the app
- LLDP-MED: the phone learns its voice VLAN
- What every port gives away