LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 03-17-2004, 01:23 PM   #1
eroica
Member
 
Registered: Sep 2003
Distribution: Mandriva 2006,OpenSuse 10.1
Posts: 154

Rep: Reputation: 30
Question ? on not being able to ping localhost


hello,
i've been trying 2 get webmin 2 work and i came across this trouble on my machine. webmin is supposed 2 work on the localhost port 10000 but i notice when i do a netstat I get this output:
root@localhost Downloads]# netstat -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:9099 *:* LISTEN
tcp 0 0 *:10000 *:* LISTEN
tcp 0 0 *:x11 *:* LISTEN
udp 0 0 *:10000 *:*
udp 0 0 localhost:domain *:*
udp 0 0 224.0.0.251:5353 *:*
I've not seen the notation *:10000 b4. I try pinging localhost & 127.0.0.1 and i get nothing back. my dialup is working fine and i can ping this website no problem and yes my hosts file has the localhost entry. obviously what I thought was a problem w/webmin is more a problem w/my tcp/ip stack. Being a Windows person and a Linux newbie(I'm runing mandrake 9.1) I was wondering if anyone had suggestions on what might be wrong here....

alan
 
Old 03-17-2004, 04:31 PM   #2
DoubleOTeC
Member
 
Registered: Aug 2003
Location: Dominica
Distribution: RedHat, FC1, FC3, FC4
Posts: 266

Rep: Reputation: 30
run: /sbin/ifconfig -a

