• 全部
  • 经验案例
  • 典型配置
  • 技术公告
  • FAQ
  • 漏洞说明
  • 全部
  • 全部
  • 大数据引擎
  • 知了引擎
产品线
搜索
取消
案例类型
发布者
是否解决
是否官方
时间
搜索引擎
匹配模式
高级搜索

SR8800-X VRRP与BFD、Track联动典型配置

2015-08-12 发表
  • 0关注
  • 0收藏 2694浏览
粉丝:1人 关注:0人

区域A和区域B用户所在网络的出口处部署了两台汇聚层设备(Device ADevice B)。

现要求使用VRRPBFDTrack联动功能,实现以下需求:

Device ADevice B上分别配置两个VRRP备份组,Device AVRRP备份组1中的Master设备,Device BVRRP备份组2中的Master设备

在正常情况下,区域A的用户将VRRP备份组1作为缺省网关,通过Device A进行数据转发,区域B用户将VRRP备份组2作为缺省网关,通过Device B进行数据转发。当一台网关设备出现故障时,另一台网关设备能够迅速承担受影响区域内主机流量的转发任务;

当网关设备Device ADevice B)自身出现故障,或其上行接口出现故障时,局域网中的主机可以通过另一台设备网关设备Device BDevice A)继续通信,避免通信中断;当Device ADevice B)故障恢复后,继续承担网关功能;

Device ADevice B的下行链路出现故障时,局域网中的主机通过接入设备L2 Switch A L2 Switch BTen-GigabitEthernet3/0/2端口将数据转发给网关设备继续通信,避免通信中断;当Device ADevice B的下行链路故障恢复后,继续由L2 Switch A L2 Switch BTen-GigabitEthernet3/0/1端口将数据发送给网关设备。

 

为了实现不同区域中用户数据流的负载分担,需要在Device ADevice B上分别创建两个VRRP备份组,并配置区域A内的主机都将VRRP备份组1作为网关,区域B内的主机都将VRRP备份组2作为网关;

为使Device A优先被选举为VRRP备份组1Master设备,需要为其在VRRP备份组1中配置较高的优先级;为使Device B优先被选举为VRRP备份组2Master设备,需要为其在VRRP备份组2中配置较高的优先级;

配置两个VRRP备份组都工作在抢占模式,以保证原Master设备故障恢复后,能再次抢占成为Master

通过Device ADevice B上配置BFD功能监视其上行接口的状态,当监测到其上行接口故障时Device ADevice B的优先级会自动降低指定的数额,使VRRP备份组1Device B的优先级高于Device A,或VRRP备份组2Device A的优先级高于Device B,从而实现主备切换。

请务必保证备份组中的所有设备上配置的VRRP版本一致,否则备份组无法正常工作。

为了避免对端发送大量的ICMP重定向报文造成网络拥塞,建议不要将BFD echo报文的源IP地址配置为属于该设备任何一个接口所在网段。

建议将备份组的虚拟IP地址和备份组中设备下行接口的IP地址配置为同一网段,否则可能导致局域网内的主机无法访问外部网络。

 

1.1.1  配置各接口的IP地址

(1)      配置Device A各接口的IP地址

<DeviceA> system-view

[DeviceA] interface ten-gigabitethernet 3/0/1

[DeviceA-Ten-GigabitEthernet3/0/1] undo shutdown

[DeviceA-Ten-GigabitEthernet3/0/1] ip address 1.1.1.1 24

[DeviceA-Ten-GigabitEthernet3/0/1] quit

(2)      请参考以上方法配置上图中其它接口的IP地址,配置步骤这里省略

1.1.2  配置上行设备Device EDevice FVRRP组虚拟IP的静态路由

(1)      配置Device E

# 配置Device EVRRP备份组1VRRP备份组2的虚拟IP地址的静态路由。

<DeviceE> system-view

[DeviceE] ip route-static 10.1.1.0 255.255.255.0 1.1.1.1

[DeviceE] ip route-static 10.1.2.0 255.255.255.0 1.1.1.1

(2)      配置Device F

# 配置Device FVRRP备份组1VRRP备份组2的虚拟IP地址的静态路由。

