Link Layer Discovery Protocol (LLDP) is the open standard (IEEE 802.1AB) means of discovering neighbors over the link layer (Layer 2 [L2]). Let’s take a look at LLDP in action and see what you might need to do to make it work with other vendors’ devices.
To show a bit of intervendor compatibility, I’ve connected my Arista 7010T switch to an old Cisco 3750. The connection is between G1/0/52 on the 3750 and e24 on the Arista. When I turn up the port, I get the following message on the Arista console:
Apr 10 23:21:35 Arista Lldp: %LLDP-5-NEIGHBOR_NEW: LLDP neighbor with chassisId 001c.b084.cfb4 and portId "[ Arista e24 ]" added on interface Ethernet24
Without configuring anything, the Arista switch has discovered the Cisco switch, even though the Arista switch is not running Cisco Discovery Protocol (CDP). Let’s dig in and see what Arista sees:
Arista-7010T#sho lldp LLDP transmit interval : 30 seconds LLDP transmit holdtime : 120 seconds LLDP reinitialization delay : 2 seconds LLDP Management Address VRF : default Enabled optional TLVs: Port Description System Name System Description System Capabilities Management Address (best) IEEE802.1 Port VLAN ID IEEE802.3 Link Aggregation IEEE802.3 Maximum Frame Size Port Tx Enabled Rx Enabled Et1 Yes Yes Et2 Yes Yes Et3 Yes Yes Et4 Yes Yes Et5 Yes Yes Et6 Yes Yes Et7 Yes Yes Et8 Yes Yes Et9 Yes Yes Et10 Yes Yes [--snippage--] Et45 Yes Yes Et46 Yes Yes Et47 Yes Yes Et48 Yes Yes Et49 Yes Yes Et50 Yes Yes Et51 Yes Yes Et52 Yes Yes Ma1 Yes Yes Arista-7010T#
That’s pretty boring. I’d rather see what switches are connected where, so let’s use the show lldp neighbors
command:
Arista-7010T#sho lld nei Last table change time : 73 days, 2:44:38 ago Number of table inserts : 5 Number of table deletes : 1 Number of table drops : 0 Number of table age-outs : 0 Port Neighbor Device ID Neighbor Port ID TTL Et13 VLab-Linux 0025.9088.2e90 120 Et33 3750-Core.gad.net [ Arista Core ] 120
Now that’s more like it! Port e13 is a server called VLab-Linux
. On port e33, the Neighbor Device ID is shown as 3750-Core.gad.net
, which is a conglomeration of the hostname and the configured domain name on the 3750. If you’ve never changed the domains on your Cisco switches, expect them all to show up as hostname.cisco.com
. I detest defaults when my OCD kicks in, so I changed my 3750 to gad.net
:
SW-3750(config)#ip domain name gad.net
Unfortunately, the Cisco switch is not so open-minded, at least by default. Here’s the output of the command show cdp neighbors
on the 3750:
SW-3750#sho cdp neighbors Capability Codes: R - Router, T - Trans Bridge, B- Source Route Bridge S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone Device ID Local Intrfce Holdtme Capability Platform Port ID R1-PBX Gig 1/0/10 144 R S I 2811 Fas 0/0 R1-PBX Gig 1/0/11 135 R S I 2811 Fas 0/1 TS-1 Gig 1/0/39 122 R 2611 Eth 0/1 SEP0019AA96D096 Gig 1/0/42 126 H P IP Phone Port 1 Cisco-WAP-N Gig 1/0/1 120 T I AIR-AP125 Gig 0 SEP04FE7F689D33 Gig 1/0/2 125 H P IP Phone Port 1 SEP000DBC50FCD1 Gig 1/0/4 147 H P IP Phone Port 1 SEP00124362C4D2 Gig 1/0/42 147 H P IP Phone Port 1
Although there are all sorts of interesting devices like WAPs and IP Phones listed, there is no mention of the Arista switch. And although the Arista switch will listen to and understand the CDP advertisements, the 3750 doesn’t see the LLDP advertisements being sent by Arista. Luckily, we can change that by using the Cisco command lldp run
:
SW-3750(config)#lldp run
Even though this won’t let us see the Arista switch with the show cdp neighbor
command, we can now see it with the show lldp neighbor
command:
SW-3750#sho lldp neighbors Capability codes: (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device (W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other Device ID Local Intf Hold-time Capability Port ID SEP04FE7F689D33 Gi1/0/2 180 B,T 04FE7F689D33:P1 Office Switch Gi1/0/42 120 B g1 Arista Gi1/0/52 120 B Ethernet24 Total entries displayed: 3
Not only can we see the Arista switch on port G1/0/52, but we can also see some other devices that we heretofore could not see. The device named Office Switch
is a Netgear eight-port 1 Gb switch that I didn’t even know supported LLDP. What a pleasant surprise! I also found it interesting that the IP Phone with the device ID of SEP04FE7F689D33
supports CDP and LLDP simultaneously.
As with CDP on a Cisco switch, you can show detail information. Using the show lldp neighbors detail
command will output a pile of useful information, but it’s displayed a bit differently than the similar Cisco command. Whereas Cisco sorts this information by device discovered, Arista sorts it by interface and shows every interface on the switch. In the interest of brevity, I’ve removed some of the output, including one of the Arista connected interfaces:
Arista(config)# sho lldp neighbors detail Interface Ethernet1 detected 0 LLDP neighbors: Interface Ethernet2 detected 0 LLDP neighbors: Interface Ethernet3 detected 0 LLDP neighbors: [-- output removed --] Interface Ethernet33 detected 1 LLDP neighbors: Neighbor 001c.b084.cfb0/"[ Arista Core ]", age 11 seconds Discovered 143 days, 5:44:44 ago; Last changed 143 days, 5:44:44 ago - Chassis ID type: MAC address (4) Chassis ID : 001c.b084.cfb0 - Port ID type: Interface alias (1) Port ID : "[ Arista Core ]" - Time To Live: 120 seconds - Port Description: "GigabitEthernet1/0/48" - System Name: "3750-Core.gad.net" - System Description: "Cisco IOS Software, C3750 Software (C3750-ADVIPSERVICESK9-M), Version 12.2(37)SE, RELEASE SOFTWARE (fc2) Copyright (c) 1986-2007 by Cisco Systems, Inc. Compiled Thu 10-May-07 16:31 by antonino" - System Capabilities : Bridge, Router Enabled Capabilities: Router - Management Address Subtype: IPv4 Management Address : 192.168.1.70 Interface Number Subtype : ifIndex (2) Interface Number : 48 OID String : - IEEE802.1 Port VLAN ID: 1 - IEEE802.3 MAC/PHY Configuration/Status Auto-negotiation : Supported, Enabled Asymmetric and Symmetric PAUSE 10BASE-T (half-duplex) 1000BASE-X (full-duplex) 1000BASE-T (half-duplex) Other Operational MAU Type : 1000BASE-T (full-duplex) [-- output removed --]
You can filter the output by specifying an interface, both with and without detail. Here is an example without detail:
Arista-7010T#sho lldp neighbors ethernet 33 Last table change time : 73 days, 2:51:53 ago Number of table inserts : 5 Number of table deletes : 1 Number of table drops : 0 Number of table age-outs : 0 Port Neighbor Device ID Neighbor Port ID TTL Et33 3750-Core.gad.net [ Arista Core ] 120
That’s it for now. Using LLDP will become second nature after a short time of using Arista gear. Although this chapter is quite short, when I cover Zero-Touch Provisioning (Chapter 13), understanding how LLDP works will help in your understanding of what I’ve done with some custom scripting there.