Example for Configuring 6to4 Relay
Networking Requirements
As shown in Figure 11-17, the IPv6 network-side interface of 6to4 router RouterA connects to a 6to4 network. RouterB is a 6to4 relay agent and connects to the IPv6 Internet (2001::/64). RouterA and RouterB are connected through an IPv4 backbone network. A 6to4 tunnel needs to be set up between RouterA and RouterB so that hosts on the 6to4 network and the IPv6 network can communicate.
Configuration Roadmap
The configuration roadmap is as follows:
Configure an IPv4/IPv6 dual stack on routers so that they can access the IPv4 network and the IPv6 network.
Configure a 6to4 tunnel on routers to connect IPv6 networks through the IPv4 backbone network.
Configure a static route between RouterA and RouterB so that they can communicate through the IPv4 backbone 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
[RouterA] interface gigabitethernet 2/0/0
[RouterA-GigabitEthernet2/0/0] ipv6 enable
[RouterA-GigabitEthernet2/0/0] ipv6 address 2002:0201:0101:1::1/64
[RouterA-GigabitEthernet2/0/0] quit
# Configure a 6to4 tunnel.
[RouterA] interface tunnel 0/0/1
[RouterA-Tunnel0/0/1] tunnel-protocol ipv6-ipv4 6to4
[RouterA-Tunnel0/0/1] ipv6 enable
[RouterA-Tunnel0/0/1] ipv6 address 2002:0201:0101::1/64
[RouterA-Tunnel0/0/1] source gigabitethernet 1/0/0
[RouterA-Tunnel0/0/1] quit
# Configure a static route to 2002::/16.
[RouterA] ipv6 route-static 2002:: 16 tunnel 0/0/1
# Configure a default route to the IPv6 network.
[RouterA] ipv6 route-static :: 0 2002:0201:0102::1
- 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
[RouterB] interface gigabitethernet 2/0/0
[RouterB-GigabitEthernet2/0/0] ipv6 enable
[RouterB-GigabitEthernet2/0/0] ipv6 address 2001::1/64
[RouterB-GigabitEthernet2/0/0] quit
# Configure a 6to4 tunnel.
[RouterB] interface tunnel 0/0/1
[RouterB-Tunnel0/0/1] tunnel-protocol ipv6-ipv4 6to4
[RouterB-Tunnel0/0/1] ipv6 enable
[RouterB-Tunnel0/0/1] ipv6 address 2002:0201:0102::1/64
[RouterB-Tunnel0/0/1] source gigabitethernet 1/0/0
[RouterB-Tunnel0/0/1] quit
# Configure a static route to 2002::/16.
[RouterB] ipv6 route-static 2002:: 16 tunnel 0/0/1
- Verify the configuration.
# Ping the IPv6 address of GE2/0/0 on RouterB from RouterA. The IPv6 address is pinged successfully.
[RouterA] 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 = 29 ms
Reply from 2001::1
bytes=56 Sequence=2 hop limit=64 time = 5 ms
Reply from 2001::1
bytes=56 Sequence=3 hop limit=64 time = 5 ms
Reply from 2001::1
bytes=56 Sequence=4 hop limit=64 time = 5 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 = 5/14/29 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 GigabitEthernet2/0/0
ipv6 enable
ipv6 address 2002:201:101:1::1/64
#
interface Tunnel 0/0/1
ipv6 enable
ipv6 address 2002:201:101::1/64
tunnel-protocol ipv6-ipv4 6to4
source GigabitEthernet1/0/0
#
ipv6 route-static :: 0 2002:201:102::1
#
ipv6 route-static 2002:: 16 Tunnel 0/0/1
#
return
Configuration file of RouterB
#
sysname RouterB
#
ipv6
#
interface GigabitEthernet1/0/0
ip address 2.1.1.2 255.0.0.0
#
interface GigabitEthernet2/0/0
ipv6 enable
ipv6 address 2001::1/64
#
interface Tunnel 0/0/1
ipv6 enable
ipv6 address 2002:201:102::1/64
tunnel-protocol ipv6-ipv4 6to4
source GigabitEthernet1/0/0
#
ipv6 route-static 2002:: 16 Tunnel 0/0/1
#
return