MSTP (多生成树) 每个VLAN或者几个VLAN拥有一颗生成树,基于实例的生成树。instance 1、instance 2 每个实例拥有一颗生成树。MSTP可以实现多VLAN 的负载分担,可以实现多厂商对接。

VRRP虚拟路由冗余协议(Virtual Router Redundancy Protocol)是由IETF提出的解决局域网中配置静态网关出现单点失效现象的路由协议。

注意:当MSTP 和VRRP共同存在时,我们必须要做MSTP的区域设置以及实例优先级,网络中二层MSTP的Vlan主根和三层VRRP的master网关要放在同一台设备上。在下面的图中,我们把Vlan10的instance 1的根桥设置为LSW1,Vlan10的网关设备也设置为LSW1。Vlan20的instance 2的根桥设置为LSW2,Vlan20的网关设备也为LSW2。

如图,PC1、PC2是企业内网的主机,分别属于VLAN10和VLAN20,LSW1和LSW2之间的g0/0/2口和g0/0/3口之间形成链路聚合。AR1是企业边界路由器,用于和外网通信。AR1、LSW1和LSW2之间运行ospf协议。LSW1、LSW2和LSW3之间运行MSTP协议。要让PC1、PC2出去和回来的流量方向一致,且形成第一跳网关冗余,且负载均衡。如下是配置

PC1

PC>ipconfig

IPv4 address......................: 192.168.10.10
Subnet mask.......................: 255.255.255.0
Gateway...........................: 192.168.10.254
Physical address..................: 54-89-98-55-50-74
VLAN..............................: 10

PC2

PC>ipconfig

IPv4 address......................: 192.168.20.10
Subnet mask.......................: 255.255.255.0
Gateway...........................: 192.168.20.254
Physical address..................: 54-89-98-85-59-50
Vlan..............................: 20

LSW1

[LSW1]display current-configuration
#
vlan batch 10 20 100
#
stp instance 1 priority 4096
stp instance 2 priority 8192
#
stp region-configuration
region-name MSTP
instance 1 vlan 10
instance 2 vlan 20
active region-configuration
#
interface Vlanif10
ip address 192.168.10.1 255.255.255.0
vrrp vrid 10 virtual-ip 192.168.10.254
vrrp vrid 10 priority 150
vrrp vrid 10 preempt-mode timer delay 10
vrrp vrid 10 track interface GigabitEthernet0/0/4 reduced 60
vrrp vrid 10 authentication-mode md5 GX2lR,}C+Ky~t+Byca8YR#(#
#
interface Vlanif20
ip address 192.168.20.1 255.255.255.0
vrrp vrid 20 virtual-ip 192.168.20.254
vrrp vrid 20 authentication-mode md5 L>YK#S.jKJu:|l#3M^#3"$f#
#
interface Vlanif100
ip address 192.168.30.1 255.255.255.0
#
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/2
eth-trunk 1
#
interface GigabitEthernet0/0/3
eth-trunk 1
#
interface GigabitEthernet0/0/4
port link-type access
port default vlan 100
#
ospf 100 router-id 192.168.30.1
import-route direct route-policy POLICY
area 0.0.0.0
network 192.168.30.1 0.0.0.0
#
route-policy POLICY permit node 10
if-match ip-prefix F
apply cost 10
#
route-policy POLICY permit node 20
if-match ip-prefix F2
apply cost 20
#
ip ip-prefix F index 10 permit 192.168.10.0 24
ip ip-prefix F2 index 10 permit 192.168.20.0 24
#

LSW2