<DeviceE> system-view

[DeviceF] ip route-static 10.1.1.0 255.255.255.0 1.1.2.1

[DeviceF] ip route-static 10.1.2.0 255.255.255.0 1.1.2.1

1.1.3  配置VRRP备份组

(1)      配置Device A

# 配置VRRP备份组1的虚拟IP地址为10.1.1.1,抢占延时为5s并且VRRP备份组1Device A的优先级为110,高于Device B,成为VRRP备份组1Master

[DeviceA] interface ten-gigabitethernet 3/0/2

[DeviceA-Ten-GigabitEthernet3/0/2] vrrp vrid 1 virtual-ip 10.1.1.1

[DeviceA-Ten-GigabitEthernet3/0/2] vrrp vrid 1 priority 110

[DeviceA-Ten-GigabitEthernet3/0/2] vrrp vrid 1 preempt-mode delay 5

[DeviceA-Ten-GigabitEthernet3/0/2] quit

# 配置VRRP备份组2的虚拟IP地址为10.1.2.1,抢占延时为5s

 [DeviceA] interface ten-gigabitethernet 3/0/3

[DeviceA-Ten-GigabitEthernet3/0/3] vrrp vrid 2 virtual-ip 10.1.2.1

[DeviceA-Ten-GigabitEthernet3/0/3] vrrp vrid 2 preempt-mode delay 5

[DeviceA–Ten-GigabitEthernet3/0/3] quit

(2)      配置Device B

# 配置VRRP备份组1的虚拟IP地址为10.1.1.1,抢占延时为5s

[DeviceB] interface ten-gigabitethernet 3/0/2

[DeviceB-Ten-GigabitEthernet3/0/2] vrrp vrid 1 virtual-ip 10.1.1.1

[DeviceB-Ten-GigabitEthernet3/0/2] vrrp vrid 1 preempt-mode delay 5

[DeviceB-Ten-GigabitEthernet3/0/2] quit

# 配置VRRP备份组2的虚拟IP地址为10.1.2.1,抢占延时为5s。并且VRRP备份组2Device B的优先级为110,高于Device A,成为VRRP备份组2Master

 [DeviceB] interface ten-gigabitethernet 3/0/3

[DeviceB-Ten-GigabitEthernet3/0/3] vrrp vrid 2 virtual-ip 10.1.2.1

[DeviceB-Ten-GigabitEthernet3/0/3] vrrp vrid 2 priority 110

[DeviceB-Ten-GigabitEthernet3/0/3] vrrp vrid 2 preempt-mode delay 5

[DeviceB–Ten-GigabitEthernet3/0/3] quit

1.1.4  配置BFD功能

(1)      配置Device A

# 配置BFD echo报文方式的Source IPIP地址可以任意指定,不要与实际接口地址相同。

[DeviceA] bfd echo-source-ip 10.10.10.10

(2)      配置Device B

# 配置BFD echo报文方式的Source IPIP地址可以任意指定,不要与实际接口地址相同。

[DeviceB] bfd echo-source-ip 11.11.11.11

1.1.5  配置Track

(1)      配置Device A

# 创建和BFD会话关联的Track1,检测上行设备Device E是否可达。

 [DeviceA] track 1 bfd echo interface ten-gigabitethernet 3/0/1 remote ip 1.1.1.2 local ip 1.1.1.1

# 配置备份组1监视Track1的状态,当Track项状态为Negative时,Device AVRRP备份组1中的优先级减小20,低于Device B,以便Device B抢占成为Master

[DeviceA] interface ten-gigabitethernet 3/0/2

[DeviceA-Ten-GigabitEthernet3/0/2] vrrp vrid 1 track 1 reduced 20

[DeviceA-Ten-GigabitEthernet3/0/2] quit

(2)      配置Device B

# 创建和BFD会话关联的Track1,检测上行设备Device F是否可达。

 [DeviceB] track 1 bfd echo interface ten-gigabitethernet 3/0/1 remote ip 1.1.2.2 local ip 1.1.2.1

# 配置备份组2监视Track1的状态,当Track项状态为Negative时,Device BVRRP备份组2中的优先级减小20,低于Device A,以便Device A抢占成为Master

[DeviceB] interface ten-gigabitethernet 3/0/3

[DeviceB-Ten-GigabitEthernet3/0/3] vrrp vrid 2 track 1 reduced 20

[DeviceB-Ten-GigabitEthernet3/0/3] quit

1.2  验证配置

(1)      网关设备Device ADevice B和链路均正常工作时,验证局域网内主机是否可以与外部网络通信

# 检查区域A的主机到目的端1.1.1.2是否可达。

<host A> ping 1.1.1.2

PING 1.1.1.2 (1.1.1.2): 56 data bytes

56 bytes from 1.1.1.2: seq=0 ttl=128 time=22.43 ms

56 bytes from 1.1.1.2: seq=1 ttl=128 time=7.17 ms

56 bytes from 1.1.1.2: seq=2 ttl=128 time=8.91 ms

56 bytes from 1.1.1.2: seq=3 ttl=128 time=7.45 ms

56 bytes from 1.1.1.2: seq=4 ttl=128 time=9.11 ms

 

--- 1.1.1.2 ping statistics ---

5 packets transmitted, 5 packets received, 0% packet loss

round-trip min/avg/max = 7.17/11.01/22.43 ms

# 检查区域B的主机到目的端1.1.2.2是否可达。

<host C> ping 1.1.2.2

PING 1.1.2.2 (1.1.2.2): 56 data bytes

56 bytes from 1.1.2.2: seq=0 ttl=128 time=22.43 ms

56 bytes from 1.1.2.2: seq=1 ttl=128 time=7.17 ms

56 bytes from 1.1.2.2: seq=2 ttl=128 time=8.91 ms

56 bytes from 1.1.2.2: seq=3 ttl=128 time=7.45 ms

56 bytes from 1.1.2.2: seq=4 ttl=128 time=9.11 ms

 

--- 1.1.2.2 ping statistics ---

5 packets transmitted, 5 packets received, 0% packet loss

round-trip min/avg/max = 7.17/11.01/22.43 ms

以上显示信息表示网关设备Device ADevice B和链路均正常工作时,区域A的主机和区域B的主机都可以访问Internet

# 查看Device ABFD会话。

[DeviceA] display bfd session

 

 Total Session Num: 1     Up Session Num: 1     Init Mode: Active

 

 IPv4 Session Working Under Echo Mode:

 

 LD             SourceAddr      DestAddr        State    Holdtime    Interface

 65             1.1.1.1         1.1.1.2         Up       2000ms      XGE3/0/1

以上显示信息表示BFD会话已经建立。

# 显示Device A上备份组的详细信息。

[DeviceA] display vrrp verbose

IPv4 Virtual Router Information:

 Running Mode      : Standard

 Total number of virtual routers : 2

   Interface Ten-GigabitEthernet3/0/2

     VRID           : 1                    Adver Timer  : 100

     Admin Status   : Up                   State        : Master

     Config Pri     : 110                  Running Pri  : 110

     Preempt Mode   : Yes                  Delay Time   : 5

     Auth Type      : None

     Virtual IP     : 10.1.1.1

     Virtual MAC    : 0000-5e00-0101

     Master IP      : 10.1.1.101

   VRRP Track Information:

     Track Object   : 1                    State : Positive   Pri Reduced : 20

 

   Interface Ten-GigabitEthernet3/0/3

     VRID           : 2                    Adver Timer  : 100

     Admin Status   : Up                   State        : Backup

     Config Pri     : 100                  Running Pri  : 100

     Preempt Mode   : Yes                  Delay Time   : 5

     Become Master  : 3600ms left

     Auth Type      : None

     Virtual IP     : 10.1.2.1

     Master IP      : 10.1.2.102

# 显示Device B上备份组的详细信息。

[DeviceB] display vrrp verbose

