Can't ping itself, but other machines on the network can

Can't ping itself, but other machines on the network can

Post by vasan » Tue, 21 Sep 2004 22:34:58



Try to ping the same machine, ping gives below error, but I can ping
all other machines on the network. Any idea?. Thanks in advance.

connect: Invalid argument

 
 
 

Can't ping itself, but other machines on the network can

Post by P Gent » Wed, 22 Sep 2004 03:46:01



> Try to ping the same machine, ping gives below error, but I can ping
> all other machines on the network. Any idea?. Thanks in advance.

> connect: Invalid argument


PING 127.0.0.1 (127.0.0.1) from 127.0.0.1 : 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.107 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.069 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.060 ms

--- 127.0.0.1 ping statistics ---
3 packets transmitted, 3 received, 0% loss, time 1998ms
rtt min/avg/max/mdev = 0.060/0.078/0.107/0.022 ms


Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
X.X.24.0     0.0.0.0         255.255.248.0   U         0 0          0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U         0 0          0 lo
0.0.0.0         X.X.24.1     0.0.0.0         UG        0 0          0 eth0

Note that 127.0.0.0 is in the route table and uses the lo interface.


eth0      Link encap:Ethernet  HWaddr 00:40:D0:04:06:AC
          inet addr:X.X.25.127  Bcast:255.255.255.255  Mask:255.255.248.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:98390 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7493 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:10971597 (10.4 Mb)  TX bytes:1051776 (1.0 Mb)
          Interrupt:11 Base address:0xe000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:76 errors:0 dropped:0 overruns:0 frame:0
          TX packets:76 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5443 (5.3 Kb)  TX bytes:5443 (5.3 Kb)

And note that the local loopback has been configured on the interface.

Should be all you need.

hth,
prg
eamil above disabled

 
 
 

Can't ping itself, but other machines on the network can

Post by Moe Tr » Wed, 22 Sep 2004 08:56:16



>Try to ping the same machine, ping gives below error, but I can ping
>all other machines on the network. Any idea?. Thanks in advance.

>connect: Invalid argument

What was the exact command used?  What is the network address and netmask?

        Old guy

 
 
 

Can't ping itself, but other machines on the network can

Post by vasan » Wed, 22 Sep 2004 10:31:02


Thanks for mail, my problem is, my ip addr is 172.16.37.59, If I ping
to that IP addr, I am getting that error ( I mentioned in my post), if
I try to ping 172.16.37.60 or any other IP addr in that subnet, it
work sfine, I can't ping to the cards own Ip addr. Please klet me know
what was the reason. Thanks in advance,
 
 
 

Can't ping itself, but other machines on the network can

Post by Floyd L. Davids » Wed, 22 Sep 2004 11:44:26



>Thanks for mail, my problem is, my ip addr is 172.16.37.59, If I ping
>to that IP addr, I am getting that error ( I mentioned in my post), if
>I try to ping 172.16.37.60 or any other IP addr in that subnet, it
>work sfine, I can't ping to the cards own Ip addr. Please klet me know
>what was the reason. Thanks in advance,

The reason can indeed be determined from the information given
to you about the loopback interface, /lo/, which should be
configured for address 127.0.0.1 (see the commands previously
mentioned, _ifconfig_ and _netstat_).

That may seem to be unrelated, but the kernel pulls a little
trick on you that isn't obvious.  If you send a packet to *any*
IP address that is configured for a device on your host (e.g.,
the 172.16.37.59 address if that is configured for an ethernet
interface), it won't go to that interface but to the loopback
device instead.

Hence there is no difference between doing "ping 172.16.37.59"
and "ping 127.0.0.1".  Indeed, if you run _ifconfig_ and make
note of the tx and rx packet counts, and then successfully ping
either of those two IP addresses, you'll see that *only* the
packet counts for the /lo/ device are incremented.

Of course, in your case it appears the /lo/ device is not
configured, so you probably won't get results from either
address, right?

--
FloydL. Davidson           <http://web.newsguy.com/floyd_davidson>

 
 
 

Can't ping itself, but other machines on the network can

Post by vasan » Wed, 22 Sep 2004 22:03:13


I have this command. First I set my IP addr and then I ping my ip
addr.

#ifconfig eth0 172.16.37.78 netmask 255.255.255.0

#ping 172.16.37.78
Connect: Invalid arguement

If I ping other IP addr, for example, I have another machine with
172.16.37.79, then I can pimg that machine from here.

Thanks.

 
 
 

Can't ping itself, but other machines on the network can

Post by P Gent » Fri, 24 Sep 2004 02:37:04



> I have this command. First I set my IP addr and then I ping my ip
> addr.

> #ifconfig eth0 172.16.37.78 netmask 255.255.255.0

> #ping 172.16.37.78
> Connect: Invalid arguement

> If I ping other IP addr, for example, I have another machine with
> 172.16.37.79, then I can pimg that machine from here.

> Thanks.

Show the output of these two commands (from consol/x-term):


BTW - if you don't know what the command does just type "man
[command]" for an explanation (and education).

We need to confirm whether the loopback interface is configured on
eth0.  Output should similar to my previous post.

If it's not configured you will have to:

Enter root password ...






output here ...

output here ...
Whoopee!

Now you have to get this initialization into your startup scripts.  It
should have been there already -- have no idea why it's not.  We need
to know your distro to help with this part (without futzing it).

If you have a graphical tool for this, I suggest you use it to make
sure _all_ file(s) and entries are properly updated.  If the nic was
present at install it should have been done then "automagically", but
if you added it afterwards you'll do it by hand.

hth,
prg
email above disabled

 
 
 

1. Can ping linux itself, but can't ping others

CH,

Did you mean 192.168.0.8 or 192.168.0.1?

Almost certainly, your ethernet adapter isn't working -- most likely,
it's not configured correctly.

a) What kind of card is it.
b) What does your /etc/conf.modules (or /etc/modules.conf) file look like?
c) What does lsmod show?
d) What does the output of "ifconfig" look like?
e) What does the output of "route -n" look like?
f) What does "cat /proc/interrupts" show?
g) What does "cat /proc/ioports" show?

-Tom
--
Tom Eastep             \  Eastep's First Principle of Computing:
ICQ #60745924           \  "Any sane computer will tell you how it

Shoreline, Washington USA \___________________________________________

2. strange NFS output

3. Canned "ping"

4. Freeswan + Windows

5. It's not bad canned meat...

6. XF86 question

7. Xcal on RedHat 5.1

8. D-link DE220 can PING his own IP, but can't PING others'

9. Canned Proxy URLs to Filter

10. CGI: apache canned response

11. For those of you tired of canned distributions...

12. Any Canned Class code?