EdgeMAX - configurar LLDP a traves de interfaces

Resumen


Los lectores aprenderán sobre el protocolo de descubrimiento de capa de enlace (LLDP) y cómo configurar el router para este protocolo.

LLDP es un protocolo de capa 2 para publicidad/descubrir vecinos en IEEE 802 redes de área local. La funcionalidad es similar a Cisco del CDP (Cisco Discovery Protocol).

Configuración

Esta es la configuración mínima:

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

Mostrar comandos

Estos son ejemplos de Mostrar lldp comandos:

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

Configuración de LLDP adicional

Puede especificar más detalles para cualquier interfaz determinado o todos ellos.

  • Se puede especificar la ubicación usando cualquiera de estos tres métodos:
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
  • Este ejemplo utiliza datos de localización basados en el civic. Aquí están los tipos de datos disponibles:
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

  • Utilice los siguientes comandos para especificar los datos de localización basados en el civic :
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
  • Para ver los nuevos detalles, utilice el Mostrar vecinos lldp detalle comando:
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

Deshabilitar una interfaz

Para desactivar los anuncios de LLDP en una interfaz específica:

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