Internet Connection, yet no loopback ping??
I am new to Linux, so this may be a simple configuration error, but I have exhausted all my ideas. I have a 400MHz Dell Optiplex running Mandrake 10.1, that is using an Intel Corp (82559) Ethernet Pro 100 NIC. I have access to the Internet on this machine, but not my LAN, (with all Windows computers). I did configure Samba, using many hours of Googling and Tutorials and tested it using smbclient. Even though it is on the Internet, when I try to ping the loopback I get 100% failure. Same results if I ping the IP address (192.168.0.100). I have tried using Static address assignment and DHCP, it made no difference. when I used the ifconfig command it says that loopback and eth0 are up. When I use the netstat command I don't get any errors, just alot of "Stream..Connected" messeges. Any idea what I can do to fix this?
|
Please post the output of (as root): 'iptables -L' and 'route'.
|
Wait you can access the internet, but when you ping the loopback (i assume 127.0.0.1) it fails?! Usally that is a sign of a defective nic. Have you tried to ping www.yahoo.com? What happens does it fail or ping?Are you on a Domain or a workgroup? Do you the firewall on?
|
I don't think that's a sign of a broken NIC, more likely some bad firewall rules, or a missing localhost route. Pinging localhost never touches hardware (computers with no nic can ping localhost).
|
I set the security level to standard in the Mandrake Control Center, and I have the firewall set to allow all.
[root@localhost curtis]# iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination [root@localhost curtis]# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.0.0 * 255.255.255.0 U 0 0 0 eth0 127.0.0.0 * 255.0.0.0 U 0 0 0 lo default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0 [root@localhost curtis]# ping 127.0.0.1 PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data. --- 127.0.0.1 ping statistics --- 13 packets transmitted, 0 received, 100% packet loss, time 11997ms [root@localhost curtis]# |
I am currently on a workgroup.
root@localhost curtis]# ping www.yahoo.com PING www.yahoo.akadns.net (66.94.230.36) 56(84) bytes of data. 64 bytes from p5.www.scd.yahoo.com (66.94.230.36): icmp_seq=1 ttl=52 time=49.8 ms 64 bytes from p5.www.scd.yahoo.com (66.94.230.36): icmp_seq=2 ttl=52 time=51.0 ms 64 bytes from p5.www.scd.yahoo.com (66.94.230.36): icmp_seq=3 ttl=52 time=49.5 ms 64 bytes from p5.www.scd.yahoo.com (66.94.230.36): icmp_seq=4 ttl=52 time=48.2 ms --- www.yahoo.akadns.net ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3002ms rtt min/avg/max/mdev = 48.249/49.672/51.091/1.023 ms [root@localhost curtis]# Pinging my Windows XP host [root@localhost curtis]# ping 192.168.0.102 PING 192.168.0.102 (192.168.0.102) 56(84) bytes of data. 64 bytes from 192.168.0.102: icmp_seq=1 ttl=128 time=6.08 ms 64 bytes from 192.168.0.102: icmp_seq=2 ttl=128 time=2.91 ms 64 bytes from 192.168.0.102: icmp_seq=3 ttl=128 time=3.31 ms 64 bytes from 192.168.0.102: icmp_seq=4 ttl=128 time=3.09 ms 64 bytes from 192.168.0.102: icmp_seq=5 ttl=128 time=3.12 ms --- 192.168.0.102 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4003ms rtt min/avg/max/mdev = 2.913/3.705/6.084/1.196 ms [root@localhost curtis]# |
ok do you have the file ifcfg-lo at /etc/sysconfig/network-scripts the contains of this file is the following
DEVICE=lo IPADDR=127.0.0.1 NETMASK=255.0.0.0 NETWORK=127.0.0.0 # If you're having problems with gated making 127.0.0.0/8 a martian, # you can change this to something else (255.255.255.255, for example) BROADCAST=127.255.255.255 ONBOOT=yes NAME=loopback if no make one #service network restart |
Yes, that file exists and has exactly what you posted in it.
|
can you post the output of dmesg and tell me are you using static ip or dhcp. and the contains of
/etc/hosts |
I am running DHCP right now. When I set this box up I set it to the higher security setting, (does that account for the length of the dmesg output?) but now it is down to standard.
I had to shorten this post because the dmesg output was so long, and it makes smilies out of nett2all:DROP in most of the entires The /etc/hosts file contains 127.0.0.1 localhost [root@localhost etc]# dmesg 192.168.0.255 LEN=146 TOS=0x00 PREC=0x00 TTL=64 ID=148 DF PROTO=UDP SPT=631 DPT=631 LEN=126 Shorewall:net2all: DROP:IN=eth0 OUT= MAC= SRC=192.168.0.100 DST=192.168.0.255 LEN=146 TOS=0x00 PREC=0x00 TTL=64 ID=149 DF PROTO=UDP SPT=631 DPT=631 LEN=126 Shorewall:net2all: DROP:IN=eth0 OUT= MAC= SRC=192.168.0.100 DST=192.168.0.255 LEN=146 TOS=0x00 PREC=0x00 TTL=64 ID=150 DF PROTO=UDP SPT=631 DPT=631 LEN=126 Shorewall:net2all: DROP:IN=eth0 OUT= MAC= SRC=192.168.0.100 DST=192.168.0.255 LEN=146 TOS=0x00 PREC=0x00 TTL=64 ID=151 DF PROTO=UDP SPT=631 DPT=631 LEN=126 Shorewall:net2all: DROP:IN=eth0 OUT= MAC= SRC=192.168.0.100 DST=192.168.0.255 LEN=146 TOS=0x00 PREC=0x00 TTL=64 ID=152 DF PROTO=UDP SPT=631 DPT=631 LEN=126 Shorewall:net2all: DROP:IN=eth0 OUT= MAC= SRC=192.168.0.100 DST=192.168.0.255 LEN=146 TOS=0x00 PREC=0x00 TTL=64 ID=153 DF PROTO=UDP SPT=631 DPT=631 LEN=126 ... All of what I removed contain Shorewall and was similar to the entries I left Shorewall:net2all: DROP:IN=eth0 OUT= MAC= SRC=192.168.0.100 DST=192.168.0.255 LEN=146 TOS=0x00 PREC=0x00 TTL=64 ID=244 DF PROTO=UDP SPT=631 DPT=631 LEN=126 Shorewall:net2all: DROP:IN=eth0 OUT= MAC= SRC=192.168.0.100 DST=192.168.0.255 LEN=146 TOS=0x00 PREC=0x00 TTL=64 ID=245 DF PROTO=UDP SPT=631 DPT=631 LEN=126 Shorewall:net2all: DROP:IN=eth0 OUT= MAC= SRC=192.168.0.100 DST=192.168.0.255 LEN=146 TOS=0x00 PREC=0x00 TTL=64 ID=246 DF PROTO=UDP SPT=631 DPT=631 LEN=126 Shorewall:net2all: DROP:IN=eth0 OUT= MAC= SRC=192.168.0.100 DST=192.168.0.255 LEN=146 TOS=0x00 PREC=0x00 TTL=64 ID=247 DF PROTO=UDP SPT=631 DPT=631 LEN=126 mtrr: 0xfd000000,0x400000 overlaps existing 0xfd000000,0x100000 mtrr: 0xfd000000,0x400000 overlaps existing 0xfd000000,0x100000 mtrr: 0xfd000000,0x400000 overlaps existing 0xfd000000,0x100000 cdrom: This disc doesn't have any tracks I recognize! e100: eth0: e100_watchdog: link down e100: eth0: e100_watchdog: link up, 100Mbps, full-duplex e100: eth0: e100_watchdog: link down e100: eth0: e100_watchdog: link up, 100Mbps, full-duplex e100: eth0: e100_watchdog: link down e100: eth0: e100_watchdog: link up, 100Mbps, full-duplex |
ok try this
/sbin/ifconfig lo 127.0.0.1 /sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo |
[root@localhost root]# /sbin/ifconfig lo 127.0.0.1
[root@localhost root]# /sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo SIOCADDRT: File exists [root@localhost root]# ping 127.0.0.1 PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data. --- 127.0.0.1 ping statistics --- 10 packets transmitted, 0 received, 100% packet loss, time 8997ms |
Do you have a file named ifcfg-lo at /etc/sysconfig/networking/
if not make one as i posted before then restart the network service other wise if you are using redhat try uninstalling and again installing the rpm netconfig and redhat-config-network and for the first time configure your interface by redhat-config-network |
Since everything appears to be working you really do not have a problem. I assume that samba is working and you state that you can also ping other hosts on the network. If pinging localhost or your IP address failed you would probably see an error message like host unreachable. I would guess that when you set your system to a higher security setting it disabled ICMP responses and when you configured the system back to a lower setting ICMP responses were not re-enabled.
BTW ICMP is the data that is returned via a ping command I can not remember the exact location but look in /proc/net/ipv4/ for files icmp_echo_ignore_broadcasts and icmp_echo_ignore_all If they contain a 1 then responses are disabled. You can enable ICMP by the following commands echo 0 > /proc/location of file/icmp_echo_ignore_broadcasts echo 0 > /proc/location of file/icmp_echo_ignore_all To permanently enable ICMP responses you will need to modify the /etc/sysctl.conf file |
ok i also faced the same problem. i created the problem in my FC3
the solution was #echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts #echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_all |
All times are GMT -5. The time now is 06:06 PM. |