[CCNA]试验58 配置CDP协议



R1配置
r1(config)#int s1/2
r1(config-if)#ip ad 10.1.1.1 255.255.255.0
r1(config-if)#no sh

R2配置
r2(config)#int s2/1
r2(config-if)#ip ad 10.1.1.2 255.255.255.0
r2(config-if)#no sh

在R1上查看cdp

r1#sh
00:04:00: %SYS-5-CONFIG_I: Configured from console by console
r1#sh cdp nei
Capability Codes: R �C Router, T �C Trans Bridge, B �C Source Route Bridge
S �C Switch, H �C Host, I �C IGMP, r �C Repeater
Device ID        Local Intrfce     Holdtme    Capability  Platform  Port ID
r2                  Ser 1/2        155           R        3640      Ser 2/1

已经可以查看到R2的信息了

r1#sh cdp nei detail
――――――――-
Device ID: r2
Entry address(es):
IP address: 10.1.1.2
Platform: cisco 3640,  Capabilities: Router
Interface: Serial1/2,  Port ID (outgoing port): Serial2/1
Holdtime : 135 sec
Version :
Cisco Internetwork Operating System Software
IOS ™ 3600 Software (C3640-D-M), Version 12.0(4), RELEASE SOFTWARE (fc1)
Copyright (c) 1986-1999 by cisco Systems, Inc.
Compiled Thu 15-Apr-99 10:31 by ccai

可以查看到R2与R1直接接口的IP 路由器的型号和IOS的版本

r1#sh cdp traffic
CDP counters :
Packets output: 7, Input: 5
Hdr syntax: 0, Chksum error: 0, Encaps failed: 0
No memory: 0, Invalid packet: 0, Fragmented: 0

这条命令可以查看收到和发送的数据包数量

调试cdp
R1上
r1#debug cdp packets
CDP packet info debugging is on
r1#clear cdp table           清理cdp缓存表
r1#clear cdp counters     清理cdp计数器
00:08:10: CDP-PA: Packet received from r2 on interface Serial1/2
00:08:10: **Entry NOT found in cache**
00:08:12: CDP-PA: Packet sent out on Serial1/2

已经可以看见消息了

现在关闭R1的cdp服务

r1(config)#int s1/2
r1(config-if)#no cdp en

再次r1#sh cdp int s1/2

就看不见信息了

r1(config)#no cdp run  关闭所有接口的cdp服务

关闭了后再次查看cdp nei

r1#sh cdp nei
% CDP is not enabled

提示cdp没有开启

你可能感兴趣的:(职场,配置,协议,休闲)