To configure a static IPv6 tunnel interface, use the
tunnel mode ipv6ip
command in interface configuration mode. To remove a static IPv6 tunnel interface, use the
no form of this command.
tunnel mode ipv6ip [6rd | 6to4 | auto-tunnel | isatap]
no tunnel mode ipv6ip
Syntax Description
6rd
|
(Optional) Specifies that the tunnel is to be used for IPv6 rapid deployment (6RD).
|
6to4
|
(Optional) Configures an IPv6 automatic tunnel using a destination address that is dynamically constructed from an IPv4 address
and the prefix 2002::/16 (referred to as a 6to4 address).
|
auto-tunnel
|
(Optional) Configures an IPv6 automatic tunnel using an IPv4-compatible IPv6 address.
|
isatap
|
(Optional) Configures an IPv6 automatic tunnel using Intra-Site Automatic Tunnel Addressing Protocol (ISATAP) to connect
IPv6 nodes (hosts and routers) within IPv4 networks.
|
Command Default
Static IPv6 tunnel interfaces are not configured.
Command Modes
Interface configuration (config-if)
Command History
Release
|
Modification
|
12.2(2)T
|
This command was introduced.
|
12.0(21)ST
|
This command was integrated into Cisco IOS Release 12.0(21)ST.
|
12.0(22)S
|
This command was integrated into Cisco IOS Release 12.0(22)S.
|
12.2(14)S
|
This command was modified. The
isatap keyword was added to support the addition of ISATAP tunnel implementation.
|
12.2(28)SB
|
This command was integrated into Cisco IOS Release 12.2(28)SB.
|
12.2(25)SG
|
This command was integrated into Cisco IOS Release 12.2(25)SG.
|
12.2(33)SRA
|
This command was integrated into Cisco IOS Release 12.2(33)SRA.
|
12.2(33)SXH
|
This command was integrated into Cisco IOS Release 12.2(33)SXH.
|
Cisco IOS XE Release 2.1
|
This command was integrated into Cisco IOS XE Release 2.1.
|
Cisco IOS XE Release 3.1S
|
This command was modified. The
6rd keyword was added. The
auto-tunnel keyword was deprecated on Cisco ASR 1000 series routers.
|
15.1(3)T
|
This command was modified. The 6rd keyword was added.
|
15.1SY
|
This command was integrated into Cisco IOS Release 15.1SY. The
auto-tunnel keyword was deprecated.
|
Cisco IOS XE Release 3.2SE
|
This command was integrated into Cisco IOS XE Release 3.2SE.
|
Usage Guidelines
IPv6 tunneling is the encapsulation of IPv6 packets within IPv4 packets and transmitting the packets across an IPv4 routing
infrastructure.
Manually Configured Tunnels
The
tunnel
mode
ipv6ip command configures an IPv6 tunnel. The devices at each end of the IPv6 tunnel must support both IPv4 and IPv6 protocol stacks.
To use this command, you must first manually configure the following:
-
An IPv6 address on the tunnel interface
-
An IPv4 address as the tunnel source
-
An IPv4 address as the tunnel destination
Automatic Determination of Tunnel Destination
The
tunnel
mode
ipv6ip
auto-tunnel command configures an automatic IPv6 tunnel. The tunnel source is manually configured. The tunnel destination is automatically
determined as the low-order 32 bits of the IPv4-compatible IPv6 addresses. An IPv4-compatible IPv6 address is a 128-bit IPv6
address that contains the IPv6 prefix 0:0:0:0:0:0 in the high-order 96 bits of the address and an IPv4 address in the low-order
32 bits of the address. The devices at each end of the automatic tunnel must support both IPv4 and IPv6 protocol stacks.
6to4 Tunnels
The
tunnel
mode
ipv6ip
6to4 command configures an automatic 6to4 tunnel where the tunnel endpoint is determined by a globally unique IPv4 address embedded
into a 6to4 address. A 6to4 address is a combination of the prefix 2002::/16 and a globally unique 32-bit IPv4 address. (IPv4-compatible
addresses are not used in 6to4 tunneling.) The unique IPv4 address is used as the network-layer address in the 6to4 address
prefix. The source of the tunnel is an interface that you can manually configure using the
tunnel
source command. The border devices at each end of a 6to4 tunnel must support both IPv4 and IPv6 protocol stacks. Additionally, the
traffic that is destined for the network with the 6to4 address prefix must be routed over the tunnel by using the
ipv6
route command.
6RD Tunnels
The
tunnel
mode
ipv6ip
6rd command specifies that the tunnel is to be used for IPv6 RD. The 6RD feature is similar to the 6to4 tunnel feature, but it
does not require addresses to have a 2002::/16 prefix. It also does not require that all 32 bits of the IPv4 destination be
in the IPv6 payload header.
ISATAP Tunnels
ISATAP tunnels enable the transportation of IPv6 packets within network boundaries. ISATAP tunnels allow individual IPv4
or IPv6 dual-stack hosts within a site to connect to an IPv6 network using the IPv4 infrastructure.
Unlike IPv4-compatible addresses, ISATAP IPv6 addresses can use any initial unicast /64 prefix. The last 64 bits are used
as the interface identifier. Of these, the first 32 bits are the fixed pattern 0000:5EFE. The last 32 bits carry the tunnel
endpoint IPv4 address.
Examples
The following example shows how to configure a manual IPv6 tunnel. In this example, tunnel interface 0 is manually configured
with a global IPv6 address. The tunnel source and destination are also manually configured.
Device(config)# interface tunnel 0
Device(config-if)# ipv6 address 3ffe:b00:c18:1::3/127
Device(config-if)# tunnel source ethernet 0
Device(config-if)# tunnel destination 192.168.30.1
Device(config-if)# tunnel mode ipv6ip
Device(config-if)# end
Examples
The following example shows how to configure an automatic IPv6 tunnel that uses Ethernet interface 0 as the tunnel source.
The tunnel destination is determined automatically as the low-order 32 bits of an IPv4-compatible IPv6 address.
Device(config)# interface tunnel 0
Device(config-if)# no ip address
Device(config-if)# tunnel source ethernet 0
Device(config-if)# tunnel mode ipv6ip auto-tunnel
Device(config-if)# end
Examples
The following example shows how to configure a 6to4 tunnel. In this example, Ethernet interface 0 is configured with an IPv4
address 192.168.99.1. The site-specific 48-bit prefix 2002:c0a8:630 is constructed by prepending the prefix 2002::/16 to the
IPv4 address 192.168.99.1.
The tunnel interface 0 is configured without an IPv4 or IPv6 address. The tunnel source address is configured manually as
Ethernet interface 0. The tunnel destination address is automatically constructed. An IPv6 static route is configured to route
traffic that is destined for network 2002::/16 over tunnel interface 0.
Device(config)# interface ethernet 0
Device(config-if)# ip address 192.168.99.1 255.255.255.0
Device(config-if)# ipv6 address 2002:c0a8:6301:1::/64 eui-64
Device(config-if)# exit
Device(config)# interface tunnel 0
Device(config-if)# no ip address
Device(config-if)# ipv6 unnumbered ethernet 0
Device(config-if)# tunnel source ethernet 0
Device(config-if)# tunnel mode ipv6ip 6to4
Device(config-if)# exit
Device(config)# ipv6 route 2002::/16 tunnel 0
Device(config)# end
Examples
When a tunnel interface is configured using the
ipv6
unnumbered ,
tunnel
source , and
tunnel
mode
ipv6ip
commands, the tunnel uses the first IPv6 address configured on the source interface as its IPv6 address. For 6to4 tunnels,
the first IPv6 address configured on the source interface must be a 6to4 address. In the following example, the first IPv6
address configured for Ethernet interface 0 (6to4 address 2002:c0a8:6301:1::/64) is used as the IPv6 address of tunnel 0:
Device(config)# interface tunnel 0
Device(config-if)# ipv6 unnumbered ethernet 0
Device(config-if)# tunnel source ethernet 0
Device(config-if)# tunnel mode ipv6ip 6to4
Device(config-if)# exit
Device(config)# interface ethernet 0
Device(config-if)# ipv6 address 2002:c0a8:6301:1::/64 eui-64
Device(config-if)# ipv6 address 3ffe:1234:5678::1/64
Device(config-if)# end
Examples
The following example shows how to configure a 6RD tunnel:
Device(config)# interface Tunnel1
Device(config-if)# ipv6 address 2001:B000:100::1/32
Device(config-if)# tunnel source GigabitEthernet2/0/0
Device(config-if)# tunnel mode ipv6ip 6rd
Device(config-if)# tunnel 6rd prefix 2001:B000::/32
Device(config-if)# tunnel 6rd ipv4 prefix-len 16 suffix-len 8
Device(config-if)# end
Device# show tunnel 6rd Tunnel1
Interface Tunnel1:
Tunnel Source: 10.1.1.1
6RD: Operational, V6 Prefix: 2001:B000::/32
V4 Common Prefix Length: 16, Value: 10.1.0.0
V4 Common Suffix Length: 8, Value: 0.0.0.1
Examples
The following example shows how to configure ISATAP tunnel over an Ethernet interface 0. Router advertisements are enabled
to allow client autoconfiguration.
Device(config)# interface Ethernet 0
Device(config-if)# ip address 10.1.1.1 255.255.255.0
Device(config)# interface Tunnel 0
Device(config-if)# tunnel source ethernet 0
Device(config-if)# tunnel mode ipv6ip isatap
Device(config-if)# ipv6 address 2001:0DB8::/64 eui-64
Device(config-if)# no ipv6 nd ra suppress
Device(config-if)# end