文档详情

路由器设置命令.doc

发布:2017-12-07约5.28千字共5页下载文档
文本预览下载声明
路由器配置命令 路由器是局域网络与广域网络(或城域网)相连的必备设备,也是网络管理员必备的技能之一。 路由器的命令实际上难度和早期的dos操作系统或命令行的linux比较接近,但功能上要比以上操作系统单一很多。不同厂商的路由器命令有些许差别,但功能性的东西没有本质的差别。 以下是常用路由器配置命令。 1. 进入特权模式 enable router enable router # 2. 进入全局配置模式 configure terminal router enable router #configure terminal router (config)# 3. 重命名 hostname routera 以routerA为例 router enable router #configure terminal router(config)#hostname routerA routerA (config)# 4. 配置使能口令 enable password cisco 以cisco为例 router enable router #configure terminal router(config)#hostname routerA routerA (config)# enable password cisco 5. 配置使能密码 enable secret ciscolab 以cicsolab为例 router enable router #configure terminal router(config)#hostname routerA routerA (config)# enable secret ciscolab 6. 进入路由器某一端口 interface fastethernet 0/1 router enable router #configure terminal router(config)#hostname routerA routerA (config)# interface fastethernet 0/1 routerA (config-if)# 进入路由器的某一子端口 interface fastethernet 0/1.1 以1端口的1子端口为例 router enable router #configure terminal router(config)#hostname routerA routerA (config)# interface fastehernet 0/1.1 7. 设置端口ip地址信息 router enable router #configure terminal router(config)#hostname routerA routerA(config)# interface fastethernet 0/1 以1端口为例 routerA (config-if)#ip address 192.168.1.1 255.255.255.0 配置交换机端口ip和子网掩码 routerA (config-if)#no shut 启动此接口 routerA (config-if)#exit 8. 查看命令 show router enable router # show version 察看系统中的所有版本信息 show controllers serial + 编号查看串口类型 show ip route 查看路由器的路由表 9. cdp相关命令 router enable router # show cdp 查看设备的cdp全局配置信息 show cdp traffic 查看有关cdp包的统计信息 show cdp neighbors 列出与设备相连的cisco设备 10. csico2600的密码恢复 重新启动路由器,在启动过程中按下ctrl+break键,使路由器进入rom monitor模式。 在提示符下输入命令修改配置寄存器的值,然后重新启动路由器。 rommon1confreg 0×2142 rommon2reset 重新启动路由器后进入setup模式,选择“no”,退回到exec模式,此时路由器原有的配置仍然保存在startup-config中,为使路由器恢复密码后配置不变,则需要把startup-config中配置保存到running-config中,然后重新设置enable密码,并把配置寄存器的值改回0×2102。 routerenable router#copy startup-config running-config router#configure terminal router(config)#enable password cisco
显示全部
相似文档