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 Service

AR500, AR510, AR531, AR550, AR1500, and AR2500 V200R010

This document describes the concepts and configuration procedures of IP Service features on the device, and provides the 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 IP Unnumbered Interface

Example for Configuring an IP Unnumbered Interface

Networking Requirements

As shown in Figure 1-6, RouterA and RouterC are interconnected through a tunnel. Tunnel interfaces (Tunnel0/0/15) of RouterA and RouterC are seldom used, so they have no IP address configured. IP unnumbered needs to be configured on the tunnel interfaces so that the two switches can communicate through the tunnel.

Figure 1-6  Network diagram for IP unnumbered interface configuration

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure OSPF to ensure that there are reachable routes between RouterA and RouterC.

  2. Create tunnel interfaces on RouterA and RouterC and configure the tunnel interfaces to borrow IP addresses from loopback interfaces to save IP addresses.

Procedure

  1. Configure IP addresses for physical interfaces.

    # Configure RouterA.
    <Huawei> system-view
    [Huawei] sysname RouterA
    [RouterA] interface loopback 0
    [RouterA-LoopBack0] ip address 10.1.1.1 255.255.255.0
    [RouterA-LoopBack0] quit
    [RouterA] interface gigabitethernet 1/0/0
    [RouterA-GigabitEthernet1/0/0] undo portswitch
    [RouterA-GigabitEthernet1/0/0] ip address 20.1.1.1 255.255.255.0
    [RouterA-GigabitEthernet1/0/0] quit
    
    # Configure RouterB.
    <Huawei> system-view
    [Huawei] sysname RouterB
    [RouterB] interface gigabitethernet 1/0/0
    [RouterB-GigabitEthernet1/0/0] undo portswitch
    [RouterB-GigabitEthernet1/0/0] ip address 20.1.1.2 255.255.255.0
    [RouterB-GigabitEthernet1/0/0] quit
    [RouterB] interface gigabitethernet 2/0/0
    [RouterB-GigabitEthernet2/0/0] undo portswitch
    [RouterB-GigabitEthernet2/0/0] ip address 30.1.1.1 255.255.255.0
    [RouterB-GigabitEthernet2/0/0] quit

    # Configure RouterC.

    <Huawei> system-view
    [Huawei] sysname RouterC
    [RouterC] interface loopback 0
    [RouterC-LoopBack0] ip address 10.1.2.1 255.255.255.0
    [RouterC-LoopBack0] quit
    [RouterC] interface gigabitethernet 1/0/0
    [RouterC-GigabitEthernet1/0/0] undo portswitch
    [RouterC-GigabitEthernet1/0/0] ip address 30.1.1.2 255.255.255.0
    [RouterC-GigabitEthernet1/0/0] quit
    

  2. Configure OSPF.

    # Configure RouterA.

    [RouterA] ospf 1
    [RouterA-ospf-1] area 0
    [RouterA-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255
    [RouterA-ospf-1-area-0.0.0.0] quit
    [RouterA-ospf-1] quit

    # Configure RouterB.

    [RouterB] ospf 1
    [RouterB-ospf-1] area 0
    [RouterB-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255
    [RouterB-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255
    [RouterB-ospf-1-area-0.0.0.0] quit
    [RouterB-ospf-1] quit

    # Configure RouterC.

    [RouterC] ospf 1
    [RouterC-ospf-1] area 0
    [RouterC-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255
    [RouterC-ospf-1-area-0.0.0.0] quit
    [RouterC-ospf-1] quit

    # After the preceding configurations, run the display ip routing-table command on RouterA and RouterC. The command output shows that RouterA and RouterC have learned OSPF routes to the network segment of the peer.

    # The following uses the display on RouterA as an example.

    [RouterA] display ip routing-table protocol ospf
    Route Flags: R - relay,
    D - download to fib                                          
    ------------------------------------------------------------------------------       
    Public routing table : OSPF                                                          
             Destinations : 1        Routes : 1                                          
                                                                                         
    OSPF routing table status : <Active>                                                 
             Destinations : 1        Routes : 1                                          
                                                                                         
    Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface           
                                                                                         
           30.1.1.0/24  OSPF    10   2           D   20.1.1.2        GigabitEthernet1/0/0
                                                                                         
    OSPF routing table status : <Inactive>                                               
             Destinations : 0        Routes : 0                                          
                                                                                         

  3. Configure tunnel interfaces.

    # Configure RouterA.

    [RouterA] interface tunnel 0/0/15
    [RouterA-Tunnel0/0/15] tunnel-protocol gre
    [RouterA-Tunnel0/0/15] ip address unnumbered interface loopback 0 
    [RouterA-Tunnel0/0/15] source 20.1.1.1
    [RouterA-Tunnel0/0/15] destination 30.1.1.2
    [RouterA-Tunnel0/0/15] quit

    # Configure RouterC.

    [RouterC] interface tunnel 0/0/15
    [RouterC-Tunnel0/0/15] tunnel-protocol gre
    [RouterC-Tunnel0/0/15] ip address unnumbered interface loopback 0 
    [RouterC-Tunnel0/0/15] source 30.1.1.2
    [RouterC-Tunnel0/0/15] destination 20.1.1.1
    [RouterC-Tunnel0/0/15] quit

  4. Configure static routes.

    # Configure RouterA.

    [RouterA] ip route-static 10.1.2.0 24 tunnel 0/0/15 
    

    # Configure RouterC.

    [RouterC] ip route-static 10.1.1.0 24 tunnel 0/0/15 
    

  5. Verify the configuration.

    # Ping 10.1.2.1 from RouterA.

    [RouterA] ping 10.1.2.1
      PING 10.1.2.1: 56  data bytes, press CTRL_C to break                     
        Reply from 10.1.2.1: bytes=56 Sequence=1 ttl=255 time=1 ms             
        Reply from 10.1.2.1: bytes=56 Sequence=2 ttl=255 time=1 ms             
        Reply from 10.1.2.1: bytes=56 Sequence=3 ttl=255 time=1 ms             
        Reply from 10.1.2.1: bytes=56 Sequence=4 ttl=255 time=1 ms             
        Reply from 10.1.2.1: bytes=56 Sequence=5 ttl=255 time=1 ms             
                                                                                    
      --- 10.1.2.1 ping statistics ---                                         
        5 packet(s) transmitted                                                     
        5 packet(s) received                                                        
        0.00% packet loss                                                           
        round-trip min/avg/max = 1/1/1 ms                                           
    

Configuration Files

  • Configuration file of RouterA

    #
     sysname RouterA
    #
    interface GigabitEthernet1/0/0                                                         
     undo portswitch
     ip address 20.1.1.1 255.255.255.0                                              
    #
    interface LoopBack0
     ip address 10.1.1.1 255.255.225.0
    #
    interface Tunnel0/0/15
     ip address unnumbered interface LoopBack0
     tunnel-protocol gre                                                            
     source 20.1.1.1                                                                
     destination 30.1.1.2 
    #
    ospf 1
     area 0.0.0.0
      network 20.1.1.0 0.0.0.255    
    #                                                                               
    ip route-static 10.1.2.0 255.255.255.0 Tunnel0/0/15   
    #
    return
  • Configuration file of RouterB

    #
     sysname RouterB
    #                                                                               
    interface GigabitEthernet1/0/0                                                         
     undo portswitch
     ip address 20.1.1.2 255.255.255.0                                              
    #                                                                               
    interface GigabitEthernet2/0/0                                                         
     undo portswitch
     ip address 30.1.1.1 255.255.255.0                                              
    #
    ospf 1
     area 0.0.0.0
      network 20.1.1.0 0.0.0.255    
      network 30.1.1.0 0.0.0.255           
    #
    return
  • Configuration file of RouterC

    #
     sysname RouterC
    #                                                                               
    interface GigabitEthernet1/0/0                                                         
     undo portswitch
     ip address 30.1.1.2 255.255.255.0     
    #
    interface LoopBack0
     ip address 10.1.2.1 255.255.225.0
    #
    interface Tunnel0/0/15
     ip address unnumbered interface LoopBack0
     tunnel-protocol gre                                                            
     source 30.1.1.2                                                                
     destination 20.1.1.1    
    #
    ospf 1
     area 0.0.0.0
      network 30.1.1.0 0.0.0.255  
    #                                                                               
    ip route-static 10.1.1.0 255.255.255.0 Tunnel0/0/15   
    #
    return
Translation
Download
Updated: 2019-05-20

Document ID: EDOC1100034231

Views: 80341

Downloads: 51

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