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

SR8800-X OSPF与BFD联动典型配置

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

某公司通过一台二层交换机作为中继将两个相距较远的部门连接。Device A、Device B、Device C上运行OSPF,建立OSPF邻居关系,保证网络层相互可达。

已知Device ADevice C都支持BFD功能,要求使用OSPFBFD联动技术,采用BFD控制报文方式实现当Device ADevice C与二层交换机之间的链路出现故障(如链路down)时,BFD能够快速感知并通告OSPF协议。

现要求通过在Device ADevice C上配置OSPFBFD联动功能,实现:

监测通过L2 Switch通信的链路;

当链路出现故障时设备能够快速感知并通告OSPF协议,快速切换到Device B链路进行通信。

 


Device ADevice C都支持BFD,可以使用BFD控制报文方式,通信双方至少要有一方运行在主动模式才能成功建立起BFD会话。

 


1.1.1  配置各接口的IP地址
(1)      配置Device A各接口的IP地址
system-view
[DeviceA] interface ten-gigabitethernet 3/0/1
[DeviceA-Ten-GigabitEthernet3/0/1] undo shutdown
[DeviceA-Ten-GigabitEthernet3/0/1] ip address 10.1.0.101 24
[DeviceA-Ten-GigabitEthernet3/0/1] quit
(2)      请参考以上方法配置图中其它接口的IP地址,配置步骤这里省略
1.1.2  配置OSPF基本功能
(1)      配置Device A
# 配置Device AOSPF基本功能,并使能OSPFBFD功能。
[DeviceA] ospf
[DeviceA-ospf-1] area 0
[DeviceA-ospf-1-area-0.0.0.0] network 10.1.0.0 0.0.0.255
[DeviceA-ospf-1-area-0.0.0.0] network 192.168.0.0 0.0.0.255
[DeviceA-ospf-1-area-0.0.0.0] network 120.1.1.0 0.0.0.255
[DeviceA-ospf-1-area-0.0.0.0] quit
[DeviceA-ospf-1] quit
[DeviceA] interface ten-gigabitethernet 3/0/1
[DeviceA-Ten-GigabitEthernet3/0/1] ospf bfd enable
[DeviceA-Ten-GigabitEthernet3/0/1] quit
(2)      配置Device B
# 配置Device BOSPF基本功能。
[DeviceB] ospf
[DeviceB-ospf-1] area 0
[DeviceB-ospf-1-area-0.0.0.0] network 192.168.0.0 0.0.0.255
[DeviceB-ospf-1-area-0.0.0.0] network 13.1.1.0 0.0.0.255
[DeviceB-ospf-1-area-0.0.0.0] quit
[DeviceB-ospf-1] quit
(3)      配置Device C
# 配置Device COSPF基本功能,并使能OSPFBFD功能。
[DeviceC] ospf
[DeviceC-ospf-1] area 0
[DeviceC-ospf-1-area-0.0.0.0] network 10.1.0.0 0.0.0.255
[DeviceC-ospf-1-area-0.0.0.0] network 13.1.1.0 0.0.0.255
[DeviceC-ospf-1-area-0.0.0.0] network 121.1.1.0 0.0.0.255
[DeviceC-ospf-1-area-0.0.0.0] quit
[DeviceC-ospf-1] quit
[DeviceC] interface vlan-interface 10
[DeviceC-Vlan-interface10] ospf bfd enable
[DeviceC-Vlan-interface10] quit
[DeviceC] interface ten-gigabitethernet 3/0/1
[DeviceC-Ten-GigabitEthernet3/0/1] ospf bfd enable
[DeviceC-Ten-GigabitEthernet3/0/1] quit
1.1.3  配置BFD功能
(1)      配置Device A
# 配置BFD会话建立前的运行模式为主动模式(缺省为主动模式)。
[DeviceA] bfd session init-mode active
# 配置发送和接收单跳BFD控制报文的最小时间间隔都为100ms,单跳BFD检测时间倍数为3
 [DeviceA] interface ten-gigabitethernet 3/0/1
[DeviceA-Ten-GigabitEthernet3/0/1] bfd min-transmit-interval 100
[DeviceA-Ten-GigabitEthernet3/0/1] bfd min-receive-interval 100
[DeviceA-Ten-GigabitEthernet3/0/1] bfd detect-multiplier 3
[DeviceA-Ten-GigabitEthernet3/0/1] quit
(2)      配置Device C
# 配置BFD会话建立前的运行模式为主动模式(缺省为主动模式)。
[DeviceC] bfd session init-mode active
# 配置发送和接收单跳BFD控制报文的最小时间间隔都为100ms,单跳BFD检测时间倍数为3
 [DeviceC] interface ten-gigabitethernet 3/0/1
[DeviceC-Ten-GigabitEthernet3/0/1] bfd min-transmit-interval 100
[DeviceC-Ten-GigabitEthernet3/0/1] bfd min-receive-interval 100
[DeviceC-Ten-GigabitEthernet3/0/1] bfd detect-multiplier 3
[DeviceC-Ten-GigabitEthernet3/0/1] quit
1.2  验证配置
# 检查Device A连接的主机host A120.1.1.2)到Device C连接的主机host C121.1.1.2)是否可达。
ping 121.1.1.2
PING 121.1.1.2 (121.1.1.2): 56 data bytes
56 bytes from 121.1.1.2: seq=0 ttl=128 time=22.43 ms
56 bytes from 121.1.1.2: seq=1 ttl=128 time=7.17 ms
56 bytes from 121.1.1.2: seq=2 ttl=128 time=8.91 ms
56 bytes from 121.1.1.2: seq=3 ttl=128 time=7.45 ms
56 bytes from 121.1.1.2: seq=4 ttl=128 time=9.11 ms
 
