Linux-Hams archive - March 1997: Re: How do I use ip-tunnel?

Re: How do I use ip-tunnel?

Terry Dawson (igmfvnk@kajak.fi)
Fri, 07 Mar 1997 08:32:17 +1100


Joop Stakenborg wrote:

> Hi, thanks for reading.
> I am trying to set up the kernel tunnel driver to be able to
> reach another host which is normally not reachable by me.
> For clarity I have replaced ip-numbers with host names [between brackets].
> Here is the setup:

Joop,

> insmod ipip.o
> insmod new_tunnel.o

> Then the driver is configured with ifconfig:
>
> ifconfig tunl0 [pa3aba] pointopoint [pe1lxx]
> # here an scc port is attached too, called sl0

Why have you configured the pointopoint address ?
The original tunnel device, which allowed only one encap route
per tunnel device used the pointopoint parameter to specify
the end point for the route, the new one uses the 'gw' field
in the routing table, allowing multiple routes per tunl* device.

We use something like:

ifconfig tunl0 our.addr.ampr.org up
route add -net ampr.dest1.ampr.org netmask xxx.xxx.xxx.xxx gw
dest.real.addr1 tunl0
route add -net ampr.dest2.ampr.org netmask xxx.xxx.xxx.xxx gw
dest.real.addr2 tunl0
route add -net ampr.dest3.ampr.org netmask xxx.xxx.xxx.xxx gw
dest.real.addr3 tunl0
etc.

> The other host, pe1lxx has the tunnel stuff compiled in and
> only has one line to set up his stuff:
>
> ifconfig tunl0 [pe1lxx]

The other host, presuming it is intended to be a 'slave' to your
machine would require:

ifconfig tunl0 pe1lxx
route add -net 44.0.0.0 netmask 255.0.0.0 gw your.real.addr tunl0

> The setup works OK for a while, but after some time, half an hour
> or so and sometimes less, pe1lxx will get kernel panics and
> his system will even crash sometimes.
> Can anyone see if this is setup OK?
> Maybe I forgot something?

Ours has been running absolutely solidly with something in the order of:

$ /sbin/route -n | wc -l
537

routes configured on a 386sx16/4M with uptimes interrupted only by
kernel upgrades. We currently run linux-2.0.29+module12.

The configuration we use is pretty much documented in the AX25-HOWTO
as an example near the end.

regards
Terry