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

  1. 查看交换机基本信息:

display version // 查看交换机型号及版本信息 display device // 查看交换机设备信息 display interface brief // 查看交换机接口状态及速率信息

  1. 配置交换机基本参数:

sysname switch1 // 设置交换机名称为 switch1 vlan batch 2 to 10 // 批量创建 VLAN 2-10 interface GigabitEthernet 0/0/1 // 进入接口 GigabitEthernet 0/0/1 description Uplink to Core Switch // 配置接口描述信息 port link-type trunk // 配置接口为 Trunk 模式 port trunk allow-pass vlan 2 to 10 // 配置接口允许通过 VLAN 2-10 的数据帧

  1. 查看交换机配置信息:

display current-configuration // 查看当前交换机的配置信息 display vlan // 查看 VLAN 配置信息 display interface GigabitEthernet 0/0/1 // 查看接口 GigabitEthernet 0/0/1 的配置信息

  1. 配置交换机安全功能:

port-security enable // 开启端口安全功能 port-security mac-address max 2 // 设置端口最多允许接入 2 个 MAC 地址 port-security mac-address sticky // 配置端口为粘性 MAC 地址模式 port-security violation protect // 配置端口违规情况下的保护模式

  1. 配置交换机 STP 功能:

stp enable // 开启 STP 功能 stp mode rstp // 配置 STP 模式为 RSTP stp priority 0 // 配置 STP 优先级为 0 display stp // 查看当前 STP 配置信息

以上只是一些常用的命令,华为交换机拥有众多的命令和功能,需要根据实际需求进行选择和配置


原文地址: https://www.cveoy.top/t/topic/dwch 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录