2024年6月11日发(作者:)

交换机常用配置命令

交换机常用配置命令

1.

在全局配置模式下进入接口模式

Switch(config)# Interface fastethernet 0/0

2.

在line接口模式下设置用户模式之前设置密码

Switch(config) #Line console 0

Switch(config-line)# password

Switch(config-line)# login

3.

在全局模式下为交换机配置主机名

Switch(config)# hostname XXXX

4.

在特权模式下查看交换机设置

Switch# show running-config

5.

在特权模式下设置使能口令

Switch# enable password XXXXX

6.

在特权模式下加密保存使能口令

Switch# enable secret XXXXX

7.

在全局模式下配置交换机网关

Switch(config)# ip default-gateway 192.168.1.1

8.

在特权模式下查看交换机的MAC地址

Switch# show mac-address table

9.

在特权模式下查看交换机直连设备

Switch# show cdp neighbors