本文共 2736 字,大约阅读时间需要 9 分钟。
R1(config-if)#no shutdown R1(config-if)#no shutdown R2(config-if)#no shutdown R2(config-if)#no shutdown R2(config-if)#clock rate 128000 //以上是打开路由器间互连的各个接口,而默认时交换机S1 的所有接口就是打开的。 Global CDP information: Global CDP information: Sending CDP packets every 60 seconds Sending a holdtime value of 180 seconds Sending CDPv2 advertisements is enabled //默认时CDP 是运行的,每60 秒从接口发送cdp 消息;发送出的CDP 消息,邻居会为它保 GigabitEthernet0/0 is up, line protocol is up Sending CDP packets every 60 seconds GigabitEthernet0/1 is administratively down, line protocol is down Sending CDP packets every 60 seconds Serial0/0/0 is down, line protocol is down Sending CDP packets every 60 seconds Serial0/0/1 is administratively down, line protocol is down Sending CDP packets every 60 seconds Device ID Local Intrfce Holdtme Capability Platform Port ID R2 Ser 0/0/0 137 R S I 2821 Ser 0/0/0 S1 Gig 0/0 172 S I WS-C3560- Fas 0/1 //以上显示R1 路由器有两个邻居:R2 和S1。“Device ID”表示邻居的主机名;“Local Intrfce” 表明R1 通过该接口和邻居连接,注意是R1 上的接口;“Holdtme”指收到邻居发送的CDP 消息的时间,采用倒计时;“Capability”表明邻居是什么设备,第一、二行Capability Codes 对各符号进行了说明;“Platform”指明了邻居的硬件型号;“Port ID”指明了R1 是连接对 ------------------------- Platform: Cisco 2821, Capabilities: Router Switch IGMP Interface: Serial0/0/0, Port ID (outgoing port): Serial0/0/0 Cisco IOS Software, 2800 Software (C2800NM-ADVENTERPRISEK9-M), Version 12.4(11)T1, RELEASE Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2007 by Cisco Systems, Inc. Compiled Thu 25-Jan-07 12:50 by prod_rel_team VTP Management Domain: '' //以上是显示邻居R2 的详细信息,甚至可以知道邻居的IOS 版本 R1(config-if)#no cdp enable //以上是在g0/0 接口上关闭cdp,其他接口还运行CDP R1(config)#no cdp run //以上是在整个路由器上关闭cdp R1(config)#cdp run //在整个路由器上打开cdp R1(config)#cdp timer 30 //调整CDP 消息发送时间为30 秒 R1(config)#cdp holdtime 120 //调整CDP 消息的holdtime 为120 秒,对方收到该路由器发送的CDP 消息后将保持120 秒 Sending CDP packets every 30 seconds Sending a holdtime value of 120 seconds Sending CDPv2 advertisements is enabled 本文转自gauyanm 51CTO博客,原文链接:http://blog.51cto.com/gauyanm/234136,如需转载请自行联系原作者