IPv4 Virtual Router Information:

 Running Mode      : Standard

 Total number of virtual routers : 2

   Interface Ten-GigabitEthernet3/0/2

     VRID           : 1                    Adver Timer  : 100

     Admin Status   : Up                   State        : Backup

     Config Pri     : 100                  Running Pri  : 100

     Preempt Mode   : Yes                  Delay Time   : 5

     Become Master  : 3100ms left

     Auth Type      : None

     Virtual IP     : 10.1.1.1

     Master IP      : 10.1.1.101

 

   Interface Ten-GigabitEthernet3/0/3

     VRID           : 2                    Adver Timer  : 100

     Admin Status   : Up                   State        : Master

     Config Pri     : 110                  Running Pri  : 110

     Preempt Mode   : Yes                  Delay Time   : 5

     Auth Type      : None

     Virtual IP     : 10.1.2.1

     Virtual MAC    : 0000-5e00-0102

     Master IP      : 10.1.2.102

   VRRP Track Information:

     Track Object   : 1                    State : Positive   Pri Reduced : 20

以上显示信息表示在备份组1Device AMasterDevice BBackup缺省网关为10.1.1.1/24的主机通过Device A访问Internet备份组2Device ABackupDevice BMaster缺省网关为10.1.2.1/24的主机通过Device B访问Internet

(2)      Device A监视的上行设备或上行链路状态为down,验证局域网内主机是否可以与外部网络通信

# 检查区域A的主机到目的端1.1.1.2是否可达。

<host A> ping 1.1.1.2

PING 1.1.1.2 (1.1.1.2): 56 data bytes

56 bytes from 1.1.1.2: seq=0 ttl=128 time=22.43 ms

56 bytes from 1.1.1.2: seq=1 ttl=128 time=7.17 ms

56 bytes from 1.1.1.2: seq=2 ttl=128 time=8.91 ms

56 bytes from 1.1.1.2: seq=3 ttl=128 time=7.45 ms

56 bytes from 1.1.1.2: seq=4 ttl=128 time=9.11 ms

 

--- 1.1.1.2 ping statistics ---

5 packets transmitted, 5 packets received, 0% packet loss

round-trip min/avg/max = 7.17/11.01/22.43 ms

# 检查区域B的主机到目的端1.1.1.2是否可达。

<host C> ping 1.1.2.2

PING 1.1.2.2 (1.1.2.2): 56 data bytes

56 bytes from 1.1.2.2: seq=0 ttl=128 time=22.43 ms

56 bytes from 1.1.2.2: seq=1 ttl=128 time=7.17 ms

56 bytes from 1.1.2.2: seq=2 ttl=128 time=8.91 ms

56 bytes from 1.1.2.2: seq=3 ttl=128 time=7.45 ms

56 bytes from 1.1.2.2: seq=4 ttl=128 time=9.11 ms

 

--- 1.1.2.2 ping statistics ---

5 packets transmitted, 5 packets received, 0% packet loss

round-trip min/avg/max = 7.17/11.01/22.43 ms

以上显示信息表示当Device A监视的上行设备或上行链路状态为down时,区域A的主机和区域B的主机都可以访问Internet

# 查看Device A上的BFD会话。

[DeviceA] display bfd session

 

 Total Session Num: 1     Up Session Num: 0     Init Mode: Active

 

 IPv4 Session Working Under Echo Mode:

 

 LD             SourceAddr      DestAddr        State    Holdtime    Interface

 65             1.1.1.1         1.1.1.2         Down        /        XGE3/0/1

以上显示信息表示BFD会话已经终止。

# 显示Device B上备份组的详细信息。

[DeviceB] display vrrp verbose

IPv4 Virtual Router Information:

 Running Mode      : Standard

 Total number of virtual routers : 2

   Interface Ten-GigabitEthernet3/0/2

     VRID           : 1                    Adver Timer  : 100

     Admin Status   : Up                   State        : Master

     Config Pri     : 100                  Running Pri  : 100

     Preempt Mode   : Yes                  Delay Time   : 5

     Auth Type      : None

     Virtual IP     : 10.1.1.1

     Virtual MAC    : 0000-5e00-0101

     Master IP      : 10.1.1.102

 

   Interface Ten-GigabitEthernet3/0/2

     VRID           : 2                    Adver Timer  : 100

     Admin Status   : Up                   State        : Master

     Config Pri     : 110                  Running Pri  : 110

     Preempt Mode   : Yes                  Delay Time   : 5

     Auth Type      : None

     Virtual IP     : 10.1.2.1

     Virtual MAC    : 0000-5e00-0102

     Master IP      : 10.1.2.102

   VRRP Track Information:

     Track Object   : 1                    State : Positive   Pri Reduced : 20

