* [LARTC] Source Routing on a multihomed host
@ 2002-02-26 14:36 STEVE CASTRO
2002-02-28 9:01 ` bert hubert
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: STEVE CASTRO @ 2002-02-26 14:36 UTC (permalink / raw)
To: lartc
[-- Attachment #1: Type: text/plain, Size: 591 bytes --]
Hello,
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?
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.
Thanks for any and all help,
Steve Castro
[-- Attachment #2: Type: text/html, Size: 1153 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [LARTC] Source Routing on a multihomed host
2002-02-26 14:36 [LARTC] Source Routing on a multihomed host STEVE CASTRO
@ 2002-02-28 9:01 ` bert hubert
2002-02-28 15:32 ` STEVE CASTRO
2002-03-01 10:07 ` bert hubert
2 siblings, 0 replies; 4+ messages in thread
From: bert hubert @ 2002-02-28 9:01 UTC (permalink / raw)
To: lartc
On Tue, Feb 26, 2002 at 09:36:50AM -0500, STEVE CASTRO wrote:
> Hello,
>
> 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?
What do you mean by overriding default routes?
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
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LARTC] Source Routing on a multihomed host
2002-02-26 14:36 [LARTC] Source Routing on a multihomed host STEVE CASTRO
2002-02-28 9:01 ` bert hubert
@ 2002-02-28 15:32 ` STEVE CASTRO
2002-03-01 10:07 ` bert hubert
2 siblings, 0 replies; 4+ messages in thread
From: STEVE CASTRO @ 2002-02-28 15:32 UTC (permalink / raw)
To: lartc
> > 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.
>
> What do you mean by overriding default routes?
Suppose I have a multihomed host with 2 interfaces (eth0,eth1) to 2
different ISPs.
If I have set up the default route to be eth0 for all internet traffic, I
want to be able to
bind an application to eth1 and thus have that connections packets go out
eth1 and
NOT eth0. In other words, I want the routing decision to be based upon the
bound to source address to take precedence over the destination default
route rule.
I know doing source routing is possible when the linux box is setup as a
router. I
am only considering setting up the box as a multi-homed host with all
outbound traffic
generated from local application processes.
I do not presently have access to a multihomed host otherwise I would fiddle
around
to figure this out.
Thanks,
Steve
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LARTC] Source Routing on a multihomed host
2002-02-26 14:36 [LARTC] Source Routing on a multihomed host STEVE CASTRO
2002-02-28 9:01 ` bert hubert
2002-02-28 15:32 ` STEVE CASTRO
@ 2002-03-01 10:07 ` bert hubert
2 siblings, 0 replies; 4+ messages in thread
From: bert hubert @ 2002-03-01 10:07 UTC (permalink / raw)
To: lartc
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
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-03-01 10:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-26 14:36 [LARTC] Source Routing on a multihomed host STEVE CASTRO
2002-02-28 9:01 ` bert hubert
2002-02-28 15:32 ` STEVE CASTRO
2002-03-01 10:07 ` bert hubert
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.