华为配置LLDP基本功能

华为配置LLDP基本功能

1.什么是lldp协议
定义
LLDP(Link Layer Discovery Protocol)是IEEE 802.1ab中定义的链路层发现协议。LLDP是一种标准的二层发现方式,可以将本端设备的管理地址、设备标识、接口标识等信息组织起来,并发布给自己的邻居设备,邻居设备收到这些信息后将其以标准的管理信息库MIB(Management Information Base)的形式保存起来,以供网络管理系统查询及判断链路的通信状况。
2.配置目的
随着网络规模越来越大,网络设备种类繁多,并且各自的配置错综复杂,对网络管理能力的要求也越来越高。传统网络管理系统多数只能分析到三层网络拓扑结构,无法确定网络设备的详细拓扑信息、是否存在配置冲突等。因此需要有一个标准的二层信息交流协议。
LLDP提供了一种标准的链路层发现方式。通过LLDP获取的设备二层信息能够快速获取相连设备的拓扑状态;显示出客户端、交换机、路由器、应用服务器以及网络服务器之间的路径;检测设备间的配置冲突、查询网络失败的原因。企业网用户可以通过使用网管系统,对支持运行LLDP协议的设备进行链路状态监控,在网络发生故障的时候快速进行故障定位。
3.组网需求
在这里插入图片描述

如图1所示,DeviceA和DeviceB、DeviceC之间有可达链路,DeviceA、DeviceC与NMS之间有可达路由。在配置LLDP功能之前,DeviceA无法获取DeviceB和DeviceC的状态信息,NMS也不能通过SNMP报文获取DeviceA、DeviceB和DeviceC之间的拓扑结构信息。
配置LLDP功能之后,设备间可以通过交互LLDP报文获取彼此的状态信息。同时NMS可以通过LLDP管理IP地址查找DeviceA、DeviceB和DeviceC,获取它们之间的拓扑信息。
4配置思路
配置DeviceA、DeviceB和DeviceC的相关接口的IP地址和路由协议,使网络层路由可达。
使能DeviceA、DeviceB和DeviceC的全局LLDP功能。
配置DeviceA、DeviceB和DeviceC的管理IP地址,该IP地址用于在邻居节点中标识本端设备。
配置DeviceA、DeviceB和DeviceC的LLDP相关参数,优化LLDP的性能。
配置DeviceA、DeviceB和DeviceC的LLDP告警功能,合理配置设备发送LLDP告警的延迟时间,既能达到告警的目的,也能降低系统资源的消耗。

  1. 操作步骤
  2. 配置相关接口的IP地址和路由协议
  3. 使能DeviceA、DeviceB和DeviceC的全局LLDP功能。

配置DeviceA
DeviceA:
sysname DeviceA
lldp enable

配置DeviceB
DeviceA:
sysname DeviceB
lldp enable

配置DeviceC
DeviceC:
sysname DeviceC
lldp enable

配置LSW1
[lSW1]lldp enable

