VRRP与VLAN综合实验

简介:

实验要求:

1.    使VLAN10中的PC1VLAN20中的PC2能够ping通主机PC3,且vlan10valn20中的主机能够互通。

2.    PC1PC2的网关都使用虚拟网关(见拓扑图),并且当交换机S3GE0/0/3口出现故障时,PC1也能和PC2PC3通信。

3.    S1S2中配置VRRP。且要配置VRRP认证。

 

实验拓扑:

45b463ed6a20fbaee12cd555328ac0c9.png-wh_

实验思路:

  1.  路由器要有分别去往PC1PC2的路由。S1S2也要有去往PC3的路由

  2. S1S2vlan1要配置与之路由器接口对应的IP地址。

  3. 虚拟网关IP的网段要与所在的vlanID的网段一致。

  4.  同一个VRRP备份组的认证方式和密码要一致。

实验配置:

[Huawei]sysn R1
[R1]inter g0/0/2
[R1-GigabitEthernet0/0/2]ip add 3.3.3.1 24
[R1-GigabitEthernet0/0/1]ip add 192.168.1.1 24
[R1-GigabitEthernet0/0/0]ip add 192.168.2.1 24
[R1]ip route-static 172.16.1.0 24 192.168.1.2   配置静态路由
[R1]ip route-static 172.31.1.0 24 192.168.2.2


[S1]vlan batch 10 20
[S1]inter g0/0/3
[S1-GigabitEthernet0/0/3]port link-type trunk 
[S1-GigabitEthernet0/0/3]port trunk allow-pass vlan all
[S1-GigabitEthernet0/0/3]inter g0/0/4
[S1-GigabitEthernet0/0/1]port link-type trunk 
[S1-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[S1]ip route-static 3.3.3.0 24 192.168.1.1        去往PC3 的路由
[S1]interface Vlanif 1
[S1-Vlanif1]ip add 192.168.1.2 24        与对端路由器接口IP一个网段
[S1]interface Vlanif 10
[S1-Vlanif10]ip address 172.16.1.3 24
[S1-Vlanif10]vrrp vrid 10 virtual-ip 172.16.1.1 虚拟网关IP一定要与vlan10的IP同一个网段
[S1-Vlanif10]vrrp vrid 10 priority 120     使其成为master
[S1-Vlanif10]vrrp vrid 10 authentication-mode md5 huawei 配置VRRP认证(密码:huawei)
[S1-Vlanif10]inter vlan 20
[S1-Vlanif20]ip add 172.31.1.4 24        注意一定要为vlan20配置一个IP地址
[S1-Vlanif20]vrrp vrid 20 virtual-ip 172.31.1.1
[S1-Vlanif20]vrrp vrid 20 authentication-mode md5 huawei
[S1-Vlanif20]vrrp vrid 20 preempt-mode disable  关闭S1中VRRP备
份组20的抢占模式

[S2]vlan batch 10 20
[S2]inter g0/0/4
[S2-GigabitEthernet0/0/4]port link-type trunk 
[S2-GigabitEthernet0/0/4]port trunk allow-pass vlan all
[S2-GigabitEthernet0/0/4]inter g0/0/1
[S2-GigabitEthernet0/0/1]port link-type trunk 
[S2-GigabitEthernet0/0/1]port trunk allow-pass vlan all

[S2]ip route-static 3.3.3.0 24 192.168.2.1
[S2]interface Vlanif 1
[S2-Vlanif1]ip add 192.168.2.2 24
[S2]interface Vlanif 10
[S2-Vlanif10]ip add 172.16.1.4 24
[S2-Vlanif10]vrrp vrid 10 virtual-ip 172.16.1.1
[S2-Vlanif10]vrrp vrid 10 preempt-mode disable 
[S2-Vlanif10]vrrp vrid 10 authentication-mode md5 huawei
[S2-Vlanif10]inter vlan 20
[S2-Vlanif20]ip add 172.31.1.1 24
[S2-Vlanif20]vrrp vrid 20 virtual-ip 172.31.1.1
[S2-Vlanif20]vrrp vrid 20 priority 120
[S2-Vlanif20]vrrp vrid 20 authentication-mode md5 huawei

[Huawei]sysn S3

[S3]vlan batch 10 20
[S3]inter g0/0/1
[S3-GigabitEthernet0/0/1]port link-type access 
[S3-GigabitEthernet0/0/1]port default vlan 10
[S3-GigabitEthernet0/0/1]inter g0/0/2
[S3-GigabitEthernet0/0/2]port link-type access 
[S3-GigabitEthernet0/0/2]por de vla 20
[S3-GigabitEthernet0/0/2]inter g0/0/3
[S3-GigabitEthernet0/0/3]port link-type trunk 
[S3-GigabitEthernet0/0/3]port trunk allow-pass vlan all 
[S3-GigabitEthernet0/0/2]inter g0/0/4
[S3-GigabitEthernet0/0/4]port link-type trunk 
[S3-GigabitEthernet0/0/4]port trunk allow-pass vlan all


实验验证:


e41235a80d5f36aab901aa99730f775f.png-wh_


蔡瑞

 

本文转自 新网学会 51CTO博客,原文链接:http://blog.51cto.com/xwxhvip/1983463 ,如需转载请自行联系原作者

相关文章
|
8月前
|
网络架构
交换机与路由器技术-19-HSRP和PVSTP综合实验
交换机与路由器技术-19-HSRP和PVSTP综合实验
35 0
|
9月前
|
网络协议 安全
OSPF综合实验
1、R4为ISP,其上只能配置1P地址;R4与其他所有直连设备间使用公有IP; 2、R3–R5/6/7为MGRE环境,R3为中心站点 3、整个0SPF环境1P地址为172.16.0.0/16 4、所有设备均可访问R4的环回; 5、减少LSA的更新量,加快收敛,保障更新安全 6、全网可达
65 0
|
9月前
|
网络协议
BGP综合实验
172.16.0.0 24 骨干 172.16.1.0 建邻 172.16.2.0-7.0 用户
44 0
|
12月前
|
网络虚拟化
Cisco——HSRP实验案例一
Cisco——HSRP实验案例一
|
数据安全/隐私保护
Cisco——VRRP基础实验
Cisco——VRRP基础实验
247 0
Cisco——VRRP基础实验
|
网络协议 网络架构