Dell Networking SONiC:链路层发现协议
摘要: 本文介绍 Dell Networking SONiC 中的链路层发现协议 (LLDP) 和配置。本文使用运行 Dell SONiC 4.1 的交换机。
本文适用于
本文不适用于
本文并非针对某种特定的产品。
本文并非包含所有产品版本。
说明
|
前提条件
我们使用标准接口命名来演示概念。请参阅文章 202172 Dell Networking S 系列:基本接口配置 - SONiC 4.0,了解有关接口命名的更多信息 |
指数
介绍
配置语法
启用和禁用 LLDP。
配置 LLDP 传输
配置 LLDP 接收
启用 LLDP 传输和接收。
启用 LLDP 以发送管理地址、系统名称和说明。
验证
简介
链路层发现协议 (LLDP) 允许交换机通告主要功能和物理描述。LLDP 在 IEEE 802.1AB 中定义。此信息可用于帮助识别系统拓扑和检测 LAN 上的不良配置。
- LLDP 是一种单向协议;没有请求或响应序列。实施传输功能的站点通告信息,实施接收功能的站点接收和处理信息。
- 可在每个交换机端口上单独启用或禁用传输和接收功能。
- LLDP 是一种不限供应商的发现协议。
- 交换机接收并定期传输 LLDP 协议数据单元 (PDU)。默认传输间隔为 30 秒。
- 从邻居收到的 LLDP PDU 信息将在特定时间(称为生存时间 (TTL) 后过期。默认 TTL 值为 120 秒。
- 生成树阻塞端口允许 LLDP PDU。
配置语法
提醒:LLDP 配置发生任何更改后,LLDP 表将在 120 秒 (TTL) 内更新。
启用和禁用 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 |
配置 LLDP 传输
执行这些命令将禁用 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) |
配置 LLDP 接收
执行这些命令将禁用 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) |
启用 LLDP 传输和接收。
默认情况下,LLDP 传输和接收默认已启用。如果您已配置 LLDP 传输,LLDP 接收将停用。
如果您已配置 LLDP 接收,则 LLDP 传输将停用。
要激活两者,请删除 LLDP 接收和 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 |
启用 LLDP 以发送管理地址、系统名称和说明。
默认情况下,LLDP 会通告系统名称 和系统描述。要通过 LLDP 通告管理地址,我们必须手动配置 lldp tlv-select management-address 。
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-addressDELLSONiC(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 |
验证
| 配置 | 语法 |
| DELLSONiC# show lldp 表 | 显示所有 LLDP 邻居的夏季。 |
| DELLSONiC# show lldp 邻居 | 显示所有 LLDP 邻居的详细信息。 |
| DELLSONiC# show lldp neighbor Eth slot/port[/subport] | 在特定接口中显示 LLDP 邻居的详细信息。 |
| DELLSONiC# 显示 lldp 统计信息 | 显示所有 LLDP 邻居的 LLDP 统计信息。 |
| DELLSONiC# show lldp statistics Eth slot/port[/subport] | 在特定接口中显示 LLDP 统计信息。 |
输出示例
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
--------------------------------- |
受影响的产品
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
...
文章属性
文章编号: 000218154
文章类型: How To
上次修改时间: 16 10月 2023
版本: 4
从其他戴尔用户那里查找问题的答案
支持服务
检查您的设备是否在支持服务涵盖的范围内。