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

NE40E V800R010C10SPC500 Configuration Guide - IP Routing 01

This is NE40E V800R010C10SPC500 Configuration Guide - IP Routing
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 Configuring BGP Best-external

Example for Configuring BGP Best-external

BGP Best-external enables a backup device to select the sub-optimal route and send the route to its BGP peers if the route preferentially selected based on BGP route selection policies is an IBGP route advertised by the master device. Therefore, BGP Best-external speeds up BGP route convergence if the primary link fails.

Networking Requirements

If master and backup provider edges (PEs) or RRs are deployed, routes are selected based on BGP route selection policies, and the primary link fails, the BGP route convergence takes a long time because no backup route is available. To address this problem, configure BGP Best-external.

In the networking shown in Figure 10-51, an EBGP peer relationship is established between Device A and Device B. In addition, an IBGP peer relationship is established between each two devices among RR1, RR2, Device B, and Device C except between Device B and Device C. Device B is a client of RR1 and RR2. RR1 has a greater Local_Pref value than RR2, and therefore RR1 is the master device while RR2 is the backup device. RR1 and RR2 receive the same route to 1.1.1.1/24 from Device B.

To ensure that traffic can be immediately switched to a backup link if the primary link fails, configure BGP Best-external on RR2 so that RR2 can select the Best-external route (advertised by Device B) and advertise it to its peers.

Figure 10-51 Configuring BGP Best-external
NOTE:

Interfaces 1 through 5 in this example are GE 3/0/1, GE 3/0/2, GE 3/0/3, GE 1/0/1, GE 1/0/2, respectively.



Precautions

BGP Best-external route selection and advertisement must be configured so that the BGP Best-external function takes effect.

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure basic BGP functions on each router.

  2. Configure a route-policy and a Local_Pref value greater than the default value 100 for RR1.

  3. Enable BGP Best-external on RR2.

Data Preparation

To complete the configuration, you need the following data:

  • Router IDs of Device A, Device B, Device C, RR1, and RR2, and their AS numbers, as listed in Table 10-29

  • Route-policy and Local_Pref configured for RR1

Table 10-29 Configurations of each device

Device

Router ID

Interface Number

IP Address

AS Number

Device A

1.1.1.1

GigabitEthernet3/0/1

172.10.1.1/24

AS 65008

LoopBack0

1.1.1.1/32

Device B

2.2.2.2

GigabitEthernet3/0/1

172.10.1.2/24

AS 65009

GigabitEthernet3/0/2

172.10.2.1/24

GigabitEthernet1/0/2

172.10.3.1/24

Device C

3.3.3.3

GigabitEthernet3/0/1

172.10.4.2/24

AS 65009

GigabitEthernet3/0/3

172.10.5.1/24

RR 1

4.4.4.4

GigabitEthernet3/0/2

172.10.2.2/24

AS 65009

GigabitEthernet3/0/1

172.10.4.1/24

GigabitEthernet1/0/1

172.10.6.1/24

RR 2

5.5.5.5

GigabitEthernet1/0/2

172.10.3.2/24

AS 65009

GigabitEthernet3/0/3

172.10.5.2/24

GigabitEthernet3/0/2

172.10.6.2/24

