一、工作模式
1.用户模式:
switch>
可以查看交换机基本信息,且不能做任何修改配置。
2.特权模式:
switch>enable
switch#
可以查看所有配置,且不能修改配置。
但可以做测试,保存,初始化等操作。
3.全局配置模式:
switch#configure terminal
switch(config)#
默认不能查看配置!
可以修改配置,且全局生效!
4.接口配置模式:
switch(config)#interface f0/1
switch(config-if)#
默认不能查看配置!
可以修改配置,且全局生效。
其他模式:
1)初始化配置模式-Line模式(console口)
switch(config)#line console 0
switch(config-line)#
2)VLAN配置模式:
switch>vlan database
switch(config-vlan)#
二、命令
1.保存配置
switch#copy running-config startup-config 从内存中将配置文件复制到硬盘中。
或者 write
2.交换机开机动作:
查找startup-config是否存在-如果不存在则在内存中新建running-config
-如果存在则复制到内存中并改名为running-config
3.查看running-config配置:
switch#show running-config
4.查看设备软硬件安装信息:
switch#show version
5.重启设备:
switch#reload
6.配置特权密码:
switch#configure terminal
switch(config)#enable password 密码 (明文)
enable secret 密码 (密文)