2

VRRP+MSTP配置详解【华为eNSP实验】

 1 year ago
source link: https://blog.51cto.com/u_15568258/5567758
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

VRRP+MSTP配置详解【华为eNSP实验】

推荐 原创

上进小菜猪 2022-08-11 16:30:39 ©著作权

文章标签 插入图片 链路 用户名 文章分类 路由交换 网络/安全 yyds干货盘点 阅读数477

Table of Contents

之前我们配置了MSTP,完成了一个基础的需求,现在我们继续来完善一下,使用VRRP+MSTP配置
需求如下:

某公司现有需求500台设备可以上到外网,该公司有5个部门,分别是A\B\C\D\E,
每个部门均需要100台设备,并要求二层进行隔离。
1.合理规划IP(使用私有IP)与子网。
2.拟采用DHCP下发地址(拓展)
3.划分VLAN,保障二层链路流量的控制。
5.公司网络需要在两台汇聚层交换机和一台核心路由器上配置ospf路由协议实现内部网络通信。
6、在两台汇聚层交换机之间需要做链路聚合来增加带宽,考虑到二层网络的安全问题和网络资源占用问题需要对不同部门间实现二层隔离。
7.现用5台二层交换机分别模拟5个部门的接入层设备。
8.为提高网络的可靠性,每台二层接入设备都需要和汇聚层设备进行互联, 所以需要配置STP协议在保证可靠的基础上防止环路的发生。(拓展)
9、为方便后期管理和维护需要在核心和汇聚层设备上开启远程登录功能。认证方式为用户名+密码认证(用户名和密码自定义)。
10.MSTP、VRRP这些技术同学们可根据情况加以考虑和实现。(拓展)
11.思考当内网用户需要访问互联网时如何实现?

1.1 MSTP

MSTP不仅涉及多个MST(生成树实例),而且可以划分为多个MST区域(MST区域,也称为MST区域)。通常,MSTP网络可以包含一个或多个MST域,每个MST域可以包含一个或多个MST。每个MSTI由运行stp/rstp/mstp的交换设备组成,这些交换设备通过mstp协议计算后形成树状网络。

1.2 VRRP

虚拟路由冗余协议VRRP(Virtual Router Redundancy Protocol)是一种用于提高网络可靠性的容错协议。通过VRRP,可以在主机的下一跳设备出现故障时,及时将业务切换到备份设备,从而保障网络通信的连续性和可靠性。

看一下拓扑图:

VRRP+MSTP配置详解【华为eNSP实验】_插入图片

三.实验过程

我们之前已经成功的配置了MSTP,那么我们需要注意一点:
因为我们的MSTP的

instance 1 root primary
instance 2 root secondary

vlan10 20 在主根在SW6,备根在SW7。
vlan30 40 50 主根在SW7,备根在SW6。
如下分配。

instance 1 vlan 10 20
instance 2 vlan 30 40 50
VRRP+MSTP配置详解【华为eNSP实验】_链路_02

那么我们在配置的之后需要注意一点
VRRP中vlan 10 20走SW6,与上面相呼应
如下,我们先进入interface Vlanif10,配置ip地址

interface Vlanif10
ip address 192.168.10.124 25

使用VRRP配置虚拟路由,改优先级为150。

vrrp vrid 1 virtual-ip 192.168.10.126 vrrp vrid 1 priority 150 vrrp

同时设置上层链路检测,检测GigabitEthernet0/0/9接口,如果该接口故障或者丢包的话优先级减60。
这样的话,走SW7路线进行通信。

vrid 1 track interface GigabitEthernet0/0/9 reduced 60 dhcp select
global

其他的同理:

VRRP+MSTP配置详解【华为eNSP实验】_插入图片_03

注意一点,在sw6和sw7的ip不能配置一样,否则容易冲突。
踩坑截图:

VRRP+MSTP配置详解【华为eNSP实验】_插入图片_04

踩坑2:

VRRP+MSTP配置详解【华为eNSP实验】_插入图片_05

配置完VRRP,全部都是主。
原因,Eth-Trunk1没有放行vlan vrrp:

interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
解决:

VRRP+MSTP配置详解【华为eNSP实验】_用户名_06
VRRP+MSTP配置详解【华为eNSP实验】_插入图片_07

3.1 便捷命令

SW6为例:

interface Vlanif10
ip address 192.168.10.124 25
vrrp vrid 1 virtual-ip 192.168.10.126
vrrp vrid 1 priority 150
vrrp vrid 1 track interface GigabitEthernet0/0/9 reduced 60
dhcp select global
interface Vlanif20
ip address 192.112.20.252 25
vrrp vrid 2 virtual-ip 192.112.20.254
vrrp vrid 2 priority 150
vrrp vrid 2 track interface GigabitEthernet0/0/9 reduced 60
interface Vlanif40
 ip address 192.168.20.252 25
 vrrp vrid 4 virtual-ip 192.168.20.254

interface Vlanif30
 ip address 192.168.20.124 25
 vrrp vrid 3 virtual-ip 192.168.20.126

interface Vlanif50
 ip address 192.168.30.124 25
 vrrp vrid 5 virtual-ip 192.168.30.126
VRRP+MSTP配置详解【华为eNSP实验】_用户名_08

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK