C i s c o发现协议( C D P )是理解网络拓扑结构的最好方法之一。C D P是层2上的和介质和协议无关的协议,它运行在所有C i s c o制造的设备上,包括路由器、交换机和访问服务器。为了使用C D P,设备并不需要一定要配置任何网络层协议,尽管如果配置了这些地址, C D P可以找到它们。每个配置了C D P的设备向一个M A C层的多点传送地址发送周期性的消息。这些宣告包括关于发布宣告的平台的功能和软件版本的信息。
ps:CDP既然是运行在CISCO设备上的工具,也就是说它只能发现CISCO设备,其他厂商的设备它是发现不了的.
要求R2能够发现运行着的邻居路由器;
 
1) 进入到R2,打开R2的E0和S0端口;
R2(config)# interface serial 0
R2(config-if)# no shutdown 
R2(config-if)# interface ethernet 0
R2(config-if)# no shutdown
R2(config-if)
2)进入到R1,打开R1的S0端口;
R1(config)# interface serial 0
R1(config-if)# clock rate 64000    设置时钟脉冲
R1(config-if)# no shutdown
3)  查看端口状态
R2# show ip interface brief
4)进入到R2,键入show cdp neighbor和show cdp neighbor detail命令,查看输出信息;
R2# show cdp neighbor
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater
Device ID Local Intrfce Holdtme Capability Platform Port ID
Switch Eth 0 130 T S WS-C2924-XFas 0/4
R1 Ser 0 153 R 2500 Ser 0
R2# show cdp neighbor detail
-------------------------
Device ID: Switch
Entry address(es):
Platform: cisco WS-C2924-XL, Capabilities: Trans-Bridge Switch
Interface: Ethernet0, Port ID (outgoing port): FastEthernet0/4
Holdtime : 175 sec
........
 
 
在TFTP服务器上备份配置文件和IOS
 
配置过程:
1)使用一根反线将路由器和PC机连接起来,配置路由器E0口的IP地址为192.168.1.1,配置PC机网卡的IP地址为192.168.1.2;测试之间的连通性;
2)在PC机上装载TFTP SERVER软件;
3)配置路由器将配置文件导入TFTP服务器;
# configure terminal
# ping 192.168.1.2
# copy running-configuration tftp
#Address or name of remote host [ ] ?
#Destination filename [mdcl-confg]?
4)配置路由器将IOS文件导入TFTP服务器;
# configure terminal
# ping 192.168.1.2
# copy flash tftp
#Address or name of remote host [ ] ?