No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

CLI-based Configuration Guide - IP Unicast Routing

AR100, AR120, AR150, AR160, AR200, AR1200, AR2200, AR3200, and AR3600 V200R009

Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Example for Associating BGP with BFD

Example for Associating BGP with BFD

Networking Requirements

As shown in Figure 9-38, RouterA belongs to AS 100, RouterB and RouterC belong to AS 200. EBGP connections are established between RouterA and RouterB, and between RouterA and RouterC.

Service traffic is transmitted along the primary link RouterA->RouterB. The link RouterA->RouterC->RouterB functions as the backup link. Fast fault detection is required to allow traffic to be fast switched from the primary link to the backup link.

Figure 9-38 Networking diagram of configuring BFD for BGP

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure basic BGP functions on each router.

  2. Configure the MED attribute to control route selection.

  3. Enable BFD on RouterA and RouterB.

NOTE:

If two routers establish an EBGP peer relationship over a direct link, BFD for BGP does not need to be configured. This is because the ebgp-interface-sensitive command is enabled by default for directly-connected EBGP peers.

Procedure

  1. Configure an IP address for each interface.

    # Configure IP addresses for all interfaces of RouterA.

    <Huawei> system-view
    [Huawei] sysname RouterA
    [RouterA] interface gigabitethernet 1/0/0
    [RouterA-GigabitEthernet1/0/0] ip address 200.1.1.1 255.255.255.0
    [RouterA-GigabitEthernet1/0/0] quit
    [RouterA] interface gigabitethernet 2/0/0
    [RouterA-GigabitEthernet2/0/0] ip address 200.1.2.1 255.255.255.0
    [RouterA-GigabitEthernet2/0/0] quit

    The configurations of RouterB and RouterC are similar to the configuration of RouterA, and are not mentioned here.

  2. Configure basic BGP functions. Establish EBGP peer relationships between RouterA and RouterB, and between RouterA and RouterC and an IBGP peer relationship between RouterB and RouterC.

    # Configure RouterA.

    [RouterA] bgp 100
    [RouterA-bgp] router-id 1.1.1.1
    [RouterA-bgp] peer 200.1.1.2 as-number 200
    [RouterA-bgp] peer 200.1.1.2 ebgp-max-hop
    [RouterA-bgp] peer 200.1.2.2 as-number 200
    [RouterA-bgp] peer 200.1.2.2 ebgp-max-hop
    [RouterA-bgp] quit

    # Configure RouterB.

    [RouterB] bgp 200
    [RouterB-bgp] router-id 2.2.2.2
    [RouterB-bgp] peer 200.1.1.1 as-number 100
    [RouterB-bgp] peer 200.1.1.1 ebgp-max-hop
    [RouterB-bgp] peer 9.1.1.2 as-number 200
    [RouterB-bgp] network 172.16.1.0 255.255.255.0
    [RouterB-bgp] quit

    # Configure RouterC.

    [RouterC] bgp 200
    [RouterC-bgp] router-id 3.3.3.3
    [RouterC-bgp] peer 200.1.2.1 as-number 100
    [RouterC-bgp] peer 200.1.2.1 ebgp-max-hop
    [RouterC-bgp] peer 9.1.1.1 as-number 200
    [RouterC-bgp] quit

    # Check the status of BGP peer relationships on RouterA. The command output shows that the BGP peer relationships are in the Established state.

    <RouterA> display bgp peer
     BGP local router ID : 1.1.1.1
     Local AS number : 100
     Total number of peers : 2                 Peers in established state : 2
    
      Peer            V    AS  MsgRcvd  MsgSent  OutQ  Up/Down         State PrefRcv
    
      200.1.1.2       4   200        2        5     0 00:01:25 Established       0
      200.1.2.2       4   200        2        4     0 00:00:55 Established       0

  3. Configure the MED attribute.

    Set the MED value for the route sent from RouterC or RouterB to RouterA by using a routing policy.

    # Configure RouterB.

    [RouterB] route-policy 10 permit node 10
    [RouterB-route-policy] apply cost 100
    [RouterB-route-policy] quit
    [RouterB] bgp 200
    [RouterB-bgp] peer 200.1.1.1 route-policy 10 export

    # Configure RouterC.

    [RouterC] route-policy 10 permit node 10
    [RouterC-route-policy] apply cost 150
    [RouterC-route-policy] quit
    [RouterC] bgp 200
    [RouterC-bgp] peer 200.1.2.1 route-policy 10 export

    # Check BGP routing information on RouterA.

    <RouterA> display bgp routing-table
     BGP Local router ID is 1.1.1.1
     Status codes: * - valid, > - best, d - damped,
                   h - history,  i - internal, s - suppressed, S - Stale
                   Origin : i - IGP, e - EGP, ? - incomplete
    
     Total Number of Routes: 5
          Network            NextHop        MED        LocPrf    PrefVal Path/Ogn
     *>  9.1.1.0/24         200.1.2.2       150                   0      200?
     *>  172.16.1.0/24      200.1.1.2       100                   0      200i
     *                      200.1.2.2       150                   0      200i
     *>   200.1.2.0         200.1.1.2       100                   0      200?
                            200.1.2.2       150                   0      200?

    As shown in the BGP routing table, the next-hop address of the route to 172.16.1.0/24 is 200.1.1.2, and service traffic is transmitted on the primary link between RouterA and RouterB.

  4. Configure BFD, and set the interval for transmitting BFD packets, the interval for receiving BFD packets, and the local detection multiplier.

    # Enable BFD on RouterA. Set the minimum intervals for transmitting and receiving BFD packets to 100 ms and the local detection multiplier to 4.

    [RouterA] bfd
    [RouterA-bfd] quit
    [RouterA] bgp 100
    [RouterA-bgp] peer 200.1.1.2 bfd enable
    [RouterA-bgp] peer 200.1.1.2 bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 4

    # Enable BFD on RouterB. Set the minimum intervals for transmitting and receiving BFD packets to 100 ms and the local detection multiplier to 4.

    [RouterB] bfd
    [RouterB-bfd] quit
    [RouterB] bgp 200
    [RouterB-bgp] peer 200.1.1.1 bfd enable
    [RouterB-bgp] peer 200.1.1.1 bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 4

    # Display all BFD sessions on RouterA.

    <RouterA> display bgp bfd session all
      Local_Address      Peer_Address       LD/RD       Interface
      200.1.1.1          200.1.1.2          8201/8201   GigibitEthernet1/0/0
      Tx-interval(ms)    Rx-interval(ms)    Multiplier  Session-State
      100                100                4           Up
      Wtr-interval(m)
      0

  5. Verify the configuration.

    # Run the shutdown command on GE 2/0/0 of RouterB to simulate a fault on the primary link.

    [RouterB] interface gigabitethernet 2/0/0
    [RouterB-Gigabitethernet2/0/0] shutdown

    # Check the BGP routing table on RouterA.

    <RouterA> display bgp routing-table
     BGP Local router ID is 1.1.1.1
     Status codes: * - valid, > - best, d - damped,
                   h - history,  i - internal, s - suppressed, S - Stale
                   Origin : i - IGP, e - EGP, ? - incomplete
    
     Total Number of Routes: 3
          Network            NextHop        MED        LocPrf    PrefVal Path/Ogn
     *>  9.1.1.0/24          200.1.2.2      150                   0      200?
     *>  172.16.1.0/24       200.1.2.2      150                   0      200i
         200.1.2.0           200.1.2.2      150                   0      200?

    As shown in the BGP routing table, the backup link of RouterA -> RouterC -> RouterB takes effect after the primary link fails, and the next-hop address of the route to 172.16.1.0/24 is 200.1.2.2.

Configuration Files

  • Configuration file of RouterA

    #
     sysname RouterA
    #
      bfd
    #
    interface Gigabitethernet1/0/0
     ip address 200.1.1.1 255.255.255.0
    #
    interface Gigabitethernet2/0/0
     ip address 200.1.2.1 255.255.255.0
    #
    bgp 100
     router-id 1.1.1.1
     peer 200.1.1.2 as-number 200
     peer 200.1.1.2 ebgp-max-hop 255
     peer 200.1.1.2 bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 4
     peer 200.1.1.2 bfd enable
     peer 200.1.2.2 as-number 200
     peer 200.1.2.2 ebgp-max-hop 255
     #
     ipv4-family unicast
      undo synchronization
      peer 200.1.1.2 enable
      peer 200.1.2.2 enable
    #
    return
  • Configuration file of RouterB

    #
     sysname RouterB
    #
     bfd
    #
    interface Gigabitethernet1/0/0
     ip address 9.1.1.1 255.255.255.0
    #
    interface Gigabitethernet2/0/0
     ip address 200.1.1.2 255.255.255.0
    #
    interface Gigabitethernet3/0/0
     ip address 172.16.1.1 255.255.255.0
    #
    bgp 200
     router-id 2.2.2.2
     peer 9.1.1.2 as-number 200
     peer 200.1.1.1 as-number 100
     peer 200.1.1.1 ebgp-max-hop 255
     peer 200.1.1.1 bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 4
     peer 200.1.1.1 bfd enable
     #
     ipv4-family unicast
      undo synchronization
      network 172.16.1.0 255.255.255.0
      peer 9.1.1.2 enable
      peer 200.1.1.1 enable
      peer 200.1.1.1 route-policy 10 export
    #
    route-policy 10 permit node 10
     apply cost 100
    #
    return
  • Configuration file of RouterC

    #
     sysname RouterC
    #
     bfd
    #
    interface Gigabitethernet1/0/0
     ip address 9.1.1.2 255.255.255.0
    #
    interface Gigabitethernet2/0/0
     ip address 200.1.2.2 255.255.255.0
    #
    bgp 200
     router-id 3.3.3.3
     peer 9.1.1.1 as-number 200
     peer 200.1.2.1 as-number 100
     peer 200.1.2.1 ebgp-max-hop 255
     #
     ipv4-family unicast
      undo synchronization
      import-route direct
      peer 9.1.1.1 enable
      peer 200.1.2.1 enable
      peer 200.1.2.1 route-policy 10 export
    #
    route-policy 10 permit node 10
     apply cost 150
    #
    return
Translation
Download
Updated: 2019-05-17

Document ID: EDOC1000174069

Views: 111881

Downloads: 250

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next