1.思科三大基本模式:
用户模式:Route> //进入特权模式:enable
特权模式:Route# // 进入全局模式:conf t
全局模式:Route(config)#
2.1.直接退出到特权模式:
1) Route(config)#End
2) Route(config)#Ctrl+Z
3) Route(config)#Ctrl+C
2.2.一级一级退出:
Route(config)#Exit
3.进入接口模式:
Route(config)#interface fastEthernet 0/1
Route(config)#int f0/1 //同上,此为简写
其中gigabitEthernet为千兆端口,fastEthernet为百兆端口,
4.修改设备名字:
Router(config)#hostname R1 //设备名称中间不能有空格!
R1(config)#
5.修改enable密码:
R1(config)#enable password 123 //明文显示
R1(config)#no enable password //删除明文密码,知道密码的情况
R1(config)#enable secret 123 //密文显示
R1(config)#no enable secret //删除密文密码,知道密码的情况
如果同时配置了明文和密文密码,明文密码将失效,只能使用密文密码。
6.保存当前运行配置:
1) R1#write memory //保存当前运行配置到启动配置
2) R1#copy running-config startup-config //以复制的方式把运行配置复制到启动配置,达到保存的目的
7.关闭域名解析:
R1(config)#no ip domain lookup
8.给接口配置IP地址:
R1(config)#int f0/1
R1(config-if)#ip add 192.168.1.1 255.255.255.0
9.show命令用于在特权模式下查看各种配置:
R1#show version //查看各种版本
R1#show running-config //查看运行配置
R1#show startup-config //查看启动配置
R1#show ip interface brief //查看接口简要信息,例如有哪些接口、IP地址、是否启用等