two /24's and only one gateway - is routing still possible?

Michael K. Smith - Adhost mksmith at adhost.com
Mon Apr 25 21:33:14 UTC 2011


> -----Original Message-----
> From: owner-freebsd-net at freebsd.org [mailto:owner-freebsd-
> net at freebsd.org] On Behalf Of fbsdmail at dnswatch.com
> Sent: Monday, April 25, 2011 1:09 PM
> To: freebsd-net at freebsd.org
> Subject: Re: two /24's and only one gateway - is routing still possible?
> 
> 
> On Mon, April 25, 2011 11:54 am, Chuck Swiger wrote:
> > On Apr 25, 2011, at 11:47 AM, fbsdmail at dnswatch.com wrote:
> >
> >> I have a /24 with a prefix of 168.103.150.xxx with a gateway on this
> >> prefix (DSLmodem).
> >> I also have a /24 with a prefix of 75.160.109.xxx
> >> My question(s) is/are:
> >> 1) is it possible to route both of these across the same GW?
> >>
> >
> > If these netblocks were both owned by you directly and you have an ASN,
> > or if they're both owned by the same ISP who is willing to route them
> > that way, sure.  Talk to Quest...
> 
> I lease both, and have ASN's for both.
> My question is more; what might be a solution that /I/ might employ
> that would permit routing of both blocks across the single GW.
> I can envision creating a freebsd based gateway that is directly
> connected to the DSLmodem carrying an IP out of the 168 block, and one
> out of the 75 block that routes traffic for both /24's.
> But this consumes more IP's and creates an additional hop.

You can't get there from here.   Routing multiple blocks out of any interface is just a matter of routing.  If you're getting into routing discrete blocks, particularly with discrete autonomous system numbers, you will have to use BGP.  In that case you can look at Quagga or Bird or similar.  If you're just interested in the routing function, you can use route-to in PF to set up whatever you wish.

The outbound route is not a problem - it's how traffic is going to get back to you.  If you don't have some sort of dynamic routing protocol in play, then the routes will come back the way your upstream directs them.

Mike


More information about the freebsd-net mailing list