cisco ios三种模式:
R1>:用户模式
R1#:特权模式
R1(config)#:全局配置模式
从用户模式到特权模式:enable
从特权模式到全局配置模式:configure terminal
注:使用exit退出当前模式
简单认识:
2个路由器配置如下:
R1(config)#int s1/0
//在全局配置模式下,进入接口
R1(config-if)#ip add 172.16.10.1 255.255.255.0
//配置接口IP
R1(config-if)#description connection to ISP
//接口描述
R1(config-if)#no shutdown
// 接口默认是关闭的,需要手动开启
R2(config)#int s1/0
R2(config-if)#ip add 172.16.10.2 255.255.255.0
R2(config-if)#no sh
一、测试连通性:
二、查看端口信息摘要 show ip interface brief
三、vty配置:在全局配置模式下
R1(config)#line vty 0 4
//允许同一时间 5个用户 登录设备
R1(config-line)#password cisco
//设置密码
R1(config-line)#login
//开启认证登录
vty 测试:
四、设置特权登录密码
即:从用户模式登录到特权模式的密码
R1(config)#enable password qaz123
验证:
五、console登录(安全)设置
R1(config)#line console 0
R1(config-line)#password qwer
R1(config-line)#login
测试: 保存配置后重启设备