H3C_华三交换机常用命令

H3C交换机

口令设置:

进入特权模式:system-view
进入全局配置模式:system-view
设置交换机主机名:sysname SW-01
设置特权加密口令:super password cipher H3C
设置特权非密口令:super password simple H3C

开启远程访问

配置VLAN 1的IP地址:interface Vlan-interface1
设置IP地址:ip address 192.168.1.254 24
设置默认网关:ip route-static 0.0.0.0 0 192.168.1.1
配置虚拟终端访问:user-interface vty 0 4
允许登录:authentication-mode scheme
设置登录口令:set authentication password simple H3C

控制台口令

进入控制台口:user-interface console 0
允许登录:authentication-mode password
设置登录口令:set authentication password simple H3C

基本接口配置

进入指定接口:interface GigabitEthernet1/0/1
配置全双工模式:duplex full
配置速率:speed 100
设置接口描述:description to Server
设置域名服务器:domain name h3c.com
设置MAC表超时时间:mac-address timer aging 300
保存配置:save
清除配置文件:reset saved-configuration

交换机VLAN设置:

进入VLAN设置:vlan 10
创建VLAN:vlan 10
删除VLAN:undo vlan 10
将端口加入VLAN:port access vlan 10
配置Trunk模式:port link-type trunk
管理Trunk中的VLAN:port trunk permit vlan 10

链路聚合配置

创建聚合组:interface Bridge-Aggregation 1
绑定物理接口:interface GigabitEthernet1/0/1
加入聚合组:port link-aggregation group 1
查看聚合组状态:display link-aggregation summary

生成树stp:

启用STP:stp enable
指定根交换机:stp root primary
设置优先级:stp priority 4096
查看STP信息:display stp

交换机显示命令:

查看运行配置:display current-configuration
查看端口状态:display interface brief
查看ARP表:display arp
查看系统版本:display version
查看MAC表:display mac-address
查看配置文件:display saved-configuration