-2

I have two NICs.

On eth1 IP is 10.135.28.86/16.

On eth IP is 135.251.8.43/24.

My routing table is like below:

135.251.8.0/24 dev eth1  proto kernel  scope link  src 135.251.8.43
10.135.0.0/16 dev eth0  proto kernel  scope link  src 10.135.28.86 
169.254.0.0/16 dev eth0  scope link  metric 1002 
169.254.0.0/16 dev eth1  scope link  metric 1003 
10.0.0.0/8 via 10.135.0.1 dev eth0 
default via 135.251.8.1 dev eth1 

Now if I ping 10.135.28.86 from 10.34.7.103, it's OK, while if I ping 135.251.8.43 from 10.34.7.10, it fails.

And if I ping my public IP 135.251.8.43 from 135.252.11.7, it's OK, if I ping 10.135.28.86, it fails.

However, on my other machines which have exactly the same subnet and gateway configured, I can ping both IP either from 10.34.7.103 or 135.252.11.7.

Any ideas on this?

I used tcpdump to capture icmp packet on other machines and found that echo request come in eth0 and echo reply out from eth1.

but on this machine no echo reply were captured.

chrk
  • 4,037
  • 2
  • 39
  • 47
laocius
  • 772
  • 1
  • 8
  • 21

1 Answers1

0

When you ping from your other machines with IP's in both networks the machine uses the interface on the same network to send the packet (so private-to-private and public-to-public, since they are on directly connected subnets). That is why it reaches, they are on the same subnet.

I see 2 scenarios. 1. The machine which only has IP on your private network (10.34.7.10) probobly sends its ping to dgw (IP?) which then forwards it to 135.251.8.43 (eth0).

But since the source adress (10.34.7.10) is on a network directly connected to it's other interface (eth1) the answer will be sent back there. I would say you have a flawed network architecture.

  1. The machine 10.34.7.10 has a static route for 135.251.8.43 to 10.135.28.86, but your machine has not bridged the 2 networks.
aliex
  • 11
  • 2