[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ethernet: can't ping localhost or send responses..



>     Do you have an ip address binded to eth0?
> 
> [snip]
I do have an ip address configured in ifconfig for eth0.
Also, I didn't have the hosts files set up but unfortunately it didn't 
help.. :(

Two linux boxes.. the first can ping the second just fine..
The second pings the first but doesn't receive a response.
The first box's packet count still goes up for both TX and RX on 
eth0.

I disabled linux from setting up the interfaces and routing table on 
startup so I could do it step-by-step. Here's what I have:
________________
### No interfaces or routes configured yet...

$ route add -host 127.0.0.0 lo

$ route
Kernel IP routing table
Destination     Gateway         Genmask         
Flags Metric Ref    Use Iface
localnet        *               255.255.255.255 
UH    0      0        0 lo

$ ping -c 4 127.0.0.1
PING 127.0.0.1 (127.0.0.1): 56 data bytes

--- 127.0.0.1 ping statistics ---
4 packets transmitted, 0 packets received, 100% 
packet loss

$ ifconfig
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:3924  Metric:1
          RX packets:4 errors:0 dropped:0 
overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 
overruns:0 carrier:0
          collisions:0 txqueuelen:0 

### The RX and TX are at 4.. but I got 100% 
packet loss.

$ ifconfig eth0 192.168.1.53 netmask 
255.255.255.0 broadcast 192.168.1.255 up
### This automatically put an entry into the 
routing table (192.168.1.0)

$ route add -net 127.0.0.0 netmask 255.0.0.0 lo
### This command fails if I don't put in the 
netmask 255.0.0.0.. ?!??!
Kernel IP routing table
Destination     Gateway         Genmask         
Flags Metric Ref    Use Iface
DNS             *               255.255.255.255 
UH    0      0        0 eth0
192.168.1.0     *               255.255.255.0   
U     0      0        0 eth0
localnet        *               255.0.0.0       
U     0      0        0 lo
________________

thx
David


David Gudlaugsson
Spotlight Computer Consulting Services
Small business solutions.
Kalamazoo, MI
616.353.9661