Lab2:CDP命令相关

实验要求 :
1.       路由器名: CCNA1 CCNA2 CCNA3
2.       设置 password cisco1,secret cisco2,vty cisco3, 并要求所有密码都加密。
3.       配置各路由器

实验过程:
      配置路由器 1
router>en
router#configure terminal
router(config)#hostname ccna1                                               设置路由器名
ccna1(config)#enable password cisco1                                         设置 password
ccna1(config)#enable secret cisco2                                           设置 secret
ccna1(config)#line vty 0 4                                                                                                                
ccna1(config-line)#login
ccna1(config-line)#pass cisco3                                                  设置 vty 密码
ccna1(config-line)#exit
ccna1(config)#service password-encryption                                            对密码加密
ccna1(config)#int s0
ccna1(config-if)#ip add 202.119.249.1 255.255.255.0                               设置 s0
ccna1(config-if)#clock rate 64000                                               设置时钟只在 DCE 端配置
ccna1(config-if)#no shut
ccna1(config-if)#exit
ccna1(config)#exit
ccna1#
配置路由器 2
router>enable
router#conf t
router(config)#host ccna2                                                   设置路由器名
ccna2(config)#enable password cisco1                                        设置 password
ccna2(config)#enable secret cisco2                                           设置 secret
ccna2(config)#line vty 0 4                                                                                                               
ccna2(config-line)#login
ccna2(config-line)#pass cisco3                                                  设置 vty 密码
ccna2(config-line)#exit
ccna2(config)#service password-en                                           对密码加密
ccna2(config)#int s0                                                          设置 s0
ccna2(config-if)#ip add 202.119.248.1 255.255.255.0                              
ccna2(config-if)#clock rate 64000
ccna2(config-if)#no shut
ccna2(config-if)#exit
ccna2(config)#int s1                                                          设置 s1
ccna2(config-if)#ip add 202.119.248.2 255.255.255.0
ccna2(config-if)#no shut
ccna2(config-if)#exit
ccna2(config)#exit
ccna2#
配置路由器 3
router>en
router#conf t
router(config)#host ccna3                                                  设置路由器名
ccna3(config)#enable password cisco1                                        设置 password
ccna3(config)#enable secret cisco2                                           设置 secret
ccna3(config)#line vty 0 4                                                                                                                
ccna3(config-line)#login
ccna3(config-line)#pass cisco3                                               设置 vty 密码
ccna3(config-line)#exit
ccna3(config)#service password-en                                           对密码加密
ccna3(config)#int s1                                                          设置 s1
ccna3(config-if)#ip add 202.119.248.2 255.255.255.0
ccna3(config-if)#no shut
ccna3(config-if)#exit
ccna3(config)#exit
ccna3#
在路由器 2 上操作:
show cdp neighbors                                            显示相连的网络器件
show cdp                                                   显示 CDP 信息
show cdp traffic                                              显示 CDP 所用的数据包的信息
show cdp entry *                                             显示所有相邻路由器的所有信息
show cdp entry WORD( 路由器名 )                               显示该路由器的所有信息
un all                                                       关闭所有 DEBUG 信息
(config)#cdp run                                              启动 CDP 协议
disconnect ( 端口号 )                                           放弃该端口的连接
show cdp interface  ( 端口 )                                    显示该端口的 CDP 信息
clear cdp counter                                             清除 CDP 计数器
debug cdp packet                                             启动 CDP 数据包调试模式

你可能感兴趣的:(命令,职场,休闲)