实验目的

1、了解链路层发现协议LLDP的运行原理

2、掌握链路层发现协议LLDP的配置方法

实验拓扑

实验需求

1、根据实验拓扑图,完成设备的基本配置;

2、在R1上使用LLDP查看SW1和R2的设备信息;

3、注意:LLDP默认关闭,需要手工打开。

实验步骤

步骤1:设备的基本配置

配置R1

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#

配置R2

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#

配置SW1

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:配置LLDP

配置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:检查设备的接口状态

检查R1

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使用到的接口已经配置好IP地址,并且是up up状态。
检查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使用到的接口已经配置好IP地址,并且是up up状态。
检查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使用到的接口已经配置好IP地址,并且是up up状态。

步骤2:使用LLDP查看物理相连的设备信息

检查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接口已经运行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链路层发现协议吧?相关推荐

  1. LLDP(链路层发现协议)

    LLDP 链路层发现协议(LLDP)是一个厂商无关的二层协议,它允许网络设备在本地子网中通告自己的设备标识和性能. 目前,网络设备的种类日益繁多且各自的配置错综复杂,为了使不同厂商的设备能够在网络中相 ...

  2. LLDP链路层发现协议介绍

    目录 背景 基本概念 LLDP报文 Ethernet II格式封装的LLDP报文 SNAP格式封装的LLDP报文 LLDPDU TLV 特点 工作机制 LLDP的工作模式 LLDP报文的发送机制 LL ...

  3. LLDP链路层发现协议

    工作方式相同于思科CDP发现协议 将本端设备的的主要能力.管理地址.设备标识.接口标识等信息组织成不同的TLV(Type/Length/Value),封装在LLDPDU(链路层发现协议数据单元) 周期 ...

  4. lldp协议代码阅读_LLDP(链路层发现协议)和OpenFlow

    1.LLDP(链路层发现协议)机制 链路层发现协议(LLDP)是一个厂商无关的二层协议,它允许网络设备在本地子网中通告自己的设备标识和性能.它提供了一种标准的链路层发现方式.LLDP协议使得接入网络的 ...

  5. lldp协议代码阅读_LLDP链路层发现协议详解

    LLDP(链路层发现协议)是定义在802.1ab中的一个二层协议,接入网络的设备可以通过其,将管理地址.设备标识.接口标识等信息发送给同一个局域网络的其它设备. LLDP 帧格式 封装有 LLDP D ...

  6. 什么是链路层发现协议LLDP和LLDP-MED

    什么是LLDP? LLDP 是一种 IEEE 标准协议(IEEE 802.1AB),它定义封装在以太网帧中的消息,目的是为设备提供向 LAN 上的其他设备宣布基本设备信息的方法.它类似于CDP,用于网 ...

  7. 修改服务器lldp的mac地址,通过命令行界面(CLI)配置链路层发现协议(LLDP)在交换机的端口设置...

    SG350X#CONFIGURE 步骤3.进入您要通过输入以下配置的接口: SG350X(config)#interface [interface-id] Note:在本例中, ge1/0/6使用接口 ...

  8. 链路层典型协议(简述)

    链路层 以太网协议,ARP协议: 链路层负责了相邻数据之间的数据转发: 以太网协议: 用于描述相邻设备通信: 协议格式: 48位对端&源端MAC地址:描述了相邻的亮哥指定物理硬件设备: 16位 ...

  9. 网络基础链路层--eth协议arp协议mtu

    网络基础链路层--eth协议&arp协议&mtu 一.链路层 二.eth-以太网协议 (一)mac地址 三.arp-地址解析协议 (一)解析流程 (二)arp缓存为什么只有很短的一段时 ...

最新文章

  1. mysql导出数据到txt太慢_分享:mysql导出数据到txt文件
  2. php gt lte gte,springdata jpa封装数据库关键字(EQ, LIKE, GT, LT, GTE, LTE,IN)
  3. zynq交叉编译环境
  4. k8s组件批量启动、查看状态
  5. Vmware安装与使用
  6. 【摩天好课推荐】2 Python语言入门
  7. Deepin 15.7安装教程
  8. VTK:Video之FFMPEG
  9. java 数据字典 spring_springboot+redis+切面实现数据字典功能
  10. 6.5 Introduce Explaining Variable(引入解释性变量)
  11. violate、内存屏障
  12. 更改itunes备份路径【windows备份iphone数据】
  13. android 入侵检测系统,基于行为模式的Android平台入侵检测系统的设计与实现
  14. 软考之网络工程师准备
  15. 一技随身计算机作文,生活技能作文(精选9篇)
  16. 以太坊中metamask、imtoken等钱包签名的php验证
  17. 《深入理解计算机系统》Lab3 Bomblab
  18. 钻石特工java下载_联想i909——S141升级后的改变
  19. [转载] 深入理解Android系统网络架构
  20. Choerodon前端环境变量方案

热门文章

  1. C语言练习题——动态数组
  2. [SUCTF2018]babyre [ACTF新生赛2020]fungame
  3. 比赛的一道题:SCSHOP1.5代码审计
  4. 007 Android之Broadcast Receiver
  5. Debian 8安装Lamp 的坑
  6. 1、数据库是什么?关系型数据库和非关系型数据库又是什么?
  7. 阿里云服务器外网访问问题
  8. Oracle中的常用的数据类型
  9. 计算机基本水平测试内容,浙江师范大学计算机基础水平测试大纲(2018级新生使用)...
  10. 关闭裁剪功能_4个图片裁剪技巧,瞬间看出Word大神与小白的差距!