华为交换机重启命令

华为交换机重启命令

restart。

华为交换机配置命令有以下几种:

1、用户模式:交换机启动后在控制台直接按车就进入用户模式(远程管理telnet 交换机ip时需要口令)。

——帮助

quit——退出当前模式返上一级

<switchone>ping ip-address——测试网络连通性

<switchone>telnet ip-address——从交换机登陆其它设备<switchone>super--从用户模式进入特权模式

2、特权模式:进入特权模式一般需要口令,可以防止非法登陆交换机

<switchone>display current——显示当前运行的配置

<switchone>save——保存当前运行的配置

<switchone>reboot——重启交换机

<switchone>display mac——显示mac地址表

<switchone>display inteface ethernet 0/1——查看以太网口状态

<switchone>system-view——从特权模式进入全局模式

3、全局模式:更改配置

a. 进入以太网口配置模式及相关配置

[switchone]interface ethernet ——0/1

[switchone-Ethernet0/1]shutdown/undo shutdown ——关闭/打开接口

[switchone-Ethernet0/1]port link-type access/trunk ——接口类型设为untagged端口(默认)/tagged端口(用于上行口和级联口)

access端口发出和接收的帧不带vlan标记,即untagged端口

trunk端口发出和接收的帧一般要带vlan标记,即tagged端口

设为tagged口后,还要做以下操作:

[switchone-Ethernet0/1]port trunk permit vlan 225 to 250——这条命令是允许有vlan标记225到250的帧上传

b. 进入vlan配置模式(为了便于操作,不用在接口模式下配置access,而在vlan模式下进行相关操作)

[switchone]vlan 225

[switchone-vlan225] port Ethernet 1/1将ethernet 1/1加入vlan225

c. 设置super口令

[switchone]super password simple 2403h 特权口令为2403h