Re: [OT] ipv4: how to choose src ip?

From: Brad Hards (bhards@bigpond.net.au)
Date: Thu Dec 05 2002 - 15:56:31 EST


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, 6 Dec 2002 07:37, Richard B. Johnson wrote:
> > I'm not interested in rewriting the source address with netfilter based
> > on destination and/or service; What I'm looking for is rather a way to
> > initiate two connections to the same destination host using the two
> > different source IP addresses.
>
> The simple answer is that if you need a specific IP address
> associated with a "multi-honed" host, that has only one interface,
> then something is broken. And you get to keep the pieces.

There are some reasons why you might like to use a specific address on a
machine that is multi-homed, although normally the logic in the kernel works
fine. I won't try to explain it in detail at this stage, but link-local is a
personal favourite.

Probably all you want is to use the SO_BINDTODEVICE socket option.

Brad
- --
http://linux.conf.au. 22-25Jan2003. Perth, Aust. I'm registered. Are you?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9771/W6pHgIdAuOMRAjZGAKC8anD6rum/sEuYJRX2XZNEtEOG2gCdFBUq
SOK8RUP9Ub2hX1HGej9vxhU=
=KHOl
-----END PGP SIGNATURE-----

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Dec 07 2002 - 22:00:24 EST