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 an OSPF Stub Area

Example for Configuring an OSPF Stub Area

This section describes how to configure a stub area that imports static routes. Such configuration can reduce the number of LSAs advertised to this area without affecting route reachability.

Networking Requirements

On the network shown in Figure 5-12, all routers run OSPF, and the entire AS is divided into three areas. Device A and Device B function as ABRs to advertise inter-area routes; Device D functions as the ASBR to import external routes (static routes).

Configure Area 1 as a stub area to reduce the LSAs advertised to this area without affecting route reachability.

Figure 5-12 Networking for configuring an OSPF stub area
NOTE:

Interface 1 and interface 2 in this example are GE 1/0/0 and GE 2/0/0, respectively.



Precautions

When configuring an OSPF stub area, note the following rules:

  • The backbone area cannot be configured as a stub area.
  • An ASBR cannot exist in a stub area. That is, AS-external routes are not flooded in the stub area.
  • A virtual link cannot pass through a stub area.

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure basic OSPF functions on each router for interconnection.

  2. Configure a static route on Device D and import it into OSPF.

  3. Configure Area 1 as a stub area by running the stub command on all routers in Area 1 and check the OSPF routing information on Device C.

  4. Prevent Device A from advertising Type 3 LSAs to the stub area, and check the OSPF routing information on Device C.

Data Preparation

To complete the configuration, you need the following data:

Device Name

Router ID

Process ID

IP Address

Device A

1.1.1.1

1

Area 0: 192.168.0.0/24

Area 1: 192.168.1.0/24

Device B

2.2.2.2

1

Area 0: 192.168.0.0/24

Area 2: 192.168.2.0/24

Device C

3.3.3.3

1

Area 1: 192.168.1.0/24 and 172.16.1.0/24

Device D

4.4.4.4

1

Area 2: 192.168.2.0/24 and 172.17.1.0/24

Device E

5.5.5.5

1

Area 1: 172.16.1.0/24

Device F

6.6.6.6

1

Area 2: 172.17.1.0/24

Procedure

  1. Assign an IP address to each interface. For configuration details, see Configuration Files in this section.
  2. Configure basic OSPF functions. For details, see Example for Configuring Basic OSPF Functions.
  3. Configure Device D to import static routes.

    [~DeviceD] ip route-static 10.0.0.0 8 null 0
    [*DeviceD] ospf 1
    [*DeviceD-ospf-1] import-route static type 1
    [*DeviceD-ospf-1] commit
    [~DeviceD-ospf-1] quit

    # Display ABR and ASBR information on Device C.

    [~DeviceC] display ospf abr-asbr
              OSPF Process 1 with Router ID 3.3.3.3
                      Routing Table to ABR and ASBR
    
     Type        Destination       Area       Cost  NextHop         RtType
     Intra-area  1.1.1.1           0.0.0.1    1     192.168.1.1     ABR
     Inter-area  4.4.4.4           0.0.0.1    3     192.168.1.1     ASBR

    # Display the OSPF routing table on Device C.

    NOTE:

    If the area where Device C resides is a common area, external routes exist in the routing table.

    [~DeviceC] display ospf routing
              OSPF Process 1 with Router ID 3.3.3.3
                       Routing Tables
    
     Routing for Network
     Destination        Cost       Type       NextHop         AdvRouter       Area
    
     172.17.1.0/24      4          Inter-area 192.168.1.1     1.1.1.1         0.0.0.1
     192.168.0.0/24     2          Inter-area 192.168.1.1     1.1.1.1         0.0.0.1
     192.168.2.0/24     3          Inter-area 192.168.1.1     1.1.1.1         0.0.0.1
    
     Routing for ASEs
     Destination        Cost       Type       Tag        NextHop         AdvRouter
    
     10.0.0.0/8         4          Type1      1          192.168.1.1     4.4.4.4
    
    
     Total Nets: 4
     Intra Area: 0  Inter Area: 3  ASE: 1  NSSA: 0

  4. Configure Area 1 as a stub area.

    # Configure Device A.

    [~DeviceA] ospf 1
    [*DeviceA-ospf-1] area 1
    [*DeviceA-ospf-1-area-0.0.0.1] stub
    [*DeviceA-ospf-1-area-0.0.0.1] commit
    [~DeviceA-ospf-1-area-0.0.0.1] quit

    # Configure Device C.

    [~DeviceC] ospf 1
    [*DeviceC-ospf-1] area 1
    [*DeviceC-ospf-1-area-0.0.0.1] stub
    [*DeviceC-ospf-1-area-0.0.0.1] commit
    [~DeviceC-ospf-1-area-0.0.0.1] quit

    # Configure Device E.

    [~DeviceE] ospf 1
    [*DeviceE-ospf-1] area 1
    [*DeviceE-ospf-1-area-0.0.0.1] stub
    [*DeviceE-ospf-1-area-0.0.0.1] commit
    [~DeviceE-ospf-1-area-0.0.0.1] quit

    # Display the routing table on Device C.

    NOTE:

    After the area where Device C resides is configured as a stub area, a default route rather than AS external routes is displayed in the routing table.

    [~DeviceC] display ospf routing
              OSPF Process 1 with Router ID 3.3.3.3
                       Routing Tables
    
     Routing for Network
     Destination        Cost       Type       NextHop         AdvRouter       Area
     0.0.0.0/0          2          Inter-area 192.168.1.1     1.1.1.1         0.0.0.1
     172.17.1.0/24      4          Inter-area 192.168.1.1     1.1.1.1         0.0.0.1
     192.168.0.0/24     2          Inter-area 192.168.1.1     1.1.1.1         0.0.0.1
     192.168.2.0/24     3          Inter-area 192.168.1.1     1.1.1.1         0.0.0.1
    
     Total Nets: 4
     Intra Area: 0  Inter Area: 4  ASE: 0  NSSA: 0

  5. # Prevent Device A from advertising Type 3 LSAs to the stub area.

    [~DeviceA] ospf
    [*DeviceA-ospf-1] area 1
    [*DeviceA-ospf-1-area-0.0.0.1] stub no-summary
    [*DeviceA-ospf-1-area-0.0.0.1] commit
    [~DeviceA-ospf-1-area-0.0.0.1] quit

  6. Verify the configuration.

    # Display the OSPF routing table on Device C.

    [~DeviceC] display ospf routing
              OSPF Process 1 with Router ID 3.3.3.3
                       Routing Tables
    
     Routing for Network
     Destination        Cost       Type       NextHop         AdvRouter       Area
     0.0.0.0/0          2          Inter-area 192.168.1.1     1.1.1.1         0.0.0.1
    
     Total Nets: 1
     Intra Area: 0  Inter Area: 1  ASE: 0  NSSA: 0
    NOTE:

    After the advertisement of summary LSAs to the stub area is disabled, the number of routing entries on the routers in the stub area further decreases, and only the default route to a destination beyond the stub area is reserved.

Configuration Files

  • Device A configuration file

    #
     sysname DeviceA
    #
    router id 1.1.1.1
    #
    interface GigabitEthernet1/0/0
     undo shutdown 
     ip address 192.168.0.1 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     undo shutdown
     ip address 192.168.1.1 255.255.255.0
    #
    ospf 1
     area 0.0.0.0
      network 192.168.0.0 0.0.0.255
     area 0.0.0.1
      network 192.168.1.0 0.0.0.255
      stub no-summary
    #
    return
  • Device B configuration file

    #
     sysname DeviceB
    #
    router id 2.2.2.2
    #
    interface GigabitEthernet1/0/0
     undo shutdown
    ip address 192.168.0.2 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     undo shutdown
     ip address 192.168.2.1 255.255.255.0
    #
    ospf 1
     area 0.0.0.0
      network 192.168.0.0 0.0.0.255
     area 0.0.0.2
      network 192.168.2.0 0.0.0.255
    #
    return
  • Device C configuration file

    #
     sysname DeviceC
    #
    router id 3.3.3.3
    #
    interface GigabitEthernet1/0/0
     undo shutdown
     ip address 192.168.1.2 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     undo shutdown
     ip address 172.16.1.1 255.255.255.0
    #
    ospf 1
     area 0.0.0.1
      network 192.168.1.0 0.0.0.255
      network 172.16.1.0 0.0.0.255
      stub
    #
    return
  • Device D configuration file

    #
     sysname DeviceD
    #
    router id 4.4.4.4
    #
    interface GigabitEthernet1/0/0
     undo shutdown 
     ip address 192.168.2.2 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     undo shutdown
     ip address 172.17.1.1 255.255.255.0
    #
    ospf 1
     import-route static type 1
     area 0.0.0.2
      network 192.168.2.0 0.0.0.255
      network 172.17.1.0 0.0.0.255
    #
    ip route-static 10.0.0.0 255.0.0.0 NULL0
    #
    return
  • Device E configuration file

    #
     sysname DeviceE
    #
    router id 5.5.5.5
    #
    interface GigabitEthernet2/0/0
     undo shutdown
     ip address 172.16.1.2 255.255.255.0
    #
    ospf 1
     area 0.0.0.1
      network 172.16.1.0 0.0.0.255
      stub
    #
    return
  • Device F configuration file

    #
     sysname DeviceF
    #
    router id 6.6.6.6
    #
    interface GigabitEthernet2/0/0
     undo shutdown
     ip address 172.17.1.2 255.255.255.0
    #
    ospf 1
     area 0.0.0.2
      network 172.17.1.0 0.0.0.255
    #
    return
Translation
Download
Updated: 2019-01-03

Document ID: EDOC1100055018

Views: 49924

Downloads: 201

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