当前位置:首页 > 数码 >

华为vrrp和mstp配置实例(华为路由器vrrp配置实例)

来源:原点资讯(www.yd166.com)时间:2022-11-01 12:28:41作者:YD166手机阅读>>

MSTP VRRP的典型组网

1 实验拓扑及描述

华为vrrp和mstp配置实例,华为路由器vrrp配置实例(1)

1. 这是一个由三台交换机组成的倒三角型二层交换网络;

2. 网络中有4个VLAN:10、20、30、40;

3. 接口编号如图所示;

4. VLAN10对应的网段为192.168.10.0/24;VLAN20对应的网段为192.168.20.0/24;

VLAN30对应的网段为192.168.30.0/24;VLAN40对应的网段为192.168.40.0/24;

各VLAN的网关均为.254的地址,该地址为VRRP组的虚拟地址;

5. SW1的vlanif10和vlanif20的IP地址分别为:192.168.10.253、192.168.20.253

SW1的vlanif30和vlanif40的IP地址分别为:192.168.30.252、192.168.40.252

6. SW1的vlanif10和vlanif20的IP地址分别为:192.168.10.252、192.168.20.252

SW1的vlanif30和vlanif40的IP地址分别为:192.168.30.253、192.168.40.253

2 实验需求

1. 由于网络中VLAN较多,并且存在二层环路因此使用MSTP实现环路避免,同时实现负载分担。

2. 将vlan10、20映射到MSTP实例1;将vlan30、40映射到MSTP实例2;

3. MSTP实例1Block掉的端口为SW3的GE0/0/23;实例2Block掉的端口为SW2的GE0/0/22;

4. 为了提高网络的网关层冗余能力,在SW1及SW2的vlanif10、vlanif20、vlanif30、vlanif40上部署VRRP,一共4组。而VRRP的Master及Backup需与MSTP的主、备根重叠。也就是说SW1的vlanif10及vlanif20为各自VRRP组的Master,此外vlanif30及vlanif40为各自VRRP组的Backup;SW2正好相反。

3 实验步骤及配置

SW3的配置如下:

#在SW3上创建VLAN,并将接口加入相应的VLAN

[SW3] vlan batch 10 20 30 40

[SW3] interface GigabitEthernet0/0/22

[SW3-GigabitEthernet0/0/22] port link-type trunk

[SW3-GigabitEthernet0/0/22] port trunk allow-pass vlan 10 20 30 40

[SW3] interface GigabitEthernet0/0/23

[SW3-GigabitEthernet0/0/23] port link-type trunk

[SW3-GigabitEthernet0/0/23] port trunk allow-pass vlan 10 20 30 40

#配置MSTP,将vlan10 20映射到实例1,将vlan30 40映射到实例2

#在SW3上,MSTP实例1及实例2的优先级保持默认32768

[SW3] stp mode mstp

[SW3] stp region-configuration

[SW3-mst-region] region-name huawei

[SW3-mst-region] instance 1 vlan 10 20

[SW3-mst-region] instance 2 vlan 30 40

[SW3-mst-region] active region-configuration

[SW3-mst-region] quit

[SW3] stp instance 1 priority 32768

[SW3] stp instance 2 priority 32768

[SW3] stp enable


SW1的配置如下:

[SW1] vlan batch 10 20 30 40

[SW1] interface GigabitEthernet0/0/24

[SW1-GigabitEthernet0/0/24] port link-type trunk

[SW1-GigabitEthernet0/0/24] port trunk allow-pass vlan 10 20 30 40

[SW1] interface GigabitEthernet0/0/22

[SW1-GigabitEthernet0/0/22] port link-type trunk

[SW1-GigabitEthernet0/0/22] port trunk allow-pass vlan 10 20 30 40


#配置MSTP,将vlan10 20映射到实例1,将vlan30 40映射到实例2

#将SW1的MSTP设置为实例1的主根,实例2的次根

[SW1] stp mode mstp

[SW1] stp region-configuration

[SW1-mst-region] region-name huawei

[SW1-mst-region] instance 1 vlan 10 20

[SW1-mst-region] instance 2 vlan 30 40

[SW1-mst-region] active region-configuration

[SW1-mst-region] quit

[SW1] stp instance 1 root primary

[SW1] stp instance 2 root secondary

[SW1] stp enable

#配置vlanif10、vlanif20、vlanif30、vlanif40

#配置vlanif10、vlanif20、vlanif30、vlanif40,分别加入VRRP组1,2,3,4

