R&S,数通HCIP|VRRP实现高可靠性实验

一、实验拓扑

二、实验需求

        ① 要求PC1访问R1默认通过S2,PC2访问R1默认通过R3。

        ② S2和S3互为对方的备份网关。

        ③ 在主备份交互时保证网络的连通性。

        ④ 保证VRRP配置的安全性。

        ⑤ 实现网络的快速相应。

三、实验分析

        第一,对于需求 ① 和 ②,需要设置VRRP之间的负载均衡;第二,主备份交互时的丢包主要是由于原主设备回复Master状态时,其OSPF邻居并未完全建立,需要设置抢占时延;第三,可以通过设置VRRP的认证机制实现其安全性;第四,对于网络的快速相应,可以在二层交换机上通过设置边缘端口的方式,保证其快速响应。

四、实验步骤

步骤一:按照拓扑图所示配置IP地址,对于三层交换机,需要配置Vlanif 以及接口模式实现IP地址的配置。

对R1:

[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip address 13.1.1.1 24
[R1-GigabitEthernet0/0/0]ospf enable 1 area 0
[R1-GigabitEthernet0/0/0]int g0/0/1
[R1-GigabitEthernet0/0/1]ip address 12.1.1.1 24
[R1-GigabitEthernet0/0/1]ospf enable 1 area 0
[R1-GigabitEthernet0/0/1]qu
[R1]ospf 1
[R1-ospf-1]area  0

对S2:

[S2]vlan batch 10 20
[S2]int Vlanif 10
[S2-Vlanif10]ip address 12.1.1.2 24
[S2-Vlanif10]ospf enable  area  0
[S2-Vlanif10]int Vlanif 20
[S2-Vlanif20]ip address 192.168.1.254 24
[S2-Vlanif20]ospf enable  area  0
[S2]int g0/0/02
[S2-GigabitEthernet0/0/2]port link-type access 
[S2-GigabitEthernet0/0/2]port default vlan 20
[S2-GigabitEthernet0/0/2]int g0/0/1
[S2-GigabitEthernet0/0/1]port link-type access
[S2-GigabitEthernet0/0/1]port default vlan 10
[S2-GigabitEthernet0/0/1]qu
[S2]ospf 1
[S2-ospf-1]area  0
[S2-ospf-1-area-0.0.0.0]

对S3:

[S3]vlan batch 10 20 
[S3]int Vlanif 10
[S3-Vlanif10]ip address 13.1.1.3 24
[S3-Vlanif10]ospf enable  1 area  0
[S3-Vlanif10]int vlanif 20
[S3-Vlanif20]ip address 192.168.1.253 24
[S3-Vlanif20]ospf enable  1 area  0
[S3-Vlanif20]int g0/0/1
[S3-GigabitEthernet0/0/1]port link-type access
[S3-GigabitEthernet0/0/1]port default vlan  10 
[S3]int g0/0/2
[S3-GigabitEthernet0/0/2]port link-type access
[S3-GigabitEthernet0/0/2]port default  vlan 20 
[S3-GigabitEthernet0/0/2]qu
[S3]ospf 1
[S3-ospf-1]area 0
[S3-ospf-1-area-0.0.0.0]

对PC1:

对PC2:

步骤二: 为实现网络的快速相应,在二层交换机上配置边缘端口,同时为保证通信,对二层交换机的VLAN进行相应配置,对于S2和S3的下行链路接口上的邻居,配置相应的静默端口

对S2:

[S2]ospf 1
[S2-ospf-1]silent-interface g0/0/2

对S3:

[S3]ospf 1
[S3-ospf-1]silent-interface g0/0/2

对S1:

[S1]int e0/0/1
[S1-Ethernet0/0/1]port link-type trunk 
[S1-Ethernet0/0/1]port trunk  allow-pass  vlan 10 20
[S1-Ethernet0/0/1]int e0/0/02
[S1-Ethernet0/0/2]port link-type trunk 
[S1-Ethernet0/0/2]port trunk allow-pass vlan  10 20

步骤三:配置S2和S3上的VRRP功能,并开启认证

对S2:

[S2]int Vlanif  20
[S2-Vlanif20]vrrp vrid 1 virtual-ip 192.168.1.253 
[S2-Vlanif20]vrrp vrid 2 virtual-ip 192.168.1.254 
[S2-Vlanif20]vrrp vrid 1 authentication-mode md5 sfn
[S2-Vlanif20]vrrp vrid 2 authentication-mode md5 sfn

对S3:

[S3]int Vlanif  20
[S3-Vlanif20]vrrp vrid 1 virtual-ip 192.168.1.253 
[S3-Vlanif20]vrrp vrid 2 virtual-ip 192.168.1.254 
[S3-Vlanif20]vrrp vrid 1 authentication-mode md5 sfn
[S3-Vlanif20]vrrp vrid 2 authentication-mode md5 sfn

注:此时,PC1和PC2应该已经可以正常与R1进行通信,且已满足需求①、②、④。

效果如图:

PC1:

PC2: 

步骤五:开启VRRP抢占时延

由于抢占时延只能在Master上配置,因此S2配置Vrid 1的抢占时延,S3配置Vrid 2的抢占时延。

对S2:

[S2]int Vlanif 20
[S2-Vlanif20]vrrp vrid 1 preempt-mode timer delay 60

对S3:

[S3]int Vlanif 20
[S3-Vlanif20]vrrp vrid 2 preempt-mode timer delay 60

  • 2
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

朔方鸟

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值