配置DeviceA、DeviceB和DeviceC的管理IP地址
配置DeviceA的管理IP地址为10.10.10.1。
DeviceA:
[DeviceA]int g0/0/0
[DeviceA-GigabitEthernet0/0/0]ip add 10.10.10.1 24
[DeviceA-GigabitEthernet0/0/0undo shut
[DeviceA]lldp management-address 10.10.10.1

DeviceB:
[DeviceB]int g0/0/0
[DeviceB-GigabitEthernet0/0/0]ip add 10.10.10.2 24
[DeviceB-GigabitEthernet0/0/0undo shut
[DeviceB]lldp management-address 10.10.10.2

DeviceC:
[DeviceC]int g0/0/0
[DeviceC-GigabitEthernet0/0/0]ip add 10.10.10.3 24
[DeviceC-GigabitEthernet0/0/0undo shut
[DeviceC]lldp management-address 10.10.10.3

配置DeviceA、DeviceB和DeviceC的LLDP相关参数,包括设备发送LLDP报文的周期和延迟时间。

DeviceA:
lldp message-transmission interval 60
lldp message-transmission delay 9

DeviceB:
lldp message-transmission interval 60
lldp message-transmission delay 9

DeviceC:
lldp message-transmission interval 60
lldp message-transmission delay 9

使能DeviceA、DeviceB和DeviceC的LLDP告警功能,配置设备发送LLDP告警的延迟时间

配置DeviceA
DeviceA:
snmp-agent trap enable feature-name lldp
lldp trap-interval 10

配置DeviceB
DeviceB:
snmp-agent trap enable feature-name lldp
lldp trap-interval 10

配置DeviceC
DeviceC:
snmp-agent trap enable feature-name lldp
lldp trap-interval 10

LSW1的lldp配置
[lSW1]di
sysname lSW1

vlan batch 10

cluster enable
ntdp enable
ndp enable

lldp enable
lldp message-transmission interval 60
lldp message-transmission delay 9
lldp trap-interval 10
interface Vlanif10
ip address 10.10.10.254 255.255.255.0

interface MEth0/0/1

interface Ethernet0/0/1
port link-type access
port default vlan 10

interface Ethernet0/0/2
port link-type access
port default vlan 10

interface Ethernet0/0/3
port link-type access
port default vlan 10
snmp-agent
snmp-agent local-engineid 800007DB034C1FCC536DEE
snmp-agent sys-info version v3
snmp-agent trap enable feature-name LLDPTRAP

lldp management-address 10.10.10.254

user-interface con 0
user-interface vty 0 4

return
[lSW1]

检查配置结果
查看DeviceA的LLDP是否使能、LLDP管理地址是否配置、LLDP告警功能是否使能以及LLDP属性的值是否为所配置的值。
查看DeviceA的本地LLDP信息
在这里插入图片描述

查看DeviceA的邻居设备的LLDP信息。
[DeviceA]dis lldp neighbor interface GigabitEthernet 0/0/0
GigabitEthernet0/0/0 has 1 neighbors:

Neighbor index : 1
Chassis type :macAddress
Chassis ID :4c1f-cc53-6dee
Port ID type :interfaceName
Port ID :Ethernet0/0/1
Port description :NA
System name :lSW1
System description :S3700-26C-HI
Huawei Versatile Routing Platform Software
VRP ® software,Version 3.30 (S3700 V200R001C00)
Copyright © 2007 Huawei Technologies Co., Ltd.
System capabilities supported :bridge
System capabilities enabled :bridge
Management address type :all802
Management address : 4c1f-cc53-6dee
Expired time :114s

Auto-negotiation supported :No
Auto-negotiation enabled :No
OperMau :speed(0)/duplex(Half)

Power port class :PD
PSE power supported :No
PSE power enabled :No
PSE pairs control ability:No
Power pairs :Unknown
Port power classification:Unknown

Link aggregation supported:Yes
Link aggregation enabled :No
Aggregation port ID :0
Maximum frame Size :9216

MED Device information
Device class :Network Connectivity

HardwareRev :VER B
FirmwareRev :NA
SoftwareRev :Version 3.30 V200R001C00
SerialNum :NA
Manufacturer name :HUAWEI TECH CO., LTD
Model name :NA
Asset tracking identifier :NA

Power Type :Unknown
PoE PSE power source :Unknown
Port PSE Priority :Unknown
Port Available power value:2
[DeviceA]

Please check whether system data has been changed, and save data in time

Configuration console time out, please press any key to log on

system
Enter system view, return user view with Ctrl+Z.
[DeviceA]disp lldp ?
ap-neighbor AP neighbor
local LLDP information about the local device or ports
neighbor Neighbor information
statistics LLDP statistics information
tlv-config Enable TLV information
[DeviceA]disp lldp ne
[DeviceA]disp lldp neighbor ?
brief Number of routes downloaded to FIB
interface Interface
| Matching output
Please press ENTER to execute command
[DeviceA]disp lldp neighbor int
[DeviceA]disp lldp neighbor interface g
[DeviceA]disp lldp neighbor interface GigabitEthernet 0/0/0
GigabitEthernet0/0/0 has 1 neighbors:

Neighbor index : 1
Chassis type :macAddress
Chassis ID :4c1f-cc53-6dee
Port ID type :interfaceName
Port ID :Ethernet0/0/1
Port description :NA
System name :lSW1
System description :S3700-26C-HI
Huawei Versatile Routing Platform Software
VRP ® software,Version 3.30 (S3700 V200R001C00)
Copyright © 2007 Huawei Technologies Co., Ltd.
System capabilities supported :bridge
System capabilities enabled :bridge
Management address type :ipV4
Management address : 10.10.10.254
Expired time :196s

Auto-negotiation supported :No
Auto-negotiation enabled :No
OperMau :speed(0)/duplex(Half)

Power port class :PD
PSE power supported :No
PSE power enabled :No
PSE pairs control ability:No
Power pairs :Unknown
Port power classification:Unknown

Link aggregation supported:Yes
Link aggregation enabled :No
Aggregation port ID :0
Maximum frame Size :9216

MED Device information
Device class :Network Connectivity

HardwareRev :VER B
FirmwareRev :NA
SoftwareRev :Version 3.30 V200R001C00
SerialNum :NA
Manufacturer name :HUAWEI TECH CO., LTD
Model name :NA
Asset tracking identifier :NA

Power Type :Unknown
PoE PSE power source :Unknown
Port PSE Priority :Unknown
Port Available power value:2

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

shatianyzg

创作不易,不断探索

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值