VLAN間路由之多層交換機
一、實驗拓撲
二、實驗要求
1.PC1屬於vlan10,PC2屬於vlan20,IP地址如圖所示
2.配置交換機使得pc1和pc2能正常通信
三、實驗配置
sw1:
vlan batch 10 20 900
#
interface Vlanif10 給vlan10 的svi接口配置ip地址
ip address 192.168.10.254 255.255.255.0
#
interface Vlanif20
ip address 192.168.20.254 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 900
#
sw2:
vlan batch 10 20
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094
sw3:
vlan batch 10 20
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 20
四、實驗驗證
查看核心交換機的接口ip
測試pc1和pc2之間能否正常通信