三层交换机VLAN间路由-vlan跨两台交换机

利用三层实现vlan间路由,其中,vlan跨两台交换机

1、拓扑图如下:
三层交换机VLAN间路由-vlan跨两台交换机_第1张图片

2、配置表
设备 接口 所属vlan 设备 接口
MS1 F0/1 Vlan 11 MS1 F0/24 trunk
MS1 F0/2 Vlan 11 MS2 F0/24 trunk
MS1 F0/3 Vlan 22
MS2 F0/1 Vlan 33
MS2 F0/2 Vlan 44
MS2 F0/3 Vlan 22

Vlan ip 子网掩码
Vlan11 192.168.11.1 255.255.255.0
Vlan22 192.168.22.1 255.255.255.0
Vlan33 192.168.33.1 255.255.255.0
Vlan44 192.168.44.1 255.255.255.0

PC ip 子网掩码 默认网关
PC0 192.168.11.2 255.255.255.0 192.168.11.1
PC1 192.168.11.3 255.255.255.0 192.168.11.1
PC2 192.168.22.2 255.255.255.0 192.168.22.1
PC3 192.168.33.2 255.255.255.0 192.168.33.1
PC4 192.168.44.2 255.255.255.0 192.168.44.1
PC5 192.168.22.3 255.255.255.0 192.168.22.1

3、MS1配置

配置vlan
# vlan 11
# vlan 22
# vlan 33
# vlan 44

配置SVI
# int vlan 11
# ip add 192.168.11.1 255.255.255.0
# int vlan 22
# ip add 192.168.22.1 255.255.255.0
# int vlan 33
# ip add 192.168.33.1 255.255.255.0
# int vlan 44
# ip add 192.168.44.1 255.255.255.0

配置接口
# int range f0/1-2
# switchport access vlan 11
# int f0/3
# switchport access vlan 22

配置中继链路
# int f0/24
# switchport trunk enc dot
#switchport mode trunk

启用路由功能
# ip routing

4、MS2配置

配置vlan
# vlan 11
# vlan 22
# vlan 33
# vlan 44

配置SVI
# int vlan 11
# ip add 192.168.11.1 255.255.255.0
# int vlan 22
# ip add 192.168.22.1 255.255.255.0
# int vlan 33
# ip add 192.168.33.1 255.255.255.0
# int vlan 44
# ip add 192.168.44.1 255.255.255.0

配置接口
# int range f0/1
# switchport access vlan 33
# int f0/2
# switchport access vlan 44
# int f0/3
# switchport access vlan 22

配置中继链路
# int f0/24
# switchport trunk enc dot
#switchport mode trunk

启用路由功能
# ip routing

5、测试
测试PC之间的互通性
三层交换机VLAN间路由-vlan跨两台交换机_第2张图片

你可能感兴趣的:(综合)