Sign up ×
Server Fault is a question and answer site for 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 --> gw: nm: 24
eth1 --> gw: nm: 24

Since this two IP is on the same machine, normally when we ping to from This machine will not reply to because 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

2 Answers 2

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 ( a route to via

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

Sorry to bother, I put

ip route via dev eth1

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

I Answered my own question.

share|improve this answer

Your Answer


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.