if your localhost is not there then....settin it up may be as simple as (i've never had to do this myself): /sbin/ifconfig lo up 127.0.0.1

Please ....someone correct me if i'm wrong
 
Old 03-18-2004, 07:21 PM   #3
eroica
Member
 
Registered: Sep 2003
Distribution: Mandriva 2006,OpenSuse 10.1
Posts: 154

Original Poster
Rep: Reputation: 30
ok thanks I'll try that command when I get back to work on monday. I always thought ifconfig was part of the wireless tools set only. I just issued the command on my laptop at home and got back both the wireless adapter and "lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1"
And i could ping localhost no problem.I'm just a little confused coming from the Windows World. You're saying u have to add the local loopback port 127.0.0.1? I thought that was done automatically on installation of the tcp/ip stack? I'll try the command and give u a heads up if it works.
thanx,
alan
 
Old 03-22-2004, 09:15 AM   #4
eroica
Member
 
Registered: Sep 2003
Distribution: Mandriva 2006,OpenSuse 10.1
Posts: 154

Original Poster
Rep: Reputation: 30
thanx that command brought up local loopback and now Webmin comes up when I put the Localhost address in browser. One followup question. Will the local loopback always come up now on bootup or do I have to change some file etc?
thanx,
alan
 
Old 03-26-2004, 04:02 PM   #5
DoubleOTeC
Member
 
Registered: Aug 2003
Location: Dominica
Distribution: RedHat, FC1, FC3, FC4
Posts: 266

Rep: Reputation: 30
check it out and let me know....i believe it should as long as the network service starts on boot
 
Old 03-26-2004, 07:33 PM   #6
eroica
Member
 
Registered: Sep 2003
Distribution: Mandriva 2006,OpenSuse 10.1
Posts: 154

Original Poster
Rep: Reputation: 30
unfortunetly the local loopback does not come up on bootup. I did some checking and i do have the ifcfg-lo file w/the proper settings in it but it is not running on boot. Any suggestions on how I would get ifcfg-lo to run on startup....

alan
 
Old 03-26-2004, 11:02 PM   #7
kdepa
Member
 
Registered: Feb 2004
Posts: 73

Rep: Reputation: 15
Try adding the command /sbin/ifconfig lo up 127.0.0.1
to wherever your INIT starts up your network interfaces. Its possible, although unlikely, that the localhost interface may be commented out or not even in the config file.
 
Old 03-27-2004, 05:16 PM   #8
DoubleOTeC
Member
 
Registered: Aug 2003
Location: Dominica
Distribution: RedHat, FC1, FC3, FC4
Posts: 266

Rep: Reputation: 30
Does your network service actually start up?

run: /sbin/service network status

to see if the service is running

also check in your folder containing your network-scripts
/etc/sysconfig/network-scripts/
for me...(on RedHat)

to see if theres a file sumtin like ifcfg-lo.

it nomally contains

DEVICE=lo
IPADDR=127.0.0.1
NETMASK=255.0.0.0
NETWORK=127.0.0.0
BROADCAST=127.255.255.255
ONBOOT=yes
NAME=loopback

let i know
 
Old 03-27-2004, 05:49 PM   #9
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
You could also check your log file after boot to see if it encountered any problems bringing up the network.
less /var/log/messages
 
Old 03-28-2004, 06:39 PM   #10
eroica
Member
 
Registered: Sep 2003
Distribution: Mandriva 2006,OpenSuse 10.1
Posts: 154

Original Poster
Rep: Reputation: 30
thanx for the answers. i do have the ifcfg-lo file in etc/networking-scripts. i compared it to my home computer which is also running mandrake 9.1 and they are identical. does anyone know which script calls ifcfg-lo so i can check that out? I shoul add that my dial-up connection works fine all the time. does that mean my network services is starting ok? I also have the output from the network status command:
[root@localhost cot]# service network status
Configured devices:
lo ppp0 tr0
Currently active devices:
ppp0
Also was poking around in etc/rc.d/init.d/networking and the only line I saw that pertained 2 bringing up the Local Loopback that I could make was:
# bring up loopback interface
action "Bringing up loopback interface: " ./ifup ifcfg-lo
Does this look right? I come from windoze world so reading shell scripts is not part of my usual troubleshooting procedure....

alan

Last edited by eroica; 03-29-2004 at 02:00 PM.
 
Old 03-29-2004, 04:55 PM   #11
DoubleOTeC
Member
 
Registered: Aug 2003
Location: Dominica
Distribution: RedHat, FC1, FC3, FC4
Posts: 266

Rep: Reputation: 30
Yes...that script is correct....

What your service network status command is retruning indicates that only ur ppp device is active. I take that to be your dial-up connection. Ensure that you ifcfg-lo file has the line

ONBOOT=yes

If your network service is starting up properly...and the logs indicate nothing....try running the "ifup lo" command on startup...
 
Old 03-31-2004, 12:20 PM   #12
eroica
Member
 
Registered: Sep 2003
Distribution: Mandriva 2006,OpenSuse 10.1
Posts: 154

Original Poster
Rep: Reputation: 30
hello,
here is contents of ifcfg-lo:
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
where would i put the ifup lo command? I guess what I am asking is who invokes the ifcfg-lo file. Coming from Windows I would for example be looking in the autoexec.bat file. How does ifcfg-lo or any ifcfg file get "called"? and once again I would assume if my ppp0 interface is working does that imply network services has started ok?

alan

Last edited by eroica; 03-31-2004 at 01:33 PM.
 
Old 03-31-2004, 02:29 PM   #13
eroica
Member
 
Registered: Sep 2003
Distribution: Mandriva 2006,OpenSuse 10.1
Posts: 154

Original Poster
Rep: Reputation: 30
hello again, in the words of emily latella "never mind". I'm sorry I didnt RTFM b4 posting. Looking closer in Mandrake CC under Draksvcs I had networking unchecked. As soon as i checked it and rebooted loopback is up on startup. But if someone still has the patience w/newbie. What does checking the Network service do? Why is ifcfg-lo now being run. And I would like to know because this computer has an old IBM token ring card that also now starts up. I would really like this not come up on every bootup. I do have ifcfg-tr0 set to bootup=no but when I do ifconfig -a I see it is up and running. In fact I think that is why I disabled networking when I first installed Linux because that token ring card was causing a hang on bootup. Thanx for every one input...

alan
 
Old 04-01-2004, 03:58 PM   #14
DoubleOTeC
Member
 
Registered: Aug 2003
Location: Dominica
Distribution: RedHat, FC1, FC3, FC4
Posts: 266

Rep: Reputation: 30
Network is the service controlling all the network devices....

Therefore checking it i believe sets it to be run on boot. Once this service is started all configured devices are setup and some are put up dependant on whether they are to come up on boot
 
  


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
Strange Ping Issue - Can't ping localhost but can ping others on LAN code_slinger Linux - Networking 15 03-30-2015 02:39 PM
Can't ping localhost (ping: sendto: Operation not permitted) mentor99us Linux - Networking 7 09-05-2012 02:11 PM
MDK 9.2, Can't ping localhost but can ping outside world? JohnLocke Linux - Networking 2 07-01-2004 05:59 PM
Can't ping localhost mandrakemark Linux - Networking 6 03-03-2004 08:57 PM
Can't Ping Localhost themorph Linux - Networking 1 02-16-2002 11:48 AM

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

All times are GMT -5. The time now is 10:22 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