华为交换机的配置命令主要包括以下几个方面:
基本配置命令
进入系统视图:`system-view`
退出系统视图:`quit`
保存配置:`save`
重启设备:`reboot`
查看配置:`display current-configuration`
VLAN配置命令
创建VLAN:`vlan [vlan-id]`
删除VLAN:`undo vlan [vlan-id]`
进入VLAN:`interface vlan [vlan-id]`
将端口放入VLAN:`port link-type access` 或 `port default vlan [vlan-id]`
删除VLAN中的端口:`undo port [port-id]`
端口配置命令
查看端口信息:`display interface [interface-name]`
设置端口为access模式:`port link-type access`
设置端口为trunk模式:`port link-type trunk`
配置管理地址
配置VLAN管理地址:`interface vlanif [vlan-id] ip address [ip-address] [subnet-mask]`
配置Telnet远程访问
开启Telnet服务:`telnet server enable`
限制用户数量登录:`user-int vty 0 4` 和 `authentication-mode password`
查看和配置ACL(访问控制列表)
查看ACL应用信息:`display packet-filter interface [interface-name]`
查看所有ACL设置:`display acl all` 或 `display acl config all`
配置ACL规则:`acl number [acl-number]` 和 `rule [rule-number] [protocol] [source] [destination] [action]`
查看设备状态
查看CPU信息:`display cpu`
查看内存使用情况:`display memory`
查看风扇状态:`display fan`
查看设备温度信息:`display temperature`
以上是一些基本的华为交换机配置命令。