Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a two systems on a private network 192.168.0.0/16.

SysA has an IP of 192.168.0.30 SysB has two subinterfaces in linux, ETH0:0 with IPs of 192.168.200.213 and ETH0:1 192.168.90.20.

If I'm on SysB how can I get it to access SysA through the 192.168.90.20 IP instead of the 192.168.200.213 IP?

share|improve this question
    
You probably mistyped the IP of SysA, it says 102.168 while it should probably say 192.168? –  Mattias Ahnberg Jan 18 '12 at 19:28
    
Thanks, I didn't noticed that. Fixed now. –  LF4 Jan 18 '12 at 20:57
add comment

1 Answer 1

up vote 2 down vote accepted

You'd have to look into Source Routing for Linux. An example can be found here in the Linux Advanced Routing & Traffic Control HOWTO:
http://lartc.org/howto/lartc.rpdb.html#LARTC.RPDB.SIMPLE

Actually, even simpler you can do something like this:

ip route add to 192.168.0.30 src 192.168.90.20 dev eth0 via 192.168.90.1

Assuming that the gateway is 192.168.90.1, change it accordingly if needed!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.