华为交换机
口令设置:
进入特权模式:system-view
设置交换机主机名:sysname SW-01
设置特权加密口令:super password cipher huawei
设置特权非密口令:super password simple huawei
开启远程访问
配置VLAN 1的IP地址:interface Vlanif1
设置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 password
设置登录口令:set authentication password cipher 123456
控制台口令
进入控制台口:user-interface console 0
允许登录:authentication-mode password
设置登录口令:set authentication password cipher Console@123
基本接口配置
进入指定接口:interface GigabitEthernet0/0/1
配置全双工模式:duplex full
配置速率:speed 1000
设置接口描述:description to Server
设置域名服务器:dns server 8.8.8.8
设置MAC表超时时间:mac-address aging-time 300
保存配置:save
清除配置文件:reset saved-configuration
交换机VLAN设置:
创建VLAN:vlan 10
删除VLAN:undo vlan 10
将端口加入VLAN:port default vlan 10
配置Trunk模式:port link-type trunk
管理Trunk中的VLAN:port trunk allow-pass vlan 10
链路聚合配置
创建聚合组:interface Eth-Trunk1
绑定物理接口:eth-trunk 1
查看聚合组状态:display eth-trunk 1
生成树stp:
启用STP:stp enable
指定根交换机:stp root primary
设置优先级:stp priority 4096
查看命令:
查看运行配置:display current-configuration
查看端口状态:display interface brief
查看ARP表:display arp
查看系统版本:display version
查看MAC表:display mac-address
查看配置文件:display saved-configuration