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 Configuring Prefix-based BGP ORF

Example for Configuring Prefix-based BGP ORF

Networking Requirements

As shown in Figure 9-36, PE1 and PE2 belong to AS 100. PE2 needs to advertise only the routes that match the import policy of PE1 without having to maintain export policies.

Figure 9-36 Networking diagram of configuring prefix-based BGP ORF

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure prefix-based BGP ORF so that PE2 can advertise only the routes that match the import policy of PE1 without having to maintain export policies.

Procedure

  1. Establish an IPv4 unicast peer relationship between PE1 and PE2.

    # Configure PE1.

    <Huawei> system-view
    [Huawei] sysname PE1
    [PE1] interface gigabitethernet 1/0/0
    [PE1-GigabitEthernet1/0/0] ip address 111.1.1.1 255.255.255.0
    [PE1-GigabitEthernet1/0/0] quit
    [PE1] bgp 100
    [PE1-bgp] peer 111.1.1.2 as-number 100
    [PE1-bgp] quit

    # Configure PE2.

    <Huawei> system-view
    [Huawei] sysname PE2
    [PE2] interface gigabitethernet 1/0/0
    [PE2-GigabitEthernet1/0/0] ip address 111.1.1.2 255.255.255.0
    [PE2-GigabitEthernet1/0/0] quit
    [PE2] bgp 100
    [PE2-bgp] peer 111.1.1.1 as-number 100
    [PE2-bgp] quit

  2. Apply the prefix-based inbound policy on PE1.

    # Configure PE1.

    [PE1] ip ip-prefix 1 permit 4.4.4.0 24 greater-equal 32
    [PE1] bgp 100
    [PE1-bgp] peer 111.1.1.2 ip-prefix 1 import
    [PE1-bgp] quit

    # Configure PE2.

    [PE2] ip route-static 3.3.3.3 255.255.255.255 NULL0
    [PE2] ip route-static 4.4.4.4 255.255.255.255 NULL0
    [PE2] ip route-static 5.5.5.5 255.255.255.255 NULL0
    [PE2] bgp 100
    [PE2-bgp] import static
    [PE1-bgp] quit

    # Check the routes sent by PE2 to PE1.

    [PE2] display bgp routing peer 111.1.1.1 advertised-routes
    
     BGP Local router ID is 111.1.1.2
     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
    
     *>   3.3.3.3/32         111.1.1.2       0          100        0      ?
     *>   4.4.4.4/32         111.1.1.2       0          100        0      ?
     *>   5.5.5.5/32         111.1.1.2       0          100        0      ?
    

    # Check the routes received by PE1 from PE2.

    [PE1] display bgp routing-table peer 111.1.1.2 received-routes
    
     BGP Local router ID is 111.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: 1
          Network            NextHop        MED        LocPrf    PrefVal Path/Ogn
    
     *>i  4.4.4.4/32         111.1.1.2       0          100        0      ?
    

    When prefix-based BGP ORF is not enabled, PE2 sends routes 3.3.3.3, 4.4.4.4, and 5.5.5.5 to PE1. Because the prefix-based inbound policy is applied on PE1, PE1 receives only route 4.4.4.4.

  3. Enable prefix-based BGP ORF.

    # Enable prefix-based BGP ORF on PE1.

    [PE1] bgp 100
    [PE1-bgp] peer 111.1.1.2 capability-advertise orf ip-prefix both
    [PE1-bgp] quit

    # Enable prefix-based BGP ORF on PE2.

    [PE2] bgp 100
    [PE2-bgp] peer 111.1.1.1 capability-advertise orf ip-prefix both
    [PE2-bgp] quit

  4. Verify the configuration.

    # Check the negotiation of prefix-based BGP ORF.

    [PE1] display bgp peer 111.1.1.2 verbose
    
            BGP Peer is 111.1.1.2,  remote AS 100
            Type: IBGP link
            BGP version 4, Remote router ID 111.1.1.2
            Update-group ID: 2
            BGP current state: Established, Up for 00h01m22s
            BGP current event: KATimerExpired
            BGP last state: OpenConfirm
            BGP Peer Up count: 8
            Received total routes: 1
            Received active routes total: 1
            Received mac routes: 0
            Advertised total routes: 0
            Port:  Local - 54845    Remote - 179
            Configured: Connect-retry Time: 32 sec
            Configured: Active Hold Time: 180 sec   Keepalive Time:60 sec
            Received  : Active Hold Time: 180 sec
            Negotiated: Active Hold Time: 180 sec   Keepalive Time:60 sec
            Peer optional capabilities:
            Peer supports bgp multi-protocol extension
            Peer supports bgp route refresh capability
            Peer supports bgp outbound route filter capability
            Support Address-Prefix: IPv4-UNC address-family, rfc-compatible, both
            Peer supports bgp 4-byte-as capability
            Address family IPv4 Unicast: advertised and received
     Received: Total 5 messages
                     Update messages                1
                     Open messages                  1
                     KeepAlive messages             2
                     Notification messages          0
                     Refresh messages               1
     Sent: Total 4 messages
                     Update messages                0
                     Open messages                  1
                     KeepAlive messages             2
                     Notification messages          0
                     Refresh messages               1
     Authentication type configured: None
     Last keepalive received: 2011/09/25 18:48:15
     Last keepalive sent    : 2011/09/25 18:48:19
     Last update    received: 2011/09/25 16:11:28
     Minimum route advertisement interval is 15 seconds
     Optional capabilities:
     Route refresh capability has been enabled
     Outbound route filter capability has been enabled
     Enable Address-Prefix: IPv4-UNC address-family, rfc-compatible, both
     4-byte-as capability has been enabled
     Peer Preferred Value: 0
     Routing policy configured:
     No import update filter list
     No export update filter list
     Import prefix list is: 1
     No export prefix list
     No import route policy
     No export route policy
     No import distribute policy
     No export distribute policy
    

    # Check the routes sent by PE2 to PE1.

    [PE2] display bgp routing peer 111.1.1.1 advertised-routes
    
     BGP Local router ID is 111.1.1.2
     Status codes: * - valid, > - best, d - damped,
                   h - history,  i - internal, s - suppressed, S - Stale
                   Origin : i - IGP, e - EGP, ? - incomplete
    
    
     Total Number of Routes: 1
          Network            NextHop        MED        LocPrf    PrefVal Path/Ogn
    
     *>   4.4.4.4/32         111.1.1.2       0          100        0      ?
    

    # Check the routes received by PE1 from PE2.

    [PE1] display bgp routing-table peer 111.1.1.2 received-routes
    
     BGP Local router ID is 111.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: 1
          Network            NextHop        MED        LocPrf    PrefVal Path/Ogn
    
     *>i  4.4.4.4/32         111.1.1.2       0          100        0      ?
    

    After being enabled with prefix-based BGP ORF, PE2 sends only route 4.4.4.4 matching the inbound policy of PE1.

