cisco设备基本配置命令
基本配置
1、系统配置对话框:空配时才会出现。
Continue with configuration dialog? [yes/no]:
YES:进入到一个设置向导
√ NO:直接使用命令行配置
2、配置模式转换
Router> //用户模式:查看
Router>enable //进入特权模式
Router# //特权模式:查看
Router#configure terminal //进入全局配置模式
Router(config)# //全局配置模式
Router(config)#hostname IGNB //修改设备名称
IGNB#show //看
3、用户模式、特权模式主要用于查看信息
Router>
Router#
IGNB#show ? //使用问号可以查看可敲的命令
IGNB#s? //以S开头的命令有什么
IGNB#show running-config //查看当前配置文件
IGNB#show startup-config //查看启机配置文件
IGNB#copy running-config startup-config //保存配置
IGNB#write //同上
show version //查看设备的型号,mac地址
Router#show ip interface brief //查看接口摘要信息
4、TAB补全机制(使用前提,命令必须是唯一的)
5、配置设备端口IP:
R1(config)#interface f0/0 //进入f0/0接口
R1(config-if)#ip address 192.168.1.1 255.255.255.0 //配置接口IP
6、注意:路由器接口一般默认关闭,交换机接口一班默认开启
R1(config-if)#no shutdown //开启接口
R1(config-if)#exit //返回上一层
R1(config-if)#end //直接返回到特权模式
7、敲错命令时会出现以下情况
Router>eeee
Translating "eeee"...domain server (255.255.255.255)
解决方法:
① ctrl + shift + 6
② Router(config)#no ip domain lookup
8、设置特权密码
Router(config)#enable password cisco
Router(config)#enable secret 123
注意:当同一设备同时配置了password 和 secret ,password会失效,只有secret奏效
设备管理
1、配置设备
console:控制线。
远程登录:telnet
web界面:HTTP
SNMP:接收随机消息(及事件报告)网络管理系统获知网络出现问题
ASDM:配置防火墙的图形管理界面
AUX口:用于备份console口 //实际应用很少用到,和router一样,很少插拔,很少单独坏掉。
2、详细解释
line con 0
!
line aux 0
!
line vty 0 4
login
!
(1)Console 口(物理接口)
用于终端接入交换机等网络设备,终端可对网络设备进行配置
//默认没有login
如果需要给console设置密码认证,
R1(config)#line console 0 //注意只有一个console <0> 口
R1(config-line)#password cisco
R1(config-line)# login //console默认没有login,需要手动配置
(2)VTY链路(虚拟,实现终端远程登陆配置)
vty <0-15>
R1(config)#line vty 0 4 //进入VTY 0-4号链路
R1(config-line)#password cisco //为VTY链路配置密码
远程登录的优点:
突破路上的距离限制。
认证方式:
(1)R1(config-line)#login local //使用本地用户数据库认证
提示输入:
username:
password:
(2)R1(config-line)#login //使用密码认证
提示输入:
password:
注意:
R1(config)#line vty 0 4
R1(config-line)#password cisco
R1(config-line)#login local //使用本地用户数据库认证,密码认证失效
重新配置本地用户数据库:
R1(config)#username xxx
R1(config)#password xxx
更多推荐
cisco设备基本配置命令
发布评论