VLAN及聚合VLAN

时间:2024-04-04 19:59:00

VLAN及聚合VLAN路由器要使用二层接口才能互联互通(e0/0/0),三层接口不能连通。
配置如下:
[sw1]dis cu

vlan batch 2 to 3 10

vlan 10
mux-vlan
subordinate separate 3
subordinate group 2

interface GigabitEthernet0/0/1
port link-type access
port default vlan 2
port mux-vlan enable

interface GigabitEthernet0/0/2
port link-type access
port default vlan 2
port mux-vlan enable

interface GigabitEthernet0/0/3
port link-type access
port default vlan 3
port mux-vlan enable

interface GigabitEthernet0/0/4
port link-type access
port default vlan 3
port mux-vlan enable

interface GigabitEthernet0/0/5
port link-type access
port default vlan 10
port mux-vlan enable

return

[r1]dis cu
[V200R003C00]

vlan batch 10

interface Vlanif10
ip address 1.1.1.254 255.0.0.0

interface Ethernet0/0/0
port link-type access
port default vlan 10

return

VLAN及聚合VLAN聚合vlan,此时SW2是终端的网关。
配置如下:
[sw2]dis cu

sysname sw2

vlan batch 2 to 3 10

vlan 10
aggregate-vlan
access-vlan 2 to 3

interface Vlanif10
ip address 1.1.1.254 255.0.0.0

interface GigabitEthernet0/0/1
port link-type access
port default vlan 2

interface GigabitEthernet0/0/2
port link-type access
port default vlan 3

return