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 BGP to Interact with an IGP

Example for Configuring BGP to Interact with an IGP

Networking Requirements

The network shown in Figure 9-29 is divided into AS 65008 and AS 65009. In AS 65009, an IGP is used to calculate routes. In this example, OSPF is used as an IGP. The two ASs need to communicate with each other.

Figure 9-29 Networking diagram for configuring BGP to interact with an IGP

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure OSPF on Routers B and C so that these devices can access each other.
  2. Establish an EBGP connection between Routers A and B so that these devices can exchange routing information.
  3. Configure BGP and OSPF to import routes from each other on Router B so that the two ASs can communicate with each other.
  4. (Optional) Configure BGP route summarization on Router B to simplify the BGP routing table.

Procedure

  1. Configure an IP address for each interface.

    Configure an IP address to each interface as shown in Figure 9-29. For details about the configuration, see the following configuration files.

  2. Configuring OSPF

    # Configure Router B.

    <Huawei> system-view
    [Huawei] sysname RouterB
    [RouterB] ospf 1
    [RouterB-ospf-1] area 0
    [RouterB-ospf-1-area-0.0.0.0] network 9.1.1.0 0.0.0.255
    [RouterB-ospf-1-area-0.0.0.0] quit
    [RouterB-ospf-1] quit

    # Configure Router C.

    [RouterC] ospf 1
    [RouterC-ospf-1] area 0
    [RouterC-ospf-1-area-0.0.0.0] network 9.1.1.0 0.0.0.255
    [RouterC-ospf-1-area-0.0.0.0] network 9.1.2.0 0.0.0.255
    [RouterC-ospf-1-area-0.0.0.0] quit
    [RouterC-ospf-1] quit

  3. Establish an EBGP connection.

    # Configure Router A.

    [RouterA] bgp 65008
    [RouterA-bgp] router-id 1.1.1.1
    [RouterA-bgp] peer 3.1.1.1 as-number 65009
    [RouterA-bgp] ipv4-family unicast
    [RouterA-bgp-af-ipv4] network 8.1.1.0 255.255.255.0

    # Configure Router B.

    [RouterB] bgp 65009
    [RouterB-bgp] router-id 2.2.2.2
    [RouterB-bgp] peer 3.1.1.2 as-number 65008

  4. Configure BGP to interact with an IGP

    # On Router B, configure BGP to import OSPF routes.

    [RouterB-bgp] ipv4-family unicast
    [RouterB-bgp-af-ipv4] import-route ospf 1
    [RouterB-bgp-af-ipv4] quit
    [RouterB-bgp] quit

    # View the routing table of Router A.

    [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
     *>   8.1.1.0/24         0.0.0.0         0                     0      i
     *>   9.1.1.0/24         3.1.1.1         0                     0      65009?
     *>   9.1.2.0/24         3.1.1.1         2                     0      65009?

    # On Router B, configure OSPF to import BGP routes.

    [RouterB] ospf
    [RouterB-ospf-1] import-route bgp
    [RouterB-ospf-1] quit

    # View the routing table of Router C.

    [RouterC] display ip routing-table
    Route Flags: R - relay,
    D - download to fib
    ------------------------------------------------------------------------------
    Routing Tables: Public
             Destinations : 7        Routes : 7
    
    Destination/Mask    Proto  Pre  Cost        Flags NextHop         Interface
    
            8.1.1.0/24  O_ASE  150  1             D  9.1.1.1         GigabitEthernet1/0/0
            9.1.1.0/24  Direct 0    0             D  9.1.1.2         GigabitEthernet1/0/0
            9.1.1.2/32  Direct 0    0             D  127.0.0.1       GigabitEthernet1/0/0
            9.1.2.0/24  Direct 0    0             D  9.1.2.1         GigabitEthernet2/0/0
            9.1.2.1/32  Direct 0    0             D  127.0.0.1       GigabitEthernet2/0/0
          127.0.0.0/8   Direct 0    0             D  127.0.0.1       InLoopBack0
          127.0.0.1/32  Direct 0    0             D  127.0.0.1       InLoopBack0

  5. (Optional) Configure automatic route summarization.

    BGP is used to transmit routing information on large-scale networks. BGP route summarization can be configured to simplify routing tables of devices on these networks.

    # Configure Router B.

    [RouterB] bgp 65009
    [RouterB-bgp] ipv4-family unicast
    [RouterB-bgp-af-ipv4] summary automatic

    # View the routing table of Router A.

    [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: 2
          Network            NextHop        MED        LocPrf    PrefVal Path/Ogn
     *>   8.1.1.0/24         0.0.0.0         0                     0      i
     *>   9.0.0.0            3.1.1.1                               0      65009?

    # Run the ping -a 8.1.1.1 9.1.2.1 command on Router A.

    [RouterA] ping -a 8.1.1.1 9.1.2.1
      PING 9.1.2.1: 56  data bytes, press CTRL_C to break
        Reply from 9.1.2.1: bytes=56 Sequence=1 ttl=254 time=15 ms
        Reply from 9.1.2.1: bytes=56 Sequence=2 ttl=254 time=31 ms
        Reply from 9.1.2.1: bytes=56 Sequence=3 ttl=254 time=47 ms
        Reply from 9.1.2.1: bytes=56 Sequence=4 ttl=254 time=46 ms
        Reply from 9.1.2.1: bytes=56 Sequence=5 ttl=254 time=47 ms
      --- 9.1.2.1 ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 15/37/47 ms

Configuration Files

  • Configuration file of Router A

    #
     sysname Router A
    #
    interface GigabitEthernet1/0/0
     ip address 8.1.1.1 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     ip address 3.1.1.2 255.255.255.0
    #
    bgp 65008
     router-id 1.1.1.1
     peer 3.1.1.1 as-number 65009
     #
     ipv4-family unicast
      undo synchronization
      network 8.1.1.0 255.255.255.0
      peer 3.1.1.1 enable
    #
    return
  • Configuration file of Router B

    #
     sysname Router B
    #
    interface GigabitEthernet1/0/0
     ip address 9.1.1.1 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     ip address 3.1.1.1 255.255.255.0
    #
    bgp 65009
     router-id 2.2.2.2
     peer 3.1.1.2 as-number 65008
     #
     ipv4-family unicast
      undo synchronization
      summary automatic
      import-route ospf 1
      peer 3.1.1.2 enable
    #
    ospf 1
     import-route bgp
     area 0.0.0.0
      network 9.1.1.0 0.0.0.255
    #
    return
  • Configuration file of Router C

    #
     sysname Router C
    #
    interface GigabitEthernet1/0/0
     ip address 9.1.1.2 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     ip address 9.1.2.1 255.255.255.0
    #
    ospf 1
     area 0.0.0.0
      network 9.1.1.0 0.0.0.255
      network 9.1.2.0 0.0.0.255
    #
    return
Translation
Download
Updated: 2019-05-17

Document ID: EDOC1000174069

Views: 111912

Downloads: 250

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