Procedure

  1. Configure an IP address for each interface on the router. For configuration details, see Configuration Files in this section.
  2. Configure basic BGP functions. Establish an EBGP peer relationship between Device A and Device B, and an IBGP peer relationship between each two devices among RR1, RR2, Device B, and Device C except between Device B and Device C. Configure Device B as a client of RR1 and RR2.

    # Configure Device A.

    [~DeviceA] bgp 65008
    [*DeviceA-bgp] router-id 1.1.1.1
    [*DeviceA-bgp] peer 172.10.1.2 as-number 65009
    [*DeviceA-bgp] import-route direct
    [*DeviceA-bgp] commit
    [~DeviceA-bgp] quit

    # Configure Device B.

    [~DeviceB] bgp 65009
    [*DeviceB-bgp] router-id 2.2.2.2
    [*DeviceB-bgp] peer 172.10.1.1 as-number 65008
    [*DeviceB-bgp] peer 172.10.2.2 as-number 65009
    [*DeviceB-bgp] peer 172.10.3.2 as-number 65009
    [*DeviceB-bgp] import-route direct
    [*DeviceB-bgp] commit
    [~DeviceB-bgp] quit

    # Configure Device C.

    [~DeviceC] bgp 65009
    [*DeviceC-bgp] router-id 3.3.3.3
    [*DeviceC-bgp] peer 172.10.4.1 as-number 65009
    [*DeviceC-bgp] peer 172.10.5.2 as-number 65009
    [*DeviceC-bgp] import-route direct
    [*DeviceC-bgp] commit
    [~DeviceC-bgp] quit
    [~DeviceC] quit

    # Configure RR1.

    [~RR1] bgp 65009
    [*RR1-bgp] router-id 4.4.4.4
    [*RR1-bgp] peer 172.10.2.1 as-number 65009
    [*RR1-bgp] peer 172.10.4.2 as-number 65009
    [*RR1-bgp] peer 172.10.6.2 as-number 65009
    [*RR1-bgp] peer 172.10.2.1 reflect-client
    [*RR1-bgp] import-route direct
    [*RR1-bgp] commit
    [~RR1-bgp] quit

    # Configure RR2.

    [~RR2] bgp 65009
    [*RR2-bgp] router-id 5.5.5.5
    [*RR2-bgp] peer 172.10.3.1 as-number 65009
    [*RR2-bgp] peer 172.10.5.1 as-number 65009
    [*RR2-bgp] peer 172.10.6.1 as-number 65009
    [*RR2-bgp] peer 172.10.3.1 reflect-client
    [*RR2-bgp] import-route direct
    [*RR2-bgp] commit
    [~RR2-bgp] quit

  3. Set the Local-Pref value to 130 for RR1.

    # Configure RR1.

    [~RR1] route-policy policy1 permit node 10
    [*RR1-route-policy] apply local-preference 130
    [*RR1-route-policy] commit
    [~RR1-route-policy] quit
    [~RR1] bgp 65009
    [*RR1-bgp] peer 172.10.6.2 route-policy policy1 export
    [*RR1-bgp] peer 172.10.4.2 route-policy policy1 export
    [*RR1-bgp] reflect change-path-attribute
    [*RR1-bgp] commit
    [~RR1-bgp] quit

    # Check information about the route to 1.1.1.1 on Device C.

    <DeviceC> display bgp routing-table 1.1.1.1
    BGP local router ID : 3.3.3.3
     Local AS number : 65009
     Paths:   1 available, 1 best, 1 select, 0 best-external
     BGP routing table entry information of 1.1.1.0/24:
     From: 172.10.4.1 (4.4.4.4)
     Route Duration: 0d00h01m19s
     Relay IP Nexthop: 172.10.4.1
     Relay IP Out-interface: GigabitEthernet3/0/1
     Original nexthop: 172.10.1.1
     Qos information : 0x0
     AS-path 65008, origin incomplete, MED 0, localpref 130, pref-val 0, valid, internal, best, select, pre 255
     Originator: 2.2.2.2
     Cluster list: 4.4.4.4
     Not advertised to any peer yet

    The command output shows that Device C has only one BGP route to 1.1.1.1 and that the route is advertised by RR1.

  4. Configure BGP Best-external on RR2.

    # Configure RR2.

    [~RR2] bgp 65009
    [*RR2-bgp] bestroute best-external
    [*RR2-bgp] peer 172.10.5.1 advertise best-external
    [*RR2-bgp] commit
    [~RR2-bgp] quit

    # Check information about the route to 1.1.1.1 on Device C.

    <DeviceC> display bgp routing-table 1.1.1.1
    BGP local router ID : 5.5.5.5
     Local AS number : 65009
     Paths:   2 available, 1 best, 1 select, 0 best-external
     BGP routing table entry information of 1.1.1.0/24:
     From: 172.10.4.1 (4.4.4.4)
     Route Duration: 0d00h03m31s
     Relay IP Nexthop: 172.10.4.1
     Relay IP Out-interface: GigabitEthernet3/0/1
     Original nexthop: 172.10.1.1
     Qos information : 0x0
     AS-path 65008, origin incomplete, MED 0, localpref 130, pref-val 0, valid, internal, best, select, pre 255
     Originator: 2.2.2.2
     Cluster list: 4.4.4.4
     Not advertised to any peer yet
    
     BGP routing table entry information of 1.1.1.0/24:
     From: 172.10.5.2 (5.5.5.5)
     Route Duration: 0d00h00m01s
     Relay IP Nexthop: 172.10.4.1
     Relay IP Out-interface: GigabitEthernet3/0/1
     Original nexthop: 172.10.1.1
     Qos information : 0x0
     AS-path 65008, origin incomplete, MED 0, localpref 100, pref-val 0, valid, inte
    rnal, pre 255, not preferred for Local_Pref
     Originator: 2.2.2.2
     Cluster list: 5.5.5.5
     Not advertised to any peer yet

    The command output shows that Device C has a BGP route to 1.1.1.1 (the BGP Best-external route advertised by RR2) in addition to the route advertised by RR1.

