Networking Forums

Networking Forums > Computer Networking > Linux Networking > Setting the outgoing IP-Address

Reply
Thread Tools Display Modes

Setting the outgoing IP-Address

 
 
Ulrich Wurst
Guest
Posts: n/a

 
      07-07-2003, 01:39 PM
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
 
 
 
 
/dev/rob0
Guest
Posts: n/a

 
      07-07-2003, 05:52 PM
In article <bebt4u$oe3$05$(E-Mail Removed)>, 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
 
Ulrich Wurst
Guest
Posts: n/a

 
      07-07-2003, 06:09 PM
"/dev/rob0" <(E-Mail Removed)> schrieb im Newsbeitrag
news:(E-Mail Removed)...

> 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
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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bind outgoing mail connects to virtual ip address? Jack Snodgrass Linux Networking 4 03-13-2008 02:52 PM
How to restrict use of IP address (alias) on outgoing connection ?? Rohit Linux Networking 1 01-19-2007 06:29 PM
How to select IP address for outgoing packets? Graham Murray Linux Networking 3 04-28-2005 06:34 PM
Setting IP by mac address Ralph Krausse Wireless Internet 3 10-27-2004 12:55 PM
Setting IP by mac address Ralph Krausse Linux Networking 1 10-26-2004 06:16 PM



1 2 3 4 5 6 7 8 9 10 11