Example for Configuring a Manual IPv6 over IPv4 Tunnel

Networking Requirements

As shown in Figure 1, two IPv6 networks are connected to Device B on the IPv4 backbone network through Device A and Device C. To interconnect the two IPv6 networks, configure a manual IPv6 over IPv4 tunnel between Device A and Device C.


Figure 1 Configuring a manual IPv6 over IPv4 tunnel
 


Precautions

When configuring a manual IPv6 over IPv4 tunnel, note the following points:
  • Create a tunnel interface and set parameters for the tunnel interface.
  • Perform the following configuration on both Device A and Device C. The source address of the local end is the destination address of the remote end of the tunnel. Similarly, the destination address of the local end is the source address of the remote end.
  • Configure IP addresses for the tunnel interface to support routing protocols.

Configuration Roadmap

The configuration roadmap is as follows:
  1. Assign an IP address to each physical interface.
  2. Configure the IPv6 address, source interface number, and destination address for the tunnel interface.
  3. Set the protocol type is IPv6-IPv4.

Data Preparation

To complete the configuration, you need the following data:
  • IP addresses of interfaces
  • IPv6 address, source interface number, and destination address of the tunnel

Procedure

  1. Configure Device A.
    # Configure an IP address for Device A's interface that connects to Device C.
    <HUAWEI> system-view
    [~HUAWEI] sysname DeviceA
    [*HUAWEI] commit
    [~DeviceA] interface gigabitethernet 0/1/0
    [~DeviceA-GigabitEthernet0/1/0] ip address 192.168.50.2 255.255.255.0
    [*DeviceA-GigabitEthernet0/1/0] undo shutdown
    [*DeviceA-GigabitEthernet0/1/0] quit
    # Set the protocol type to IPv6-IPv4.
    [*DeviceA] interface tunnel 1
    [*DeviceA-Tunnel1] tunnel-protocol ipv6-ipv4
    # Configure the IPv6 address, source interface number, and destination address for the tunnel interface.
    [*DeviceA-Tunnel1] ipv6 enable
    [*DeviceA-Tunnel1] ipv6 address 2001:db8::1 64
    [*DeviceA-Tunnel1] source 192.168.50.2
    [*DeviceA-Tunnel1] destination 192.168.51.2
    [*DeviceA-Tunnel1] quit
    # Configure a static route.
    [*DeviceA] ip route-static 192.168.51.2 255.255.255.0 192.168.50.1
    [*DeviceA] commit
  2. Configure Device B.
    # Configure IP addresses for Device B's interfaces that connect to Device A and Device C.
    <HUAWEI> system-view
    [~HUAWEI] sysname DeviceB
    [*HUAWEI] commit
    [~DeviceB] interface gigabitethernet 0/1/0
    [~DeviceB-GigabitEthernet0/1/0] ip address 192.168.50.1 255.255.255.0
    [*DeviceB-GigabitEthernet0/1/0] undo shutdown
    [*DeviceB-GigabitEthernet0/1/0] quit
    [*DeviceB] interface gigabitethernet 0/2/0
    [*DeviceB-GigabitEthernet0/2/0] ip address 192.168.51.1 255.255.255.0
    [*DeviceB-GigabitEthernet0/2/0] undo shutdown
    [*DeviceB-GigabitEthernet0/2/0] commit
    [~DeviceB-GigabitEthernet0/2/0] quit
  3. # Configure Device C.
    # Configure an IP address for Device C's interface that connects to Device A.
    <HUAWEI> system-view
    [~HUAWEI] sysname DeviceC
    [*HUAWEI] commit
    [~DeviceC] interface gigabitethernet 0/1/0
    [~DeviceC-GigabitEthernet0/1/0] ip address 192.168.51.2 255.255.255.0
    [*DeviceC-GigabitEthernet0/1/0] undo shutdown
    [*DeviceC-GigabitEthernet0/1/0] quit
    # Set the protocol type to IPv6-IPv4.
    [*DeviceC] interface tunnel 1
    [*DeviceC-Tunnel1] tunnel-protocol ipv6-ipv4
    # Configure the IPv6 address, source interface number, and destination address for the tunnel interface.
    [*DeviceC-Tunnel1] ipv6 enable
    [*DeviceC-Tunnel1] ipv6 address 2001:db8::2 64
    [*DeviceC-Tunnel1] source 192.168.51.2
    [*DeviceC-Tunnel1] destination 192.168.50.2
    [*DeviceC-Tunnel1] quit
    # Configure a static route.
    [*DeviceC] ip route-static 192.168.50.2 255.255.255.0 192.168.51.1
    [*DeviceC] commit
  4. Verify the configuration.
    # Ping the IPv4 address of GE 0/1/0 on Device A from Device C, and the ping operation is successful.
    [~DeviceC] ping 192.168.50.2
      PING 192.168.50.2: 56  data bytes, press CTRL_C to break
        Reply from 192.168.50.2: bytes=56 Sequence=1 ttl=254 time=84 ms
        Reply from 192.168.50.2: bytes=56 Sequence=2 ttl=254 time=27 ms
        Reply from 192.168.50.2: bytes=56 Sequence=3 ttl=254 time=25 ms
        Reply from 192.168.50.2: bytes=56 Sequence=4 ttl=254 time=3 ms
        Reply from 192.168.50.2: bytes=56 Sequence=5 ttl=254 time=24 ms
    
    
      --- 192.168.50.2 ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 3/32/84 ms
    # Ping the IPv6 address of Tunnel 1 on Device A from Device C, and the ping operation is successful.
    [~DeviceC] ping ipv6 2001:db8::1
      PING 2001:db8::1 : 56  data bytes, press CTRL_C to break
        Reply from 2001:db8::1
        bytes=56 Sequence=1 hop limit=64  time = 28 ms
        Reply from 2001:db8::1
        bytes=56 Sequence=2 hop limit=64  time = 27 ms
        Reply from 2001:db8::1
        bytes=56 Sequence=3 hop limit=64  time = 26 ms
        Reply from 2001:db8::1
        bytes=56 Sequence=4 hop limit=64  time = 27 ms
        Reply from 2001:db8::1
        bytes=56 Sequence=5 hop limit=64  time = 26 ms
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
    round-trip min/avg/max = 26/26/28 ms

