Chapter 8. LLDP

Link Layer Discovery Protocol (LLDP) is the open source answer to Cisco’s proprietary Cisco Discovery Protocol (CDP). LLDP is specified in IEEE 802.1AB and is similar to CDP in many ways. Let’s take a look at LLDP in action, and see what you may need to do to make it work with other vendors’ devices.

My Arista 7124S switch is connected to a 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 CDP. Let’s dig in and see what Arista sees:

Arista#sho lldp
LLDP transmit interval      : 30 seconds
LLDP transmit holdtime      : 120 seconds
LLDP reinitialization delay : 2 seconds

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
Et11       Yes         Yes
Et12       Yes         Yes
Et13       Yes         Yes
Et14       Yes         Yes
Et15       Yes         Yes
Et16       Yes         Yes
Et17       Yes         Yes
Et18       Yes         Yes
Et19       Yes         Yes
Et20       Yes         Yes
Et21       Yes         Yes
Et22       Yes         Yes
Et23       Yes         Yes
Et24       Yes         Yes

That’s pretty boring. I’d rather see what switches are connected where, so I’ll use the show lldp neighbors command. This should seem pretty familiar to anyone who has used CDP on a Cisco switch:

Arista#sho lldp neighbors
Last table change time   : 0:00:06 ago
Number of table inserts  : 3
Number of table deletes  : 0
Number of table drops    : 0
Number of table age-outs : 0

Port      Neighbor Device ID             Neighbor Port ID          TTL
Et10      Arista                         Ethernet11                120
Et11      Arista                         Ethernet10                120
Et24      SW-3750.cisco.com              [ Arista e24 ]            120

Now that’s more like it! Ports e10 and e11 are connected to each other, which is why the hostname is Arista. Why do I have the switch connected to itself? Because I like to force equipment to do unusual things in order to try and get them to fail in spectacular ways. On port e24, the Neighbor Device ID is shown as SW-3750.cisco.com, which is a conglomeration of the hostname and the default 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 went straight to my 3750 and changed the domain to gad.net:

SW-3750(config)#ip domain name gad.net

Shortly thereafter, the change showed up on my Arista switch:

Arista#sho lldp neighbors
Last table change time   : 0:00:33 ago
Number of table inserts  : 3
Number of table deletes  : 0
Number of table drops    : 0
Number of table age-outs : 0

Port      Neighbor Device ID             Neighbor Port ID          TTL
Et10      Arista                         Ethernet11                120
Et11      Arista                         Ethernet10                120
Et24      SW-3750.gad.net                [ Arista e24 ]            120

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

While 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 with the Cisco command lldp run:

SW-3750(config)#lldp run

While 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, detail information may be shown. 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. Where Cisco sorts this information by device discovered, Arista sorts it by interface, and shows every interface on the switch. I’ve removed some of the output, including one of the Arista-connected interfaces, in the interest of brevity:

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 Ethernet9 detected 0 LLDP neighbors:

Interface Ethernet10 detected 1 LLDP neighbors:

  Neighbor 001c.7308.80ae/Ethernet11, age 26 seconds
  Discovered 0:38:09 ago; Last changed 0:22:55 ago
    - Chassis ID type: MAC address (4)
      Chassis ID     : 001c.7308.80ae
    - Port ID type: Interface name (5)
      Port ID     : "Ethernet11"
    - Time To Live: 120 seconds
    - System Name: "Arista"
    - System Description: "Arista Networks EOS version 4.7.8 running
on an Arista Networks DCS-7124S"
    - System Capabilities : Bridge, Router
      Enabled Capabilities: Bridge
    - Management Address Subtype: Ethernet (6)
      Management Address        : 001c.7308.80ae
      Interface Number Subtype  : Unknown (1)
      Interface Number          : 0
      OID String                :
    - IEEE802.1 Port VLAN ID: 0
    - IEEE802.1/IEEE802.3 Link Aggregation
      Link Aggregation Status: Capable, Disabled (0x01)
      Port ID                : 0
    - IEEE802.3 Maximum Frame Size: 9236 bytes

[-- output removed --]

Interface Ethernet23 detected 0 LLDP neighbors:

Interface Ethernet24 detected 1 LLDP neighbors:

  Neighbor 001c.b084.cfb4/[ Arista e24 ], age 3 seconds
  Discovered 0:37:44 ago; Last changed 0:18:08 ago
    - Chassis ID type: MAC address (4)
      Chassis ID     : 001c.b804.cfb4
    - Port ID type: Interface alias (1)
      Port ID     : "[ Arista e24 ]"
    - Time To Live: 120 seconds
    - Port Description: "GigabitEthernet1/0/52"
    - System Name: "SW-3750.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: None
    - Management Address Subtype: IPv4 (1)
      Management Address        : 192.168.1.4
      Interface Number Subtype  : ifIndex (2)
      Interface Number          : 52
      OID String                :
    - IEEE802.1 Port VLAN ID: 901
    - IEEE802.3 MAC/PHY Configuration/Status
      Auto-negotiation       : Not Supported
      Advertised Capabilities: 10BASE-T (full-duplex)
      Operational MAU Type   : 1000BASE-SX (full-duplex) (26)

You can filter the output by specifying an interface, both with and without detail. Here is an example without detail:

Arista(config)#sho lldp neighbors ethernet 24
Last table change time   : 0:23:47 ago
Number of table inserts  : 3
Number of table deletes  : 0
Number of table drops    : 0
Number of table age-outs : 0

Port      Neighbor Device ID             Neighbor Port ID          TTL
Et24      SW-3750.gad.net                [ Arista e24 ]            120

That’s it for now. Using LLDP will become second nature after a short time using Arista gear.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.50.29