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 Service

CloudEngine 8800, 7800, 6800, and 5800 V200R003C00

This document describes the configurations of IP Service, including IP address, ARP, DHCP, DNS, IP performance optimization, IPv6, DHCPv6, and IPv6 DNS.
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, Tunnel interfaces (Tunnel1) of SwitchA and SwitchC are seldom used, so they have no IP address configured. The tunnel interfaces need to borrow the IP address of the loopback interface 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 IP addresses for interfaces on SwitchA, SwitchB, and SwitchC.
  2. Configure OSPF routes to ensure that there are reachable IPv4 routes between SwitchA and SwitchC.
  3. Create tunnel interfaces on SwitchA and SwitchC, set up a GRE tunnel between them, and specify the source and destination addresses of the tunnel interfaces.
  4. On SwitchA and SwitchC, configure the tunnel interface to borrow the IP address from a loopback interface.
  5. On SwitchA and SwitchC, configure tunnel routes using static routing.

Procedure

  1. Assign IP addresses to interfaces

    # Configure SwitchA.

    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchA
    [*HUAWEI] commit
    [~SwitchA] vlan batch 10
    [*SwitchA] interface 10ge 1/0/1
    [*SwitchA-10GE1/0/1] port link-type trunk
    [*SwitchA-10GE1/0/1] port trunk allow-pass vlan 10
    [*SwitchA-10GE1/0/1] quit
    [*SwitchA] interface vlanif 10
    [*SwitchA-Vlanif10] ip address 10.2.1.1 24
    [*SwitchA-Vlanif10] quit
    [*SwitchA] interface loopback 0
    [*SwitchA-LoopBack0] ip address 10.1.1.1 24
    [*SwitchA-LoopBack0] quit
    [*SwitchA] commit

    # Configure SwitchB.

    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchB
    [*HUAWEI] commit
    [~SwitchB] vlan batch 10 20
    [*SwitchB] interface 10ge 1/0/1
    [*SwitchB-10GE1/0/1] port link-type trunk
    [*SwitchB-10GE1/0/1] port trunk allow-pass vlan 10
    [*SwitchB-10GE1/0/1] quit
    [*SwitchB] interface 10ge 1/0/2
    [*SwitchB-10GE1/0/2] port link-type trunk
    [*SwitchB-10GE1/0/2] port trunk allow-pass vlan 20
    [*SwitchB-10GE1/0/2] quit
    [*SwitchB] interface vlanif 10
    [*SwitchB-Vlanif10] ip address 10.2.1.2 24
    [*SwitchB-Vlanif10] quit
    [*SwitchB] interface vlanif 20
    [*SwitchB-Vlanif20] ip address 10.3.1.1 24
    [*SwitchB-Vlanif20] quit
    [*SwitchB] commit

    # Configure SwitchC.

    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchC
    [*HUAWEI] commit
    [~SwitchC] vlan batch 20
    [*SwitchC] interface 10ge 1/0/1
    [*SwitchC-10GE1/0/1] port link-type trunk
    [*SwitchC-10GE1/0/1] port trunk allow-pass vlan 20
    [*SwitchC-10GE1/0/1] quit
    [*SwitchC] interface vlanif 20
    [*SwitchC-Vlanif20] ip address 10.3.1.2 24
    [*SwitchC-Vlanif20] quit
    [*SwitchC] interface loopback 0
    [*SwitchC-LoopBack0] ip address 10.1.2.1 24
    [*SwitchC-LoopBack0] quit
    [*SwitchC] commit

  2. Configure OSPF on the devices

    # Configure SwitchA.

    [~SwitchA] ospf 1
    [*SwitchA-ospf-1] area 0
    [*SwitchA-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255
    [*SwitchA-ospf-1-area-0.0.0.0] quit
    [*SwitchA-ospf-1] quit
    [*SwitchA] commit

    # Configure SwitchB.

    [~SwitchB] ospf 1
    [*SwitchB-ospf-1] area 0
    [*SwitchB-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255
    [*SwitchB-ospf-1-area-0.0.0.0] network 10.3.1.0 0.0.0.255
    [*SwitchB-ospf-1-area-0.0.0.0] quit
    [*SwitchB-ospf-1] quit
    [*SwitchB] commit

    # Configure SwitchC.

    [~SwitchC] ospf 1
    [*SwitchC-ospf-1] area 0
    [*SwitchC-ospf-1-area-0.0.0.0] network 10.3.1.0 0.0.0.255
    [*SwitchC-ospf-1-area-0.0.0.0] quit
    [*SwitchC-ospf-1] quit
    [*SwitchC] commit

  3. Configure Tunnel1 to borrow the IP address from Loopback0 and configure the gre tunnel.

    # Configure SwitchA (except CE6870EI, CE6875EI, and CE6880EI).

    [~SwitchA] interface eth-trunk 1
    [*SwitchA-Eth-Trunk1] service type tunnel
    [*SwitchA-Eth-Trunk1] quit
    [*SwitchA] interface 10ge 1/0/2
    [*SwitchA-10GE1/0/2] eth-trunk 1
    [*SwitchA-10GE1/0/2] quit
    [*SwitchA] commit
    [~SwitchA] interface tunnel 1
    [*SwitchA-Tunnel1] tunnel-protocol gre
    [*SwitchA-Tunnel1] binding interface eth-trunk 1
    [*SwitchA-Tunnel1] ip address unnumbered interface loopback 0
    [*SwitchA-Tunnel1] source 10.2.1.1
    [*SwitchA-Tunnel1] destination 10.3.1.2
    [*SwitchA-Tunnel1] quit
    [*SwitchA] commit
    Configure SwitchA (CE6870EI, CE6875EI, and CE6880EI ).
    [~SwitchA] ip tunnel mode gre
    [*SwitchA] commit
    
    NOTE:

    After the configuration is complete, save the configuration and restart the device for the configuration to take effect. You can restart the device immediately or restart it after completing all configurations.

    [~SwitchA] interface tunnel 1
    [*SwitchA-Tunnel1] tunnel-protocol gre
    [*SwitchA-Tunnel1] ip address unnumbered interface loopback 0
    [*SwitchA-Tunnel1] source 10.2.1.1
    [*SwitchA-Tunnel1] destination 10.3.1.2
    [*SwitchA-Tunnel1] quit
    [*SwitchA] commit

    Configure SwitchC (except CE6870EI, CE6875EI, and CE6880EI).

    [~SwitchC] interface eth-trunk 1
    [*SwitchC-Eth-Trunk1] service type tunnel
    [*SwitchC-Eth-Trunk1] quit
    [*SwitchC] interface 10ge 1/0/2
    [*SwitchC-10GE1/0/2] eth-trunk 1
    [*SwitchC-10GE1/0/2] quit
    [*SwitchC] commit
    [~SwitchC] interface tunnel 1
    [*SwitchC-Tunnel1] tunnel-protocol gre
    [*SwitchC-Tunnel1] binding interface eth-trunk 1
    [*SwitchC-Tunnel1] ip address unnumbered interface loopback 0
    [*SwitchC-Tunnel1] source 10.3.1.2
    [*SwitchC-Tunnel1] destination 10.2.1.1
    [*SwitchC-Tunnel1] quit
    [*SwitchC] commit
    Configure SwitchC (CE6870EI, CE6875EI, and CE6880EI).
    [~SwitchC] ip tunnel mode gre
    [*SwitchC] commit
    
    NOTE:

    After the configuration is complete, save the configuration and restart the device for the configuration to take effect. You can restart the device immediately or restart it after completing all configurations.

    [~SwitchC] interface tunnel 1
    [*SwitchC-Tunnel1] tunnel-protocol gre
    [*SwitchC-Tunnel1] ip address unnumbered interface loopback 0
    [*SwitchC-Tunnel1] source 10.3.1.2
    [*SwitchC-Tunnel1] destination 10.2.1.1
    [*SwitchC-Tunnel1] quit
    [*SwitchC] commit

  4. Configure static routes.

    # Configure SwitchA.

    [~SwitchA] ip route-static 10.1.2.0 255.255.255.0 tunnel 1
    [*SwitchA] commit

    # Configure SwitchC.

    [~SwitchC] ip route-static 10.1.1.0 255.255.255.0 tunnel 1
    [*SwitchC] commit

  5. Verify the configuration.

    # Ping 10.1.2.1 from SwitchA. The ping operation succeeds.

    [~SwitchA] 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=2 ms
        Reply from 10.1.2.1: bytes=56 Sequence=2 ttl=255 time=3 ms
        Reply from 10.1.2.1: bytes=56 Sequence=3 ttl=255 time=3 ms
        Reply from 10.1.2.1: bytes=56 Sequence=4 ttl=255 time=3 ms
        Reply from 10.1.2.1: bytes=56 Sequence=5 ttl=255 time=3 ms
    
      --- 10.1.2.1 ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 2/2/3 ms
    

Configuration Files

  • Configuration file of SwitchA(except CE6870EI, CE6875EI, and CE6880EI)

    #
    sysname SwitchA
    #
    vlan batch 10
    #
    interface Vlanif10
     ip address 10.2.1.1 255.255.255.0
    #
    interface Eth-Trunk1
     service type tunnel
    #
    interface 10GE1/0/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    interface 10GE1/0/2
     eth-trunk 1
    #
    interface LoopBack0
     ip address 10.1.1.1 255.255.225.0
    #
    interface Tunnel1
     ip address unnumbered interface LoopBack0
     tunnel-protocol gre
     source 10.2.1.1
     destination 10.3.1.2
     binding interface Eth-Trunk1
    #
    ospf 1
     area 0.0.0.0
      network 10.2.1.0 0.0.0.255
    #
    ip route-static 10.1.2.0 255.255.255.0 Tunnel1
    #
    return
  • Configuration file of SwitchA(CE6870EI, CE6875EI, and CE6880EI)

    #
    sysname SwitchA
    #
    vlan batch 10
    #
    ip tunnel mode gre
    #
    interface Vlanif10
     ip address 10.2.1.1 255.255.255.0
    #
    interface 10GE1/0/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    interface LoopBack0
     ip address 10.1.1.1 255.255.225.0
    #
    interface Tunnel1
     ip address unnumbered interface LoopBack0
     tunnel-protocol gre
     source 10.2.1.1
     destination 10.3.1.2
    #
    ospf 1
     area 0.0.0.0
      network 10.2.1.0 0.0.0.255
    #
    ip route-static 10.1.2.0 255.255.255.0 Tunnel1
    #
    return
  • Configuration file of SwitchB

    #
    sysname SwitchB
    #
    vlan batch 10 20
    #
    interface Vlanif10
     ip address 10.2.1.2 255.255.255.0
    #
    interface Vlanif20
     ip address 10.3.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 10.2.1.0 0.0.0.255
      network 10.3.1.0 0.0.0.255
    #
    return
  • Configuration file of SwitchC(except CE6870EI, CE6875EI, and CE6880EI)

    #
    sysname SwitchC
    #
    vlan batch 20
    #
    interface Vlanif20
     ip address 10.3.1.2 255.255.255.0
    #
    interface Eth-Trunk1
     service type tunnel
    #
    interface 10GE1/0/1
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    interface 10GE1/0/2
     eth-trunk 1
    #
    interface LoopBack0
     ip address 10.1.2.1 255.255.225.0
    #
    interface Tunnel1
     ip address unnumbered interface LoopBack0
     tunnel-protocol gre
     source 10.3.1.2
     destination 10.2.1.1
     binding interface Eth-Trunk1
    #
    ospf 1
     area 0.0.0.0
      network 10.3.1.0 0.0.0.255
    #
    ip route-static 10.1.1.0 255.255.255.0 Tunnel1
    #
    return
  • Configuration file of SwitchC(CE6870EI, CE6875EI, and CE6880EI)

    #
    sysname SwitchC
    #
    vlan batch 20
    #
    ip tunnel mode gre
    #
    interface Vlanif20
     ip address 10.3.1.2 255.255.255.0
    #
    interface 10GE1/0/1
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    interface LoopBack0
     ip address 10.1.2.1 255.255.225.0
    #
    interface Tunnel1
     ip address unnumbered interface LoopBack0
     tunnel-protocol gre
     source 10.3.1.2
     destination 10.2.1.1
    #
    ospf 1
     area 0.0.0.0
      network 10.3.1.0 0.0.0.255
    #
    ip route-static 10.1.1.0 255.255.255.0 Tunnel1
    #
    return
Translation
Download
Updated: 2019-05-08

Document ID: EDOC1100004354

Views: 69196

Downloads: 147

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