PDA

View Full Version : Cannot ping a different network mask


Jamwa
14th May 2012, 07:33 AM
I have this network configuration on machine:

sh-4.1# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0C:29:10:5F:54
inet addr:10.106.106.168 Bcast:10.106.107.255 Mask:255.255.254.0
inet6 addr: fe80::20c:29ff:fe10:5f54/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:97913 errors:0 dropped:0 overruns:0 frame:0
TX packets:13515 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8866817 (8.4 MiB) TX bytes:100443654 (95.7 MiB)

sh-4.1#

The network proxy is given as

export http_proxy=http://10.106.106.32:3128

Now I have another similar machine, machine 2, with same settings (except address of course). This machine can ping successfully what machine 1 cannot. I am trying to ping an IP 10.100.150.6

What am I doing wrong please?

stevea
14th May 2012, 08:04 AM
The ping destination is on another network. So you likely have different route settings. Compare
ip route
from both machines.

Evil_Bert
14th May 2012, 08:07 AM

It would help if you could state the address of machine 2 and provide more information about the network you are trying to ping.

You have at least two subnets:
a. 10.106.106.0/255.255.254.0
b. 10.100.150.0 ..... mask unknown, so the network is a bit of a guess.

The HTTP proxy is meaningless as ping uses ICMP, which will ignore that setting.

What device is doing the routing between the two subnets a. and b. above?

(Edit: Posted before seeing stevea's reply).

Jamwa
14th May 2012, 08:19 AM
OK, a bit more details:

Am trying to ping 10.100.150.6

Machine 1 (that which is failing):
sh-4.1# ip route
10.106.106.0/23 dev eth0 proto kernel scope link src 10.106.106.168
169.254.0.0/16 dev eth0 scope link metric 1002
default via 10.106.107.254 dev eth0
sh-4.1#

Machine 2 (The one that works):
sh-4.1# ip route
10.106.106.0/23 dev eth1 proto kernel scope link src 10.106.106.174
169.254.0.0/16 dev eth1 scope link metric 1002
default via 10.106.107.254 dev eth1
sh-4.1#

stevea
14th May 2012, 08:29 AM
The relevant route looks the same - aside from the interface name (eth0, eth1).
default via 10.106.107.254 dev eth1


I suggest you try
traceroute 10.100.150.6
and see where that takes you.

Can you ping the router (10.106.107.254 ) from both systems ?

Jamwa
14th May 2012, 08:37 AM
For the one that works,


sh-4.1# traceroute 10.100.150.6
traceroute to 10.100.150.6 (10.100.150.6), 30 hops max, 60 byte packets
1 10.8.16.10 (10.8.16.10) 2.723 ms 2.446 ms 2.415 ms
2 10.100.150.6 (10.100.150.6) 0.465 ms !X 0.748 ms !X 0.720 ms !X
sh-4.1#


The one that does not work gives


1 * * *
2 * * *
3 * * *
...
29 * * *
30 * * *


Both of them ping 10.106.107.254 successfully