#其中SW1为VRRP组1及2的Master,为组3及4的Backup

[SW1] interface Vlanif10

[SW1-vlanif10] ip address 192.168.10.253 255.255.255.0

[SW1-vlanif10] vrrp vrid 1 virtual-ip 192.168.10.254

[SW1-vlanif10] vrrp vrid 1 priority 120

[SW1-vlanif10] vrrp vrid 1 preempt-mode timer delay 20

[SW1] interface Vlanif20

[SW1-vlanif20] ip address 192.168.20.253 255.255.255.0

[SW1-vlanif20] vrrp vrid 2 virtual-ip 192.168.20.254

[SW1-vlanif20] vrrp vrid 2 priority 120

[SW1-vlanif20] vrrp vrid 2 preempt-mode timer delay 20

[SW1] interface Vlanif30

[SW1-vlanif30] ip address 192.168.30.252 255.255.255.0

[SW1-vlanif30] vrrp vrid 3 virtual-ip 192.168.30.254

[SW1] interface Vlanif40

[SW1-vlanif40] ip address 192.168.40.252 255.255.255.0

[SW1-vlanif40] vrrp vrid 4 virtual-ip 192.168.40.254

SW2的配置如下:

[SW2] vlan batch 10 20 30 40

[SW2] interface GigabitEthernet0/0/24

[SW2-GigabitEthernet0/0/24] port link-type trunk

[SW2-GigabitEthernet0/0/24] port trunk allow-pass vlan 10 20 30 40

[SW2] interface GigabitEthernet0/0/23

[SW2-GigabitEthernet0/0/23] port link-type trunk

[SW2-GigabitEthernet0/0/23] port trunk allow-pass vlan 10 20 30 40


#配置MSTP,将vlan10 20映射到实例1,将vlan30 40映射到实例2

#将SW1的MSTP设置为实例2的主根,实例1的次根

[SW2] stp mode mstp

[SW2] stp region-configuration

[SW2-mst-region] region-name huawei

[SW2-mst-region] instance 1 vlan 10 20

[SW2-mst-region] instance 2 vlan 30 40

[SW2-mst-region] active region-configuration

[SW2-mst-region] quit

[SW2] stp instance 1 root secondary

[SW2] stp instance 2 root primary

[SW2] stp enable


#配置vlanif10、vlanif20、vlanif30、vlanif40

#配置vlanif10、vlanif20、vlanif30、vlanif40,分别加入VRRP组1,2,3,4

#其中SW1为VRRP组3及4的Master,为组1及2的Backup

[SW2] interface Vlanif10

[SW2-vlanif10] ip address 192.168.10.252 255.255.255.0

[SW2-vlanif10] vrrp vrid 1 virtual-ip 192.168.10.254

[SW2] interface Vlanif20

[SW2-vlanif20] ip address 192.168.20.252 255.255.255.0

[SW2-vlanif20] vrrp vrid 2 virtual-ip 192.168.20.254

[SW2] interface Vlanif30

[SW2-vlanif30] ip address 192.168.30.252 255.255.255.0

[SW2-vlanif30] vrrp vrid 3 virtual-ip 192.168.30.254

[SW2-vlanif30] vrrp vrid 3 priority 120

[SW2] interface Vlanif40

[SW2-vlanif40] ip address 192.168.40.252 255.255.255.0

[SW2-vlanif40] vrrp vrid 4 virtual-ip 192.168.40.254

[SW2-vlanif40] vrrp vrid 4 priority 120

完成配置后,各VLAN的用户都能够ping通自己的网关;

我们在SW3上看看:

[SW3] display stp brief

MSTID Port Role STP State Protection

0 GigabitEthernet0/0/1 DESI FORWARDING NONE

0 GigabitEthernet0/0/2 DESI FORWARDING NONE

0 GigabitEthernet0/0/22 DESI FORWARDING NONE

0 GigabitEthernet0/0/23 DESI FORWARDING NONE

1 GigabitEthernet0/0/1 DESI FORWARDING NONE

1 GigabitEthernet0/0/22 ROOT FORWARDING NONE

1 GigabitEthernet0/0/23 ALTE DISCARDING NONE

2 GigabitEthernet0/0/2 DESI FORWARDING NONE

2 GigabitEthernet0/0/22 ALTE DISCARDING NONE

2 GigabitEthernet0/0/23 ROOT FORWARDING NONE

