interface is a generic tunnelling device for IPv4 and IPv6.
It can tunnel IPv traffic over IPv.
Therefore, there can be four possible configurations.
The behavior of
is mainly based on RFC2893 IPv6-over-IPv4 configured tunnel.
can also tunnel ISO traffic over IPv using EON encapsulation.
does not perform GRE encapsulation; use
for GRE encapsulation.
interface is created at runtime using interface cloning.
most easily done with the
command or using the
ifconfig_ Aq interface
the administrator needs to configure the protocol and addresses used for the outer
This can be done by using
The administrator also needs to configure the protocol and addresses for the
inner header, with
Note that IPv6 link-local addresses
(those that start with
will be automatically configured whenever possible.
You may need to remove IPv6 link-local addresses manually using
if you want to disable the use of IPv6 as the inner header
(for example, if you need a pure IPv4-over-IPv6 tunnel).
Finally, you must modify the routing table to route the packets through the
device can be configured to be ECN friendly.
This can be configured by
ECN friendly behavior
device can be configured to be ECN friendly, as described in
This is turned off by default, and can be turned on by the
will show normal behavior, as described in RFC2893.
This can be summarized as follows:
Set outer TOS bit to
Drop outer TOS bit.
will copy ECN bits
on IPv4 TOS byte or IPv6 traffic class byte)
on egress and ingress, as follows:
Copy TOS bits except for ECN CE
inner to outer.
Set ECN CE bit to
Use inner TOS bits with some change.
If outer ECN CE bit is
enable ECN CE bit on the inner.
Note that the ECN friendly behavior violates RFC2893.
This should be used in mutual agreement with the peer.
A malicious party may try to circumvent security filters by using
For better protection,
performs both martian and ingress filtering against the outer source address
Note that martian/ingress filters are in no way complete.
You may want to secure your node by using packet filters.
Ingress filtering can break tunnel operation in an asymmetrically
It can be turned off by
Processing each packet requires two route lookups: first on the
packet itself, and second on the tunnel destination.
This second route can be cached, increasing tunnel performance.
However, in a dynamically routed network, the tunnel will stick
to the cached route, ignoring routing table updates.
Route caching can be enabled with the
tunnels may not be nested.
This behavior may be modified at runtime by setting the
to the desired level of nesting.
tunnels are restricted to one per pair of end points.
Parallel tunnels may be enabled by setting the
David L. Black
K. K. Ramakrishnan
"IPsec Interactions with ECN"
device first appeared in the WIDE hydrangea IPv6 kit.
There are many tunnelling protocol specifications, all
defined differently from each other.
device may not interoperate with peers which are based on different specifications,
and are picky about outer header fields.
For example, you cannot usually use
to talk with IPsec devices that use IPsec tunnel mode.
The current code does not check if the ingress address
(outer source address)
configured in the
interface makes sense.
Make sure to specify an address which belongs to your node.
Otherwise, your node will not be able to receive packets from the peer,
and it will generate packets with a spoofed source address.
If the outer protocol is IPv4,
does not try to perform path MTU discovery for the encapsulated packet
(DF bit is set to 0).
If the outer protocol is IPv6, path MTU discovery for encapsulated packets
may affect communication over the interface.
The first bigger-than-pmtu packet may be lost.
To avoid the problem, you may want to set the interface MTU for
to 1240 or smaller, when the outer header is IPv6 and the inner header is IPv4.
device does not translate ICMP messages for the outer header into the inner header.
In the past,
had a multi-destination behavior, configurable via
The behavior is obsolete and is no longer supported.