Configuration Files

  • Device A configuration file

    #
    sysname DeviceA
    #
    interface GigabitEthernet3/0/1
     undo shutdown
     ip address 172.10.1.1 255.255.255.0
    #
    interface LoopBack0
     ip address 1.1.1.1 255.255.255.255
    #
    bgp 65008
     router-id 1.1.1.1
     peer 172.10.1.2 as-number 65009
     #
     ipv4-family unicast
      undo synchronization
      import-route direct
      peer 172.10.1.2 enable
    #
    return
  • Device B configuration file

    #
    sysname DeviceB
    #
    interface GigabitEthernet3/0/1
     undo shutdown
     ip address 172.10.1.2 255.255.255.0
    #
    interface GigabitEthernet3/0/2
     undo shutdown
     ip address 172.10.2.1 255.255.255.0
    #
    interface GigabitEthernet1/0/2
     undo shutdown
     ip address 172.10.3.1 255.255.255.0
    #
    bgp 65009
    #
     router-id 2.2.2.2
     peer 172.10.1.1 as-number 65008
     peer 172.10.2.2 as-number 65009
     peer 172.10.3.2 as-number 65009
     #
     ipv4-family unicast
      undo synchronization
      import-route direct
      peer 172.10.1.1 enable
      peer 172.10.2.2 enable
      peer 172.10.3.2 enable
    #
    return
  • Device C configuration file

    #
    sysname DeviceC
    #
    interface GigabitEthernet3/0/1
     undo shutdown
     ip address 172.10.4.2 255.255.255.0
    #
    interface GigabitEthernet3/0/3
     undo shutdown
     ip address 172.10.5.1 255.255.255.0
    #
    bgp 200
     router-id 3.3.3.3
     peer 172.10.4.1 as-number 65009
     peer 172.10.5.2 as-number 65009
     #
     ipv4-family unicast
      undo synchronization
      import-route direct
      peer 172.10.4.1 enable
      peer 172.10.5.2 enable
    #
    return
  • RR1 configuration file

    #
    sysname RR1
    #
    interface GigabitEthernet3/0/1
     undo shutdown
     ip address 172.10.4.1 255.255.255.0
    #
    interface GigabitEthernet3/0/2
     undo shutdown
     ip address 172.10.2.2 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     undo shutdown
     ip address 172.10.6.1 255.255.255.0
    #
    bgp 65009
     router-id 4.4.4.4
     peer 172.10.2.1 as-number 65009
     peer 172.10.4.2 as-number 65009
     peer 172.10.6.2 as-number 65009
     #
     ipv4-family unicast
      undo synchronization
      reflect change-path-attribute
      import-route direct
      peer 172.10.2.1 enable
      peer 172.10.2.1 route-policy policy1 export
      peer 172.10.2.1 reflect-client
      peer 172.10.4.2 enable
      peer 172.10.4.2 route-policy policy1 export
      peer 172.10.6.2 enable
      peer 172.10.6.2 route-policy policy1 export
    #
    route-policy policy1 permit node 10
     apply local-preference 130
    #
    return
  • RR2 configuration file

    #
    sysname RR1
    #
    interface GigabitEthernet3/0/2
     undo shutdown
     ip address 172.10.6.2 255.255.255.0
    #
    interface GigabitEthernet3/0/3
     undo shutdown
     ip address 172.10.5.2 255.255.255.0
    #
    interface GigabitEthernet1/0/2
     undo shutdown
     ip address 172.10.3.2 255.255.255.0
    #
     router-id 5.5.5.5
     peer 172.10.3.1 as-number 65009
     peer 172.10.5.1 as-number 65009
     peer 172.10.6.1 as-number 65009
     #
     ipv4-family unicast
      undo synchronization
      import-route direct
      bestroute best-external
      peer 172.10.3.1 enable
      peer 172.10.3.1 reflect-client
      peer 172.10.5.1 enable
      peer 172.10.5.1 advertise best-external
      peer 172.10.6.1 enable
      peer 172.10.6.1 advertise best-external
    #
    return
Translation
Download
Updated: 2019-01-03

Document ID: EDOC1100055018

Views: 47424

Downloads: 200

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