FINALLY! (was: IPIP Tunneling)

George Bonser (grep@shorelink.com)
Wed, 1 Sep 1999 02:19:05 -0700 (PDT)


I got it working, finally.

All documentation that I have seen is incorrect!

You must work around a couple of kernel bugs.

Forget the new ip tools for now, it works better for me using the old
tools.

GIVEN:

Main Router

192.168.50.254 Eth1 netmask 255.255.255.0
172.16.0.254 Eth2 netmask 255.255.0.0

Remote Macine

192.168.50.113 Eth0 netmask 255.255.255.0
10.1.1.1 Dummy0 netmask 255.0.0.0

Dummy0 is pretending to be an additional interface on the second machine
in this case.

On Main Router

insmod ipip
route add -host 192.168.50.113 eth1
ifconfig tunl0 172.16.0.254 pointopoint 192.168.50.113

you will now discover a 192.168.0.0 netmask 255.255.0.0 route
installed on tunl0 ... do not delete it yet! The kernel picks up
the netmask of the 172.16.0.254 interface and auto-adds a 192.168.0.0
route using that netmask.

route add -net 10.0.0.0 netmask 255.0.0.0 gw 192.168.50.113 tunl0

now delete the bogus route

route del -net 192.168.0.0 netmask 255.255.0.0

On the remote machine:

insmod ipip
route add -host 192.168.50.254 eth0
ifconfig tunl0 10.1.1.1 pointopoint 192.168.50.254
(bogus 192.0.0.0/255.0.0.0 route added by kernel)
route add -net 172.16.0.0 netmask 255.255.0.0 gw 192.168.50.254 tunl0
route del -net 192.0.0.0 netmask 255.0.0.0

WHEW!

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/