园区网
拓扑文件获取:
链接: https://pan.baidu.com/s/11TZoYAmFXtfDxK9KxyUsFA?pwd=5nfv 提取码: 5nfv
每台PC属于不同VLAN,相应IP和VLAN如图中标注
目标:全网互通
一、各台PC配置IP地址
IP地址如图,配置过程省略
二、创建VLAN划分接口类型
LSW1
vlan batch 11 12
int e0/0/1
p l a
p d v 11
int e0/0/3
p l a
p d v 12
int e0/0/2
p l t
p t a v 11 12
LSW2
vlan batch 13 14
int e0/0/1
p l a
p d v 13
int e0/0/2
p l a
p d v 14
int e0/0/3
p l t
p t a v 13 14
LSW3
vlan batch 15 16
int e0/0/2
p l a
p d v 15
int e0/0/3
p l a
p d v 16
int e0/0/1
p l t
p t a v 15 16
LSW4
vlan batch 17 18
int e0/0/1
p l a
p d v 17
int e0/0/2
p l a
p d v 18
int e0/0/3
p l t
p t a v 17 18
RS-1
vlan batch 11 12
int e0/0/1
p l t
p t a v 11 12
RS-2
vlan batch 13 14
int e0/0/1
p l t
p t a v 13 14
RS-3
vlan batch 15 16
int e0/0/1
p l t
p t a v 15 16
RS-4
vlan batch 17 18
int e0/0/1
p l t
p t a v 17 18
三、同一接入交换机下VLAN互通
三层交换机上配置VLAN地址,使得同一交换机下的VLAN获得直连路由
RS-1
int vlanif 11
ip add 192.168.64.254 24
int vlanif 12
ip add 192.168.65.254 24
RS-2
int vlanif 13
ip add 192.168.66.254 24
int vlanif 14
ip add 192.168.67.254 24
RS-3
int vlanif 15
ip add 192.168.68.254 24
int vlanif 16
ip add 192.168.69.254 24
RS-4
int vlanif 17
ip add 192.168.70.254 24
int vlanif 18
ip add 192.168.71.254 24
四、实现不同交换机下VLAN互通
在三层交换机上做VLAN,使得与路由器互通,在路由器上做静态路由,使得路由正常转发
RS-1
vlan 100
int vlanif 100
ip add 10.0.1.1 30
int g0/0/2
p l a
p d v 100
RS-2
vlan 100
int vlanif 100
ip add 10.0.2.1 30
int g0/0/2
p l a
p d v 100
RS-3
vlan 100
int vlanif 100
ip add 10.0.3.1 30
int g0/0/1
p l a
p d v 100
RS-4
vlan 100
int vlanif 100
ip add 10.0.4.1 30
int g0/0/1
p l a
p d v 100
路由器上做路由
AR1
做去往三个方向的静态路由(目的网段做路由汇总)
ip route-static 192.168.64.0 18 10.0.1.1
ip route-static 192.168.66.0 23 10.0.2.1
ip route-static 192.168.68.0 22 10.0.0.2
AR2
做去往两个方向的静态路由(目的网段做路由汇总)
ip route-static 192.168.64.0 18 10.0.0.1
ip route-static 192.168.68.0 22 10.0.0.6
AR3
做去往三个方向的静态路由(目的网段做路由汇总)
ip route-static 192.168.68.0 22 10.0.3.1
ip route-static 192.168.70.0 23 10.0.4.1
ip route-static 192.168.64.0 18 10.0.0.5
评论区