Example for Configuring an Automatic IPv6 over IPv4 Tunnel
Networking Requirements
As shown in Figure 11-16, two IPv6 networks connect to an IPv4 backbone network through RouterA and RouterB respectively. An automatic IPv6 over IPv4 tunnel needs to be set up between RouterA and RouterB so that devices on the two IPv6 networks can communicate.
Configuration Roadmap
The configuration roadmap is as follows:
Configure IP addresses for physical interfaces so that devices can communicate on the IPv4 backbone network.
Configure IPv6 addresses and source interfaces for tunnel interfaces so that devices can communicate with hosts on the two IPv6 networks.
Set the tunnel protocol to automatic so that hosts on the two IPv6 networks can communicate through the IPv4 network.
Procedure
- Configure RouterA.
# Configure an IPv4/IPv6 dual stack.
<Huawei> system-view
[Huawei] sysname RouterA
[RouterA] ipv6
[RouterA] interface gigabitethernet 1/0/0
[RouterA-GigabitEthernet1/0/0] ip address 2.1.1.1 255.0.0.0
[RouterA-GigabitEthernet1/0/0] quit
# Configure an automatic IPv6 over IPv4 tunnel.
[RouterA] interface tunnel 0/0/1
[RouterA-Tunnel0/0/1] tunnel-protocol ipv6-ipv4 auto-tunnel
[RouterA-Tunnel0/0/1] ipv6 enable
[RouterA-Tunnel0/0/1] ipv6 address ::2.1.1.1/96
[RouterA-Tunnel0/0/1] source gigabitethernet 1/0/0
[RouterA-Tunnel0/0/1] quit
- Configure RouterB.
# Configure an IPv4/IPv6 dual stack.
<Huawei> system-view
[Huawei] sysname RouterB
[RouterB] ipv6
[RouterB] interface gigabitethernet 1/0/0
[RouterB-GigabitEthernet1/0/0] ip address 2.1.1.2 255.0.0.0
[RouterB-GigabitEthernet1/0/0] quit
# Configure an automatic IPv6 over IPv4 tunnel.
[RouterB] interface tunnel 0/0/1
[RouterB-Tunnel0/0/1] tunnel-protocol ipv6-ipv4 auto-tunnel
[RouterB-Tunnel0/0/1] ipv6 enable
[RouterB-Tunnel0/0/1] ipv6 address ::2.1.1.2/96
[RouterB-Tunnel0/0/1] source gigabitethernet 1/0/0
[RouterB-Tunnel0/0/1] quit
- Verify the configuration.
# View the IPv6 status of tunnel0/0/1 on RouterA. You can see that the tunnel status is Up.
[RouterA] display ipv6 interface tunnel 0/0/1
Tunnel0/0/1 current state : UP
IPv6 protocol current state : UP
IPv6 is enabled, link-local address is FE80::201:101
Global unicast address(es):
::2.1.1.1, subnet is ::/96
Joined group address(es):
FF02::1:FF01:101
FF02::2
FF02::1
MTU is 1500 bytes
ND reachable time is 30000 milliseconds
ND retransmit interval is 1000 milliseconds
# Ping the IPv6 address of the peer device that is compatible with the IPv4 address from RouterA. The IPv6 address is pinged successfully.
[RouterA] ping ipv6 ::2.1.1.2
PING ::2.1.1.2 : 56 data bytes, press CTRL_C to break
Reply from ::2.1.1.2
bytes=56 Sequence=1 hop limit=64 time = 30 ms
Reply from ::2.1.1.2
bytes=56 Sequence=2 hop limit=64 time = 40 ms
Reply from ::2.1.1.2
bytes=56 Sequence=3 hop limit=64 time = 50 ms
Reply from ::2.1.1.2
bytes=56 Sequence=4 hop limit=64 time = 1 ms
Reply from ::2.1.1.2
bytes=56 Sequence=5 hop limit=64 time = 50 ms
--- ::2.1.1.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 1/34/50 ms
Configuration Files
Configuration file of RouterA
# sysname RouterA # ipv6 # interface GigabitEthernet1/0/0 ip address 2.1.1.1 255.0.0.0 # interface Tunnel 0/0/1 ipv6 enable ipv6 address ::2.1.1.1/96 tunnel-protocol ipv6-ipv4 auto-tunnel source GigabitEthernet1/0/0 # return
Configuration file of RouterB
# sysname RouterB # ipv6 # interface GigabitEthernet1/0/0 ip address 2.1.1.2 255.0.0.0 # interface Tunnel 0/0/1 ipv6 enable ipv6 address ::2.1.1.2/96 tunnel-protocol ipv6-ipv4 auto-tunnel source GigabitEthernet1/0/0 # return