快捷键:tab:补全键,接下来我们就来聊聊关于思科交换机配置命令大全详细 交换机常用配置命令?以下内容大家不妨参考一二希望能帮到您!

思科交换机配置命令大全详细 交换机常用配置命令

思科交换机配置命令大全详细 交换机常用配置命令

快捷键:

tab:补全键

ctrl u : 快速删除光标前所有字符

ctrl a : 快速定位光标到行首

ctrl e : 快速定位光标到行尾

exit :退出一级

end: 直接退到特权模式

交换机启动原理:首先从硬盘中查找【startup-config】文件,若存在,则直接复制到内存中并改名为running-config,反之,创建新的running-config

一、特权模式下的命令

1)重启设备(enable 模式下)

Switch#reload

Proceed with reload? [confirm]

第一次开机或者初始化【硬盘中无startup-config文件】,系统会在内存中自动生成一个干净的running-config

2)保存配置(enable 模式下)

Switch#copy running-config startup-config

Switch#write

3)清空/擦除/初始化配置(enable 模式下)

Switch# erase startup-config

4)查看running-config配置(enable 模式下)

Switch# show running-config

5)查看startup-config配置(enable 模式下)

Switch# show startup-config

6)查看Mac地址表(enable 模式下)

Switch# show mac-address-table

Mac Address Table

-------------------------------------------

Vlan Mac Address Type Ports

---- ----------- -------- -----

1 0040.0b7e.c726 DYNAMIC Fa0/2

1 00d0.d398.2dea DYNAMIC Fa0/1

7)查看接口状态(enable 模式下)

Switch#show ip interface brief

二、line console 0模式下的命令

1)设置用户密码(line console 0模式下)

Switch(config)#line console 0

【设置密码】

Switch(config-line)#password 123

【设置认证】

Switch(config-line)#login

三、全局模式下的命令

1)配置主机名(configure terminal模式下)

hostname 设备名

Switch(config)#hostname ming

ming(config)#

2)配置特权密码(configure terminal模式下)

Switch(config)# enable password 密码 (明文)

Switch(config)# enable secret 密码 (密文)

三、接口模式下的命令

1)手工关闭接口(接口模式下)

233(config)# in f0/4

233(config-if)#shutdown

2)手工开启接口(接口模式下)

233(config)#interface f0/4

233(config-if)#no shutdown

————————————————

删除命令:【no 空格】 命令;哪里配置就哪里删除

其他模式:【do 空格】 命令;可以强制使用特权模式的命令

233(config)#do write

233(config)#do reload

端口批量设置

Switch(config)#interface rang

Switch(config)#interface range f0/1 - 24

Switch(config-if-range)#

,