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 wonder if we can reply some request from which route its came from?

My Situation is like this:

eth0 192.168.10.1 --> gw: 192.168.10.254 nm: 24
eth1 192.168.11.1 --> gw: 192.168.11.254 nm: 24

Since this two IP is on the same machine, normally when we ping to 192.168.11.1 from 192.168.10.2. This machine will not reply to 192.168.10.2 because 192.168.10.0/24 it's on eth0, and the packets where requested via eth1.

Can I make it works?

I'm using Linux ubuntu, and the application will be listen to eth1 only.

share|improve this question
add comment

2 Answers

How are the two networks interconnected? If the only "point of contact" of the two nets is the "machine" it cannot work, unless you have on your gateway (192.168.10.254) a route to 192.168.11.0/24 via 192.168.10.1.

share|improve this answer
    
I had try ip route add 192.168.11.1 via 192.168.10.1 on my gateway, and it's not working. The packets is arriving via eth1 but can reply it via eth1 because 192.168.10.1 is on eth0. –  Ta Coen Jun 10 '10 at 3:31
    
192.168.10.0/24 is on my vlan1, and 192.168.11.0/24 is on my vlan2. –  Ta Coen Jun 10 '10 at 3:33
add comment

Sorry to bother, I put

ip route 192.168.10.2 via 192.168.11.1 dev eth1

on my machine, and this do the tricks. the rest 192.168.1.0/24 will be replied via 192.168.10.1 because it was a kernel link, but 192.168.10.2 will go thru the gateway to vlan2 and back.

I Answered my own question.

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.