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

BFD for BGP configuration

2021-05-21 Published
  • 0关注
  • 0收藏 1928浏览
粉丝:0人 关注:0人

Network Topology

Network requirements

As shown in Figure, configure OSPF as the IGP in AS 200.

·           Establish two IBGP connections between Switch A and Switch C. When both paths operate correctly, Switch C uses the path Switch A<—>Switch B<—>Switch C to exchange packets with network 1.1.1.0/24.

·           Configure BFD over the path. When the path fails, BFD can quickly detect the failure and notify it to BGP. Then, the path Switch A<—>Switch D<—>Switch C takes effect immediately.


Device

interface

IP

Device

interface

IP

Switch A

Vlan-int100

3.0.1.1/24

Switch C

Vlan-int101

3.0.2.2/24

 

Vlan-int200

2.0.1.1/24

 

Vlan-int201

2.0.2.2/24

 

Loopback0

1.1.1.1/24

 

Loopback0

5.5.5.5/24

Switch B

Vlan-int100

3.0.1.2/24

Switch D

Vlan-int200

2.0.1.2/24

 

Vlan-int101

3.0.2.1/24

 

Vlan-int201

2.0.2.1/24

Configuration Steps

Configuration procedure

1. Swithc A

#

ospf 1

 area 0.0.0.0

  network 2.0.1.0 0.0.0.255

  network 3.0.1.0 0.0.0.255

#

acl number 2000

 rule 0 permit source 1.1.1.0 0.0.0.255

#

route-policy apply_med_100 permit node 10

 if-match ip address acl 2000

 apply cost 100

#

route-policy apply_med_50 permit node 10

 if-match ip address acl 2000

 apply cost 50

#

#

bgp 200

 peer 2.0.2.2 as-number 200

 peer 3.0.2.2 as-number 200

 peer 3.0.2.2 bfd

 #

 address-family ipv4 unicast

  network 1.1.1.0 255.255.255.0

  peer 2.0.2.2 enable

  peer 2.0.2.2 route-policy apply_med_100 export

  peer 3.0.2.2 enable

  peer 3.0.2.2 route-policy apply_med_50 export

#

 

2. Swithc C

#

ospf 1

 area 0.0.0.0

  network 2.0.2.0 0.0.0.255

  network 3.0.2.0 0.0.0.255

#

acl number 2000

 rule 0 permit source 5.5.5.0 0.0.0.255

#

route-policy apply_med_100 permit node 10

 if-match ip address acl 2000

 apply cost 100

#

route-policy apply_med_50 permit node 10

 if-match ip address acl 2000

 apply cost 50

#

bgp 200

 peer 2.0.1.1 as-number 200

 peer 3.0.1.1 as-number 200

 peer 3.0.1.1 bfd

 #

 address-family ipv4 unicast

  network 5.5.5.0 255.255.255.0

  peer 2.0.1.1 enable

  peer 2.0.1.1 route-policy apply_med_100 export

  peer 3.0.1.1 enable

  peer 3.0.1.1 route-policy apply_med_50 export

#

3. Swithc B

#

ospf 1

 area 0.0.0.0

  network 3.0.1.0 0.0.0.255

  network 3.0.2.0 0.0.0.255

#

 ip route-static 1.1.1.0 24 3.0.1.1

 ip route-static 5.5.5.0 24 3.0.2.2

#

4. Swithc D

 

#

ospf 1

 area 0.0.0.0

  network 2.0.1.0 0.0.0.255

  network 2.0.2.0 0.0.0.255

#

ip route-static 1.1.1.0 24 2.0.1.1

 ip route-static 5.5.5.0 24 2.0.2.2

#

 

Verifying the configuration

 

1. # Display detailed BFD session information on Switch C.

 [SwitchC]dis bfd session verbose

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

 

 IPv4 session working in control packet mode:

       Local Discr: 129                  Remote Discr: 129

         Source IP: 3.0.2.2            Destination IP: 3.0.1.1

     Session State: Up                      Interface: N/A

      Min Tx Inter: 400ms                Act Tx Inter: 400ms

      Min Rx Inter: 400ms                Detect Inter: 2000ms

          Rx Count: 2                        Tx Count: 6

      Connect Type: Indirect           Running Up for: 00:16:04

         Hold Time: 1600ms                  Auth mode: None

       Detect Mode: Async                        Slot: 1

          Protocol: BGP

           Version: 1

         Diag Info: No Diagnostic

The output shows that a BFD session has been established between Switch A and Switch C

 

