Pinging myself doesn't work

Peggan

Registered
Hi!
I have a pretty strange problem I can't ping localhost or 127.0.0.1. Pinging other computers works fine though. I usually can ping myself directly after a reboot of the system. But I can't connect the problem with any specific program I've opened.

It works fine connecting to my ftp that's no problem.

Apache doesn't work though. I've installed another version of Apache with PHP and MySQL. I had to do that as root in the GUI but I just installed it and then directly disabled root.

I sent about 6000 packets today and there were 5% of the packages that got through.....

Any suggestions?

/Peggan
 
Can you post a copy of the ping results? I'm specifically interested in why ping fails, is it no route to host? Or host not available? Also, can you post a copy of the results of the "ifconfig lo0" and "netstat -rn" commands?

Thanks,
alex
 
Hi I have the information you requested below. I didn't run ping that long time. Ping usually works fine just after a reboot but after a while (during the night after a reboot) ping seems so cease functioning. I also pinged www.av.com and that works fine.

[localhost:~] peggan% ifconfig lo0
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet 127.0.0.1 netmask 0xff000000
[localhost:~] peggan% netstat -rn
Routing tables

Internet:
Destination Gateway Flags Refs Use Netif Expire
default 17.64.44.1 UGSc 6 55 en0
17.64.44/22 link#2 UC 0 0 en0
17.64.44.1 0:0:c:7:ac:0 UHLW 6 0 en0 576
17.64.44.2 0:d0:bc:ec:f9:14 UHLW 0 0 en0 1112
17.64.44.5 0:30:80:f7:84:1c UHLW 0 0 en0 1051
17.64.47.193 0:30:65:e1:36:ae UHLW 1 414904 en0 700
127.0.0.1 127.0.0.1 UH 17 1346 lo0
[localhost:~] peggan% ping localhost
PING localhost (127.0.0.1): 56 data bytes
^C
--- localhost ping statistics ---
28 packets transmitted, 0 packets received, 100% packet loss
[localhost:~] peggan% ping www.av.com
PING altavista.com (209.73.164.96): 56 data bytes
64 bytes from 209.73.164.96: icmp_seq=0 ttl=231 time=295.553 ms
64 bytes from 209.73.164.96: icmp_seq=1 ttl=231 time=302.296 ms
64 bytes from 209.73.164.96: icmp_seq=2 ttl=231 time=315.331 ms
64 bytes from 209.73.164.96: icmp_seq=3 ttl=231 time=344.142 ms
64 bytes from 209.73.164.96: icmp_seq=4 ttl=231 time=295.05 ms
64 bytes from 209.73.164.96: icmp_seq=5 ttl=231 time=317.614 ms
^C
--- altavista.com ping statistics ---
6 packets transmitted, 6 packets received, 0% packet loss
round-trip min/avg/max = 295.05/311.664/344.142 ms
[localhost:~] peggan%

Peggan
 
Is localhost in your netinfo database? If not, that could certainly be the cause of your problem.

Open NetInfo Manager, and click on the machines directory, make sure localhost is listed. Also, check your /etc/hosts file and make sure localhost is in there as well.
That's one question. The other is are you running ip filter (ipf)? If you are runing brickhouse or a similar firewall setup package, the answer is yes. These packages usually block out icmp packets on their default "secure" setting. It's possible that the configuration blocks icmp packets from localhost as well. Try turning off any firewall (ip filters) you may have, then try the localhost ping.

Hope this helps...

-alex
 
Ok, I've checked localhost on both /etc/hosts and in the NetInfo Manager and they seems to be there.

I have an Apache server on the machine aswell and when I can't ping myself I also couldn't access the webserver.

I sit behind a big firewall in the company but I don't have my own firewall to just my computer as far as I know. Atleast I havn't configured that myself.

Peggan
 
How come the localhost is not resolving to the domain as well ? Usually the PING command will return PING localhost.whatever.domain. Do you have the domain configured correctly and is the netmask the same as the domain you are in ? Lots of things to check here like if you are getting DHCP or did you have to set the IP address yourself.
 
Hi!
First of all I want to thank all the nice people for their help.

Ok, I tried to write in domainname at the CLI and I just got an empty line as return. So I typed. sudo domainname localdomain and set the domain name.

How do you configure the domain? If I ping 127.0.0.1 it's the same pinging results as if I ping localhost isn't it.


I've tried with both dynamic IP (DHCP) and a static IP.

Peggan
 
Originally posted by Peggan
Hi!
First of all I want to thank all the nice people for their help.

Ok, I tried to write in domainname at the CLI and I just got an empty line as return. So I typed. sudo domainname localdomain and set the domain name.

How do you configure the domain? If I ping 127.0.0.1 it's the same pinging results as if I ping localhost isn't it.


I've tried with both dynamic IP (DHCP) and a static IP.

Peggan

Usually with DHCP, everything is already set and your computer should have had the basics set such as IP addressing, netmask, DNS services, gateway, etc. Let's start with the basics. Can you ping the DNS server ? or for that matter any local service such as the pop mail server ? Here's an example of pinging myself and you'll notice my PING is resolved to localhost.twcny.rr.com.

[don rash’s computer:~] drash% ping localhost
PING localhost.twcny.rr.com (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=0.997 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=255 time=0.453 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=255 time=0.395 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=255 time=0.406 ms
^C
--- localhost.twcny.rr.com ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 0.395/0.562/0.997 ms
[don rash’s computer:~] drash%
 
I've tried to ping the DNS, computer on the same subnet and e-mail. Tonight I sent 66788 packets and none of them came through to localhost :)

I'm using a static IP now. With DNS, router address, netmask and IP filled in correctly.

I didn't seem to get a domain name like you did when you pinged yourself.
 
Back
Top