Configuration Files

  • Device A configuration file
    #
     sysname DeviceA
    #
    admin
    interface GigabitEthernet0/1/0
     undo shutdown
     ip address 192.168.50.2 255.255.255.0
    #
    interface Tunnel 1
     ipv6 enable
     ipv6 address 2001:db8::1/64
     tunnel-protocol ipv6-ipv4
     source 192.168.50.2
     destination 192.168.51.2
    #
    ip route-static 192.168.51.0 255.255.255.0 192.168.50.1
    #
    return
  • Device B configuration file
    #
     sysname DeviceB
    #
    admin
    interface GigabitEthernet0/1/0
     undo shutdown
     ip address 192.168.50.1 255.255.255.0
    #
    interface GigabitEthernet0/2/0
     undo shutdown
     ip address 192.168.51.1 255.255.255.0
    #
    return
  • Device C configuration file
    #
     sysname DeviceC
    #
    admin
    interface GigabitEthernet0/1/0
     undo shutdown
     ip address 192.168.51.2 255.255.255.0
    #
    interface Tunnel 1
     ipv6 enable
     ipv6 address 2001:db8::2/64
     tunnel-protocol ipv6-ipv4
     source 192.168.51.2
     destination 192.168.50.2
    #
    ip route-static 192.168.50.0 255.255.255.0 192.168.51.1
    #
    return

Example for Configuring IPv6 Addresses for Interfaces

Networking Requirements

As shown in Figure 1, Device A and Device B are connected through GE interfaces. To check the connectivity between the two interfaces, configure global unicast IPv6 addresses 2001:db8::1/32 and 2001:db8::2/32 for the GE interfaces.
Figure 1 Configuring IPv6 addresses for interfaces




Device Name
Interface
IP Address
DeviceA
GE0/1/0
2001:db8::1/32
DeviceB
GE0/1/0
2001:db8::2/32

Precautions

None

Configuration Roadmap

The configuration roadmap is as follows:
  1. Enable IPv6 forwarding on the two Devices.
  2. Configure global unicast IPv6 addresses for interfaces.

Data Preparation

To complete the configuration, you need global unicast IPv6 addresses of the interfaces.

