华为交换机常用命令
一、更改Vlan
telnet <交换机IP>
输入用户名密码登录交换机
实例:将交换机2号端口加入Vlan3中
telnet 192.168.1.254 // 通过Telnet登录交换机 system-view // 进入配置视图 interface GigabitEthernet 0/0/2 // 进入端口0/0/2 port default vlan 3 // 将端口加入Vlan3中 quit // 退出视图 save // 保存 quit // 退出交换机
二、添加备注
实例:为交换机2号端口添加备注
telnet 192.168.1.254 // 通过Telnet登录交换机 system-view // 进入系统视图 interface GigabitEthernet 0/0/2 // 进入端口0/0/2 description xxxx // xxx为想备注的信息 quit // 退出视图 display current-configuration // 查看是否备注成功 save // 保存配置 quit // 退出交换机
三、查看接口状态
display interface Ethernet brief // 显示接口的运行状态和相关信息 display interface description // 查看接口的描述信息 display interface brief // 查看接口状态和配置的简要信息 display ip interface brief // 查看接口与IP相关的简要信息
四、查看接口的统计信息
display interface // 查看接口的统计信息 display counters // 查看接口的流量统计数 display counters error // 查看错误报文的统计信息 display counters rate // 查看接口的入方向或出方向流量速率 display ip interface // 查看接口和IP配置的相关信息