ifcfg-tunnel

Langue: en

Version: August 2004 (openSuse - 09/10/07)

Section: 5 (Format de fichier)

NAME

ifcfg-tunnel - network tunnel interface configuration

SYNOPSIS

/etc/sysconfig/network/ifcfg-gre*
/etc/sysconfig/network/ifcfg-ipip*
/etc/sysconfig/network/ifcfg-sit*

Tunnel interfaces

It is possible to create tunnel interfaces for three different protocols: SIT (IPv6 over IPv4 tunnel), GRE (universal IPv4 tunnel) and IPIP (IPv4 over IPv4 tunnel). Since there is not yet a YaST2 support for creating tunnels one must write appropriate config files by hand for now.

These new variables are to be used in tunnel config files:

TUNNEL
Here you have to set the tunnel protocol. This may be "sit" for IPv6 over IPv4 tunnel, "gre" for universal IPv4 tunnel and "ipip" for IPv4 over IPv4 tunnel.
TUNNEL_LOCAL_IPADDR or TUNNEL_LOCAL_INTERFACE
The address of the local tunnel's end could be directly specified in TUNNEL_LOCAL_IPADDR variable. If TUNNEL_LOCAL_IPADDR is empty the first ipv4 address from the interface given in the variable TUNNEL_LOCAL_INTERFACE will be used.
TUNNEL_REMOTE_IPADDR
TUNNEL_TTL
Specify the Time To Life of the packet which carries the tunneled data. Usually it is set to 64 but in some circumstances you may want do use something else between 1 and 255. Special value is "inherit" in which case the TTL is copied from the inner (tunneled) packet. This is also the default if the TTL variable wasn't used.
TUNNEL_OPTIONS
Here you may set additional options for the command ip tunnel add

Examples for tunnel configurations

This are some generic examples for different tunnel types. Replace the shown addresses and interface names by your individual ones. As configuration names you may choose the interface names.
GRE and IPIP tunnels
Create a GRE tunnel between a local computer with IP address 192.168.1.2 and a remote computer with IP address 172.16.2.3. After the tunnel is created assign an IP address 10.20.30.40 to it's local end. Default filename: ifcfg-gre0

   STARTMODE='onboot'

   BOOTPROTO='static'

   TUNNEL='gre'

   TUNNEL_LOCAL_IPADDR='192.168.1.2'

   TUNNEL_REMOTE_IPADDR='172.16.2.3'

   IPADDR='10.20.30.40'

   TUNNEL_TTL='64'

IPIP tunnel is created in exactly the same way, except that the variable TUNNEL has to be set to "ipip" in this case. Use filename ifcfg-ipip0 in this case.

SIT tunnels for IPv6 over IPv4
There are two modes in which SIT tunnels may operate: static and 6to4

To create a "static" tunnel one needs to know an IPv4 address of the remote end, while for a "6to4" tunnel the remote end is a "6to4 relay". These relays are usually public and could be reached either under their respective IPv4 address or under a unique IPv4 anycast address 192.88.99.1 (as defined in RFC 3068).

This typical config file for a 6to4 tunnel should fit most user's needs and the only required change is the external interface name. Default filename: ifcfg-sit1


   STARTMODE='onboot'

   BOOTPROTO='6to4'

   TUNNEL='sit'

   TUNNEL_LOCAL_INTERFACE='eth0'

   TUNNEL_TTL='64'

Additionally you need to set some routes. Do that in a file called ifroute-<configname> with the same configname as in ifcfg-<configname>. Default filename: ifroute-sit1 It may look like this:

   2000::/3  2002:c058:6301::1  -  -  -  metric 1

The magic string 2002:c058:6301::1 is a 6to4 version of the anycast IPv4 address 192.88.99.1.

To create a "static" tunnel with local IPv6 address 3ffe:ffff::1234/64 use a config file like this: Default filename: ifcfg-sit1


   STARTMODE='onboot'

   BOOTPROTO='static'

   TUNNEL='sit'

   TUNNEL_LOCAL_IPADDR='192.168.1.2'

   TUNNEL_REMOTE_IPADDR='172.16.2.3'

   IPADDR='3ffe:ffff::1234/64'

   TUNNEL_TTL='64'

BUGS

Please report bugs at <http://www.suse.de/feedback>

AUTHOR


Christian Zoz <zoz@suse.de> -- ifup script

Michal Svec <msvec@suse.cz> -- ifup script

Bjoern Jacke -- ifup script

Mads Martin Joergensen <mmj@suse.de> -- ifup manpage 

Michal Ludvig <mludvig@suse.cz> -- tunnel support

SEE ALSO

ifcfg(5), ifup(8).