--- 121.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
# 查看Device A OSPF邻居信息,显示Device ADevice C已建立OSPF邻居关系。
[DeviceA] display ospf peer verbose
 
          OSPF Process 1 with Router ID 2.2.2.2
                  Neighbors
 
 Area 0.0.0.0 interface 10.1.0.101(Vlan-interface10)'s neighbors
 Router ID: 1.1.1.1          Address: 10.1.0.102       GR State: Normal
   State: Full  Mode: Nbr is Slave  Priority: 1
   DR: 10.1.0.101  BDR: 10.1.0.102  MTU: 0
   Options is 0x42 (-|O|-|-|-|-|E|-)
   Dead timer due in 39  sec
   Neighbor is up for 00:09:01
   Authentication Sequence: [ 0 ]
   Neighbor state change count: 5
   BFD status: Enabled(Control mode)
# BFD会话已被创建,且状态为UP
[DeviceA] display bfd session verbose
 
 Total session number: 1   Up session number: 1   Init mode: Active
 
 IPv4 session working under Ctrl mode:
     Local Discr: 10                  Remote Discr: 1
       Source IP: 10.1.0.101        Destination IP: 10.1.0.102
   Session State: Up                     Interface: Ten-GigabitEthernet3/0/1
 Min Trans Inter: 100ms            Act Trans Inter: 1000ms
  Min Recv Inter: 100ms           Act Detect Inter: 5000ms
          Rx Count: 3971                     Tx Count: 3776
      Connect Type: Direct             Running Up for: 00:06:52
         Hold Time: 214ms                   Auth mode: None
       Detect Mode: Async                        Slot: 0
        Protocol: OSPF
       Diag Info: No Diagnostic
 
[DeviceC] display bfd session verbose
 Total session number: 1   Up session number: 1   Init mode: Active
 
 IPv4 session working under Ctrl mode:
     Local Discr: 1                   Remote Discr: 10
       Source IP: 10.1.0.102        Destination IP: 10.1.0.101
   Session State: Up                     Interface: Ten-GigabitEthernet3/0/1
 Min Trans Inter: 100ms            Act Trans Inter: 1000ms
  Min Recv Inter: 100ms           Act Detect Inter: 5000ms
Min Trans Inter: 100ms            Act Trans Inter: 1000ms
  Min Recv Inter: 100ms           Act Detect Inter: 5000ms
          Rx Count: 3971                     Tx Count: 3776
      Connect Type: Direct             Running Up for: 00:06:52
         Hold Time: 214ms                   Auth mode: None
       Detect Mode: Async                        Slot: 0
        Protocol: OSPF
       Diag Info: No Diagnostic
Device A上查看121.1.1.0/24的路由信息可以看出Device ADevice C是通过L2 Switch进行通信的。
display ip routing-table 121.1.1.0 verbose
 
Summary Count : 1
 
Destination: 120.1.1.0/24
   Protocol: OSPF            Process ID: 1
  SubProtID: 0x1                    Age: 04h20m37s
       Cost: 1               Preference: 10
        Tag: 0                    State: Active Adv
  OrigTblID: 0x0                OrigVrf: default-vrf
    TableID: 0x2                 OrigAs: 0
      NBRID: 0x26000002          LastAs: 0
     AttrID: 0xffffffff        Neighbor: 0.0.0.0
      Flags: 0x1008c        OrigNextHop: 10.1.0.102
      Label: NULL           RealNextHop: 10.1.0.102
    BkLabel: NULL             BkNextHop: N/A
  Tunnel ID: Invalid          Interface: GigabitEthernet3/0/1
BkTunnel ID: Invalid        BkInterface: N/A
# Device C和二层交换机之间的链路状态变为DownBFD快速检测到链路发生变化立刻通告OSPF
%Apr  2 11:34:26:880 2014 DeviceA BFD/5/BFD_CHANGE_FSM: Sess[10.1.0.101/10.1.0.102,1026/1026
,Ten-GigabitEthernet3/0/1,Ctrl] , Sta: UP-> DOWN, Diag: 5
%Apr  2 11:34:27:011 2014 DeviceA OSPF/5/OSPF_NBR_CHG: OSPF 1 Neighbor 10.1.0.102 Ten-GigabitEthernet3/0/1) from Full to Down.
查看121.1.1.0/24的路由信息,可以看出Device ADevice C已经切换到Device B进行通信。
display ip routing-table 121.1.1.0 verbose
Summary Count : 1
 
Destination: 121.1.1.0/24
   Protocol: OSPF            Process ID: 1
  SubProtID: 0x1                    Age: 04h20m37s
       Cost: 2               Preference: 10
        Tag: 0                    State: Active Adv
  OrigTblID: 0x0                OrigVrf: default-vrf
    TableID: 0x2                 OrigAs: 0
      NBRID: 0x26000002          LastAs: 0
     AttrID: 0xffffffff        Neighbor: 0.0.0.0
      Flags: 0x1008c        OrigNextHop: 192.168.0.102
      Label: NULL           RealNextHop: 192.168.0.102
    BkLabel: NULL             BkNextHop: N/A
  Tunnel ID: Invalid          Interface: GigabitEthernet3/0/2
BkTunnel ID: Invalid        BkInterface: N/A


该案例对您是否有帮助:

您的评价:1

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

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

该案例暂时没有网友评论

编辑评论

举报

×

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

侵犯我的权益

×

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

泄露了我的隐私

×

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

侵犯了我企业的权益

×

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

抄袭了我的内容

×

原文链接或出处

诽谤我

×

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

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

×

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

不规范转载

×

举报说明

提出建议

    +

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

确定

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

注册后可访问此模块

跳转hclhub

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