Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Oct 2005 03:47:58 +1000
From:      Bob Hepple <bhepple@freeshell.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: FreeBSD routing
Message-ID:  <20051018034758.7d76401e.bhepple@freeshell.org>
In-Reply-To: <43532C17.6020807@mrburak.net>
References:  <20051015092747.008bf142.bhepple@freeshell.org> <43507EB9.306@cs.tu-berlin.de> <20051015161054.37d56e8b.bhepple@freeshell.org> <43532C17.6020807@mrburak.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 17 Oct 2005 14:44:07 +1000
Richard Burakowski <richard.burakowski@mrburak.net> wrote:

> Bob
> 
> I'm having a hard time imagining how the packets are finding their way 
> back during your linux testing.  How does 2.214 know what to do with the 
> reply when it recieves the echo request from 254.245?  

Well, it has to be taught ... eg with a FreeBSD 2.214 I can do this:
route delete default
route add -net 192.168.254.0 -interface xl0 # !!!
route add default 192.168.254.245
cp /etc/resolv.conf.home /etc/resolv.conf

and I get this:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            192.168.254.245    UGS         0        1    xl0
127.0.0.1          127.0.0.1          UH          0        4    lo0
192.168.2          link#1             UC          0        0    xl0
192.168.2.15       link#1             UHLW        1        0    xl0
192.168.4          192.168.2.15       UGS         0        0    xl0
192.168.254        link#1             UCS         0        0    xl0
192.168.254.245    00:01:29:74:99:c2  UHLW        1       96    xl0   1060

In other words FreeBSD is happy to create a _subnet_ 192.168.254.0/24,
even though it won't create a route to a specific host.

> Was openvpn up 
> during you linux testing and down during your freebsd testing?  

Yes - absolutely although I don't usually bother to provide NAT for the
2.214 access to 2.0

> Can we 
> see your linux routing tables during the various stages?

Yup - here ya go:

bhepple@raita:~/ $ netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
10.1.2.1        0.0.0.0         255.255.255.255 UH        0 0          0 tun0
192.168.2.214   0.0.0.0         255.255.255.255 UH        0 0          0 eth0
192.168.4.0     10.1.2.1        255.255.255.0   UG        0 0          0 tun0
192.168.2.0     10.1.2.1        255.255.255.0   UG        0 0          0 tun0
192.168.0.0     0.0.0.0         255.255.255.0   U         0 0          0 ath0
192.168.254.0   0.0.0.0         255.255.255.0   U         0 0          0 eth0
127.0.0.0       127.0.0.1       255.0.0.0       UG        0 0          0 lo
0.0.0.0         192.168.0.1     0.0.0.0         UG        0 0          0 ath0

tun0 is the openvpn device
ath0 is the wireless connection to the internet
eth0 is the 10baseT network

> 
> Is it possible to preconfigure the servers to your home subnet instead 
> of 192.168.2.214?  or additionally?  it shouldn't cause any dramas if 
> your home subnet dosen't appear at work.
 
Hmmm - not quite sure what you're driving at here. I need to have a sleep
and a think!!

Cheers



Bob



-- 
Bob Hepple
mailto:bhepple@freeshell.org http://bhepple.freeshell.org
Public Key: http://bhepple.freeshell.org/public_keys.txt



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051018034758.7d76401e.bhepple>