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 OSPF Virtual Links

Example for Configuring OSPF Virtual Links

Networking Requirements

As shown in Figure 5-36, Area 2 does not connect to the backbone area directly. Area 1 serves as a transit area to connect Area 2 and Area 0. A virtual link is configured between Router A and Router B.

Figure 5-36 Configuring OSPF virtual links

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure basic OSPF functions on each router.

  2. Configure virtual connections on Router A and Router B to connect the backbone area with the non-backbone area.

Procedure

  1. Configure an IP address for each interface.

    # Configure Router A.

    <Huawei> system-view
    [Huawei] sysname RouterA
    [RouterA] interface gigabitethernet 1/0/0
    [RouterA-GigabitEthernet1/0/0] ip address 192.168.1.1 24
    [RouterA-GigabitEthernet1/0/0] quit
    [RouterA] interface gigabitethernet 2/0/0
    [RouterA-GigabitEthernet2/0/0] ip address 10.1.1.1 8
    [RouterA-GigabitEthernet2/0/0] quit

    The configurations of Router B, Router C, Router D, Router E, and Router F are similar to the configuration of Router A, and are not mentioned here.

  2. Configure basic OSPF functions.

    # Configure Router A.

    [RouterA] ospf 1 router-id 1.1.1.1 
    [RouterA-ospf-1] area 0
    [RouterA-ospf-1-area-0.0.0.0] network 10.0.0.0 0.255.255.255 
    [RouterA-ospf-1-area-0.0.0.0] quit
    [RouterA-ospf-1] area 1
    [RouterA-ospf-1-area-0.0.0.1] network 192.168.1.0 0.0.0.255 
    [RouterA-ospf-1-area-0.0.0.1] quit

    # Configure Router B.

    [RouterB] ospf 1 router-id 2.2.2.2
    [RouterB-ospf-1] area 1
    [RouterB-ospf-1-area-0.0.0.1] network 192.168.1.0 0.0.0.255 
    [RouterB-ospf-1-area-0.0.0.1] quit
    [RouterB-ospf-1] area 2
    [RouterB-ospf-1-area-0.0.0.2] network 172.16.0.0 0.0.255.255
    [RouterB-ospf-1-area-0.0.0.2] quit

    # Configure Router C.

    [RouterC] ospf 1 router-id 3.3.3.3 
    [RouterC-ospf-1] area 0
    [RouterC-ospf-1-area-0.0.0.0] network 10.0.0.0 0.255.255.255 
    [RouterC-ospf-1-area-0.0.0.0] quit

    # Configure Router D.

    [RouterD] ospf 1 router-id 4.4.4.4
    [RouterD-ospf-1] area 2
    [RouterD-ospf-1-area-0.0.0.2] network 172.16.0.0 0.0.255.255
    [RouterD-ospf-1-area-0.0.0.2] quit

    # View the OSPF routing table of Router A.

    NOTE:

    The routing table of Router A does not contain routes in Area 2 because Area 2 is not directly connected to Area 0.

    [RouterA] display ospf routing
              OSPF Process 1 with Router ID 1.1.1.1
                       Routing Tables
     Routing for Network
     Destination        Cost  Type       NextHop         AdvRouter       Area
     10.0.0.0/8         1  Transit       10.1.1.1        1.1.1.1         0.0.0.0
     192.168.1.0/24     1  Transit       192.168.1.1     1.1.1.1         0.0.0.1
     Total Nets: 2
     Intra Area: 2  Inter Area: 0  ASE: 0  NSSA: 0

  3. Configure virtual links.

    # Configure Router A.

    [RouterA] ospf 1
    [RouterA-ospf-1] area 1
    [RouterA-ospf-1-area-0.0.0.1] vlink-peer 2.2.2.2
    [RouterA-ospf-1-area-0.0.0.1] quit
    [RouterA-ospf-1] quit

    # Configure Router B.

    [RouterB] ospf 1
    [RouterB-ospf-1] area 1
    [RouterB-ospf-1-area-0.0.0.1] vlink-peer 1.1.1.1 
    [RouterB-ospf-1-area-0.0.0.1] quit
    [RouterB-ospf-1] quit

  4. Verify the configuration.

    # View the OSPF routing table of Router A.

    [RouterA] display ospf routing
              OSPF Process 1 with Router ID 1.1.1.1
                       Routing Tables
     Routing for Network
     Destination        Cost  Type       NextHop         AdvRouter       Area
     172.16.0.0/16      2   Inter-area 192.168.1.2        2.2.2.2         0.0.0.2
     10.0.0.0/8         1   Transit       10.1.1.1        1.1.1.1         0.0.0.0
     192.168.1.0/24     1   Transit       192.168.1.1     1.1.1.1         0.0.0.1
     Total Nets: 3
     Intra Area: 2  Inter Area: 1  ASE: 0  NSSA: 0

Configuration Files

  • Configuration file of Router A

    #
     sysname RouterA
    #
    interface GigabitEthernet1/0/0
     ip address 192.168.1.1 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     ip address 10.1.1.1 255.0.0.0
    #
    ospf 1 router-id 1.1.1.1
     area 0.0.0.0
      network 10.0.0.0 0.255.255.255
     area 0.0.0.1
      network 192.168.1.0 0.0.0.255
      vlink-peer 2.2.2.2
    #
    return
  • Configuration file of Router B

    #
     sysname RouterB
    #
    interface GigabitEthernet1/0/0
     ip address 192.168.1.2 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     ip address 172.16.1.1 255.255.0.0
    #
    ospf 1 router-id 2.2.2.2
     area 0.0.0.1
      network 192.168.1.0 0.0.0.255
      vlink-peer 1.1.1.1
     area 0.0.0.2
      network 172.16.0.0 0.0.255.255
    #
    return
  • Configuration file of Router C

    #
     sysname RouterC
    #
    interface GigabitEthernet2/0/0
     ip address 10.1.1.2 255.0.0.0
    #
    ospf 1 router-id 3.3.3.3
     area 0.0.0.0
      network 10.0.0.0 0.255.255.255
    #
    return
  • Configuration file of Router D

    #
     sysname RouterD
    #
    interface GigabitEthernet2/0/0
     ip address 172.16.1.2 255.255.0.0
    #
    ospf 1 router-id 4.4.4.4
     area 0.0.0.2
      network 172.16.0.0 0.0.255.255
    #
    return
Translation
Download
Updated: 2019-05-17

Document ID: EDOC1000174069

Views: 141509

Downloads: 280

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