以上显示信息表示当Device A监视的上行设备或上行链路状态为down时,Device B抢占成为VRRP备份组1MasterVLAN 2内的主机通过Device B与外界通信。

# 上行设备或上行链路状态恢复为UP后,查看Device A上的BFD会话。

[DeviceA] display bfd session

 

 Total Session Num: 1     Up Session Num: 1     Init Mode: Active

 

 IPv4 Session Working Under Echo Mode:

 

 LD             SourceAddr      DestAddr        State    Holdtime    Interface

 65             1.1.1.1         1.1.1.2         Up       1932ms      XGE3/0/1

以上显示信息表示BFD会话已经恢复。

# 上行设备或上行链路状态恢复为UP后,显示Device A上备份组的详细信息。

[DeviceA] display vrrp verbose

IPv4 Virtual Router Information:

 Running Mode      : Standard

 Total number of virtual routers : 2

   Interface Ten-GigabitEthernet3/0/2

     VRID           : 1                    Adver Timer  : 100

     Admin Status   : Up                   State        : Master

     Config Pri     : 110                  Running Pri  : 110

     Preempt Mode   : Yes                  Delay Time   : 5

     Auth Type      : None

     Virtual IP     : 10.1.1.1

     Virtual MAC    : 0000-5e00-0101

     Master IP      : 10.1.1.101

   VRRP Track Information:

     Track Object   : 1         State : Positive   Pri Reduced : 20

 

   Interface Ten-GigabitEthernet3/0/3

     VRID           : 2                    Adver Timer  : 100

     Admin Status   : Up                   State        : Backup

     Config Pri     : 100                  Running Pri  : 100

     Preempt Mode   : Yes                  Delay Time   : 5

     Become Master  : 3550ms left

     Auth Type      : None

     Virtual IP     : 10.1.2.1

     Master IP      : 10.1.2.102

以上显示信息表示当上行设备或上行链路状态恢复为UP后,Device AVRRP备份组1中恢复为原来的优先级并抢占成为该备份组的MasterVLAN 2内的主机通过Device A与外界通信。

该案例对您是否有帮助:

您的评价:1

若您有关于案例的建议,请反馈:

作者在2019-06-07对此案例进行了修订
0 个评论

该案例暂时没有网友评论

编辑评论

举报

×

侵犯我的权益 >
对根叔知了社区有害的内容 >
辱骂、歧视、挑衅等(不友善)

侵犯我的权益

×

泄露了我的隐私 >
侵犯了我企业的权益 >
抄袭了我的内容 >
诽谤我 >
辱骂、歧视、挑衅等(不友善)
骚扰我

泄露了我的隐私

×

您好,当您发现根叔知了上有泄漏您隐私的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到pub.zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您认为哪些内容泄露了您的隐私?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)

侵犯了我企业的权益

×

您好,当您发现根叔知了上有关于您企业的造谣与诽谤、商业侵权等内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到 pub.zhiliao@h3c.com 邮箱,我们会在审核后尽快给您答复。
  • 1. 您举报的内容是什么?(请在邮件中列出您举报的内容和链接地址)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
  • 3. 是哪家企业?(营业执照,单位登记证明等证件)
  • 4. 您与该企业的关系是?(您是企业法人或被授权人,需提供企业委托授权书)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

抄袭了我的内容

×

原文链接或出处

诽谤我

×

您好,当您发现根叔知了上有诽谤您的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到pub.zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您举报的内容以及侵犯了您什么权益?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

对根叔知了社区有害的内容

×

垃圾广告信息
色情、暴力、血腥等违反法律法规的内容
政治敏感
不规范转载 >
辱骂、歧视、挑衅等(不友善)
骚扰我
诱导投票

不规范转载

×

举报说明

提出建议

    +

亲~登录后才可以操作哦!

确定

亲~检测到您登陆的账号未在http://hclhub.h3c.com进行注册

注册后可访问此模块

跳转hclhub

你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作