Configuration Files

  • Configuration file of PE1

    #
     sysname PE1
    #
    interface GigabitEthernet1/0/0
     ip address 111.1.1.1 255.255.255.0
    #
    bgp 100
     peer 111.1.1.2 as-number 100
     #
     ipv4-family unicast
      undo synchronization
      peer 111.1.1.2 enable
      peer 111.1.1.2 ip-prefix 1 import
      peer 111.1.1.2 capability-advertise orf ip-prefix both
    #
     ip ip-prefix 1 index 10 permit 4.4.4.0 24 greater-equal 32 less-equal 32
    #
    return
    
  • Configuration file of PE2

    #
     sysname PE2
    #
    interface GigabitEthernet1/0/0
     ip address 111.1.1.2 255.255.255.0
    #
    bgp 100
     peer 111.1.1.1 as-number 100
    #
     ipv4-family unicast
      undo synchronization
      import-route static
      peer 111.1.1.1 enable
      peer 111.1.1.1 capability-advertise orf ip-prefix both
    #
     ip route-static 3.3.3.3 255.255.255.255 NULL0
     ip route-static 4.4.4.4 255.255.255.255 NULL0
     ip route-static 5.5.5.5 255.255.255.255 NULL0
    #
    return
Translation
Download
Updated: 2019-05-17

Document ID: EDOC1000174069

Views: 141427

Downloads: 280

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