不会还有人不会配置LLDP链路层发现协议吧?
实验目的
1、了解链路层发现协议LLDP的运行原理
2、掌握链路层发现协议LLDP的配置方法
实验拓扑
实验需求
1、根据实验拓扑图,完成设备的基本配置;
2、在R1上使用LLDP查看SW1和R2的设备信息;
3、注意:LLDP默认关闭,需要手工打开。
实验步骤
步骤1:设备的基本配置
配置R1:
Router>enable
Router#configure terminal
Router(config)#hostname R1
R1(config)#no ip domain-lookup
R1(config)#line console 0
R1(config-line)#exec-timeout 0 0
R1(config-line)#logging synchronous
R1(config-line)#exit
R1(config)#interface ethernet0/0
R1(config-if)#ip address 192.168.1.254 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface ethernet0/1
R1(config-if)#ip address 192.168.12.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#end
R1#
配置R2:
Router>enable
Router#configure terminal
Router(config)#hostname R2
R2(config)#no ip domain-lookup
R2(config)#line console 0
R2(config-line)#exec-timeout 0 0
R2(config-line)#logging synchronous
R2(config-line)#exit
R2(config)#interface ethernet0/0
R2(config-if)#ip address 192.168.12.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#end
R2#
配置SW1:
Switch>enable
Switch#configure terminal
Switch(config)#hostname SW1
SW1(config)#no ip domain-lookup
SW1(config)#line console 0
SW1(config-line)#exec-timeout 0 0
SW1(config-line)#logging synchronous
SW1(config-line)#exit
SW1(config)#interface vlan 1
SW1(config-if)#ip address 192.168.1.1 255.255.255.0
SW1(config-if)#no shutdown
SW1(config-if)#exit
SW1(config)#ip default-gateway 192.168.1.254
SW1(config)#end
SW1#
步骤2:配置LLDP
配置R1:
R1>enable
R1#configure terminal
R1(config)#lldp run //运行LLDP
配置R2:
R2>enable
R2#configure terminal
R2(config)#lldp run
配置SW1:
SW1>enable
SW1#configure terminal
SW1(config)#lldp run
实验检查
步骤1:检查设备的接口状态
检查R1:
R1#show ip interface brief
Interface IP-Address OK? Method Status Protocol
Ethernet0/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 brief
Interface IP-Address OK? Method Status Protocol
Ethernet0/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 brief
Interface IP-Address OK? Method Status Protocol
Ethernet0/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 interface
Ethernet0/0:
Tx: enabled
Rx: enabled
Tx state: IDLE
Rx state: WAIT FOR FRAME
Ethernet0/1:
Tx: enabled
Rx: enabled
Tx state: IDLE
Rx state: WAIT FOR FRAME
Ethernet0/2:
Tx: enabled
Rx: enabled
Tx state: INIT
Rx state: WAIT PORT OPER
Ethernet0/3:
Tx: enabled
Rx: enabled
Tx state: INIT
--More--
R1的E0/0和E0/1接口已经运行LLDP。
检查R1上的LLDP邻居:
R1#show lldp neighbors
Capability codes:
(R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device
(W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other
Device ID Local Intf Hold-time Capability Port ID
SW1 Et0/0 120 R Et0/0
R2 Et0/1 120 R Et0/0
Total entries displayed: 2
R1上能够看到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.3000
Port id: Et0/0 //对端的接口
Port Description: Ethernet0/0
System 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_E
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2019 by
Time remaining: 103 seconds
System Capabilities: B,R
Enabled Capabilities: R
Management Addresses:
IP: 192.168.1.1 //SW1的IP地址
Auto Negotiation - not supported
Physical media capabilities - not advertised
Media Attachment Unit type - not advertised
Vlan ID: - not advertised
------------------------------------------------
Local Intf: Et0/1
Chassis id: aabb.cc00.2000
Port id: Et0/0
Port Description: Ethernet0/0
System Name: R2
System Description:
Cisco IOS Software, Linux Software (I86BI_LINUX-ADVENTERPRISEK9-M), Version 15.7(3)M2, DEVELOPMENT TEST SOFTWARE
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2018 by Cisco Systems, Inc.
Compiled Wed 28-Mar-18 11:18 by prod_rel_te
Time remaining: 98 seconds
System Capabilities: B,R
Enabled Capabilities: R
Management Addresses:
IP: 192.168.12.2
Auto Negotiation - not supported
Physical media capabilities - not advertised
Media Attachment Unit type - not advertised
Vlan ID: - not advertised
Total entries displayed: 2
R1有两个CDP邻居,分别是SW1和R2。
1
end
不会还有人不会配置LLDP链路层发现协议吧?相关推荐
- LLDP(链路层发现协议)
LLDP 链路层发现协议(LLDP)是一个厂商无关的二层协议,它允许网络设备在本地子网中通告自己的设备标识和性能. 目前,网络设备的种类日益繁多且各自的配置错综复杂,为了使不同厂商的设备能够在网络中相 ...
- LLDP链路层发现协议介绍
目录 背景 基本概念 LLDP报文 Ethernet II格式封装的LLDP报文 SNAP格式封装的LLDP报文 LLDPDU TLV 特点 工作机制 LLDP的工作模式 LLDP报文的发送机制 LL ...
- LLDP链路层发现协议
工作方式相同于思科CDP发现协议 将本端设备的的主要能力.管理地址.设备标识.接口标识等信息组织成不同的TLV(Type/Length/Value),封装在LLDPDU(链路层发现协议数据单元) 周期 ...
- lldp协议代码阅读_LLDP(链路层发现协议)和OpenFlow
1.LLDP(链路层发现协议)机制 链路层发现协议(LLDP)是一个厂商无关的二层协议,它允许网络设备在本地子网中通告自己的设备标识和性能.它提供了一种标准的链路层发现方式.LLDP协议使得接入网络的 ...
- lldp协议代码阅读_LLDP链路层发现协议详解
LLDP(链路层发现协议)是定义在802.1ab中的一个二层协议,接入网络的设备可以通过其,将管理地址.设备标识.接口标识等信息发送给同一个局域网络的其它设备. LLDP 帧格式 封装有 LLDP D ...
- 什么是链路层发现协议LLDP和LLDP-MED
什么是LLDP? LLDP 是一种 IEEE 标准协议(IEEE 802.1AB),它定义封装在以太网帧中的消息,目的是为设备提供向 LAN 上的其他设备宣布基本设备信息的方法.它类似于CDP,用于网 ...
- 修改服务器lldp的mac地址,通过命令行界面(CLI)配置链路层发现协议(LLDP)在交换机的端口设置...
SG350X#CONFIGURE 步骤3.进入您要通过输入以下配置的接口: SG350X(config)#interface [interface-id] Note:在本例中, ge1/0/6使用接口 ...
- 链路层典型协议(简述)
链路层 以太网协议,ARP协议: 链路层负责了相邻数据之间的数据转发: 以太网协议: 用于描述相邻设备通信: 协议格式: 48位对端&源端MAC地址:描述了相邻的亮哥指定物理硬件设备: 16位 ...
- 网络基础链路层--eth协议arp协议mtu
网络基础链路层--eth协议&arp协议&mtu 一.链路层 二.eth-以太网协议 (一)mac地址 三.arp-地址解析协议 (一)解析流程 (二)arp缓存为什么只有很短的一段时 ...
最新文章
- mysql导出数据到txt太慢_分享:mysql导出数据到txt文件
- php gt lte gte,springdata jpa封装数据库关键字(EQ, LIKE, GT, LT, GTE, LTE,IN)
- zynq交叉编译环境
- k8s组件批量启动、查看状态
- Vmware安装与使用
- 【摩天好课推荐】2 Python语言入门
- Deepin 15.7安装教程
- VTK:Video之FFMPEG
- java 数据字典 spring_springboot+redis+切面实现数据字典功能
- 6.5 Introduce Explaining Variable(引入解释性变量)
- violate、内存屏障
- 更改itunes备份路径【windows备份iphone数据】
- android 入侵检测系统,基于行为模式的Android平台入侵检测系统的设计与实现
- 软考之网络工程师准备
- 一技随身计算机作文,生活技能作文(精选9篇)
- 以太坊中metamask、imtoken等钱包签名的php验证
- 《深入理解计算机系统》Lab3 Bomblab
- 钻石特工java下载_联想i909——S141升级后的改变
- [转载] 深入理解Android系统网络架构
- Choerodon前端环境变量方案
热门文章
- C语言练习题——动态数组
- [SUCTF2018]babyre [ACTF新生赛2020]fungame
- 比赛的一道题:SCSHOP1.5代码审计
- 007 Android之Broadcast Receiver
- Debian 8安装Lamp 的坑
- 1、数据库是什么?关系型数据库和非关系型数据库又是什么?
- 阿里云服务器外网访问问题
- Oracle中的常用的数据类型
- 计算机基本水平测试内容,浙江师范大学计算机基础水平测试大纲(2018级新生使用)...
- 关闭裁剪功能_4个图片裁剪技巧,瞬间看出Word大神与小白的差距!