Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Aug 2007 08:32:41 -0500
From:      Josh Paetzel <josh@tcbug.org>
To:        freebsd-isp@freebsd.org
Subject:   Re: Using FreeBSD as a router
Message-ID:  <20070822133241.GB83613@tcbug.org>
In-Reply-To: <20070822125432.GB58627@schumacher.dk>
References:  <20070822080112.GA58627@schumacher.dk> <46CC1E6E.9080701@tomjudge.com> <20070822125432.GB58627@schumacher.dk>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
Steffen Schumacher wrote:
> On 22.08.2007 12:30:54 +0100, Tom Judge wrote:
> > Steffen Schumacher wrote:
> > 
> > Firstly this address is not a valid host address it is a network address. 
> > as shown by the routing entry below.  Secondly your default gateway must be 
> > on your local network segment to work however 195.249.0/16 is behind the 
> > router 131.164.191.1.
> > 
> > 195.249.0/16       131.164.191.1      UG1         1       12  vlan7
> > 
> > Perhaps your default gateway should be 131.164.191.1 ??
> >
> 
> Yes - ultimately that should be my gateway, but I want FreeBSD to realize
> this by looking at the 195.249.0/16 route.
> The thing is that 195.249.0/16 will also be seen from 131.164.191.2 but with
> a lower localpref, making 131.164.191.1 the best choice. This way if .1 dies,
> 195.249.0/16 should be routed towards .2, and ultimately my default should go
> at .2 also.
> This is the goal - to make the default move to .2 if .1 is dead, and back when
> 1. comes back up again.
> 
> I don't think it matters if I use 195.249.0.0 or 195.249.1.1, since the router
> receiving the packets will do their own routing lookup. Whats important is only
> getting the next-hop mac/if for the default route, and that should be available
> from the 195.249.0/16 route.
> 
> /Steffen 

"You keep using that word. I do not think it means what you think it
means."

In FreeBSD the default route is a directly connected host that it can
send packets to that it doesn't have a specific route to.  It's not
going to 'figure out' a default route from a network address.

There are a lot of hacks people use to get around this, some of the
are of the 'ping this ip periodically and if it goes away swap the
default route' nature.

You could also investigate running CARP/HSRP/VRRP/GLBP  on these two gateways 
so they can sit on the same IP, thus obliviating the need to change
the default route at all.

I've never actually tried getting FBSD to grap it's own routing
information from a routing protocol but it's possible you could go
down that route as well...

-- 
Thanks,

Josh Paetzel

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.3 (FreeBSD)

iD8DBQFGzDr5JvkB8SevrssRAjR8AJ45G247dD/SgoltC+ovsO112H52zQCePO1r
gciAbkLm/TQetbmPwC1wNFQ=
=6J/Y
-----END PGP SIGNATURE-----
home | help

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