思科路由简单命令

1.思科路由器 ,登录默认进入用户模式,第一次进入,会让你选择是否进入引导进行简单设置

2.查看此模式下面的命令

命令 +?

3.模式切换命令

enable   进入特权命令
configure terminal 进入全局配置模式
end   退出全局配置模式
ctrl+z 退出全局配置模式
exit  退出
disable 退出

4.设备命名

hostname R10 
ctrl +v shift ? 控制台输入?

5.设置密码 

enable password 123456
enable secret 123456 | enable secret level 7 123456 设置加密密码

6.保存配置 ,当前正在运行的配置写入开启启动配置

write 

7.查看配置命令

show startup-config或者wr

8.查看配置

 copy running-coonfig startup -config

9.恢复出厂设施

wr er (write erase) 

10.删除配置

 no hostname

11.设置标语 

Banner motd #输入你想输入的字符#结束

12.设置时间时区 在全局配置

clock timezone GMT + 8
do show clock  查看当前时间 

clock set 21:46:30 13 jun 2019  设置时间 

13.配置IP进入全局配置模式

int e0/0 进入e0/0 接口
IP address 10.0.0.1 255.255.255.252 设置ip
no shutdown  启动接口

14.查看接口状态

show ip interface brief 接口摘要
show cdp neighbors detail 用于搜集吡邻信息

show int e0/0 查看详细

description Connected_R1_e0/0  配置描述

sh run int e0/0  显示描述

15.查看各个接口链接

sh cdp neighbors (思科私有)

15.查看详细cdp条目

sh cdp entry 

16.开启lldp协议(公用协议)

lldp run
show lldp neighbors

17.密码重置

1.升级备份tftp ftp    Xmodem(适用系统被删除破坏了,传输速率低)
2.查看闪存卡中的show flash 备份 flash.ios (.bin) 到本地
3.tftpserver ,3cserver软件
4.密码重置 进入miniios系统 ,查看show flash,修改配置文件config,(rename flash:config.txt flash:config.old),然后空配启动,
载入旧配置(copy flash:config.txt system:running-config),
进入配置模式去掉密码(no enable secret) wr保存

18.关闭IP的路由功能

no ip routing 关闭IP的路由功能
show ip route 显示路由表

19.配置网关

ip default-gateway 192.168.1.1

20.手动添加静态路由 

IP route network-address subnet-mask {ip-add}

21.启动一个环回口,进入

interface loopbck 0

22.追踪两端中得每一跳 

tr ip (traceroute)

23.查看pc ip

do sh ip int br pc 
do sh ip ro 查路由
sh ip rip database

24. pc配置网关

IP default-gateway 10.10.20.254

25.rip协议

1.启动rip协议 router rip 
2.加入网络 network 0.0.0.0
3.do sh run | srr
4.no auto-summary 关闭自动汇总
5.version 2设置版本为2
6.passive-inerface e0/0 pas掉e0/0口不宣告路由消息

26.排错命令

show ip route |show ip protocols |debug ip rip | show ip interface brief
51.关闭dug undebug

猜你喜欢

转载自www.cnblogs.com/aqicheng/p/11996222.html