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之间能否正常通信
本文出自 “游客520” 博客,请务必保留此出处http://mling17.blog.51cto.com/9356255/1743352
原文:http://mling17.blog.51cto.com/9356255/1743352