Vlan聚合( Vlan aggregation):通常说的super(超级) vlan。是指在一个主vlan下包括多个处于同一个IP网段的从vlan,但只需为主VLANif配置IP地址,各从vlan使用主vlan的VLANif地址作为网关实现三层互通(ARP proxy)。目的是解决IP地址浪费,提高编址的灵活性。
配置聚合vlan之后,普通vlan方式的网络地址、广播地址、网关地址都可以拿来做主机地址用。
Super-vlan:只能在三层交换机创建,不能添加物理交换机端口,只能添加sub-vlan。
Sub-vlan:可以在二层和三层交换机创建,成员为连接用户的交换机端口,不能配置VLANif。
下面请看组网示例,按照常规vlan划分PC2的IP地址是网络地址不能用作主机地址。
具体配置:
在配置时,需先创建配置sub-vlan 再配置super-vlan。
[Huawei]vlan batch 2 3 100
#此处把vlan100 用作超级vlan,vlan2 vlan 3用作sub-vlan
[Huawei-GigabitEthernet0/0/2]port link-type access
[Huawei-GigabitEthernet0/0/2]port default vlan 2
[Huawei-GigabitEthernet0/0/3]port link-type a
[Huawei-GigabitEthernet0/0/3]port default vlan 2
[Huawei-GigabitEthernet0/0/22]port link-type access
[Huawei-GigabitEthernet0/0/22]port default vlan 3
#配置端口为连接主机模式
[Huawei-vlan100]aggregate-vlan
#配置vlan 100 为聚合vlan
[Huawei-vlan100]access-vlan 2 to 3
#把vlan2 vlan3 加入聚合vlan中
[Huawei-Vlanif100]arp-proxy inter-sub-vlan-proxy enable
#打开vlan内的arp代理功能,否则vlan之间无法三层通信
[Huawei-Vlanif100]ip address 10.1.1.254 24
配置完成后
测试用PC 1 ping PC2
PC>ping 10.1.1.4
Ping 10.1.1.4: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 10.1.1.4: bytes=32 seq=2 ttl=127 time<1 ms
From 10.1.1.4: bytes=32 seq=3 ttl=127 time<1 ms
From 10.1.1.4: bytes=32 seq=4 ttl=127 time=1 ms
From 10.1.1.4: bytes=32 seq=5 ttl=127 time<1 ms
--- 10.1.1.4 ping statistics ---
5 packet(s) transmitted
4 packet(s) received
20.00% packet loss
round-trip min/avg/max = 0/4/16 ms
下面是配置文件供参考
<Huawei>dis cu
#
sysname Huawei
#
vlan batch 2 to 3 100
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
drop-profile default
#
vlan 100
aggregate-vlan
access-vlan 2 to 3
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin service-type http
#
interface Vlanif1
#
interface Vlanif100
ip address 10.1.1.254 255.255.255.0
arp-proxy inter-sub-vlan-proxy enable
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 2
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 2
#
interface GigabitEthernet0/0/4
#
interface GigabitEthernet0/0/21
#
interface GigabitEthernet0/0/22
port link-type access
port default vlan 3
#
interface GigabitEthernet0/0/23
#
interface GigabitEthernet0/0/24
#
interface NULL0
#
user-interface con 0
user-interface vty 0 4
#
port-group a
#
return
<Huawei>