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

Configuration Guide - IP Unicast Routing

S9300, S9300E, and S9300X V200R011C10

This document describes IP Unicast Routing configurations supported by the switch, including the principle and configuration procedures of IP Routing Overview, Static Route, RIP, RIPng, OSPF, OSPFv3, IS-IS(IPv4), IS-IS(IPv6), BGP, Routing Policy ,and PBR, and provides configuration examples.
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

Networking Requirements

On the network shown in Figure 5-72, OSPF is running among the three switches, the entire OSPF network is divided into Area0 and Area1, and SwitchB functions as an ASBR to communicate with external networks. The scale of the OSPF routing table on SwitchC needs to be reduced without affecting communication.

Figure 5-72  Networking diagram of configuring an OSPF stub area

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure basic OSPF functions on each switch to implement basic connections on the OSPF network.

  2. Configure static routes on SwitchB and import them to the OSPF routing table so that there are reachable routes between the OSPF network and external networks.

  3. Configure Area1 as a stub area to reduce the scale of the OSPF routing table on SwitchC.

  4. Disable the ABR (SwitchA) from advertising Type 3 LSA to Area1 (that means Area 1 is configured as a totally stub area) to further reduce the scale of the OSPF routing table on SwitchC.

Procedure

  1. Configure VLANs for interfaces.

    # Configure SwitchA. The configurations of SwitchB and SwitchC are similar to the configuration of SwitchA.

    <Quidway> system-view
    [Quidway] sysname SwitchA
    [SwitchA] vlan batch 10 20
    [SwitchA] interface gigabitethernet 1/0/1
    [SwitchA-GigabitEthernet1/0/1] port link-type trunk
    [SwitchA-GigabitEthernet1/0/1] port trunk allow-pass vlan 10
    [SwitchA-GigabitEthernet1/0/1] quit
    [SwitchA] interface gigabitethernet 1/0/2
    [SwitchA-GigabitEthernet1/0/2] port link-type trunk
    [SwitchA-GigabitEthernet1/0/2] port trunk allow-pass vlan 20
    [SwitchA-GigabitEthernet1/0/2] quit

  2. Configure an IP address for each VLANIF interface.

    # Configure SwitchA. The configurations of SwitchB and SwitchC are similar to the configuration of SwitchA.

    [SwitchA] interface vlanif 10
    [SwitchA-Vlanif10] ip address 192.168.0.1 24
    [SwitchA-Vlanif10] quit
    [SwitchA] interface vlanif 20
    [SwitchA-Vlanif20] ip address 192.168.1.1 24
    [SwitchA-Vlanif20] quit

  3. Configure basic OSPF functions.

    # Configure SwitchA.

    [SwitchA] ospf 1 router-id 10.1.1.1
    [SwitchA-ospf-1] area 0
    [SwitchA-ospf-1-area-0.0.0.0] network 192.168.0.0 0.0.0.255
    [SwitchA-ospf-1-area-0.0.0.0] quit
    [SwitchA-ospf-1] area 1
    [SwitchA-ospf-1-area-0.0.0.1] network 192.168.1.0 0.0.0.255
    [SwitchA-ospf-1-area-0.0.0.1] quit
    [SwitchA-ospf-1] quit

    # Configure SwitchB.

    [SwitchB] ospf 1 router-id 10.2.2.2
    [SwitchB-ospf-1] area 0
    [SwitchB-ospf-1-area-0.0.0.0] network 192.168.0.0 0.0.0.255
    [SwitchB-ospf-1-area-0.0.0.0] quit
    [SwitchB-ospf-1] quit

    # Configure SwitchC.

    [SwitchC] ospf 1 router-id 10.3.3.3
    [SwitchC-ospf-1] area 1
    [SwitchC-ospf-1-area-0.0.0.1] network 192.168.1.0 0.0.0.255
    [SwitchC-ospf-1-area-0.0.0.1] quit
    [SwitchC-ospf-1] quit

  4. # Configure SwitchB to import static routes.

    [SwitchB] ip route-static 10.0.0.0 8 null 0
    [SwitchB] ospf 1
    [SwitchB-ospf-1] import-route static type 1
    [SwitchB-ospf-1] quit

    # Check the OSPF routing table on SwitchC. The AS external routes exist in the table.

    [SwitchC] display ospf routing
    
         OSPF Process 1 with Router ID 10.3.3.3
                       Routing Tables
    
     Routing for Network
     Destination        Cost  Type         NextHop         AdvRouter       Area
     192.168.1.0/24     1     Transit      192.168.1.2     10.3.3.3        0.0.0.1
     192.168.0.0/24     2     Inter-area   192.168.1.1     10.1.1.1        0.0.0.1
    
     Routing for ASEs
     Destination    Cost      Type       Tag         NextHop         AdvRouter
     10.0.0.0/8    3         Type1      1           192.168.1.1     10.2.2.2
    
     Total Nets: 3
     Intra Area: 1  Inter Area: 1  ASE: 1  NSSA: 0

  5. Configure Area1 as a stub area.

    # Configure SwitchA.

    [SwitchA] ospf 1
    [SwitchA-ospf-1] area 1
    [SwitchA-ospf-1-area-0.0.0.1] stub
    [SwitchA-ospf-1-area-0.0.0.1] quit
    [SwitchA-ospf-1] quit

    # Configure SwitchC.

    [SwitchC] ospf 1
    [SwitchC-ospf-1] area 1
    [SwitchC-ospf-1-area-0.0.0.1] stub
    [SwitchC-ospf-1-area-0.0.0.1] quit
    [SwitchC-ospf-1] quit

    # Check the OSPF routing table on SwitchC. The AS external routes do not exist in the table, but a default route to the external network is added.

    [SwitchC] display ospf routing
    
              OSPF Process 1 with Router ID 10.3.3.3
                       Routing Tables
    
     Routing for Network
     Destination        Cost  Type       NextHop         AdvRouter       Area
     192.168.1.0/24     1     Transit    192.168.1.2     10.3.3.3         0.0.0.1
     0.0.0.0/0          2     Inter-area 192.168.1.1     10.1.1.1         0.0.0.1
     192.168.0.0/24     2     Inter-area 192.168.1.1     10.1.1.1         0.0.0.1
    
     Total Nets: 3
     Intra Area: 1  Inter Area: 2  ASE: 0  NSSA: 0

  6. Configure Area1 as a totally stub area.

    [SwitchA] ospf 1
    [SwitchA-ospf-1] area 1
    [SwitchA-ospf-1-area-0.0.0.1] stub no-summary
    [SwitchA-ospf-1-area-0.0.0.1] quit
    [SwitchA-ospf-1] quit

  7. Verify the configuration.

    # Check the OSPF routing table on SwitchC. The route with the destination address 192.168.0.0/24 does not exist in the table, but the intra-area OSPF routes and a default route to the external network are reserved.

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

Configuration Files

  • SwitchA configuration file

    #
    sysname SwitchA
    #
    vlan batch 10 20
    #
    interface Vlanif10
     ip address 192.168.0.1 255.255.255.0
    #
    interface Vlanif20
     ip address 192.168.1.1 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    ospf 1 router-id 10.1.1.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
  • SwitchB configuration file

    #
    sysname SwitchB
    #
    vlan batch 10
    #
    interface Vlanif10
     ip address 192.168.0.2 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    ospf 1 router-id 10.2.2.2
     import-route static type 1
     area 0.0.0.0
      network 192.168.0.0 0.0.0.255
    #
    ip route-static 10.0.0.0 255.0.0.0 NULL0
    #
    return
  • SwitchC configuration file

    #
    sysname SwitchC
    #
    vlan batch 20
    #
    interface Vlanif20
     ip address 192.168.1.2 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    ospf 1 router-id 10.3.3.3
     area 0.0.0.1
      network 192.168.1.0 0.0.0.255
      stub
    #
    return
Translation
Download
Updated: 2019-10-22

Document ID: EDOC1000178418

Views: 201009

Downloads: 37

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