EdgeRouter - Configure LLDP across interfaces

Overview


Readers will learn about the Link Layer Discovery Protocol (LLDP) and how to configure an EdgeRouter to advertise this protocol.

LLDP is a layer 2 protocol for advertising/discovering neighbors on IEEE 802 local area networks. The functionality is similar to Cisco's CDP (Cisco Discovery Protocol).

Configuration

This is the minimal configuration:

ubnt@R1# set service lldp                                                       
[edit]                                                                           
ubnt@R1# commit                                                                 
[ service lldp ]                                                                
Starting lldpd...                                                               

Show Commands

Here are examples of show lldp commands:

ubnt@R1:~$ show lldp neighbors 
 Capability Codes: R - Router, B - Bridge, W - Wlan r - Repeater, S - Station
                   D - Docsis, T - Telephone, O - Other

 Device ID                 Local  Proto  Cap   Platform             Port ID 
 ---------                 -----  -----  ---   --------             ------- 
 ProCurve Switch 2510B-24  eth0   LLDP   B     ProCurve J9019B Swit 1       
 R2                        eth1   LLDP   R     UBNT EdgeRouter Lite 3-Port eth1    
ubnt@R1:~$ show lldp neighbors detail 
-------------------------------------------------------------------------------
LLDP neighbors:
-------------------------------------------------------------------------------
Interface:    eth0, via: LLDP, RID: 1, Time: 0 day, 00:02:56
  Chassis:     
    ChassisID:    mac c0:91:34:51:9d:00
    SysName:      ProCurve Switch 2510B-24
    SysDescr:     ProCurve J9019B Switch 2510B-24, revision Q.11.17, ROM Q.10.02 (/sw/code/build/harp(bh2))
    MgmtIP:       10.1.0.209
    Capability:   Bridge, on
  Port:        
    PortID:       local 1
    PortDescr:    1
-------------------------------------------------------------------------------
Interface:    eth1, via: LLDP, RID: 3, Time: 0 day, 00:01:44
  Chassis:     
    ChassisID:    mac dc:9f:db:17:12:34
    SysName:      R2
    SysDescr:     UBNT EdgeRouter Lite 3-Port running on v1.0.3dev.4515948.121206.0102
    MgmtIP:       192.0.2.20
    Capability:   Bridge, off
    Capability:   Router, on
    Capability:   Wlan, off
  Port:        
    PortID:       mac dc:9f:db:17:12:35
    PortDescr:    eth1
    PMD autoneg:  supported: yes, enabled: yes
      Adv:          10Base-T, HD: yes, FD: yes
      Adv:          100Base-T, HD: yes, FD: yes
      Adv:          1000Base-T, HD: no, FD: yes
      MAU oper type: 1000BaseTFD - Four-pair Category 5 UTP, full duplex mode
  LLDP-MED:    
    Device Type:  Network Connectivity Device
    Capability:   Capabilities
    Capability:   Policy
    Capability:   Location
    Capability:   MDI/PSE
    Capability:   MDI/PD
    Capability:   Inventory
    Inventory:   
      Software Revision: 2.6.32.13-UBNT

Additional LLDP Configuration

You can specify more details for any given interface or all of them.

  • You can specify location using any of these three methods:
ubnt@R2# set service lldp interface all location ?
Possible completions:
  civic-based                 Civic-based location data
  coordinate-based            Coordinate based location
  elin                        ECS ELIN number
  • This example uses civic-based location data. Here are the available data types:
ubnt@R2# set service lldp interface all location civic-based country-code US
[edit] 
ubnt@R2# set service lldp interface all location civic-based ca-type ? 
Possible completions:
  0             Language
  1             National subdivisions
  2             County, parish, district
  3             City, township
  4             City division, borough, ward
  5             Neighborhood, block
  6             Street
  16            Leading street direction
  17            Trailing street suffix
  18            Street suffix
  19            House number
  20            House number suffix
  21            Landmark or vanity address
  22            Additional location info
  23            Name
  24            Postal/ZIP code
  25            Building
  26            Unit
  27            Floor
  28            Room number
  29            Place type
  128           Script

  • Use the following commands to specify the civic-based location data:
ubnt@R2# edit service lldp interface all location civic-based 
[edit service lldp interface all location civic-based]
ubnt@R2# set country-code US
[edit service lldp interface all location civic-based]
ubnt@R2# set ca-type 2 ca-value 'Santa Clara'
[edit service lldp interface all location civic-based]
ubnt@R2# set ca-type 3 ca-value 'San Jose'
[edit service lldp interface all location civic-based]
ubnt@R2# set ca-type 6 ca-value '2580 Orchard Parkway'                                                                                                                                                                                      
[edit service lldp interface all location civic-based]
ubnt@R2# set ca-type 24 ca-value 95131                                                                                                                                                                                                       
[edit service lldp interface all location civic-based]
ubnt@R2# set ca-type 1 ca-value CA    
[edit service lldp interface all location civic-based]
ubnt@R2# top 
[edit]
ubnt@R2# commit
[ service lldp ]
Starting lldpd...
Stopping lldpd...
set_location: Location set successfully for eth0
set_location: Location set successfully for eth1
set_location: Location set successfully for eth2
  • To view the new details, use the show lldp neighbors detail command:
ubnt@R1:~$ show lldp neighbors detail 
-------------------------------------------------------------------------------
LLDP neighbors:
-------------------------------------------------------------------------------
Interface:    eth1, via: LLDP, RID: 3, Time: 0 day, 00:01:28
  Chassis:     
    ChassisID:    mac dc:9f:db:17:12:34
    SysName:      R2
    SysDescr:     UBNT EdgeRouter Lite 3-Port running on v1.0.3dev.4515948.121206.0102
    MgmtIP:       192.0.2.20
    Capability:   Bridge, off
    Capability:   Router, on
    Capability:   Wlan, off
  Port:        
    PortID:       mac dc:9f:db:17:12:35
    PortDescr:    eth1
    PMD autoneg:  supported: yes, enabled: yes
      Adv:          10Base-T, HD: yes, FD: yes
      Adv:          100Base-T, HD: yes, FD: yes
      Adv:          1000Base-T, HD: no, FD: yes
      MAU oper type: 1000BaseTFD - Four-pair Category 5 UTP, full duplex mode
  LLDP-MED:    
    Device Type:  Network Connectivity Device
    Capability:   Capabilities
    Capability:   Policy
    Capability:   Location
    Capability:   MDI/PSE
    Capability:   MDI/PD
    Capability:   Inventory
    LLDP-MED Location Identification: Type: address
      Country:      US
      National subdivisions: CA
      County, parish, district: Santa Clara
      City, township: San Jose
      Street:       2580 Orchard Parkway
      Postal/ZIP code: 95131
    Inventory:   
      Software Revision: 2.6.32.13-UBNT

Disable an Interface

To disable LLDP advertisements on a specific interface:

ubnt@R1# set service lldp interface eth0 disable 
[edit]
ubnt@R1# commit
[ service lldp ]
Starting lldpd...
Stopping lldpd...
Powered by Zendesk