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

CloudEngine 8800, 7800, 6800, and 5800 V200R005C10

This document describes the configurations of IP Unicast Routing, including IP Routing, Static Route, RIP, RIPng, OSPF, OSPFv3, IPv4 IS-IS, IPv6 IS-IS, BGP, Routing Policy, and PBR.
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 Basic OSPF Functions

Example for Configuring Basic OSPF Functions

Networking Requirements

As shown in Figure 5-31, all switches run OSPF, and the entire AS is partitioned into three areas. Switch A and Switch B function as ABRs to forward routes between areas.

After the configuration is complete, each switch should learn the routes to all network segments in the AS.

Figure 5-31 Networking diagram for configuring basic OSPF functions

Configuration Roadmap

The configuration roadmap is as follows:

  1. Enable OSPF on each switch.

  2. Specify network segments in different areas.

Procedure

  1. Assign an IP address to each interface. The configuration details are not provided here.
  2. Configure basic OSPF functions.

    # Configure Switch A.

    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchA
    [*HUAWEI] commit
    [~SwitchA] router id 10.1.1.1
    [*SwitchA] ospf 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] commit
    [~SwitchA-ospf-1] quit

    # Configure Switch B.

    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchB
    [*HUAWEI] commit
    [~SwitchB] router id 10.2.2.2
    [*SwitchB] ospf 1
    [*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] area 2
    [*SwitchB-ospf-1-area-0.0.0.2] network 192.168.2.0 0.0.0.255
    [*SwitchB-ospf-1-area-0.0.0.2] quit
    [*SwitchB-ospf-1] commit
    [~SwitchB-ospf-1] quit

    # Configure Switch C.

    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchC
    [*HUAWEI] commit
    [~SwitchC] router id 10.3.3.3
    [*SwitchC] ospf 1
    [*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] network 172.16.1.0 0.0.0.255
    [*SwitchC-ospf-1-area-0.0.0.1] commit
    [~SwitchC-ospf-1-area-0.0.0.1] quit
    [~SwitchC-ospf-1] quit

    # Configure Switch D.

    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchD
    [*HUAWEI] commit
    [~SwitchD] router id 10.4.4.4
    [*SwitchD] ospf 1
    [*SwitchD-ospf-1] area 2
    [*SwitchD-ospf-1-area-0.0.0.2] network 192.168.2.0 0.0.0.255
    [*SwitchD-ospf-1-area-0.0.0.2] network 172.17.1.0 0.0.0.255
    [*SwitchD-ospf-1-area-0.0.0.2] commit
    [~SwitchD-ospf-1-area-0.0.0.2] quit
    [~SwitchD-ospf-1] quit

    # Configure Switch E.

    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchE
    [*HUAWEI] commit
    [~SwitchE] router id 10.5.5.5
    [*SwitchE] ospf 1
    [*SwitchE-ospf-1] area 1
    [*SwitchE-ospf-1-area-0.0.0.1] network 172.16.1.0 0.0.0.255
    [*SwitchE-ospf-1-area-0.0.0.1] commit
    [~SwitchE-ospf-1-area-0.0.0.1] quit
    [~SwitchE-ospf-1] quit

    # Configure Switch F.

    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchF
    [*HUAWEI] commit
    [~SwitchF] router id 10.6.6.6
    [*SwitchF] ospf 1
    [*SwitchF-ospf-1] area 2
    [*SwitchF-ospf-1-area-0.0.0.2] network 172.17.1.0 0.0.0.255
    [*SwitchF-ospf-1-area-0.0.0.2] commit
    [~SwitchF-ospf-1-area-0.0.0.2] quit
    [~SwitchF-ospf-1] quit

  3. Verify the configuration.

    # Display the OSPF neighbors of Switch A.

    [~SwitchA] display ospf peer
    OSPF Process 1 with Router ID 10.1.1.1
     Area 0.0.0.0 interface 192.168.0.1(Vlanif10)'s neighbors
      Router ID: 10.2.2.2           Address : 192.168.0.2
      State    : Full               Mode    : Nbr is Master      Priority: 1
      DR       : 192.168.0.2        BDR     : 192.168.0.1        MTU     : 0
      Dead timer due (in seconds) : 36
      Retrans timer interval      : 5
      Neighbor up time            : 02h29m06s
      Authentication Sequence     : 0
    
     Area 0.0.0.1 interface 192.168.1.1(Vlanif20)'s neighbors
      Router ID: 10.3.3.3           Address : 192.168.1.2
      State    : Full               Mode    : Nbr is Master      Priority: 1
      DR       : 192.168.1.2        BDR     : 192.168.1.1        MTU     : 0
      Dead timer due (in seconds) : 33
      Retrans timer interval      : 5
      Neighbor up time            : 02h28m52s
      Authentication Sequence     : 0

    # Display the OSPF routing information on Switch A.

    [~SwitchA] display ospf routing
    OSPF Process 1 with Router ID 10.1.1.1
    
     Routing for Network
     --------------------------------------------------------------------------------
     Destination        Cost       Type       NextHop         AdvRouter       Area
     172.16.1.0/24      2          Transit    192.168.1.2     10.3.3.3         0.0.0.1
    
     172.17.1.0/24      3          Inter-area 192.168.0.2     10.2.2.2         0.0.0.0
    
     192.168.0.0/24     1          Direct     192.168.0.1     10.1.1.1         0.0.0.0
    
     192.168.1.0/24     1          Direct     192.168.1.1     10.1.1.1         0.0.0.1
    
     192.168.2.0/24     2          Inter-area 192.168.0.2     10.2.2.2         0.0.0.0
    
     Total Nets: 5
     Intra Area: 3  Inter Area: 2  ASE: 0  NSSA: 0    

    # Display the LSDB of Switch A.

    [~SwitchA] display ospf lsdb
    OSPF Process 1 with Router ID 10.1.1.1
    Link State Database
    
    Area: 0.0.0.0
    ----------------------------------------------------------------------------                                                        
     Type      LinkState ID    AdvRouter        Age  Len   Sequence       Metric
     Router    10.1.1.1        10.1.1.1           93  48   80000004            1
     Router    10.2.2.2        10.2.2.2           92  48   80000004            1
     Sum-Net   172.16.1.0      10.1.1.1         1287  28   80000002            2
     Sum-Net   192.168.1.0     10.1.1.1         1716  28   80000001            1
     Sum-Net   172.17.1.0      10.2.2.2         1336  28   80000001            2
     Sum-Net   192.168.2.0     10.2.2.2           87  28   80000002            1
    
    Area: 0.0.0.1
    ----------------------------------------------------------------------------                                                        
     Type      LinkState ID    AdvRouter        Age  Len   Sequence       Metric
     Router    10.1.1.1        10.1.1.1         1420  48   80000002            1
     Router    10.3.3.3        10.3.3.3         1294  60   80000003            1
     Router    10.5.5.5        10.5.5.5         1296  36   80000002            1
     Network   172.16.1.1      10.3.3.3         1294  32   80000001            0
     Sum-Net   172.17.1.0      10.1.1.1         1325  28   80000001            3
     Sum-Net   192.168.0.0     10.1.1.1         1717  28   80000001            1
     Sum-Net   192.168.2.0     10.1.1.1         1717  28   80000001            2

    # Display the routing table on Switch D and perform the ping operation to test the connectivity.

    [~SwitchD] display ospf routing
    OSPF Process 1 with Router ID 10.4.4.4
    
     Routing for Network
     --------------------------------------------------------------------------------
     Destination        Cost       Type       NextHop         AdvRouter       Area
     172.16.1.0/24      4          Inter-area 192.168.2.1     10.2.2.2         0.0.0.2
    
     172.17.1.0/24      1          Direct     172.17.1.1      10.4.4.4         0.0.0.2
    
     192.168.0.0/24     2          Inter-area 192.168.2.1     10.2.2.2         0.0.0.2
    
     192.168.1.0/24     3          Inter-area 192.168.2.1     10.2.2.2         0.0.0.2
    
     192.168.2.0/24     1          Direct     192.168.2.2     10.4.4.4         0.0.0.2
    
     Total Nets: 5
     Intra Area: 2  Inter Area: 3  ASE: 0  NSSA: 0
    [~SwitchD] ping 172.16.1.1
      PING 172.16.1.1: 56  data bytes, press CTRL_C to break
        Reply from 172.16.1.1: bytes=56 Sequence=1 ttl=253 time=62 ms
        Reply from 172.16.1.1: bytes=56 Sequence=2 ttl=253 time=16 ms
        Reply from 172.16.1.1: bytes=56 Sequence=3 ttl=253 time=62 ms
        Reply from 172.16.1.1: bytes=56 Sequence=4 ttl=253 time=94 ms
        Reply from 172.16.1.1: bytes=56 Sequence=5 ttl=253 time=63 ms
    
    
      --- 172.16.1.1 ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 16/59/94 ms

