LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-12-2005, 09:33 PM   #1
cuschu
Member
 
Registered: Jun 2005
Location: Lander, Wyoming
Distribution: Ubuntu 9.05 LTSP Server, Kubuntu 9.04 Desktop
Posts: 46

Rep: Reputation: 15
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?
 
Old 07-12-2005, 09:45 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Please post the output of (as root): 'iptables -L' and 'route'.
 
Old 07-12-2005, 09:50 PM   #3
azbaer
Member
 
Registered: May 2004
Location: Arizona USA
Distribution: Debian Woody & Sarge, Ubuntu, Fedora
Posts: 75

Rep: Reputation: 15
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?
 
Old 07-12-2005, 10:03 PM   #4
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
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).
 
Old 07-12-2005, 11:28 PM   #5
cuschu
Member
 
Registered: Jun 2005
Location: Lander, Wyoming
Distribution: Ubuntu 9.05 LTSP Server, Kubuntu 9.04 Desktop
Posts: 46

Original Poster
Rep: Reputation: 15
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]#
 
Old 07-12-2005, 11:32 PM   #6
cuschu
Member
 
Registered: Jun 2005
Location: Lander, Wyoming
Distribution: Ubuntu 9.05 LTSP Server, Kubuntu 9.04 Desktop
Posts: 46

Original Poster
Rep: Reputation: 15
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]#
 
Old 07-12-2005, 11:59 PM   #7
roopunix
Member
 
Registered: Feb 2004
Location: Kathmandu
Distribution: Redhat/fedora/Suse [Wanna Drive With Debian]
Posts: 208

Rep: Reputation: 30
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
 
Old 07-13-2005, 12:13 AM   #8
cuschu
Member
 
Registered: Jun 2005
Location: Lander, Wyoming
Distribution: Ubuntu 9.05 LTSP Server, Kubuntu 9.04 Desktop
Posts: 46

Original Poster
Rep: Reputation: 15
Yes, that file exists and has exactly what you posted in it.
 
Old 07-13-2005, 12:29 AM   #9
roopunix
Member
 
Registered: Feb 2004
Location: Kathmandu
Distribution: Redhat/fedora/Suse [Wanna Drive With Debian]
Posts: 208

Rep: Reputation: 30
can you post the output of dmesg and tell me are you using static ip or dhcp. and the contains of


/etc/hosts

Last edited by roopunix; 07-13-2005 at 12:31 AM.
 
Old 07-13-2005, 01:09 AM   #10
cuschu
Member
 
Registered: Jun 2005
Location: Lander, Wyoming
Distribution: Ubuntu 9.05 LTSP Server, Kubuntu 9.04 Desktop
Posts: 46

Original Poster
Rep: Reputation: 15
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 nett2allROP 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

Last edited by cuschu; 07-13-2005 at 01:13 AM.
 
Old 07-13-2005, 01:23 AM   #11
roopunix
Member
 
Registered: Feb 2004
Location: Kathmandu
Distribution: Redhat/fedora/Suse [Wanna Drive With Debian]
Posts: 208

Rep: Reputation: 30
ok try this



/sbin/ifconfig lo 127.0.0.1
/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo
 
Old 07-13-2005, 06:30 AM   #12
cuschu
Member
 
Registered: Jun 2005
Location: Lander, Wyoming
Distribution: Ubuntu 9.05 LTSP Server, Kubuntu 9.04 Desktop
Posts: 46

Original Poster
Rep: Reputation: 15
[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
 
Old 07-13-2005, 06:57 AM   #13
roopunix
Member
 
Registered: Feb 2004
Location: Kathmandu
Distribution: Redhat/fedora/Suse [Wanna Drive With Debian]
Posts: 208

Rep: Reputation: 30
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
 
Old 07-13-2005, 07:16 AM   #14
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
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

Last edited by michaelk; 07-13-2005 at 07:31 AM.
 
Old 07-13-2005, 07:41 AM   #15
roopunix
Member
 
Registered: Feb 2004
Location: Kathmandu
Distribution: Redhat/fedora/Suse [Wanna Drive With Debian]
Posts: 208

Rep: Reputation: 30
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
FC4 won't ping 127.0.0.1 or the internet, but will ping local computers jalsk Linux - Networking 4 11-22-2005 05:59 PM
MDK 10 - Sharing Internet connection - cannot even ping Singing Banzo Linux - Networking 15 03-31-2005 09:01 PM
Internet connection problem, able to ping but unable to get web page in browser rajnishmishra Linux - Networking 13 07-15-2004 12:54 AM
nic active, but can't ping beyond loopback pvl Linux - Networking 4 04-01-2004 09:14 AM
Loopback connection fails Frances Linux - Networking 2 08-02-2003 02:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration