Setting the outgoing IP-Address

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 ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-07-2003
Ulrich Wurst
 
Posts: n/a
Default Setting the outgoing IP-Address

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


Reply With Quote
  #2 (permalink)  
Old 07-07-2003
/dev/rob0
 
Posts: n/a
Default Re: Setting the outgoing IP-Address

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
Reply With Quote
  #3 (permalink)  
Old 07-07-2003
Ulrich Wurst
 
Posts: n/a
Default Re: Setting the outgoing IP-Address

"/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


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:25 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0