On Thu, Feb 28, 2002 at 10:32:19AM -0500, STEVE CASTRO wrote: > > > > Will the Simple Source routing example shown in "LARTC HOWTO" work > > > for a multihomed host (not a router) application that simply "binds" > > > to the address associated with the interface or does the source > > > routing decision only effect packets coming in over the interface and > not > > > from a local application? > > > > It effects all packets. > > > > > Basically, I want an application to choose which interface to use (i.e. > > > override the default route) by doing something similar to the old days > > > (Kernel 2.0.31 I think) when there was a socket option called > > > SO_BINDTODEVICE. > > > > Can't you just let the application bind to the ip address of the > interface? > > yes...this is exactly what I want to do. BUT....I am just beginning to learn > about the > "advanced routing" capabilities AND it is not clear to me how (or even > if its possible) to set it up a multihomed linux host (not a router) to > ensure that the > outgoing interface is chosen based upon the bound to address and NOT the > destination address. > > Prior to "advanced routing" the outgoing interface > on a multi-homed host (not router) was chosen strictly on the destination > address. > The binding simply fixed the source address of the packet....regardless of > the > interface actually used. (One could thus have packets sent out eth0 whose > source > address were actually eth1) There was no source routing capability on a > linux host, only > linux routers. The SO_BINDTODEVICE was an early socket option to get around > this. I suggest you read 'Unix Network Programming 1&2' by Stevens, or peruse the source of any program with a 'bind to address' option. Regards, bert -- http://www.PowerDNS.com Versatile DNS Software & Services http://www.tk the dot in .tk http://lartc.org Linux Advanced Routing & Traffic Control HOWTO