分类:
2012-02-07 21:08:22
本示例拓扑结构如图20-10所示。
图20-10 Super VLAN简单配置示例拓扑结构
要求如下:
l 创建Super VLAN 10,VLAN接口的IP地址为10.0.0.1/24。
l 创建Sub VLAN:VLAN 2、VLAN 3、VLAN 5。
l 交换机端口GigabitEthernet1/0/1和端口GigabitEthernet1/0/2属于VLAN 2,端口GigabitEthernet1/0/3和端口GigabitEthernet1/0/4属于VLAN 3,端口GigabitEthernet1/0/5和端口GigabitEthernet1/0/6属于VLAN 5。
l 各Sub VLAN的用户之间能够满足二层隔离和三层互通。
具体的配置步骤如下:
(1)创建三个Sub VLAN,并把对应的端口添加到所属的Sub VLAN中(注意,交换机上各端口默认都是Access类型端口)。
[Sysname] vlan 2
[Sysname-vlan2] port gigabitethernet 1/0/1 gigabitethernet 1/0/2
[Sysname-vlan2] quit
[Sysname] vlan 3
[Sysname-vlan3] port gigabitethernet 1/0/3 gigabitethernet 1/0/4
[Sysname-vlan3] quit
[Sysname] vlan 5
[Sysname-vlan5] port gigabitethernet 1/0/5 gigabitethernet 1/0/6
[Sysname-vlan5] quit
(2)创建Super VLAN 10(但不要添加任何物理端口),并为它对应的VLAN接口配置IP地址10.0.0.1/24,同时开启本地ARP代理功能以实现各Sub VLAN间的三层通信。
[Sysname] vlan 10
[Sysname-vlan10] interface vlan-interface 10
[Sysname-Vlan-interface10] ip address 10.0.0.1 255.255.255.0
[Sysname-Vlan-interface10] local-proxy-arp enable
[Sysname-Vlan-interface10] quit
如果要设置与路由器相关的接口为Trunk类型端口,则必须在创建了Super VLAN后才可以进行,而不能先把某端口转换成Trunk类型再创建Super VLAN。因为先转换成Trunk类型端口再创建Super VLAN时,Trunk端口就会自动加入到Super VLAN,而Super VLAN是强制不能有任何物理端口加入的。
(3)建立Super VLAN 10与Sub VLAN 2、Sub VLAN 3和Sub VLAN 5之间的映射关系。
[Sysname] vlan 10
[Sysname-vlan10] supervlan
[Sysname-vlan10] subvlan 2 3 5
[Sysname-vlan10] quit
[Sysname] quit
(4)通过display supervlan命令查看Super VLAN配置信息,验证配置是否生效。从输出信息中可以看出,Super VLAN 10所对应的Sub VLAN有三个,即VLAN 2、VLAN 3和VLAN 5。从中也可以看出各Sub VLAN中的端口成员及其他信息。而且可以发现,各Sub VLAN都已配置了路由接口,且都为Super VLAN 10所对应的VLAN接口IP地址10.0.0.1/24。注意输出信息中的粗体字部分。
SuperVLAN ID : 10
SubVLAN ID : 2-3 5
VLAN ID: 10
VLAN Type: static
It is a Super VLAN.
Route Interface: configured
Ip Address: 10.0.0.1
Subnet Mask: 255.255.255.0
Description: VLAN 0010
Name:VLAN 0010
Tagged Ports: none
Untagged Ports: none
VLAN ID: 2
VLAN Type: static
It is a Sub VLAN.
Route Interface: configured
Ip Address: 10.0.0.1
Subnet Mask: 255.255.255.0
Description: VLAN 0002
Name:VLAN 0002
Tagged Ports: none
Untagged Ports:
GigabitEthernet1/0/1 GigabitEthernet1/0/2
VLAN ID: 3
VLAN Type: static
It is a Sub VLAN.
Route Interface: configured
Ip Address: 10.0.0.1
Subnet Mask: 255.255.255.0
Description: VLAN 0003
Name:VLAN 0003
Tagged Ports: none
Untagged Ports:
GigabitEthernet1/0/3 GigabitEthernet1/0/4
VLAN ID: 5
VLAN Type: static
It is a Sub VLAN.
Route Interface: configured
Ip Address: 10.0.0.1
Subnet Mask: 255.255.255.0
Description: VLAN 0005
Name:VLAN 0005
Tagged Ports: none
Untagged Ports:
GigabitEthernet1/0/5 GigabitEthernet1/0/6