ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

VRRP相关配置案例!②

2021-04-12 23:03:37  阅读:207  来源: 互联网

标签:region 配置 GigabitEthernet0 192.168 案例 VRRP SW1 SW3 SW2


实验

实验要求

交换机配置MSTP+VRRP,SW1作为VLAN10的主,VLAN20的备,SW2相反,使得PC1和PC2可以互通。
在这里插入图片描述

1.配置各主机IP子网和网关

配置PC1:IP为192.168.1.1,子网掩码为255.255.255.0,网关为192.168.1.254

配置PC2:IP为192.168.2.1,子网掩码为255.255.255.0,网关为192.168.2.254

2.配置交换机SW1

<Huawei>sys
[Huawei]sys SW1

[SW1]vlan batch 10 20

[SW1]int vlanif 10
[SW1-Vlanif10]ip add 192.168.1.252 24
[SW1-Vlanif10]vrrp vrid 1 virtual-ip 192.168.1.254
[SW1-Vlanif10]vrrp vrid 1 priority 110

[SW1-Vlanif10]int vlanif 20
[SW1-Vlanif20]ip add 192.168.2.253 24
[SW1-Vlanif20]vrrp vrid 2 virtual-ip 192.168.2.254

[SW1-Vlanif20]int g0/0/1
[SW1-GigabitEthernet0/0/1]p l t
[SW1-GigabitEthernet0/0/1]p t a v a
00
[SW1]dis vrrp brief 
VRID  State        Interface                Type     Virtual IP     
----------------------------------------------------------------
1     Master       Vlanif10                 Normal   192.168.1.254  
2     Backup       Vlanif20                 Normal   192.168.2.254  
----------------------------------------------------------------
Total:2     Master:1     Backup:1     Non-active:0 

[SW1]stp region-configuration 
[SW1-mst-region]region-name huawei
[SW1-mst-region]instance 1 vlan 10
[SW1-mst-region]instance 2 vlan 20
[SW1-mst-region]active region-configuration 

[SW1-mst-region]q
[SW1]stp mode mstp
[SW1]stp instance 1 root primary 
[SW1]stp instance 2 root secondary 


3.配置交换机SW2

<Huawei>sys
[Huawei]sys SW2

[SW2]vlan batch 10 20

[SW2]int vlanif 10
[SW2-Vlanif10]ip add 192.168.1.253 24
[SW2-Vlanif10]vrrp vrid 1 virtual-ip 192.168.1.254

[SW2-Vlanif10]int vlanif 20
[SW2-Vlanif20]ip add 192.168.2.252 24
[SW2-Vlanif20]vrrp vrid 2 virtual-ip 192.168.2.254
[SW2-Vlanif20]vrrp vrid 2 priority 110

[SW2-Vlanif20]int g0/0/1
[SW2-GigabitEthernet0/0/1]p l t
[SW2-GigabitEthernet0/0/1]p t a v a

[SW2-GigabitEthernet0/0/1]q
[SW2]dis vrrp brief
VRID  State        Interface                Type     Virtual IP     
----------------------------------------------------------------
1     Backup       Vlanif10                 Normal   192.168.1.254  
2     Master       Vlanif20                 Normal   192.168.2.254  
----------------------------------------------------------------
Total:2     Master:1     Backup:1     Non-active:0   
  

[SW2]stp region-configuration 
[SW2-mst-region]region-name huawei
[SW2-mst-region]instance 1 vlan 10
[SW2-mst-region]instance 2 vlan 20
[SW2-mst-region]active region-configuration 

[SW2-mst-region]q
[SW2]stp mode mstp
[SW2]stp instance 1 root secondary 
[SW2]stp instance 2 root primary 

4.配置交换机SW3

<Huawei>sys
[Huawei]sys SW3

[SW3]vlan batch 10 20

[SW3]int g0/0/1
[SW3-GigabitEthernet0/0/1]p l t
[SW3-GigabitEthernet0/0/1]p t a v a

[SW3-GigabitEthernet0/0/1]int g0/0/2
[SW3-GigabitEthernet0/0/2]p l t
[SW3-GigabitEthernet0/0/2]p t a v a

[SW3-GigabitEthernet0/0/2]int g0/0/3
[SW3-GigabitEthernet0/0/3]p l a
[SW3-GigabitEthernet0/0/3]p d v 10

[SW3-GigabitEthernet0/0/3]int g0/0/4
[SW3-GigabitEthernet0/0/4]p l a
[SW3-GigabitEthernet0/0/4]p d v 20

[SW3]stp region-configuration 
[SW3-mst-region]region-name huawei
[SW3-mst-region]instance 1 vlan 10
[SW3-mst-region]instance 2 vlan 20
[SW3-mst-region]active region-configuration 


5.ping测试

在这里插入图片描述

在这里插入图片描述

标签:region,配置,GigabitEthernet0,192.168,案例,VRRP,SW1,SW3,SW2
来源: https://blog.csdn.net/guguai7/article/details/115628592

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有