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 04-26-2002, 10:19 PM   #1
dsledge
Member
 
Registered: Dec 2001
Location: Georgia
Distribution: Ubuntu
Posts: 31

Rep: Reputation: 15
Problem pinging localhost


Ok, here's the problem.
I cannot ping the localhost until I issue the command 'ifconfig lo 127.0.0.1'. I may be wrong, but doesn't Linux take care of this whenever it boots? (I just noticed the problem following the installation of the CUPS interface so it must have been messed-up for a while.) I've searched the Web from front to back and have yet to know what the problem might be.
Oh yeah, please be easy on the networking jargon...networking is not my 'thing'.
Thanks!! Dennis
 
Old 04-27-2002, 10:02 AM   #2
tarballedtux
Member
 
Registered: Aug 2001
Location: Off the coast of Madadascar
Posts: 498

Rep: Reputation: 30
If your on a RedHat or a distro with equivalent files then edit
/etc/sysconfig/network-scripts/ifcfg-lo
and make sure there is a line that says ONBOOT=yes

If you don't have a file like this then put a ifconfig lo 127.0.0.1 in rc.local

Hope this helps!
 
Old 04-27-2002, 11:58 AM   #3
dsledge
Member
 
Registered: Dec 2001
Location: Georgia
Distribution: Ubuntu
Posts: 31

Original Poster
Rep: Reputation: 15
Hi, thanks for your help. Still no progress though. The file already had the ONBOOT="yes" option. I've played around with a few commands and have also discovered that a stop/start of the network service gets localhost available (/etc/rc.d/init.d/network [stop/start]). Here's the contents of ifcfg-io file:
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
BOOTPROTO="none"
IPXNETNUM_802_2=""
IPXPRIMARY_802_2="no"
IPXACTIVE_802_2="no"
IPXNETNUM_802_3=""
IPXPRIMARY_802_3="no"
IPXACTIVE_802_3="no"
IPXNETNUM_ETHERII=""
IPXPRIMARY_ETHERII="no"
IPXACTIVE_ETHERII="no"
IPXNETNUM_SNAP=""
IPXPRIMARY_SNAP="no"
IPXACTIVE_SNAP="no"
 
Old 04-28-2002, 12:32 AM   #4
DMR
Member
 
Registered: Jun 2001
Location: Fairfax, California
Distribution: RH 9.0, RH 7.3, Mandrake 8.0
Posts: 986

Rep: Reputation: 30
I might be off-base here, but check /etc/hosts. There should be a line for lo which looks like:
127.0.0.1 localhost.localdomain localhost

If not, add the line to the file.

Also, what does ifconfig give you right after you boot; does info for lo appear?
 
Old 04-28-2002, 02:53 PM   #5
dsledge
Member
 
Registered: Dec 2001
Location: Georgia
Distribution: Ubuntu
Posts: 31

Original Poster
Rep: Reputation: 15
Smile

Well, I think I found a solution to the problem. As suggested, I placed a command in the /etc/rc.d/rc.local file with the following
ifconfig lo 127.0.0.1

I'm not particularly happy with using this solution since I believe that there is a better way (does anyone else use this in their boot file?) but it's working.

Thanks for the posts!!

Dennis

Last edited by dsledge; 04-28-2002 at 02:56 PM.
 
  


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
pinging problem cranium2004 Linux - Networking 2 05-21-2005 08:18 AM
pinging problem yenush Linux - Networking 1 06-07-2004 07:20 AM
Problem with pinging :( Normanu Linux - Networking 1 11-21-2003 09:33 AM
Pinging Problem warlord07 Linux - Networking 1 09-19-2003 01:02 AM
Troubles while pinging localhost and Ethernet card spycell Linux - Networking 3 07-27-2003 10:41 PM

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

All times are GMT -5. The time now is 05:17 PM.

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