Procedure

  1. Configure global unicast IPv6 addresses for interfaces.
    # Configure Device A.
    <HUAWEI> system-view
    [~HUAWEI] sysname DeviceA
    [*HUAWEI] commit
    [~DeviceA] interface GigabitEthernet 0/1/0
    [~DeviceA-GigabitEthernet0/1/0] ipv6 enable
    [*DeviceA-GigabitEthernet0/1/0] ipv6 address 2001:db8::1 32
    [*DeviceA-GigabitEthernet0/1/0] undo shutdown
    [*DeviceA-GigabitEthernet0/1/0] commit
    [~DeviceA-GigabitEthernet0/1/0] quit
    # Configure Device B.
    <HUAWEI> system-view
    [~HUAWEI] sysname DeviceB
    [*HUAWEI] commit
    [~DeviceB] interface GigabitEthernet 0/1/0
    [~DeviceB-GigabitEthernet0/1/0] ipv6 enable
    [*DeviceB-GigabitEthernet0/1/0] ipv6 address 2001:db8::2 32
    [*DeviceB-GigabitEthernet0/1/0] undo shutdown
    [*DeviceB-GigabitEthernet0/1/0] commit
    [~DeviceB-GigabitEthernet0/1/0] quit
  2. Verify the configuration.
    If you can view the configured unicast global addresses and that the interfaces and the IPv6 protocol are in the Up state, it indicates that the configuration is successful.
    # Display the interface information of Device A.
    [~DeviceA] display ipv6 interface GigabitEthernet 0/1/0
    GigabitEthernet0/1/0 current state : UP
    IPv6 protocol current state : UP
    link-local address is FE80::C964:0:B8B6:1
      Global unicast address(es):
        2001:db8::1, subnet is 2001:db8::/32
      Joined group address(es):
        FF02::1:FF00:1
        FF02::1:FFB6:1
        FF02::2
        FF02::1
      MTU is 4470 bytes
      ND DAD is enabled, number of DAD attempts: 1
      ND reachable time is 30000 milliseconds
      ND retransmit interval is 1000 milliseconds
      Hosts use stateless autoconfig for addresses
    # Display the interface information of Device B.
    [~DeviceB] display ipv6 interface GigabitEthernet 0/1/0
    GigabitEthernet0/1/0 current state : UP
    IPv6 protocol current state : UP
    link-local address is FE80::2D6F:0:7AF3:1
      Global unicast address(es):
        2001:db8::2, subnet is 2001:db8::/32
      Joined group address(es):
        FF02::1:FF00:2
        FF02::1:FFF3:1
        FF02::2
        FF02::1
      MTU is 4470 bytes
      ND DAD is enabled, number of DAD attempts: 1
      ND reachable time is 30000 milliseconds
      ND retransmit interval is 1000 milliseconds
      Hosts use stateless autoconfig for addresses
    # Ping the link-local address of Device B from Device A. Note that you need to use the parameter -i to specify the interface corresponding to the link-local address.
    [~DeviceA] ping ipv6 fe80::2d6f:0:7af3:1 -i GigabitEthernet 0/1/0
      PING FE80::2D6F:0:7AF3:1 : 56  data bytes, press CTRL_C to break
        Reply from FE80::2D6F:0:7AF3:1
        bytes=56 Sequence=1 hop limit=64  time = 60 ms
        Reply from FE80::2D6F:0:7AF3:1
        bytes=56 Sequence=2 hop limit=64  time = 50 ms
        Reply from FE80::2D6F:0:7AF3:1
        bytes=56 Sequence=3 hop limit=64  time = 50 ms
        Reply from FE80::2D6F:0:7AF3:1
        bytes=56 Sequence=4 hop limit=64  time = 30 ms
        Reply from FE80::2D6F:0:7AF3:1
        bytes=56 Sequence=5 hop limit=64  time = 1 ms
    
    
      --- FE80::2D6F:0:7AF3:1 ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 1/38/60 ms
    # Ping the global unicast IPv6 address of Device B from Device A.
    [~DeviceA] ping ipv6 2001:db8::2
      PING 2001:db8::2 : 56  data bytes, press CTRL_C to break
        Reply from 2001:db8::2
        bytes=56 Sequence=1 hop limit=64  time = 30 ms
        Reply from 2001:db8::2
        bytes=56 Sequence=2 hop limit=64  time = 50 ms
        Reply from 2001:db8::2
        bytes=56 Sequence=3 hop limit=64  time = 50 ms
        Reply from 2001:db8::2
        bytes=56 Sequence=4 hop limit=64  time = 20 ms
        Reply from 2001:db8::2
        bytes=56 Sequence=5 hop limit=64  time = 40 ms
    
    
      --- 2001:db8::2 ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 20/38/50 ms

Configuration Files

  • Device A configuration file
    #
     sysname DeviceA
    #
    admin
    interface GigabitEthernet0/1/0
    undo shutdown
    ipv6 enable
    ipv6 address 2001:db8::1/32
    #
    return
  • Device B configuration file
    #
     sysname DeviceB
    #
    admin
    interface GigabitEthernet0/1/0
    undo shutdown
    ipv6 enable
    ipv6 address 2001:db8::2/32
    #
    return