Configuration procedure

To configure a GRE over IPv6 tunnel:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enable the IPv6 packet forwarding function.

ipv6

Disabled by default.

3. Create a tunnel interface and enter tunnel interface view.

interface tunnel interface-number

By default, there is no tunnel interface on a device.

4. Configure an IPv4 address for the tunnel interface.

ip address ip-address { mask | mask-length }

By default, no IPv4 address is configured for a tunnel interface.

5. Set the tunnel mode to GRE over IPv6.

tunnel-protocol gre ipv6

By default, the tunnel is a GRE over IPv4 tunnel.

You must configure the same tunnel mode on both ends of a tunnel. Otherwise, packet delivery will fail.

6. Configure the source address or interface for the tunnel interface.

source { ipv6-address | interface-type interface-number }

By default, no source address or interface is configured for a tunnel interface.

7. Configure the destination address for the tunnel interface.

destination ipv6-address

By default, no destination address is configured for a tunnel interface.

8. Return to system view.

quit

N/A

9. Configure the device to discard the IPv4-compatible IPv6 packets.

tunnel discard ipv4-compatible-packet

Optional.

By default, the device does not discard the IPv4-compatible IPv6 packets.

10. Configure a route for packet forwarding through the tunnel.

See Layer 3—IP Routing Configuration Guide.

Each end of the tunnel must have a route (static or dynamic) through the tunnel to the other end.

For information about commands interface tunnel, tunnel-protocol, source, destination, and tunnel discard ipv4-compatible-packet, see Layer 3—IP Services Command Reference.

For information about tunnel interfaces and related configurations, see "Configuring tunneling."