This is a discussion on Setting the outgoing IP-Address within the Linux Networking forums, part of the Linux Forums category; Hi all, I'm probably missing something easy, but I have problems in choosing which IP-Address should be used ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi all,
I'm probably missing something easy, but I have problems in choosing which IP-Address should be used for outgoing packets (read: I don't know how to do it). Here is the scenario: A debian 3.0 machine with 3 ethernet interfaces, eth0 connected to the local network, eth1 connected to provider_A using the ip-address 212.1.2.3 and eth2 connected to provider_B using the ip-address 80.3.2.1. I am moving from provider_A to provider_B and while the cached DNS-Entries on some machines in the internet still point to 212.1.2.3 the machine should respond to both network interfaces, while the defaultroute is set to eth2. A ping to 80.3.2.1 from outside works fine, but a ping to 212.1.2.3 enters the machine from eth1 and the echo_reply leaves through eth2 *BUT* using 212.1.2.3 as source address for the packet. Since 212.1.2.3 is not within the network of provider_B, his routers throws the packet away, so my ping to 212.1.2.3 won't be answered. Is there some way to tell the IP-stack to use the address of the outgoing interface as source under all circumstances, even if the packet is a reply to a packet on another interface?. Thanks, Uli |
|
|||
|
In article <bebt4u$oe3$05$1@news.t-online.com>, Ulrich Wurst wrote:
> I'm probably missing something easy, but I have problems in choosing which No, it's not something easy. :) But it can be done. > Is there some way to tell the IP-stack to use the address of the outgoing > interface as source under all circumstances, even if the packet is a reply > to a packet on another interface?. Your answer lies in the poorly-documented iproute2 package. Well, there is the IP command reference, if you can find it. Ah, here's one at http://snafu.freedom.org/linux2.2/docs/ip-cref/ I guess it's in the source package too, as a .tex file. Unfortunately I don't know how to convert that to a useful format. <sheepish grin> -- /dev/rob0 - preferred_email=i$((28*28+28))@softhome.net or put "not-spam" or "/dev/rob0" in Subject header to reply |
|
|||
|
"/dev/rob0" <rob0@gmx.co.uk> schrieb im Newsbeitrag
news:slrnbgjcr7.gmr.rob0@linuxbox.stpaultel.com... > Your answer lies in the poorly-documented iproute2 package. Hi, thanks, I already found the Advanced Router Howto und used the "routing for multiple uplinks" method from section 4.2. Works like a champ. Uli |