實驗目的
 
?
 
1、了解鏈路層發(fā)現(xiàn)協(xié)議LLDP的運行原理
 
2、掌握鏈路層發(fā)現(xiàn)協(xié)議LLDP的配置方法
 
?
 
實驗拓撲
 
?
 
 
?
 
實驗需求
 
?
 
1、根據(jù)實驗拓撲圖,完成設備的基本配置;
 
2、在R1上使用LLDP查看SW1和R2的設備信息;
 
3、注意:LLDP默認關閉,需要手工打開。
 
?
 
實驗步驟
 
?
 
步驟1:設備的基本配置 
 
配置R 1 : 
 
Router>enableRouter#configure terminalRouter(config)#hostname R1R1(config)#no ip domain-lookupR1(config)#line console 0R1(config-line)#exec-timeout 0 0R1(config-line)#logging synchronousR1(config-line)#exitR1(config)#interface ethernet0/0R1(config-if)#ip address 192.168.1.254 255.255.255.0R1(config-if)#no shutdownR1(config-if)#exitR1(config)#interface ethernet0/1R1(config-if)#ip address 192.168.12.1 255.255.255.0R1(config-if)#no shutdownR1(config-if)#endR1# 
?
 
配置R 2 : 
 
Router>enableRouter#configure terminalRouter(config)#hostname R2R2(config)#no ip domain-lookupR2(config)#line console 0R2(config-line)#exec-timeout 0 0R2(config-line)#logging synchronousR2(config-line)#exitR2(config)#interface ethernet0/0R2(config-if)#ip address 192.168.12.2 255.255.255.0R2(config-if)#no shutdownR2(config-if)#endR2# 
?
 
配置S W1 : 
 
Switch>enableSwitch#configure terminalSwitch(config)#hostname SW1SW1(config)#no ip domain-lookupSW1(config)#line console 0SW1(config-line)#exec-timeout 0 0SW1(config-line)#logging synchronousSW1(config-line)#exitSW1(config)#interface vlan 1SW1(config-if)#ip address 192.168.1.1 255.255.255.0SW1(config-if)#no shutdownSW1(config-if)#exitSW1(config)#ip default-gateway 192.168.1.254SW1(config)#endSW1# 
?
 
步驟2:配置L LDP 
 
配置R1:R1>enableR1#configure terminalR1(config)#lldp run   //運行LLDP 
?
 
配置R2:R2>enableR2#configure terminalR2(config)#lldp?run
配置SW1:SW1>enableSW1#configure terminalSW1(config)#lldp run 
實驗檢查
 
?
 
步驟1:檢查設備的接口狀態(tài) 
 
檢查R 1 : 
 
R1#show ip interface briefInterface                  IP-Address      OK? Method Status                ProtocolEthernet0/0                192.168.1.254   YES manual up                    up      Ethernet0/1                192.168.12.1    YES manual up                    up      Ethernet0/2                unassigned      YES unset  administratively down down    Ethernet0/3                unassigned      YES unset  administratively down down    R1使用到的接口已經(jīng)配置好IP地址,并且是up up狀態(tài)。 
?
 
檢查R2:R2#show ip interface briefInterface                  IP-Address      OK? Method Status                ProtocolEthernet0/0                192.168.12.2    YES manual up                    up      Ethernet0/1                unassigned      YES TFTP  administratively down down    Ethernet0/2                unassigned      YES unset  administratively down down    Ethernet0/3                unassigned      YES unset  administratively down down    R2使用到的接口已經(jīng)配置好IP地址,并且是up up狀態(tài)。 
?
 
檢查SW1:SW1#show ip interface briefInterface              IP-Address      OK? Method Status                ProtocolEthernet0/0            unassigned      YES unset  up                    up      Ethernet0/1            unassigned      YES unset  up                    up      Ethernet0/2            unassigned      YES unset  up                    up      Ethernet0/3            unassigned      YES unset  up                    up      Vlan1                 192.168.1.1     YES manual up                    up      SW1使用到的接口已經(jīng)配置好IP地址,并且是up up狀態(tài)。 
?
 
步驟2:使用 LLD P查看物理相連的設備信息 
 
檢查R1上運行LLDP的接口:R1#show lldp interfaceEthernet0/0:    Tx: enabled    Rx: enabled    Tx state: IDLE    Rx state: WAIT FOR FRAMEEthernet0/1:    Tx: enabled    Rx: enabled    Tx state: IDLE    Rx state: WAIT FOR FRAMEEthernet0/2:    Tx: enabled    Rx: enabled    Tx state: INIT    Rx state: WAIT PORT OPEREthernet0/3:    Tx: enabled    Rx: enabled    Tx state: INIT --More--R1的E0/0和E0/1接口已經(jīng)運行LLDP。 
?
 
檢查R1上的LLDP鄰居:R1#show lldp neighborsCapability codes:    (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device    (W) WLAN Access Point, (P) Repeater, (S) Station, (O) OtherDevice ID           Local Intf     Hold-time  Capability      Port IDSW1                 Et0/0          120        R               Et0/0R2                   Et0/1          120        R               Et0/0Total entries displayed: 2R1上能夠看到SW1和R2兩個LLDP鄰居。 
?
 
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 
檢查R1上的LLDP條目:R1#show lldp entry *Capability codes:    (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device    (W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other------------------------------------------------Local Intf: Et0/0   //R1本端的接口Chassis id: aabb.cc00.3000Port id: Et0/0   //對端的接口Port Description: Ethernet0/0System Name: SW1   //對端設備的主機名System Description:Cisco IOS Software, Linux Software (I86BI_LINUXL2-ADVENTERPRISEK9-M), Version 15.2(CML_NIGHTLY_20190423)FLO_DSGS7, EARLY DEPLOYMENT DEVELOPMENT BUILD, synced to  V152_6_0_81_ETechnical Support: http://www.cisco.com/techsupportCopyright (c) 1986-2019 byTime remaining: 103 secondsSystem Capabilities: B,REnabled Capabilities: RManagement Addresses:    IP: 192.168.1.1   //SW1的IP地址Auto Negotiation - not supportedPhysical media capabilities - not advertisedMedia Attachment Unit type - not advertisedVlan ID: - not advertised------------------------------------------------Local Intf: Et0/1Chassis id: aabb.cc00.2000Port id: Et0/0Port Description: Ethernet0/0System Name: R2System Description:Cisco IOS Software, Linux Software (I86BI_LINUX-ADVENTERPRISEK9-M), Version 15.7(3)M2, DEVELOPMENT TEST SOFTWARETechnical Support: http://www.cisco.com/techsupportCopyright (c) 1986-2018 by Cisco Systems, Inc.Compiled Wed 28-Mar-18 11:18 by prod_rel_teTime remaining: 98 secondsSystem Capabilities: B,REnabled Capabilities: RManagement Addresses:    IP: 192.168.12.2Auto Negotiation - not supportedPhysical media capabilities - not advertisedMedia Attachment Unit type - not advertisedVlan ID: - not advertisedTotal entries displayed: 2R1有兩個CDP鄰居,分別是SW1和R2。 
?
 
?
 
1
 
?
 
?
 
end 
 
?
                            總結 
                            
                                以上是生活随笔 為你收集整理的不会还有人不会配置LLDP链路层发现协议吧? 的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
                            
                            
                                如果覺得生活随笔 網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔 推薦給好友。