把端口加入端口組裏面!!web
port-group 1 建立組1 group-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/10 將1到10加入到組1 port link-type access 接口類型爲接入模式 port access vlan 100 劃入vlan 100 or vlan 1200 [Huawei-vlan1200]port GigabitEthernet 0/0/1 to 0/0/3
建立vlan,配置trunkbash
[Huawei]vlan 1200 建立vlan1200 [Huawei-vlan1200]q [Huawei]vlan 1201 [Huawei-vlan1201]q [Huawei]int GigabitEthernet 0/0/1 [Huawei-GigabitEthernet0/0/1]port link-type trunk 配置trunk模式 [Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan [Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan 1200 容許vlan1200,1201 [Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan 1201
配置聚合:dom
[Huawei]int Eth-Trunk 1 建立聚合組 [Huawei-Eth-Trunk1]q [Huawei]int GigabitEthernet 0/0/3 把端口加入到聚合組裏 [Huawei-GigabitEthernet0/0/3]eth-trunk 1 [Huawei-GigabitEthernet0/0/3]int GigabitEthernet 0/0/2 [Huawei-GigabitEthernet0/0/2]eth-trunk 1 [Huawei-GigabitEthernet0/0/2]int GigabitEthernet 0/0/4 [Huawei-GigabitEthernet0/0/4]eth-trunk 1
在聚合的基礎上配置trunk:ssh
[Huawei]int Eth-Trunk 1 [Huawei-Eth-Trunk1]port link-type trunk [Huawei-Eth-Trunk1]port trunk allow-pass vlan 1200 [Huawei-Eth-Trunk1]port trunk allow-pass vlan 1201
配置遠程登陸:ide
[Huawei]aaa [Huawei-aaa]local-user test password cipher test 建立test用戶加密方式爲cipher密碼爲test [Huawei-aaa]local-user test service-type http ssh telnet web 應用於http,ssh,telnet,web [Huawei-aaa]local-user test level 3 用戶的權限模式,level3爲最高權限 [Huawei-aaa]q [Huawei]user-interface vty 0 4 進入虛擬終端 [Huawei-ui-vty0-4]authentication-mode aaa 認證方式採用aaa模式 [Huawei-ui-vty0-4]q
開啓snmp(一般用於監控交換機)ui
[H3C]snmp-agent sys-info version v2c [H3C]snmp-agent community read monitor [H3C]snmp-agent trap enable [H3C]snmp-agent target-host trap address udp-domain 172.10.0.251 udp-port 162 params securityname monitor v2c
編寫靜態路由:加密
ip route-static 192.168.1.0 255.255.255.0 192.168.2.2 ip route-static 0.0.0.0 0.0.0.0 192.168.1.1
保存配置spa
save
清除配置orm
reset saved-configuration