SONiC Dell Networking : Protocole de découverte de couche de liaison

Summary: Cet article explique comment utiliser le protocole LLDP (Link Layer Discovery Protocol) et la configuration de Dell Networking SONiC. Cet article utilise un commutateur exécutant Dell SONiC 4.1. ...

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

 
Configuration requise
Nous utilisons la dénomination d’interface standard pour démontrer les concepts. Reportez-vous à l’article 202172 Dell Networking série S : Configuration de l’interface de base - SONiC 4.0 pour plus d’informations sur la dénomination des interfaces


Index

Introduction
Syntaxe de configuration 
    Activez et désactivez LLDP. 
    Configuration de LLDP Transmit
Configurer la réception
LLDPActivez LLDP Transmit and Receive.       
    Activez LLDP pour envoyer l’adresse de gestion, le nom et la description du système.
Vérifier
 

Introduction

Le protocole LLDP (Link Layer Discovery Protocol) permet au commutateur d’annoncer les principales fonctionnalités et les descriptions physiques. LLDP est défini dans IEEE 802.1AB. Ces informations peuvent être utilisées pour vous aider à identifier la topologie du système et à détecter les configurations défectueuses sur le LAN. 

  • LLDP est un protocole unidirectionnelle. il n’y a pas de séquences de demande ou de réponse. Les stations qui implémentent la fonction de transmission annoncent les informations, et les stations implémentant la fonction de réception reçoivent et traitent les informations.
  • Les fonctions de transmission et de réception peuvent être activées ou désactivées séparément sur chaque port de commutateur. 
  • LLDP est un protocole de détection indépendant du fournisseur. 
  • Le commutateur reçoit et transmet régulièrement des unités de données (PDU) de protocole LLDP. L’intervalle de transmission par défaut est de 30 secondes.
  • Les informations de la PDU LLDP reçues d’un voisin expirent après un laps de temps spécifique, appelé durée de vie (TTL). La valeur TTL par défaut est de 120 secondes.
  • Les ports bloqués spanning-tree autorisent les unités d’alimentation LLDP.

Syntaxe de configuration

Remarque : Les tables LLDP sont mises à jour en 120 secondes (TTL) après toute modification de la configuration LLDP.

Activez et désactivez LLDP.  

Enable LLDP Globally
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure
DELLSONiC(config)# lldp enable
DELLSONiC(config)# end

Disable LLDP Globally 
DELLSONiC# configure  
DELLSONiC(config)# no lldp enable 
DELLSONiC(config)# end

Enable LLDP on a single interface
DELLSONiC# configure 
DELLSONiC(config)# interface Eth slot/port[/subport]
DELLSONiC(config-if-EthX/X)# lldp enable
DELLSONiC(config-if-EthX/X)# end

Disable LLDP on a single interface 
DELLSONiC# configure 
DELLSONiC(config)# interface Eth slot/port[/subport]
DELLSONiC(config-if-EthX/X)# no lldp enable 
DELLSONiC(config-if-EthX/X)# end
 

Configuration de LLDP Transmit

L’exécution de ces commandes désactive la réception LLDP.
Enable LLDP Transmit Globally
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure
DELLSONiC(config)# lldp transmit
DELLSONiC(config)# end

Enable LLDP Transmit on a single interface
DELLSONiC# configure 
DELLSONiC(config)# interface Eth slot/port[/subport] 
DELLSONiC(config-if-EthX/X)# lldp transmit
DELLSONiC(config-if-EthX/X)# end


Enable LLDP Transmit and Receive (Click here) 
 

Configurer la réception LLDP

L’exécution de ces commandes désactive la transmission LLDP.  
Enable LLDP Receive Globally 
admin@DELLSONiC:~$ sonic-cli 
DELLSONiC# configure 
DELLSONiC(config)# lldp receive
DELLSONiC(config)# end 

Enable LLDP Receive on a single interface
DELLSONiC# configure  
DELLSONiC(config)# interface Eth slot/port[/subport]
DELLSONiC(config-if-EthX/X)# lldp receive
DELLSONiC(config-if-EthX/X)# end

Enable LLDP Transmit and Receive (Click here)  
 

Activez LLDP Transmit and Receive.

Par défaut, la transmission et la réception LLDP sont activées par défaut.
Si vous avez configuré la transmission LLDP, la réception LLDP est désactivée.
Si vous avez configuré LLDP Receive, la transmission LLDP est désactivée.
Afin d’activer les deux, supprimez la réception LLDP et la transmission LLDP.
Enable LLDP Transmit and Receive Globally 
admin@DELLSONiC:~$ sonic-cli 
DELLSONiC# configure 
DELLSONiC(config)# no lldp receive
DELLSONiC(config)# no lldp transmit
DELLSONiC(config)# end 

