EdgeMAX - configurar LLDP através de interfaces

Visão geral


Os leitores aprenderão sobre o Link Layer Discovery Protocol (LLDP) e como configurar o roteador para anunciar este protocolo.

LLDP é um protocolo de camada 2 para publicidade/descobrindo vizinhos na IEEE 802 redes de área local. A funcionalidade é semelhante ao Cisco da CDP (Cisco Discovery Protocol).

Configuração

Esta é a configuração mínima:

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

Comandos show

Aqui estão exemplos 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

LLDP adicionais de configuração

Você pode especificar mais detalhes para qualquer determinada interface ou todos eles.

  • Você pode especificar a localização usando qualquer um desses três 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 exemplo usa dados de localização baseada em cívica. Aqui estão os tipos de dados disponíveis:
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 os seguintes comandos para especificar os dados de localização baseada em cívica :
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 exibir os detalhes de novos, use o mostram lldp vizinhos detalhes 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

Desabilitar uma Interface

Para desativar anúncios LLDP em uma interface específica:

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