315
Step Command Remarks
7. (Optional.) Enable dropping
IPv6 packets that use
IPv4-compatible IPv6
addresses.
tunnel discard
ipv4-compatible-packet
By default, IPv6 packets that use
IPv4-compatible IPv6 packets are not
dropped.
Configuration example
Network requirements
As shown in Figure 130, configure an IPv6 over IPv6 tunnel between Router A and Router B so the
two IPv6 networks can reach each other without disclosing their IPv6 addresses.
Figure 130 Network diagram
Configuration procedure
Make sure Router A and Router B can reach each other through IPv6.
• Configure Router A:
# Specify an IPv6 address for GigabitEthernet 2/0/1.
<RouterA> system-view
[RouterA] interface gigabitethernet 2/0/1
[RouterA-GigabitEthernet2/0/1] ipv6 address 2002:1::1 64
[RouterA-GigabitEthernet2/0/1] quit
# Specify an IPv6 address for Serial 2/1/0, which is the physical interface of the tunnel.
[RouterA] interface serial 2/1/0
[RouterA-Serial2/1/0] ipv6 address 2001::11:1 64
[RouterA-Serial2/1/0] quit
# Create the IPv6 tunnel interface Tunnel 1.
[RouterA] interface tunnel 1 mode ipv6
# Specify an IPv6 address for the tunnel interface.
[RouterA-Tunnel1] ipv6 address 3001::1:1 64
# Specify the IP address of Serial 2/1/0 as the source address for the tunnel interface.
[RouterA-Tunnel1] source 2001::11:1
# Specify the IP address of Serial 2/1/1 on Router B as the destination address for the tunnel
interface.
[RouterA-Tunnel1] destination 2002::22:1
[RouterA-Tunnel1] quit
# Configure a static route destined for the IPv6 network group 2 through the tunnel interface.
[RouterA] ipv6 route-static 2002:3:: 64 tunnel 1
• Configure Router B: