Hello.

I'm trying to set up a ip tunneling between two networks, and have more or
less run into a dead end as it feels right now.

The setup is like this:

                                                       ISDN router
                                                   ---------------
192.168.2.x/24                 192.168.1.x/24 -----| 192.168.1.2 |---Internet
        |                              |           ---------------
        |                              |
   eth1 |  192.168.2.254          eth1 |  192.168.1.254
  -------------                  -------------
  |           |                  |           |
  |    A      |                  |    B      |
  |           |                  |           |
  -------------                  -------------
        | eth0 10.1.6.4               | eth0 10.1.5.7
        |                             |
        |                             |
        | 10.1.6.0/24                 |
        |        -------------        |10.1.5.0/24
        |        |           |        |
        \--------|     C     |--------/
        10.1.6.1 |           | 10.1.5.1
                 -------------
                       |
                       |
                    Internet


The idea is that network behind router A should use the ISDN router behind
router B for all internet traffic as do the network behind B, but all 
other networks connected to C uses it instead. It would be possible to
solve this using source adress routing or possibly iproute2, but I figured
that it would be easy to set up a tunnel.. Hmm.. 

The configs:

A:
ifconfig lo 127.0.0.1
route add -net 127.0.0.0

/sbin/ifconfig eth0 10.1.6.4 netmask 255.255.255.0 broadcast 10.1.6.255
/sbin/ifconfig eth1 192.168.2.254 netmask 255.255.255.0 broadcast 192.168.2.255

/sbin/route add -net 10.1.5.0 netmask 255.255.255.0 gw 10.1.6.1

####
insmod ipip
ifconfig -a tunl0 192.168.2.254 netmask 255.255.255.255
route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.2.254

route add default gw 192.168.2.254
####

echo "1" >  /proc/sys/net/ipv4/ip_forward



B:
ifconfig lo 127.0.0.1
route add -net 127.0.0.0

/sbin/ifconfig eth0 10.1.5.7 netmask 255.255.255.0 broadcast 10.1.5.255
/sbin/ifconfig eth1 192.168.1.254 netmask 255.255.255.0 broadcast 192.168.1.255

/sbin/route add -net 10.1.6.0 netmask 255.255.255.0 gw 10.1.5.1

/sbin/route add default gw 192.168.1.2

echo "1" >  /proc/sys/net/ipv4/ip_forward

######
insmod ipip
ifconfig -a tunl0 192.168.1.254 netmask 255.255.255.255
route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.1.254
 
#######################################

I have tried lots of different setups, but the most I have acheived is
some errors on the outgoing TX logs on the tunnel. There seems to be
something major I have missed, but all the docs are for 2.0.x kernels, and
that it seems had a very different setup.. 

Any ideas, info or comments would be very welcome.

/Roger Abrahamsson

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to