0

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.

2 Answers 2

0

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.

2
  • 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, 2010 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, 2010 at 3:33
0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .