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

S7700 and S9700 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 Virtual Link

Example for Configuring an OSPF Virtual Link

Networking Requirements

In Figure 5-74, the original OSPF network is divided into Area0 and Area1. Due to limitations of the existing network, Area2 needs to be planned and added to the entire OSPF network using SwitchB as an ABR.

Figure 5-74  Networking diagram of configuring an OSPF virtual link

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure basic OSPF functions on each switch to implement reachable internal routes among Area0, Area1, and Area2.

  2. Configure a virtual link between SwitchA and SwitchB to implement reachable routes between Area2 and other areas.

Procedure

  1. Configure VLANs for interfaces.

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

    <HUAWEI> system-view
    [HUAWEI] 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, SwitchC, and SwitchD are similar to the configuration of SwitchA.

    [SwitchA] interface vlanif 10
    [SwitchA-Vlanif10] ip address 10.1.1.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.10.10.1
    [SwitchA-ospf-1] area 0
    [SwitchA-ospf-1-area-0.0.0.0] network 10.1.1.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.10.10.2
    [SwitchB-ospf-1] area 1
    [SwitchB-ospf-1-area-0.0.0.1] network 192.168.1.0 0.0.0.255
    [SwitchB-ospf-1-area-0.0.0.1] quit
    [SwitchB-ospf-1] area 2
    [SwitchB-ospf-1-area-0.0.0.2] network 172.16.0.0 0.0.255.255
    [SwitchB-ospf-1-area-0.0.0.2] quit
    [SwitchB-ospf-1] quit

    # Configure SwitchC.

    [SwitchC] ospf 1 router-id 10.10.10.3 
    [SwitchC-ospf-1] area 0
    [SwitchC-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
    [SwitchC-ospf-1-area-0.0.0.0] quit
    [SwitchC-ospf-1] quit

    # Configure SwitchD.

    [SwitchD] ospf 1 router-id 10.10.10.4
    [SwitchD-ospf-1] area 2
    [SwitchD-ospf-1-area-0.0.0.2] network 172.16.0.0 0.0.255.255
    [SwitchD-ospf-1-area-0.0.0.2] quit
    [SwitchD-ospf-1] quit

    # Check the OSPF routing table on SwitchA.

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

    The preceding command output shows that the Area2 route information does not exist on SwitchA. OSPF requires that all non-backbone areas maintain the connectivity with the backbone area. Area2 is not directly connected to Area0; therefore, the routing table of SwitchA does not contain the routes in Area2.

  4. Configure a virtual link.

    # Configure SwitchA.

    [SwitchA] ospf 1
    [SwitchA-ospf-1] area 1
    [SwitchA-ospf-1-area-0.0.0.1] vlink-peer 10.10.10.2
    [SwitchA-ospf-1-area-0.0.0.1] quit
    [SwitchA-ospf-1] quit

    # Configure SwitchB.

    [SwitchB] ospf 1
    [SwitchB-ospf-1] area 1
    [SwitchB-ospf-1-area-0.0.0.1] vlink-peer 10.10.10.1 
    [SwitchB-ospf-1-area-0.0.0.1] quit
    [SwitchB-ospf-1] quit

  5. Verify the configuration.

    # Check the OSPF routing table on SwitchA.

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

    The preceding command output shows that the OSPF routing table of SwitchA contains the routes in Area2 after the virtual link is configured between SwitchA and SwitchB.

Configuration Files

  • SwitchA configuration file

    #
    sysname SwitchA
    #
    vlan batch 10 20
    #
    interface Vlanif10
     ip address 10.1.1.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.10.10.1
     area 0.0.0.0
      network 10.1.1.0 0.0.0.255
     area 0.0.0.1
      network 192.168.1.0 0.0.0.255
      vlink-peer 10.10.10.2
    #
    return
  • SwitchB configuration file

    #
    sysname SwitchB
    #
    vlan batch 20 30
    #
    interface Vlanif20
     ip address 192.168.1.2 255.255.255.0
    #
    interface Vlanif30
     ip address 172.16.1.1 255.255.0.0
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    ospf 1 router-id 10.10.10.2
     area 0.0.0.1
      network 192.168.1.0 0.0.0.255
      vlink-peer 10.10.10.1
     area 0.0.0.2
      network 172.16.0.0 0.0.255.255
    #
    return
  • SwitchC configuration file

    #
    sysname SwitchC
    #
    vlan batch 10
    #
    interface Vlanif10
     ip address 10.1.1.2 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    ospf 1 router-id 10.10.10.3
     area 0.0.0.0
      network 10.1.1.0 0.0.0.255
    #
    return
  • SwitchD configuration file

    #
    sysname SwitchD
    #
    vlan batch 30
    #
    interface Vlanif30
     ip address 172.16.1.2 255.255.0.0
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    ospf 1 router-id 10.10.10.4
     area 0.0.0.2
      network 172.16.0.0 0.0.255.255
    #
    return
Translation
Download
Updated: 2019-04-01

Document ID: EDOC1000178324

Views: 222978

Downloads: 194

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