Configuration Files

  • Configuration file of Switch A

    #
     sysname SwitchA
    #
     vlan batch 10 20
    #
     router id 10.1.1.1
    #
    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 10GE1/0/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    interface 10GE1/0/2
     port link-type trunk
     port trunk allow-pass vlan 20 
    #
    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
    #
    return
  • Configuration file of Switch B

    #
     sysname SwitchB
    #
     vlan batch 10 30
    #
     router id 10.2.2.2
    #
    interface Vlanif10
     ip address 192.168.0.2 255.255.255.0
    #
    interface Vlanif30
     ip address 192.168.2.1 255.255.255.0
    #
    interface 10GE1/0/1
     port link-type trunk
     port trunk allow-pass vlan 10 
    #
    interface 10GE1/0/2
     port link-type trunk
     port trunk allow-pass vlan 30 
    #
    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
  • Configuration file of Switch C

    #
     sysname SwitchC
    #
     vlan batch 20 40
    #
     router id 10.3.3.3
    #
    interface Vlanif20
     ip address 192.168.1.2 255.255.255.0
    #
    interface Vlanif40
     ip address 172.16.1.1 255.255.255.0
    #
    interface 10GE1/0/1
     port link-type trunk
     port trunk allow-pass vlan 20 
    #
    interface 10GE1/0/2
     port link-type trunk
     port trunk allow-pass vlan 40 
    #
    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
    #
    return
  • Configuration file of Switch D

    #
     sysname SwitchD
    #
     vlan batch 30 50
    #
     router id 10.4.4.4
    #
    interface Vlanif30
     ip address 192.168.2.2 255.255.255.0
    #
    interface Vlanif50
     ip address 172.17.1.1 255.255.255.0
    #
    interface 10GE1/0/1
     port link-type trunk
     port trunk allow-pass vlan 30 
    #
    interface 10GE1/0/2
     port link-type trunk
     port trunk allow-pass vlan 50 
    #
    ospf 1
     area 0.0.0.2
      network 192.168.2.0 0.0.0.255
      network 172.17.1.0 0.0.0.255
    #
    return
  • Configuration file of Switch E

    #
     sysname SwitchE
    #
     vlan batch 40
    #
     router id 10.5.5.5
    #
    interface Vlanif40
     ip address 172.16.1.2 255.255.255.0
    #
    interface 10GE1/0/1
     port link-type trunk
     port trunk allow-pass vlan 40 
    #
    ospf 1
     area 0.0.0.1
      network 172.16.1.0 0.0.0.255
    #
    return
  • Configuration file of Switch F

    #
     sysname SwitchF
    #
     vlan batch 50
    #
     router id 10.6.6.6
    #
    interface Vlanif50
     ip address 172.17.1.2 255.255.255.0
    #
    interface 10GE1/0/1
     port link-type trunk
     port trunk allow-pass vlan 50
    #
    ospf 1
     area 0.0.0.2
      network 172.17.1.0 0.0.0.255
    #
    return
Translation
Download
Updated: 2019-04-20

Document ID: EDOC1100074760

Views: 57559

Downloads: 63

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