To configure an IPv4 over IPv6 tunnel, configure source and destination IPv6 addresses for the tunnel on the devices at both ends of the tunnel. Hosts on different IPv4 networks can communicate through the IPv4 over IPv6 tunnel.
As shown in Figure 1, FW_A and FW_B support the IPv6/IPv4 dual stack and both connect to the IPv4 and the IPv6 networks. FW_A is routable to FW_B on the IPv6 network. An IPv4 over IPv6 tunnel is required between FW_A and FW_B to enable hosts on two IPv4 networks to communicate.
The configuration roadmap is as follows:
You must configure an address and a gateway for each PC. The methods for configuring addresses and routes for PCs vary according to the operating systems of the PCs.
After you complete the preceding configurations, view the tunnel interface on FW_A and FW_B. The protocol status of each tunnel interface is UP.
[FW_B] display interface tunnel 1 Tunnel1 current state : UP Line protocol current state : UP Last line protocol up time : 2012-11-17 10:53:58 UTC+08:00 Description: Tunnel1 Interface Route Port,The Maximum Transmit Unit is 1452 Internet Address is 10.1.1.1/24 Encapsulation is TUNNEL1, loopback not set Tunnel Source 2001::2 (GigabitEthernet0/0/2) Tunnel Destination 2001::1 Encapsulation limit 1 Tunnel Traffic class not set Tunnel Flow label not set Tunnel Hop limit 64
Configure PC1 to ping PC2.
C:\Documents and Settings\Administrator>ping 10.1.3.2
Pinging 10.1.3.2 with 32 bytes of data:
Reply from 10.1.3.2: bytes=32 time=1ms TTL=128
Reply from 10.1.3.2: bytes=32 time=39ms TTL=128
Reply from 10.1.3.2: bytes=32 time=1ms TTL=128
Reply from 10.1.3.2: bytes=32 time=1ms TTL=128
Ping statistics for 10.1.3.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 39ms, Average = 10ms
If the ping operation succeeds, the IPv4 over IPv6 tunnel configuration is correct.
Configuration script of FW_A
# sysname FW_A # ipv6 # interface GigabitEthernet0/0/2 ipv6 enable ipv6 address 2001::1 64 # interface GigabitEthernet0/0/1 ip address 10.1.2.1 255.255.255.0 # interface Tunnel 1 tunnel-protocol ipv4-ipv6 source 2001::1 destination 2001::2 ip address 10.1.1.1 255.255.255.0 # firewall zone trust add interface GigabitEthernet0/0/1 # firewall zone untrust add interface GigabitEthernet0/0/2 add interface tunnel1 # ip route-static 10.1.3.0 255.255.255.0 tunnel 1 # security-policy rule name policy1 source-zone trust source-zone untrust destination-zone trust destination-zone untrust action permit rule name policy2 source-zone local source-zone untrust destination-zone local destination-zone untrust action permit # return
Configuration script of FW_B
# sysname FW_B # ipv6 # interface GigabitEthernet0/0/2 ipv6 enable ipv6 address 2001::2 64 # interface GigabitEthernet0/0/1 ip address 10.1.3.1 255.255.255.0 # interface Tunnel 1 tunnel-protocol ipv4-ipv6 source 2001::2 destination 2001::1 ip address 10.1.1.2 255.255.255.0 # firewall zone trust add interface GigabitEthernet0/0/1 # firewall zone untrust add interface GigabitEthernet0/0/2 add interface tunnel1 # ip route-static 10.1.2.0 255.255.255.0 tunnel 1 # security-policy rule name policy1 source-zone trust source-zone untrust destination-zone trust destination-zone untrust action permit rule name policy2 source-zone local source-zone untrust destination-zone local destination-zone untrust action permit # return