H3C 华三交换机配置 Vlan,使用简单的单臂模式
VLAN 配置一览 VLAN-1 0.0.0.0/0 default VLAN-10 10.0.0.0/8 eg1/0/23 eg1/0/24 trunk uplink bridge-aggregation VLAN-31 172.16.0.0/16 eg1/0/1-eg1/0/4 access VLAN-32 172.17.0.0/16 eg1/0/5-eg1/0/8 access VLAN-410 192.168.100.0/24 eg1/0/9-eg1/0/12 access VLAN-420 192.168.200.0/24 eg1/0/13-eg1/0/16 access VLAN-999 10.0.99.0/24 eg1/0/22 access manage
1. 创建链路汇聚上行口 # 切换系统视图 sys # 创建链路汇聚接口,id=1 [H3C] interface bridge-aggregation 1 # 设置汇聚类型为动态, mode 默认为 static [H3C-Bridge-Aggregation1] link-aggregation mode static | dynamic # 设置为 trunk 上行主干 [H3C-Bridge-Aggregation1] port link-type trunk # 设置允许所有 vlan 上行 [H3C-Bridge-Aggregation1] port trunk permit vlan all
#切换到 GigabitEthernet1/0/25 [H3C-Bridge-Aggregation1] interface GigabitEthernet 1/0/25 # 设置为 trunk 上行主干 [H3C-GigabitEthernet1/0/25] port link-type trunk # 设置允许所有 vlan 上行 [H3C-GigabitEthernet1/0/25] port trunk permit vlan all #加入到链路汇聚组 1 [H3C-GigabitEthernet1/0/25] port link-aggregation group 1
#切换到 GigabitEthernet1/0/26 [H3C-GigabitEthernet1/0/25] interface GigabitEthernet 1/0/26 # 设置为 trunk 上行主干 [H3C-GigabitEthernet1/0/26] port link-type trunk # 设置允许所有 vlan 上行 [H3C-GigabitEthernet1/0/26] port trunk permit vlan all #加入到链路汇聚组 1 [H3C-GigabitEthernet1/0/26] port link-aggregation group 1 #配置完成 退出 [H3C-GigabitEthernet1/0/26] quit
2. 创建和配置 vlan # 启用 vlan [H3C] vlan enable
#创建和配置 vlan10 [H3C] vlan 10 #加入接口 [H3C-vlan10] port GigabitEthernet 1/0/23 to GigabitEthernet 1/0/24 #完成 [H3C-vlan10] quit
#创建和配置 vlan31 [H3C] vlan 31 #加入接口 [H3C-vlan31] port GigabitEthernet 1/0/1 to GigabitEthernet 1/0/4 #完成 [H3C-vlan31] quit
#创建和配置 vlan32 [H3C] vlan 32 #加入接口 [H3C-vlan32] port GigabitEthernet 1/0/5 to GigabitEthernet 1/0/8 #完成 [H3C-vlan32] quit
#创建和配置 vlan410 [H3C] vlan 410 #加入接口 [H3C-vlan410] port GigabitEthernet 1/0/9 to GigabitEthernet 1/0/12 #完成 [H3C-vlan410] quit
#创建和配置 vlan420 [H3C] vlan 420 #加入接口 [H3C-vlan420] port GigabitEthernet 1/0/13 to GigabitEthernet 1/0/16 #完成 [H3C-vlan420] quit
3. 配置管理用 vlan,网关 10.0.99.254,本机 IP10.0.99.253 #创建和配置 vlan999 [H3C] vlan 999 #加入接口 [H3C-vlan999] port GigabitEthernet 1/0/22 #清除管理端 ip [H3C-vlan999] undo ip address #创建管理端口到 ip 为 10.0.99.253 [H3C-vlan999] ip address 10.0.99.253 255.255.255.0 #管理接口 vlan 为 999 [H3C-vlan999] management-vlan 999 #完成 [H3C-vlan999] quit
4. 管理本地用户 [H3C] local-user admin #开启 telnet [H3C-luser-admin] service-type telnet #管理密码 [H3C-luser-admin] password simple admin #安全加密 [H3C-luser-admin] super password level 3 cipher admin #完成 [H3C-luser-admin] quit
5. 启用 web 管理 [H3C] ip http enable
#完成并保存 [H3C] save
#显示 Vlan [H3C] display vlan