Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Dec 2002 15:37:44 -0500 
From:      Don Bowman <don@sandvine.com>
To:        'Chuck Swiger' <cswiger@mac.com>, Don Bowman <don@sandvine.com>
Cc:        "'freebsd-net@freebsd.org'" <freebsd-net@FreeBSD.ORG>
Subject:   RE: SO_DONTROUTE, arp's, ipfw fwd, etc
Message-ID:  <FE045D4D9F7AED4CBFF1B3B813C85337010230F8@mail.sandvine.com>

next in thread | raw e-mail | index | archive | help
> -----Original Message-----
> From: Chuck Swiger [mailto:cswiger@mac.com]
> On Wednesday, December 4, 2002, at 03:20  PM, Don Bowman wrote:
> 
> > What's happening is I have >1 router feeding me sessions which
> > I'm transparently proxying (e.g. squid).
> > Obviously I can't have a default route back to each of them.
> >
> > So I have something like:
> >
> > [Router1]---\
> >              \
> > [Router2]--------[BSD]
> >              /
> > [Router3]---/
> >
> > This is done with a layer-2 mac rewrite, ie the router 
> takes the packet,
> > doesn't modify the IP header, but changes the destination MAC to
> > be that of the BSD machine.
> 
> You can't have more than one default route, but you certainly 
> can have 
> several static or dynamic routes to select the appropriate 
> router to send 
> responses back.  You could also look into policy-based routing or 
> multihoming the connections, but I guess that depends on what 
> you're doing.
> 
>  > I can't make the route be one of those routers,
>  > and the routing tables are too complicated to install (since there
>  > may be BGP on the left of them, etc, etc). Its important for
>  > me the response packets go back through the same path (to avoid
>  > reordering etc).
> 
> What happens if incoming traffic comes via more than one router at a 
> time-- how should your system decide which path to send 
> replies back?  
> Based on the source IP?

These are isp-sized routers (complicated networks with different
peering points to other networks). Static routes don't work since
they are much too dynamic. Additionally, the widget which is
picking the traffic to send (like Cisco WCCP) is load-balancing,
so there's another striping of data going on.

I'd like to just send it back to the router it came from.
I won't have a single TCP session come from more than one router,
but will have the same source or destination IP come from the different
routers concurrently.

I'm not sure what you mean by policy-based routing. If its the same
thing as on a router, then its not appropriate since it will be
based on IP.

In the example diagram above, I might have a case where host 'A'
sends host 'B' two concurrent TCP sessions. These will both transparently
arrive @ the BSD box, one via router1, one via router2. Triangulation
breaks the application, so A->B(session1) needs to always flow via
the same router it started on.

I'm thinking this is achieved by just caching the interface & destination
MAC etc in the PCB for the TCP session. It does this anyway once its
finished sending the SYN/ACK, its just that it follows routing rules and
ARP's for the SYN/ACK.

This is a common application for e.g. Squid when being fed by more
than one router.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




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