Example for Configuring a Manual IPv6 over IPv4 Tunnel
Networking Requirements
Figure 11-14 shows two IPv6 networks connected to RouterB on an IPv4 backbone network through RouterA and RouterC respectively. Hosts on the two IPv6 networks are required to communicate through the IPv4 backbone network.
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, source interfaces, and destination addresses for tunnel interfaces so that devices can communicate with hosts on the two IPv6 networks.
Set the tunnel protocol to IPv6-IPv4 so that hosts on the two IPv6 networks can communicate through the IPv4 backbone network.
Procedure
- Configure RouterA.
# Configure an IP address for an interface.
<Huawei>system-view
[Huawei] sysname RouterA
[RouterA] ipv6
[RouterA] interface gigabitethernet 1/0/0
[RouterA-GigabitEthernet1/0/0] undo portswitch
[RouterA-GigabitEthernet1/0/0] ip address 192.168.50.2 255.255.255.0
[RouterA-GigabitEthernet1/0/0] quit
# Set the tunnel protocol to IPv6-IPv4.
[RouterA] interface tunnel 0/0/1
[RouterA-Tunnel0/0/1] tunnel-protocol ipv6-ipv4
# Configure an IPv6 address, a source interface, and a destination address for the tunnel interface.
[RouterA-Tunnel0/0/1] ipv6 enable
[RouterA-Tunnel0/0/1] ipv6 address 2001::1/64
[RouterA-Tunnel0/0/1] source gigabitethernet 1/0/0
[RouterA-Tunnel0/0/1] destination 192.168.51.2
[RouterA-Tunnel0/0/1] quit
# Configure a static route.
[RouterA] ip route-static 192.168.51.2 255.255.255.0 192.168.50.1
- Configure RouterB.
# Configure IP addresses for interfaces.
<Huawei> system-view
[Huawei] sysname RouterB
[RouterB] interface gigabitethernet 1/0/0
[RouterB-GigabitEthernet1/0/0] undo portswitch
[RouterB-GigabitEthernet1/0/0] ip address 192.168.50.1 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 192.168.51.1 255.255.255.0
[RouterB-GigabitEthernet2/0/0] quit
- Configure RouterC.
# Configure an IP address for an interface.
<Huawei> system-view
[Huawei] sysname RouterC
[RouterC] ipv6
[RouterC] interface gigabitethernet 1/0/0
[RouterC-GigabitEthernet1/0/0] undo portswitch
[RouterC-GigabitEthernet1/0/0] ip address 192.168.51.2 255.255.255.0
[RouterC-GigabitEthernet1/0/0] quit
# Set the tunnel protocol to IPv6-IPv4.
[RouterC] interface tunnel 0/0/1
[RouterC-Tunnel0/0/1] tunnel-protocol ipv6-ipv4
# Configure an IPv6 address, a source interface, and a destination address for the tunnel interface.
[RouterC-Tunnel0/0/1] ipv6 enable
[RouterC-Tunnel0/0/1] ipv6 address 2001::2/64
[RouterC-Tunnel0/0/1] source gigabitethernet 1/0/0
[RouterC-Tunnel0/0/1] destination 192.168.50.2
[RouterC-Tunnel0/0/1] quit
# Configure a static route.
[RouterC] ip route-static 192.168.50.2 255.255.255.0 192.168.51.1
- Verify the configuration.
# Ping the IPv4 address of GE1/0/0 on RouterA from RouterC. RouterC can receive a Reply packet from RouterA.
[RouterC] 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=255 time=84 ms
Reply from 192.168.50.2: bytes=56 Sequence=2 ttl=255 time=27 ms
Reply from 192.168.50.2: bytes=56 Sequence=3 ttl=255 time=25 ms
Reply from 192.168.50.2: bytes=56 Sequence=4 ttl=255 time=3 ms
Reply from 192.168.50.2: bytes=56 Sequence=5 ttl=255 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 Tunnel0/0/1 on RouterA from RouterC. RouterC can receive a Reply packet from RouterA.
[RouterC] ping ipv6 2001::1
PING 2001::1 : 56 data bytes, press CTRL_C to break
Reply from 2001::1
bytes=56 Sequence=1 hop limit=64 time = 28 ms
Reply from 2001::1
bytes=56 Sequence=2 hop limit=64 time = 27 ms
Reply from 2001::1
bytes=56 Sequence=3 hop limit=64 time = 26 ms
Reply from 2001::1
bytes=56 Sequence=4 hop limit=64 time = 27 ms
Reply from 2001::1
bytes=56 Sequence=5 hop limit=64 time = 26 ms
--- 2001::1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 26/26/28 ms
Configuration Files
Configuration file of RouterA
# sysname RouterA # ipv6 # interface GigabitEthernet1/0/0 undo portswitch ip address 192.168.50.2 255.255.255.0 # interface Tunnel0/0/1 ipv6 enable ipv6 address 2001::1/64 tunnel-protocol ipv6-ipv4 source GigabitEthernet1/0/0 destination 192.168.51.2 # ip route-static 192.168.51.0 255.255.255.0 192.168.50.1 # return
Configuration file of RouterB
# sysname RouterB # interface GigabitEthernet1/0/0 undo portswitch ip address 192.168.50.1 255.255.255.0 # interface GigabitEthernet2/0/0 undo portswitch ip address 192.168.51.1 255.255.255.0 # return
Configuration file of RouterC
# sysname RouterC # ipv6 # interface GigabitEthernet1/0/0 undo portswitch ip address 192.168.51.2 255.255.255.0 # interface Tunnel0/0/1 ipv6 enable ipv6 address 2001::2/64 tunnel-protocol ipv6-ipv4 source GigabitEthernet1/0/0 destination 192.168.50.2 # ip route-static 192.168.50.0 255.255.255.0 192.168.51.1 # return