当前位置:网站首页>华为VRRP+MSTP联动接口检测实验案例
华为VRRP+MSTP联动接口检测实验案例
2022-08-09 10:44:00 【嘎嘎不是鸭】
一、MSTP(Multiple Spanning Tree Protocol)多生成树协议
1、MSTP把一个交换网络划分成多个域,每个域内形成多棵生成树,生成树之间彼此独立。每棵生成树叫做一个多生成树实例MSTI(Multiple Spanning Tree Instance),每个域叫做一个MST域(MST Region:Multiple Spanning Tree Region)。
2、所谓生成树实例就是多个VLAN的一个集合。通过将多个VLAN捆绑到一个实例,可以节省通信开销和资源占用率。MSTP各个实例拓扑的计算相互独立,在这些实例上可以实现负载均衡。可以把多个相同拓扑结构的VLAN映射到一个实例里,这些VLAN在端口上的转发状态取决于端口在对应MSTP实例的状态。
作用:1、防止二层环路以及链路冗余
2、基于VLAN的负载均衡
二、VRRP(Virtual Router Redundancy Protocol)虚拟网关冗余协议
VRRP广泛应用在边缘网络中,它的设计目标是支持特定情况下IP数据流量失败转移不会引起混乱,允许主机使用单路由器,以及即使在实际第一跳路由器使用失败的情形下仍能够维护路由器间的连通性。
为了防止网关单点故障,致使主机无法通信,利用VRRP协议当主网关故障时可自动切换为备份网关,不影响主机的通信
实验拓扑
要求:LSW1作为VLAN10和VLAN20的主根桥以及主网关,VLAN30和VLAN40的次根桥以及备份网关
LSW2作为VLAN30和VLAN40的主根桥以及主网关,VLAN10和VLAN20的次根桥以及备份网关
对上行口g0/0/4进行检测,如果接口down掉,主备网关角色对调,避免次优路径
LSW1配置
[LSW1]port-group group-member g0/0/1 to g0/0/3
[LSW1-port-group]port link-type trunk
[LSW1-port-group]port trunk allow-pass vlan al
[LSW1]vlan batch 10 20 30 40 100
[LSW1]int g0/0/4
[LSW1-GigabitEthernet0/0/4]port link-type access
[LSW1-GigabitEthernet0/0/4]port default vlan 100
[LSW1]stp mode mstp
[LSW1-mst-region]region-name abab
[LSW1-mst-region]instance 1 vlan 10 20
[LSW1-mst-region]instance 2 vlan 30 40
[LSW1-mst-region]active region-configuration
[LSW1]stp instance 1 root primary
[LSW1]stp instance 2 root secondary
[LSW1]interface Vlanif 10
[LSW1-Vlanif10]ip address 192.168.10.252 24
[LSW1]interface Vlanif 20
[LSW1-Vlanif20]ip address 192.168.20.252 24
[LSW1]interface Vlanif 30
[LSW1-Vlanif10]ip address 192.168.10.252 24
[LSW1]interface Vlanif 40
[LSW1-Vlanif20]ip address 192.168.20.252 24
[LSW1]int Vlanif 100
[LSW1-Vlanif100]ip address 192.168.100.1 24
[LSW1]ospf 100
[LSW1-ospf-100]area 0
[LSW1-ospf-100-area-0.0.0.0]net 0.0.0.0 255.255.255.255
[LSW1]int vlan 10
[LSW1-Vlanif10]vrrp vrid 1 virtual-ip 192.168.10.254
[LSW1-Vlanif10]vrrp vrid 1 priority 120
[LSW1-Vlanif10]vrrp vrid 1 track interface g0/0/4 reduced 60
[LSW1]int vlan 20
[LSW1-Vlanif20]vrrp vrid 1 virtual-ip 192.168.20.254
[LSW1-Vlanif20]vrrp vrid 1 priority 120
[LSW1-Vlanif20]vrrp vrid 1 track interface g0/0/4 reduced 60
[LSW1]int vlan 30
[LSW1-Vlanif30]vrrp vrid 2 virtual-ip 192.168.30.254
[LSW1]int vlan 40
[LSW1-Vlanif40]vrrp vrid 2 virtual-ip 192.168.40.254
LSW2配置
[LSW2]port-group group-member g0/0/1 to g0/0/3
[LSW2-port-group]port link-type trunk
[LSW2-port-group]port trunk allow-pass vlan all
[LSW2]vlan batch 10 20 30 40 200
[LSW2]int g0/0/4
[LSW2-GigabitEthernet0/0/4]port link-type access
[LSW2-GigabitEthernet0/0/4]port default vlan 100
[LSW2]stp mode mstp
[LSW2]stp region-configuration
[LSW2-mst-region]region-name abab
[LSW2-mst-region]instance 1 vlan 10 20
[LSW2-mst-region]instance 2 vlan 30 40
[LSW2-mst-region]active region-configuration
[LSW2]stp instance 2 root primary
[LSW2]stp instance 1 root secondary
[LSW2]interface Vlanif 10
[LSW2-Vlanif10]ip address 192.168.10.253 24
[LSW2]interface Vlanif 20
[LSW2-Vlanif20]ip address 192.168.20.253 24
[LSW2]interface Vlanif 30
[LSW2-Vlanif10]ip address 192.168.10.253 24
[LSW2]interface Vlanif 40
[LSW2-Vlanif20]ip address 192.168.20.253 24
[LSW2]int Vlanif 200
[LSW2-Vlanif100]ip address 192.168.200.1 24
[LSW2]ospf 100
[LSW2-ospf-100]area 0
[LSW2-ospf-100-area-0.0.0.0]net 0.0.0.0 255.255.255.255
[LSW2]int vlan 10
[LSW2-Vlanif10]vrrp vrid 1 virtual-ip 192.168.10.254
[LSW2]int vlan 20
[LSW2-Vlanif20]vrrp vrid 1 virtual-ip 192.168.20.254
[LSW2]int vlan 30
[LSW2-Vlanif30]vrrp vrid 2 virtual-ip 192.168.30.254
[LSW2-Vlanif30]vrrp vrid 2 priority 120
[LSW2-Vlanif30]vrrp vrid 2 track interface g0/0/4 reduced 60
[LSW2]int vlan 40
[LSW2-Vlanif40]vrrp vrid 2 virtual-ip 192.168.40.254
[LSW2-Vlanif40]vrrp vrid 2 priority 120
[LSW2-Vlanif40]vrrp vrid 2 track interface g0/0/4 reduced 60
LSW3配置
[LSW3]int g0/0/1
[LSW3-GigabitEthernet0/0/1]port link-type access
[LSW3-GigabitEthernet0/0/1]port default vlan 10
[LSW3]int g0/0/2
[LSW3-GigabitEthernet0/0/2]port link-type access
[LSW3-GigabitEthernet0/0/2]port default vlan 20
[LSW3]int g0/0/3
[LSW3-GigabitEthernet0/0/3]port link-type trunk
[LSW3-GigabitEthernet0/0/3]port trunk allow-pass vlan all
[LSW3]int g0/0/4
[LSW3-GigabitEthernet0/0/4]port link-type trunk
[LSW3-GigabitEthernet0/0/4]port trunk allow-pass vlan all
[LSW3]stp mode mstp
[LSW3]stp region-configuration
[LSW3-mst-region]region-name abab
[LSW3-mst-region]instance 1 vlan 10 20
[LSW3-mst-region]instance 2 vlan 30 40
[LSW3-mst-region]active region-configuration
LSW4配置
[LSW4]int g0/0/1
[LSW4-GigabitEthernet0/0/1]port link-type access
[LSW4-GigabitEthernet0/0/1]port default vlan 30
[LSW4]int g0/0/2
[LSW4-GigabitEthernet0/0/2]port link-type access
[LSW4-GigabitEthernet0/0/2]port default vlan 40
[LSW4]int g0/0/3
[LSW4-GigabitEthernet0/0/3]port link-type trunk
[LSW4-GigabitEthernet0/0/3]port trunk allow-pass vlan all
[LSW4]int g0/0/4
[LSW4-GigabitEthernet0/0/4]port link-type trunk
[LSW4-GigabitEthernet0/0/4]port trunk allow-pass vlan all
[LSW4]stp mode mstp
[LSW4]stp region-configuration
[LSW4-mst-region]region-name abab
[LSW4-mst-region]instance 1 vlan 10 20
[LSW4-mst-region]instance 2 vlan 30 40
[LSW4-mst-region]active region-configuration
R1配置
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.100.2 24
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 192.168.200.2 24
[R1]int g0/0/2
[R1-GigabitEthernet0/0/2]ip address 8.8.8.254 24
[R1]ospf 100
[R1-ospf-100]area 0
[R1-ospf-100-area-0.0.0.0]net 0.0.0.0 255.255.255.255
验证:
LSW1作为实例1的根桥,LSW2作为实例2的根桥
LSW1作为VLAN10、20的主网关,LSW2作为VLAN30、40的主网关
当网络正常时PC1访问服务器
当网络正常时PC3访问服务器
当LSW1上行口down掉后PC1访问服务器
当LSW2上行口down掉后PC3访问服务器
边栏推荐
- unix环境编程 第十五章 15.3 函数popen和pclose
- 笔记本电脑使用常见问题,持续更新
- 源代码阅读器项目
- 深度学习--生成对抗网络(Generative Adversarial Nets)
- MySQL外键在数据库中的作用
- Unix Environment Programming Chapter 15 15.7 Message Queuing
- 关于页面初始化
- 1003 我要通过! (20 分)
- json库的dumps()方法和loads()方法
- 解决1.tensorflow运行使用CPU不使用GPU 2.tensorflow环境下的GPU版本号 3.tensorflow和cuda以及cudnn版本对应问题 4.查看cuda和cudnn版本
猜你喜欢
深度学习--循环神经网络(Recurrent Neural Network)
Shell script combat (2nd edition) / People's Posts and Telecommunications Press Script 2 Validate input: letters and numbers only
编解码(seq2seq)+注意机制(attention) 详细讲解
自从我使用HiFlow场景连接器后,在也不用担心成为“落汤鸡”了
[Error record] Solve the problem that ASRock J3455-ITX cannot be turned on without a monitor plugged in
2022年台湾省矢量数据(点线面)及数字高程数据下载
The complete grammar of CSDN's markdown editor
【 original 】 VMware Workstation implementation Openwrt soft routing, the ESXI, content is very detailed!
OneNote 教程,如何在 OneNote 中搜索和查找笔记?
商业技术解决方案与高阶技术专题 - 数据可视化专题
随机推荐
一天半的结果——xmms on E2
绝了,这套RESTful API接口设计总结
json库的dumps()方法和loads()方法
xmms的均衡器试验成功 音效相当不错 比rockbox可能还要好
好久没上博客了,好长时间没有进展了
OpenGL ES2.0编程三部曲(转载自MyArrow)
activemq 消息持久化
好久没更新博客了
编程技术提升
AQS同步组件-FutureTask解析和用例
一键完成物联网产品注册,快速体验在线调试设备
WUSTOJ:n个素数构成等差数列
笔记本电脑使用常见问题,持续更新
numpy库中的函数 bincount() where() diag() all()
Since I use the HiFlow scene connector, I don't have to worry about becoming a "dropper" anymore
深度学习--循环神经网络(Recurrent Neural Network)
2022年台湾省矢量数据(点线面)及数字高程数据下载
Mysql多表查询
2022强网杯WP
使用pip成功安装某个库,但pycharm中找不到,此问题的解决方案