码迷,mamicode.com
首页 > 其他好文 > 详细

VRRP+MSTP 实现流量分流与核心层备份

时间:2017-04-07 19:06:05      阅读:324      评论:0      收藏:0      [点我收藏+]

标签:vrrp   mstp   流量分流   


MSTP:多生成树协议  VRRP:虚拟路由器协议


拓扑图:

技术分享


逻辑图:正常的状态

技术分享



#配置代码:

lsw1-----------------------------------------------

sy

vlan 10

vlan 20

quit

interface e0/0/1

port link-type access

port default vlan 10

quit

interface e0/0/2

port link-type access

port default vlan 20

quit

interface e0/0/3

port link-type trunk

port trunk allow-pass vlan all

quit

interface e0/0/4

port link-type trunk

port trunk allow-pass vlan all

quit

配置mstp:

stp enable

stp mode mstp

stp region-configuration

region-name RegionA

revision-level 1

instance 1 vlan 10

instance 2 vlan 20

active region-configuration

quit

lsw2-----------------------------------------------

sy

vlan 10

vlan 20

quit

interface e0/0/1

port link-type access

port default vlan 10

quit

interface e0/0/2

port link-type access

port default vlan 20

quit

interface e0/0/3

port link-type trunk

port trunk allow-pass vlan all

quit

interface e0/0/4

port link-type trunk

port trunk allow-pass vlan all

quit

配置mstp:

stp enable

stp mode mstp

stp region-configuration

region-name RegionA

revision-level 1

instance 1 vlan 10

instance 2 vlan 20

active region-configuration

quit

 

lsw3-----------------------------------------------

sy

vlan 10

vlan 20

vlan 100

quit

interface g0/0/1

port link-type trunk

port trunk allow-pass vlan all

quit

interface g0/0/2

port link-type trunk

port trunk allow-pass vlan all

quit

端口捆绑:

interface Eth-Trunk 1

quit

interface g0/0/3

eth-trunk 1

quit

interface g0/0/4

eth-trunk 1

quit

interface Eth-Trunk 1

port link-type trunk

port trunk allow-pass vlan all

quit

 

interface g0/0/5

port link-type access

port default vlan 100

quit

interface vlanif 100

ip add 10.0.0.1 24

quit

 

配置rip:

rip

version 2

network 192.168.10.0

network 192.168.20.0

network 10.0.0.0

quit

配置mstp:

stp enable

stp mode mstp

stp region-configuration

region-name RegionA

revision-level 1

instance 1 vlan 10

instance 2 vlan 20

active region-configuration

quit

stp instance 1 priority 4096

配置vrrp:

interface vlanif 10

ip add 192.168.10.251 24

vrrp vrid 1 virtual-ip 192.168.10.254

vrrp vrid 1 priority 200

quit

interface vlanif 20

ip add 192.168.20.251 24

vrrp vrid 2 virtual-ip 192.168.20.254

quit

配置端口跟踪:

interface vlanif 10

vrrp vrid 1 track interface g0/0/5 reduced 150

quit

lsw4-----------------------------------------------

vlan 10

vlan 20

vlan 200

quit

interface g0/0/1

port link-type trunk

port trunk allow-pass vlan all

quit

interface g0/0/2

port link-type trunk

port trunk allow-pass vlan all

quit

端口捆绑:

interface Eth-Trunk 1

quit

interface g0/0/3

eth-trunk 1

quit

interface g0/0/4

eth-trunk 1

quit

interface Eth-Trunk 1

port link-type trunk

port trunk allow-pass vlan all

quit

 

interface g0/0/5

port link-type access

port default vlan 200

quit

interface vlanif 200

ip add 20.0.0.1 24

quit

配置rip:

rip

version 2

network 192.168.10.0

network 192.168.20.0

network 20.0.0.0

quit

配置mstp:

stp enable

stp mode mstp

stp region-configuration

region-name RegionA

revision-level 1

instance 1 vlan 10

instance 2 vlan 20

active region-configuration

quit

stp instance 2 priority 4096

配置vrrp:

interface vlanif 10

ip add 192.168.10.252 24

vrrp vrid 1 virtual-ip 192.168.10.254

quit

interface vlanif 20

ip add 192.168.20.252 24

vrrp vrid 2 virtual-ip 192.168.20.254

vrrp vrid 2 priority 200

quit

配置端口跟踪:

interface vlanif 20

vrrp vrid 2 track interface g0/0/5 reduced 150

quit

AR1------------------------------------------------

sy

interface g0/0/0

ip add 10.0.0.2 24

quit

interface g0/0/1

ip add 20.0.0.2 24

quit

interface g0/0/2

ip add 30.0.0.254 24

quit

配置rip:

rip

version 2

network 10.0.0.0

network 20.0.0.0

network 30.0.0.0

quit




#测试图

技术分享


技术分享


技术分享



技术分享





#将LSW3关闭测试  

#关闭后的逻辑图(注:此图的LSW3为开机状态,关闭时状态的图忘截了,所以用的最开始的图片)

技术分享

技术分享


技术分享


本文出自 “Chauncey” 博客,请务必保留此出处http://cqwujiang.blog.51cto.com/10808946/1913755

VRRP+MSTP 实现流量分流与核心层备份

标签:vrrp   mstp   流量分流   

原文地址:http://cqwujiang.blog.51cto.com/10808946/1913755

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!