[SwitchC]dis bgp peer ipv4

 

 BGP local router ID: 10.3.1.1

 Local AS number: 200

 Total number of peers: 2                 Peers in established state: 2

 

  * - Dynamically created peer

  ^ - Peer created through link-local address

  Peer                    AS  MsgRcvd  MsgSent OutQ PrefRcv Up/Down  State

 

  2.0.1.1                200      101      101    0       1 01:21:30 Established

  3.0.1.1                200       11       11    0       1 00:06:39 Established

 

The output shows that Switch C has established two BGP connections with Switch A, and both connections are in Established state

 

[SwitchC]ping -a 5.5.5.5 1.1.1.1

Ping 1.1.1.1 (1.1.1.1) from 5.5.5.5: 56 data bytes, press CTRL+C to break

56 bytes from 1.1.1.1: icmp_seq=0 ttl=254 time=2.180 ms

56 bytes from 1.1.1.1: icmp_seq=1 ttl=254 time=6.879 ms

56 bytes from 1.1.1.1: icmp_seq=2 ttl=254 time=1.904 ms

56 bytes from 1.1.1.1: icmp_seq=3 ttl=254 time=1.900 ms

56 bytes from 1.1.1.1: icmp_seq=4 ttl=254 time=1.904 ms

 

2. # Display route 1.1.1.0/24 on Switch C.

[SwitchC]dis ip routing-table 1.1.1.1 verbose

 

Summary count : 1

 

Destination: 1.1.1.0/24

   Protocol: BGP instance default

 Process ID: 0

  SubProtID: 0x1                    Age: 00h17m30s

       Cost: 50              Preference: 255

      IpPre: N/A             QosLocalID: N/A

        Tag: 0                    State: Active Adv

  OrigTblID: 0x0                OrigVrf: default-vrf

    TableID: 0x2                 OrigAs: 0

      NibID: 0x16000001          LastAs: 0

     AttrID: 0x1               Neighbor: 3.0.1.1

      Flags: 0x10060        OrigNextHop: 3.0.1.1

      Label: NULL           RealNextHop: 3.0.2.1

    BkLabel: NULL             BkNextHop: N/A

    SRLabel: NULL             BkSRLabel: NULL

   SIDIndex: NULL               InLabel: NULL

  Tunnel ID: Invalid          Interface: Vlan-interface101

BkTunnel ID: Invalid        BkInterface: N/A

   FtnIndex: 0x0           TrafficIndex: N/A

  Connector: N/A                 PathID: 0x0

   LinkCost: 0               MicroSegID: 0

 

The output shows that Switch C communicates with network 1.1.1.0/24 through the path Switch C<—>Switch B<—>Switch A.

 

3.  # Break down the path Switch C<—>Switch B<—>Switch A and then display route 1.1.1.0/24 on Switch C.

 [Swtich B]interface Ten-GigabitEthernet1/0/1

 [Swtich B-Ten-GigabitEthernet1/0/1]shutdown

 

 [SwitchC]dis ip routing-table 1.1.1.1 verbose

 

Summary count : 1

 

Destination: 1.1.1.0/24

   Protocol: BGP instance default

 Process ID: 0

  SubProtID: 0x1                    Age: 00h00m49s

       Cost: 100             Preference: 255

      IpPre: N/A             QosLocalID: N/A

        Tag: 0                    State: Active Adv

  OrigTblID: 0x0                OrigVrf: default-vrf

    TableID: 0x2                 OrigAs: 0

      NibID: 0x16000002          LastAs: 0

     AttrID: 0x2               Neighbor: 2.0.1.1

      Flags: 0x10060        OrigNextHop: 2.0.1.1

      Label: NULL           RealNextHop: 2.0.2.1

    BkLabel: NULL             BkNextHop: N/A

    SRLabel: NULL             BkSRLabel: NULL

   SIDIndex: NULL               InLabel: NULL

  Tunnel ID: Invalid          Interface: Vlan-interface201

BkTunnel ID: Invalid        BkInterface: N/A

   FtnIndex: 0x0           TrafficIndex: N/A

  Connector: N/A                 PathID: 0x0

   LinkCost: 0               MicroSegID: 0

 

The output shows that Switch C communicates with network 1.1.1.0/24 through the path Switch C<—>Switch D<—>Switch A.

 

Key Configuration

该案例对您是否有帮助:

您的评价:1

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

0 comments

No comments

Add Comments:

举报

×

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

侵犯我的权益

×

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

泄露了我的隐私

×

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

侵犯了我企业的权益

×

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

抄袭了我的内容

×

原文链接或出处

诽谤我

×

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

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

×

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

不规范转载

×

举报说明

提出建议

    +

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

确定

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

注册后可访问此模块

跳转hclhub

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