在某项目中,需要把原有的大量思科交换机逐步替换成H3C交换机S5500,替换的过程会有H3C和思科同时存在的局面,网络管理人员习惯在思科上用show cdp neighbor命令来了解拓扑,但在cisco设备上show cdp neighbor看到S5500邻居Device ID字段为MAC地址,而非主机名。
1、在CISCO设备上查看CDP邻居信息
CISCO-1#show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater
Device ID Local Intrfce Holdtme Capability Platform Port ID
5cdd-702c-2536 Fas 0/0 119 S H3C S5500-Gig 1/0/24
CISCO-2 Fas 0/1 129
H3C邻居Device ID一栏显示为MAC地址,CISCO邻居显示为主机名。
2、在H3C-2里,查看和LLDP本地信息,确认有无携带System name信息的字段。
[H3C-2]dis lldp local-information
Global LLDP local-information:
Chassis ID : 5cdd-702c-2536 //有个chasis ID这个字段
System name : H3C-2 //用system name这个字段来描述主机名
System description : H3C Comware Platform Software, Software Version 5.20 Release 2221P01
H3C S5500-28C-EI
Copyright (c) 2004-2014 Hangzhou H3C Tech. Co., Ltd. All rights reserved.
System capabilities supported : Bridge,Router
System capabilities enabled : Bridge,Router
MED information
Device class: Connectivity device
(MED inventory information of master board)
HardwareRev : REV.C
FirmwareRev : 721
SoftwareRev : 5.20 Release 2221P01
SerialNum : 210235A252C13B000021
Manufacturer name : H3C
Model name : H3C S5500-28C-EI
Asset tracking identifier : Unknown
在LLDP本地信息中可以看到MAC地址信息和System name信息,分别包含在Chassis ID和System name字段中。
3、在H3C-2里,查看H3C-1互联口的NDP 及LLDP信息
[H3C-2]dis ndp int gi1/0/1
Interface: GigabitEthernet1/0/1
Status: Enabled, Pkts Snd: 42, Pkts Rvd: 44, Pkts Err: 0
Neighbor 1: Aging Time: 170(s)
MAC Address : 000f-e2b2-4d97
Host Name : H3C-1
Port Name : GigabitEthernet1/0/21
Software Ver: V200R002B07D002SP01
Device Name : H3C S5500-28C-PWR-EI
Port Duplex : AUTO
Product Ver : Release 2215
BootROM Ver : 710
[H3C-2]dis lldp neighbor-information interface gi1/0/1
LLDP neighbor-information of port 1[GigabitEthernet1/0/1]:
Neighbor index : 1
Update time : 0 days,1 hours,7 minutes,24 seconds
Chassis type : MAC address
Chassis ID : 000f-e2b2-4d97
Port ID type : Interface name
Port ID : GigabitEthernet1/0/21
Port description : GigabitEthernet1/0/21 Interface
System name : H3C – 1
System description : H3C Comware Platform Software, Software Version 5.20 Release 2215
H3C S5500-28C-PWR-EI
Copyright (c) 2004-2012 Hangzhou H3C Tech. Co., Ltd. All rights reserved.
System capabilities supported : Bridge,Router
System capabilities enabled : Bridge,Router
Port VLAN ID(PVID): 1
Port and protocol VLAN ID(PPVID) : 0
Port and protocol VLAN supported : Yes
Port and protocol VLAN enabled : No
VLAN name of VLAN 1: VLAN 0001
Auto-negotiation supported : Yes
Auto-negotiation enabled : Yes
OperMau : speed(1000)/duplex(Full)
Power port class : PSE
PSE power supported : Yes
PSE power enabled : No
PSE pairs control ability : No
Power pairs : Signal
Port power classification : Class 0
Link aggregation supported : Yes
Link aggregation enabled : No
Aggregation port ID : 0
Maximum frame Size: 9216
H3C-2能学到H3C-1的MAC address和System name信息,分别携带在Chassis ID和System name字段中。
4、在H3C-2里,查看和cisco互联口的NDP 信息
[H3C-2]dis ndp int gi1/0/24
Interface: GigabitEthernet1/0/24
Status: Enabled, Pkts Snd: 85, Pkts Rvd: 0, Pkts Err: 0
在NDP层面,H3C没有直接和思科兼容的命令,而是通过LLDP和思科兼容。
[H3C-2]dis lldp neighbor-information int gi1/0/24
CDP neighbor-information of port 24[GigabitEthernet1/0/24]:
CDP neighbor index : 2
Chassis ID : CISCO-1
Address : 192.168.99.85
Port ID : FastEthernet0/0
Software version : Cisco Internetwork Operating System Software
IOS (tm) C2600 Software (C2600-I-M), Version 12.0(7)T, RELEASE SOFTWARE (fc2)
Copyright (c) 1986-1999 by cisco Systems, Inc.
Compiled Tue 07-Dec-99 02:12 by phanguye
Platform : cisco 2621
Duplex : Full
H3C-2只能学到Cisco的system name信息,包含在Chassis ID字段中。
从LLDP报文的交互中可以发现,从思科发出的CDP报文中,思科是用chasis ID这个字段来表达主机名这个信息的,而我司设备使用chasis ID这个字段来表达MAC address信息。所以思科设备也会从收到的H3C发过来的LLDP报文中读取chasis ID字段内容当作主机名,也即我们看到的mac address。
而在H3C交换机和H3C交换机之间的LLDP交互过程中,H3C是用hostname 字段来成功发送和接受主机名信息。
在基本TLV中,有几种TLV对于实现LLDP功能来说是必选的,即必须在LLDPDU中发布。如Chassis ID、Port ID、Time To Live、End of LLDPDU。而System Name属于自定义TLV,只有H3C交换机才能识别。
TLV名称 |
说明 |
是否必须发布 |
Chassis ID |
发送设备的桥MAC地址 |
是 |
Port ID |
标识LLDPDU发送端的端口。如果LLDPDU中携带有LLDP-MED TLV,其内容为端口的MAC地址,没有端口MAC时使用桥MAC;否则,其内容为端口的名称 |
是 |
Time To Live |
本设备信息在邻居设备上的存活时间 |
是 |
End of LLDPDU |
LLDPDU的结束标识,是LLDPDU的最后一个TLV |
是 |
Port Description |
端口的描述 |
否 |
System Name |
设备的名称 |
否 |
System Description |
系统的描述 |
否 |
System Capabilities |
系统的主要功能以及已使能的功能项 |
否 |
Management Address |
管理地址,以及该地址所对应的接口号和OID(Object Identifier,对象标识) |
否 |
无解决方法,实现机制问题。
该案例暂时没有网友评论
✖
案例意见反馈
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作