VLAN间路由之多层交换机

VLAN间路由之多层交换机

一、实验拓扑

VLAN间路由之多层交换机_第1张图片

二、实验要求

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

VLAN间路由之多层交换机_第2张图片

测试pc1和pc2之间能否正常通信

VLAN间路由之多层交换机_第3张图片


你可能感兴趣的:(VLAN,交换机,间路由)