我们看到,MSTP实例1中被Block掉的端口是GE0/0/23口;MSTP实例2中被Block掉的端口是GE0/0/22,符合我们的需求。再去SW1上看看VRRP组的状态:

[SW1] display vrrp brief

VRID State Interface Type Virtual IP

----------------------------------------------------------------

1 Master Vlanif10 Normal 192.168.10.254

2 Master Vlanif20 Normal 192.168.20.254

3 Backup Vlanif30 Normal 192.168.30.254

4 Backup Vlanif40 Normal 192.168.40.254

----------------------------------------------------------------

Total:4 Master:2 Backup:2 Non-active:0

从上述输出可以看出,SW1为VRRP组1及组2的Master,同时也为VRRP组3和组4的Backup。

栏目热文

合肥到广德长途汽车经过哪些地方(合肥南到广德站途经哪几个站)

合肥到广德长途汽车经过哪些地方(合肥南到广德站途经哪几个站)

截止到2月17日11时31分接交警指令,因车流量大,管制信息:合六叶高速:姚李、大顾店、叶集入口临时封闭。沪渝高速合安段...

2022-11-01 12:29:41查看全文 >>

合肥至阜南导航(合肥市到阜南县有火车直达吗)

合肥至阜南导航(合肥市到阜南县有火车直达吗)

清明小长假踏青赏花的好时候小编为你梳理了一批阜城周边踏青赏花地~↓↓↓颍州区西湖镇一日游(目的地:五里村)简介:五里村位...

2022-11-01 12:11:47查看全文 >>

合肥到阜南县地城镇的汽车(肥东到阜南县班车)

合肥到阜南县地城镇的汽车(肥东到阜南县班车)

乍暖还寒,阴晴不定风传花信,雨濯春尘春到人间万物鲜踏青赏花,看候鸟北返、燕子衔泥、鸭戏春波......以下是阜阳A级景区...

2022-11-01 12:35:45查看全文 >>

合肥到阜南从哪坐车(合肥到阜南大巴)

合肥到阜南从哪坐车(合肥到阜南大巴)

新安晚报 安徽网 大皖客户端讯 记者今天从合肥市交通部门获悉,为做好新型冠状病毒感染的肺炎疫情防控,自1月27日(年初三...

2022-11-01 12:20:14查看全文 >>

合肥到毛集有大巴车吗(合肥到叶集大巴车票价格查询)

合肥到毛集有大巴车吗(合肥到叶集大巴车票价格查询)

早上起床窗外大雾弥漫到现在能见度都不高安徽气象发布大雾黄色预警06时10分变更发布大雾橙色预警信号6小时内沿淮和江淮之间...

2022-11-01 11:53:27查看全文 >>

华为交换机vrrp配置实例(华为交换机vrrp配置步骤)

华为交换机vrrp配置实例(华为交换机vrrp配置步骤)

拓扑图IP地址规划表MSTP简介MSTP(多生成树协议)是在STP的基础上发展而来的,用于在局域网中消除数据链路层的物理...

2022-11-01 11:54:15查看全文 >>

华为防火墙vrrp配置实例(华为防火墙简单配置实例)

华为防火墙vrrp配置实例(华为防火墙简单配置实例)

哈喽!大家好,又来给大家更新内容了。快来搬小板凳敲黑板吧。 防火墙是位于内部网和外部网之间的屏障,它按照系统管理员预先...

2022-11-01 12:02:10查看全文 >>

华为vrf配置实例详解(华为单臂路由vrrp配置实例)

华为vrf配置实例详解(华为单臂路由vrrp配置实例)

大家好,我是一名网络通信行业从业者,也就是大家口中的IT男。混迹头条也挺久了,认识了很多朋友。如今将之前学习过的相关知识...

2022-11-01 12:09:01查看全文 >>

华为vrrp配置流程(华为vrp开发用啥工具)

华为vrrp配置流程(华为vrp开发用啥工具)

实验一、VRRP主备备份的配置vrrp简介虚拟路由冗余协议VRRP(Virtual Router Redundancy ...

2022-11-01 12:33:52查看全文 >>

华为vrp的四种基础模式(华为vrp的简介)

华为vrp的四种基础模式(华为vrp的简介)

小老虎,大讲堂,华为VRP系统介绍!开课啦!VRP是华为公司具有完全自主知识产权的网络操作系统,可以运行在多种硬件平台之...

2022-11-01 12:33:01查看全文 >>

文档排行