华为交换机常用命令 (华为交换机配置vlan命令)

以下是华为交换机的一些常见命令:

1. display interfaces:显示接口信息。

2. display vlan:显示 VLAN 信息。

3. vlan batch x to y:批量创建 VLAN。

4. interface ethernet/x/y:进入以太网接口视图。

5. ip address x.x.x.x/x:配置接口 IP 地址。

6. shutdown:关闭接口。

7. no shutdown:启用接口。

8. port link-type access/trunk:设置接口类型为访问或中继。

9. port trunk allow-pass vlan x:允许 VLAN x 通过中继接口。

10. stp enable/disable:启用或禁用生成树协议。

11. stp priority x:设置交换机的生成树优先级。

12. dhcp snooping enable:启用 DHCP Snooping。

13. ip source guard enable:启用 IP 源防护。

14. mac-address learning enable/disable:启用或禁用 MAC 地址学习。

15. port-security enable:启用端口安全。

16. port-security mac-address x:配置允许的 MAC 地址。

17. qos trust dscp/cos:配置 QoS 信任 DSCP 或 CoS。

18. qos queue scheduling-mode wrr/strict-priority:设置队列调度模式。

19. acl number x:创建访问控制列表 ACL x。

20. rule x permit/deny ip source/destination x.x.x.x/x:配置 ACL 规则。

21. traffic shaping:配置流量整形。

22. bandwidth-limit ingress/egress x:限制输入/输出带宽。

23. mirroring source-interface ethernet/x/y destination-interface ethernet/x/y:配置端口镜像。

24. remote span source-interface ethernet/x/y destination-ip x.x.x.x:配置远程端口镜像。

25. snmp-server community public ro:配置 SNMP 社区。

26. snmp-server host x.x.x.x traps:配置 SNMP 陷阱主机。

27. ntp server x.x.x.x:配置 NTP 服务器。

28. ntp enable:启用 NTP。

29. logging level debug/error/warning/information:设置日志级别。

30. logging buffer size x:配置日志缓冲区大小。

31. system name x:设置交换机名称。

32. username x password x:配置用户名和密码。

33. line vty 0 4:进入虚拟终端线路配置。

34. authentication-mode password:启用密码认证。

35. privilege level x:设置用户权限级别。

36. ntp clock-period x:设置 NTP 时间同步周期。

37. ip route x.x.x.x/x y.y.y.y:配置静态路由。

38. rip/ospf/bgp:进入相应的路由协议配置。

39. router-id x:设置路由协议的路由器 ID。

40. vrrp vrid x virtual-ip x.x.x.x:配置 VRRP 虚拟路由器 ID 和虚拟 IP 地址。

41. vrrp priority x:设置 VRRP 优先级。

42. monitor session x source-interface ethernet/x/y both/received/sent:配置流量监控会话。

43. monitor session x destination-interface ethernet/x/y:配置监控会话的目标接口。

44. spanning-tree portfast:启用快速端口。

45. spanning-tree bpduguard enable:启用 BPDU 防护。

46. port link-flap protect:启用接口链路抖动保护。

47. energy-efficient-ethernet enable:启用节能以太网。

48. lldp run:启用 LLDP。

49. lldp tx-mode tx-only/tx-rx:设置 LLDP 发送模式。

50. display cpu-usage:显示 CPU 使用率。

华为交换机清除配置命令,华为交换机端口镜像的命令