LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Red Hat Network Ping issue (http://www.linuxquestions.org/questions/linux-newbie-8/red-hat-network-ping-issue-746403/)

farooqnasim 08-10-2009 06:24 AM

Red Hat Network Ping issue
 
i have a local network of 6 linux machines running redhat linux 4.4. i attached a new machine with that lan and configured it for networking.my machine is x7.x.com(192.168.1.7). it can ping all other machines (192.168.1.1 to 6) and all other machines can ping back to this but it can't ping srv.x.com(192.168.1.254) which is gateway for all) and srv(192.168.1.254) can't ping it back while others can ping with srv and srv can ping back, i have rechecked /etc/hosts and other networking files but all the enteries are correct.

how can i rectify this issu

acid_kewpie 08-10-2009 07:03 AM

going by the working and non-working IP's I'd guess that your netmask is wrong, a /25 instead of a /24?

farooqnasim 08-10-2009 07:49 AM

i dont think netmask is wrong or ip is not working. i am new to linux and networking plz explain your answer. plz note that the machine im talking about was working correctly with the same hostname and ipaddress on this network(im new to this network too), due to some reasons i reinstalled red hat 4.4 and tried to connect it to the network

malekmustaq 08-10-2009 11:43 AM

nasim:

just recheck subnetmask if it is uniform between the server and the new machine. reload dhcp if it is running or disable from all. ping again.

if still it doesn't work, try check the cables and the hub, swap the outlet to one that is ping-ing correctly.

hope this can help.

farooqnasim 08-11-2009 06:02 AM

rechecked subnet, its same, no dhcp, all are the static ips within this LAN, rechecked everything but no ping to (192.168.1.254 gateway) while all others can ping x.x.x.7 and x.x.x.7 can ping back to others on this LAN.even i am able to mount remote disks on x.x.x.7 but can't ping x.x.x.254 and vice versa. i have noticed a service ldap running on other clients and server but not on x.x.x7. could it be the reason??? or any other services i need to check

unSpawn 08-11-2009 06:25 AM

// The only thing I can suggest is that if you know something is different then by all means do check / enable it and if you have to compare all configs between two machines. Saying "can't ping" doesn't say much. Instead post complete stdout/stderr and if that doesn't show any messages run a strace on it.

farooqnasim 08-11-2009 07:31 AM

ping result to 192.168.1.254
xxxxxxx (xxxx) icmp_seq=1 Destination Host Unreachable
so on
6 packets transmitted, 0 received, +3 errors, 100% packet loss, time 5001ms, pipe 4

pinging result to 192.168.1.3
64 bytes from xxxxxxxx(xxxxxx) icmp_seq=0 ttl=64 time=0.057 ms
so on
7 packets transmitted, 7 received, 0% packet loss, time 5999ms,
rtt min/avg/max/mdev=0.047/0.050/0.057/0.008 ms, pipe 2

acid_kewpie 08-11-2009 07:32 AM

that's clearly not the *COMPLETE* message now is it?

Post full output of ifconfig, route -n, and arp -n

farooqnasim 08-11-2009 09:02 AM

output from this problematic machine
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
0.0.0.0 192.168.1.254 0.0.0.0 UG 0 0 0 eth1
arp -n
Address HWtype HWaddress Flags Mask Iface
192.168.1.11 ether 00:1A:4D:46:51:89 C eth1
ifconfig
eth1 Link encap:Ethernet HWaddr 00:1A:4D:45:5D:D1
inet addr:192.168.1.7 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::21a:4dff:fe45:5dd1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:22930 errors:0 dropped:0 overruns:0 frame:0
TX packets:40135 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4237352 (4.0 MiB) TX bytes:5524946 (5.2 MiB)
Interrupt:193 Base address:0x4000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2194 errors:0 dropped:0 overruns:0 frame:0
TX packets:2194 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2317688 (2.2 MiB) TX bytes:2317688 (2.2 MiB)
output from a machine which can ping 192.168.1.254 and can ping the problematic machine as well
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 192.168.1.254 0.0.0.0 UG 0 0 0 eth0
arp -n
Address HWtype HWaddress Flags Mask Iface
192.168.1.254 ether 00:1A:4B:B0:54:68 C eth0
192.168.1.14 ether 00:1A:4D:45:5D:E9 C eth0
192.168.1.11 ether 00:1A:4D:46:51:89 C eth0
ifconfig
eth0 Link encap:Ethernet HWaddr 00:1A:4D:46:22:D9
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::21a:4dff:fe46:22d9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:28523503 errors:0 dropped:0 overruns:0 frame:0
TX packets:30854263 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2446167612 (2.2 GiB) TX bytes:2720865479 (2.5 GiB)
Interrupt:193 Base address:0x4000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:5553 errors:0 dropped:0 overruns:0 frame:0
TX packets:5553 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1838053 (1.7 MiB) TX bytes:1838053 (1.7 MiB)

unSpawn 08-11-2009 09:34 AM

If you post output like 'diff --side-by-side file0 file1' it is easier. Here:
Code:

# output from this problematic machine                        | # output from a machine which can ping 192.168.1.254 and can
route -n                                                        route -n
Kernel IP routing table                                        Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface          Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1                | 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1                  | 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 192.168.1.254 0.0.0.0 UG 0 0 0 eth1                  | 0.0.0.0 192.168.1.254 0.0.0.0 UG 0 0 0 eth0

arp -n                                                          arp -n
Address HWtype HWaddress Flags Mask Iface                      Address HWtype HWaddress Flags Mask Iface
192.168.1.11 ether 00:1A:4D:46:51:89 C eth1                  | 192.168.1.254 ether 00:1A:4B:B0:54:68 C eth0
                                                              > 192.168.1.14 ether 00:1A:4D:45:5D:E9 C eth0
                                                              > 192.168.1.11 ether 00:1A:4D:46:51:89 C eth0

ifconfig                                                        ifconfig
eth1 Link encap:Ethernet HWaddr 00:1A:4D:45:5D1              | eth0 Link encap:Ethernet HWaddr 00:1A:4D:46:229
inet addr:192.168.1.7 Bcast:192.168.1.255 Mask:255.255.255.0  | inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::21a:4dff:fe45:5dd1/64 Scope:Link            | inet6 addr: fe80::21a:4dff:fe46:22d9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1                UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

lo Link encap:Local Loopback                                    lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0                              inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host                                  inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1                          UP LOOPBACK RUNNING MTU:16436 Metric:1

So apart from "the problematic machine" using eth1 instead of eth0, "machine which can ping" ARP entries and both machines using IPv^ too I wonder what clues this holds...

farooqnasim 08-11-2009 09:42 AM

do you need any output from 192.168.1.254?

unSpawn 08-11-2009 10:12 AM

Quote:

Originally Posted by farooqnasim (Post 3639306)
do you need any output from 192.168.1.254?

If 192.168.1.254 can see 192.168.1.7 OK then not.

I don't have any clues so I'll just fire some shots: Does 192.168.1.11 have an eth0? If so what is it connected to? If not why are you using eth1? Is iptables enabled on 192.168.1.7? Could you, on "the problematic machine", run 'strace -v -T -o /tmp/strace_ping_192.168.1.3 /bin/ping -c1 192.168.1.3' and 'strace -v -T -o /tmp/strace_ping_192.168.1.254 /bin/ping -c1 192.168.1.254' and give use 'diff --side-by-side /tmp/strace_ping_192.168.1.3 /tmp/strace_ping_192.168.1.254'? Another long shot: could you copy over the complete /etc tree from 192.168.1.7 to a machine that works OK, check how many files differ and post filenames? Might want to run a script for that if you copy over the /etc/ tree to /tmp on the "good" machine:
Code:

find /etc -type f | while read FILE; do [ -f "/tmp${FILE}" ] && diff --brief "${FILE}" "/tmp${FILE}"; done

acid_kewpie 08-11-2009 02:09 PM

I would personally be running tcpdump on the remote server, and be checking to see if it is getting any arp requests when you do try to ping, as you appear to have no entry already in the arp cache. At the same time it might also be worth running tcpdump on a machine that you can ping, whilst pinging the one you can't, to ensure that that machine does see the arp requests.

in both cases I'd suggest you run "tcpdump -vn -i ethX arp or icmp" as root.

unSpawn 08-11-2009 02:21 PM

Good one. I've thought about the arp/tcpdump combo too. Dunno why I didn't offer it.

acid_kewpie 08-11-2009 02:42 PM

Every single problem I ever encounter I try to fix with tcpdump or wireshark. I have a tcp connection issue, I use tcpdump. I have an ssl handshake issue, I use tcpdump. I have an ldap bind issue, I use tcpdump. My chair squeaks, I use tcpdump. I want some lunch, I use tcpdump.


All times are GMT -5. The time now is 03:31 PM.