Date: Tue, 19 Feb 2008 13:56:48 +0000 From: "Bruce M. Simpson" <bms@FreeBSD.org> To: Nick Barnes <Nick.Barnes@pobox.com> Cc: freebsd-net@freebsd.org Subject: Re: Multiple default routes on multihome host Message-ID: <47BAE020.1080509@FreeBSD.org> In-Reply-To: <38308.1203368454@thrush.ravenbrook.com> References: <38308.1203368454@thrush.ravenbrook.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Nick Barnes wrote: > I want packets from address A1 to be sent via gateway G1, but packets > from address A2 to be sent via gateway G2. > > How do I do this? Can I just have more than one default route? I'm > remote from the machine in question, so I don't want to tinker with > the default route until I'm sure of the answer. > Others have chimed in saying that having redundant routes constitutes poor network design: it really depends where one draws the distinction between router and host. In ad-hoc and peer-to-peer networks, there is no such distinction. The forwarding code doesn't support multiple routes to the same destination, largely out of development inertia. People are looking at this now. The forwarding code doesn't support load balancing yet, it's being considered for the future. There are problems with load balancing and TCP as it can result in loss of the original packet ordering. Of course this is something which stuff like SACK *begins* to address, it is a scenario more common in satellite networks. However you want next-hop selection based on the "laddr" for a socket which is a different thing. The stack doesn't do this on its own, it needs help from packet filtering code. You should be able to achieve this using "route-to" rules in IPFW or PF, there are tutorials out there on the subject. cheers BMS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47BAE020.1080509>