[LSW2]display current-configuration
#
vlan batch 10 20 100
#
stp instance 1 priority 8192
stp instance 2 priority 4096
#
stp region-configuration
region-name MSTP
instance 1 vlan 10
instance 2 vlan 20
active region-configuration
#
interface Vlanif10
ip address 192.168.10.2 255.255.255.0
vrrp vrid 10 virtual-ip 192.168.10.254
vrrp vrid 10 authentication-mode md5 CN7EFU,9+,'eKRQqbl+O/%;#
#
interface Vlanif20
ip address 192.168.20.2 255.255.255.0
vrrp vrid 20 virtual-ip 192.168.20.254
vrrp vrid 20 priority 150
vrrp vrid 20 preempt-mode timer delay 60
vrrp vrid 20 track interface GigabitEthernet0/0/4 reduced 60
vrrp vrid 20 authentication-mode md5 :||$@<`|wYu:|l#3M^#36%L#
#
interface Vlanif100
ip address 192.168.40.2 255.255.255.0
#
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/2
eth-trunk 1
#
interface GigabitEthernet0/0/3
eth-trunk 1
#
interface GigabitEthernet0/0/4
port link-type access
port default vlan 100
#
ospf 100 router-id 192.168.40.2
import-route direct route-policy POLICY
area 0.0.0.0
network 192.168.40.2 0.0.0.0
#
route-policy POLICY permit node 10
if-match ip-prefix F
apply cost 20
#
route-policy POLICY permit node 20
if-match ip-prefix F2
apply cost 10
#
ip ip-prefix F index 10 permit 192.168.10.0 24
ip ip-prefix F2 index 10 permit 192.168.20.0 24
#

LSW3

[LSW3]display current-configuration
#
vlan batch 10 20
#
stp region-configuration
region-name MSTP
instance 1 vlan 10
instance 2 vlan 20
active region-configuration
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 10
stp edged-port enable
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 20
stp edged-port enable
#

AR1

[AR1]display current-configuration
#
interface GigabitEthernet0/0/0
ip address 192.168.30.2 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 192.168.40.1 255.255.255.0
#
ospf 100 router-id 111.1.1.1
area 0.0.0.0
network 192.168.30.2 0.0.0.0
network 192.168.40.1 0.0.0.0
#

附上ensp源文件:链接: https://pan.baidu.com/s/1WhN79Z7b8XviOmmFAi5WyQ 密码: 8qkg

基于路由器的VRRP---------->基于路由器的VRRP技术---VRRP的应用

基于防火墙的VRRP --------->基于防火墙的VRRP技术--华为防火墙双机热备--VGMP

基于三层交换机的VRRP技术--MSTP、VRRP的综合运用的更多相关文章

  1. 基于路由器的VRRP技术--VRRP的应用

    目录 无Vlan的VRRP 有Vlan的VRRP 今天要讲的VRRP都是基于路由器的VRRP. 一:无Vlan的VRRP 如图,PC1和PC2是企业内网主机,AR1和AR2是企业访问外网的路由器,有一 ...

  2. 基于防火墙的VRRP技术--华为防火墙双机热备--VGMP

    目录 主备备份双机热备配置 负载分担双机热备配置 为了解决多个VRRP备份组状态不一致的问题,华为防火墙引入VGMP(VRRP Group Management Protocol)来实现对VRRP备份 ...

  3. 华为交换机MSTP+VRRP配置实例说明文档

    华为交换机MSTP+VRRP配置实例说明文档 拓扑图 IP地址规划表 设备名称 设备接口 对端设备 对端接口 VLAN VLAN /接口地址 备注 SW0 GE0/0/23 SW2 GE0/0/23 ...

  4. 网络拓扑实例10:MSTP+VRRP组合组网

    组网图形 MSTP+VRRP组合简介 网络中部署VRRP负载分担时,多台设备同时承担业务,每个虚拟设备都包括一个Master设备和若干个Backup设备.如果为了接入备份需要同时部署冗余链路,则需要部 ...

  5. keepalived之 Keepalived 原理(定义、VRRP 协议、VRRP 工作机制)

    1.Keepalived 定义 Keepalived 是一个基于VRRP协议来实现的LVS服务高可用方案,可以利用其来避免单点故障.一个LVS服务会有2台服务器运行Keepalived,一台为主服务器 ...

  6. comet基于HTTP长连接技术(java即时通信,推送技术详解)

    服务器推送技术的基础思想是将浏览器主动查询信息改为服务器主动发送信息,服务器发送一批数据,浏览器显示消息,同时保证与服务器的连接,当服务器需要再一次的发送数据,浏览器显示数据并保持连接. comet基 ...

  7. dom4j解析器 基于dom4j的xpath技术 简单工厂设计模式 分层结构设计思想 SAX解析器 DOM编程

    *1 dom4j解析器   1)CRUD的含义:CreateReadUpdateDelete增删查改   2)XML解析器有二类,分别是DOM和SAX(simple Api for xml).     ...

  8. 转:基于IOS上MDM技术相关资料整理及汇总

    一.MDM相关知识: MDM (Mobile Device Management ),即移动设备管理.在21世纪的今天,数据是企业宝贵的资产,安全问题更是重中之重,在移动互联网时代,员工个人的设备接入 ...

  9. 项目实战(连载):基于Angular2+Mongodb+Node技术实现的多用户博客系统教程(2)

    本章主要讲什么(一句话)?   <项目实战:基于Angular2+Mongodb+Node技术实现的多用户博客系统教程(2)> -- 基于MongoDB的MyBlog数据库知识技术储备(上 ...

随机推荐

  1. TripleDES对称加密解密 -[C#-JAVA]

    C#代码段 先MD5 再TripleDES加密 using System;using System.Collections.Generic;using System.Linq;using System ...

  2. Linux系统用户与用户组管理

    一.用户和用户组的管理 1.新增组 groupadd 命令 格式:groupadd 组名 2.删除组 groupdel 格式:groupdel 组名 3.增加用用户命令 useradd   格式:us ...

  3. Redis之数据类型和持久化及高可用

    数据类型 Redis支持五种数据类型:string(字符串),hash(哈希),list(列表),set(集合)及zset(sorted set:有序集合). String(字符串) String是r ...

  4. Java学习历程记录(一)

    一.类与对象 1.创建类 创建一个学生类.并且创造成员变量和方法 public class student{ String name: int age: public void study(参数列表) ...

  5. mysql 单机多实例重启数据库服务

    1.# cat db.txtbackend 3310base 3320storage 3330payment 3340promotion 3350 2.# cat restart_mysql_slav ...

  6. 图像Resize方式对深度学习模型效果的影响

    在基于卷积神经网络的应用过程中,图像Resize是必不可少的一个步骤.通常原始图像尺寸比较大,比如常见监控摄像机出来的是1080P高清或者720P准高清画面,而网络模型输入一般没有这么大,像Yolo系 ...

  7. PE学习前的一些小知识

    位移运算 1.与运算 & 2.或运算 | 3.非运算 ~ 4.异或运算 ^ 5.移位运算 <<  >> 内存分配,文件读写 宏定义说明 一.无参数的宏定义的一般形式为: ...

  8. MySQL5.7和MySQL8.0通用配置文件

    MySQL5.7 my.cnf配置 [client] port=3306 socket=/log/mysql/mysql.sock [mysql] socket=/log/mysql/mysql.so ...

  9. [Azure Devops] 获取单元测试的代码覆盖率

    1. 获取代码覆盖率 上一篇文章里,我们在 Pipeline 中插入一个单元测试并把所有单元测试都通过作为 Pipeline 通过的硬性要求.除此以外,我们还可以获取单元测试的代码覆盖率,用作衡量代码 ...

  10. react项目运行安装依赖报错:Error: pngquant failed to build, make sure that libpng-dev is installed

    安装报错之后.但是安装libpng-dev.发现找不到.通过多方查找.准备重新安装pngquant.命令如下: npm install --save-dev pngquant安装成功并运行成功