Enable LLDP Transmit and Receive on a single interface
DELLSONiC# configure  
DELLSONiC(config)# interface Eth slot/port[/subport]
DELLSONiC(config-if-EthX/X)# no lldp receive
DELLSONiC(config-if-EthX/X)# no lldp transmit
DELLSONiC(config-if-EthX/X)# end
 

Activez LLDP pour envoyer l’adresse de gestion, le nom et la description du système.

Par défaut, LLDP annonce le nom du système et la description du système.
Pour annoncer l’adresse de gestion par LLDP, nous devons configurer lldp tlv-select management-address manuellement.  
Use bellow configuration to enable system-name, system-description and management-address
DELLSONiC# configure
DELLSONiC(config)# lldp system-name 
DELLSONiC(config)# lldp system-description 
DELLSONiC(config)# lldp tlv-select management-address
DELLSONiC(config)#end

Disable system-name, system-description and management-address
DELLSONiC# configure
DELLSONiC(config)# no lldp system-name
DELLSONiC(config)# no lldp system-description
DELLSONiC(config)# no lldp tlv-select management-address
DELLSONiC(config)#end

You have an option to manually specify the IPv4/IPv6 address of management address manually
DELLSONiC# configure
DELLSONiC(config)# interface Eth slot/port[/subport]
DELLSONiC(config-if-Eth1/1)# lldp tlv-set management-address  
DELLSONiC(config-if-Eth1/1)# end *Applying this command will make Switch to send LLDP in the specific interface with configured IPV4/IPV6 address, rather than management port IP address. To disable use DELLSONiC# configure DELLSONiC(config)# interface Eth slot/port[/subport] DELLSONiC(config-if-Eth1/1)# lldp tlv-set management-address DELLSONiC(config-if-Eth1/1)# end
 

Vérifier

Configuration Syntaxe
DellSONiC# show lldp table Affichez l’été de tous les voisins LLDP.
DellSONiC# show lldp neighbor Afficher les détails de tous les voisins LLDP.
DELLSONiC# show lldp neighbor Eth slot/port[/subport] Afficher les détails des voisins LLDP dans une interface spécifique.
DellSONiC# afficher les statistiques lldp Afficher les statistiques LLDP de tous les voisins LLDP.
DELLSONiC# show lldp statistics Eth slot/port[/subport] Afficher les statistiques LLDP dans une interface spécifique.

Exemple de résultat
DELLSONiC# show lldp table
------------------------------------------------------------------------------------------------------
LocalPort           RemoteDevice        RemotePortID        Capability          RemotePortDescr
-------------------------------------------------------------------------------------------------------
Eth1/1              DELL-EDGE-sonic               Eth1/1              R                   Ethernet0
DELLSONiC# show lldp neighbor Eth 1/1
-----------------------------------------------------------
LLDP Neighbors
-----------------------------------------------------------
Interface:   Eth1/1,via: LLDP
  Chassis:
    ChassisID:    XXXXXXXXXXXXXXXXXXXXXXXX
    SysName:      DELL-EDGE-sonic
    SysDescr:     DELL-CORE
    TTL:          120
    MgmtIP:       30.0.0.1
    Capability:   ROUTER, ON
  Port
    PortID:       Eth1/1
    PortDescr:    Ethernet0
  LLDP-MED
    Device Type:  Network Connectivity Device
    Capability:   Capabilities, yes
    Capability:   Ext_mdi_power_pd, yes
    Capability:   Inventory, yes
    Capability:   Network_policy, yes
    Inventory
      Hardware Rev:  XXXXXXXXXXXXXXXXXXXXXXXX
      Software Rev:  XXXXXXXXXXXXXXXXXXXXXXXX
      Firmware Rev:  XXXXXXXXXXXXXXXXXXXXXXXX
      Serial Number:
DELLSONiC# show lldp statistics Eth 1/1
LLDP Statistics
---------------------------------
Interface: Eth1/1
    Transmitted      : 60
    Received         : 45
    Discarded        : 0
    Unrecognized TLV : 0
    Ageout           : 1
---------------------------------

Affected Products

Enterprise SONiC Distribution, PowerSwitch E3200-ON Series, Dell EMC Networking N3200-ON, PowerSwitch S5212F-ON, PowerSwitch S5224F-ON, PowerSwitch S5232F-ON, PowerSwitch S5248F-ON, PowerSwitch S5296F-ON, PowerSwitch Z9100-ON, PowerSwitch Z9264F-ON , PowerSwitch Z9332F-ON, PowerSwitch Z9432F-ON ...
Article Properties
Article Number: 000218154
Article Type: How To
Last Modified: 16 Oct 2023
Version:  4
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.