Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
06-14-2006, 12:23 PM
|
#1
|
LQ Newbie
Registered: Sep 2004
Posts: 16
Rep:
|
Can not ping 127.0.0.1
Hey,
Im having problems with the loopback interface.
I cant get a ping reply from it.
My ifconfig returns:
lo Link encap:Local Loopback
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Seems not to be configured correctly?
Any help fixing?
Many thanks.
|
|
|
06-14-2006, 12:46 PM
|
#2
|
Member
Registered: Aug 2003
Distribution: Mandrake 9.0; FC4; FC8; SUSE 10.3; SUSE 12.1; SUSE 13.2
Posts: 642
Rep:
|
What does your /etc/hosts file look like?
|
|
|
06-14-2006, 12:53 PM
|
#3
|
LQ Newbie
Registered: Sep 2004
Posts: 16
Original Poster
Rep:
|
im doing ping 127.0.0.1
But my file:
127.0.0.1 localhost.localdomain localhost
|
|
|
06-14-2006, 01:19 PM
|
#4
|
Senior Member
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539
Rep:
|
can you copy paste the exact command ran and the output? can you ping other IP address?
|
|
|
06-14-2006, 01:29 PM
|
#5
|
LQ Newbie
Registered: Sep 2004
Posts: 16
Original Poster
Rep:
|
I can ping external addresses and the internet address assigned in ifconfig.
The exact command im using is:
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 ---
3 packets transmitted, 0 received, 100% packet loss, time 1999ms
It just hangs after this, so i control + c.
|
|
|
06-14-2006, 01:42 PM
|
#6
|
Senior Member
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539
Rep:
|
whast the output of 'iptables -L'
|
|
|
06-14-2006, 01:47 PM
|
#7
|
LQ Newbie
Registered: Sep 2004
Posts: 16
Original Poster
Rep:
|
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
|
|
|
06-14-2006, 04:05 PM
|
#8
|
Member
Registered: May 2004
Location: Underground base in the mountains
Distribution: FreeBSD, Fedora, Ubuntu
Posts: 87
Rep:
|
Check the host.allow, host.deny files. Maybe the problem is there.
|
|
|
06-14-2006, 04:18 PM
|
#9
|
LQ Newbie
Registered: Sep 2004
Posts: 16
Original Poster
Rep:
|
Both are empty.
|
|
|
06-15-2006, 03:13 PM
|
#10
|
Member
Registered: Jun 2005
Location: Chicago, IL, USA
Distribution: Fedora Core, CentOS
Posts: 188
Rep:
|
Very interesting. Have you tried looking at your configuration scripts for the NIC card? Try looking into the script for the "localloopback" in the network scripts folder of your OS, if there is one. Since you didn't list your distribution this may not help you much but if you are using Red Hat/Fedora, try this folder:
"/etc/sysconfig/network-scripts/"
Edit the file that resembles the loopback interface accordingly. If you don't have this folder or file, manually enter the information for the lo interface as root and see if that works. If it does, you can make a script of that command and have it run on startup.
"ipconfig lo 127.0.0.1 netmask 255.0.0.0"
|
|
|
06-15-2006, 03:27 PM
|
#11
|
LQ Newbie
Registered: Sep 2004
Posts: 16
Original Poster
Rep:
|
Hi, thanks for the reply.
Im using Fedora Core 3.
In the directory you said i have:
ifcfg-lo ifdown-ipv6 ifup-aliases ifup-isdn ifup-sl
ifdown ifdown-isdn ifup-bnep ifup-plip ifup-wireless
ifdown-aliases ifdown-post ifup-eth ifup-plusb init.ipv6-global
ifdown-bnep ifdown-ppp ifup-ippp ifup-post network-functions
ifdown-eth ifdown-sit ifup-ipsec ifup-ppp network-functions-ipv6
ifdown-ippp ifdown-sl ifup-ipv6 ifup-routes
ifdown-ipsec ifup ifup-ipx ifup-sit
I cant see any called "loopback" (i have tried ls -al).
I have just ran:
""ifconfig lo 127.0.0.1 netmask 255.0.0.0"
And i can now ping 127.0.0.1.
I think my origional post does not show a subnet mask for the lo interface...
Could you just go over how i can fix this permenantly.
Many thanks for the help.
*EDIT
i have just looked in ifcfg-lo, it seems correct:
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
Last edited by dan0r; 06-15-2006 at 03:30 PM.
|
|
|
06-15-2006, 03:53 PM
|
#12
|
Member
Registered: Jun 2005
Location: Chicago, IL, USA
Distribution: Fedora Core, CentOS
Posts: 188
Rep:
|
Ok this is where my true newbie colors show. I haven't played with startup scripts in a while so it may help id you back this up with a little more research.
It would be best to isolate this problem but a patch can work until you have time .
Here is what I have for the script:
Code:
#!/bin/bash
#
#description: lo startup script
#name: /etc/rc.d/init.d/lo
#run ifconfig command
ifconfig lo 127.0.0.1 netmask 255.0.0.0
Make this file in the /etc/rc.d/init.d/ folder under the name of lo.
If it doesn't work, post saying so. I'm not at home at the moment and can't try it out but I can later on when I get off.
I do hope that this works though.
Good luck!
Last edited by gizza23; 06-15-2006 at 04:09 PM.
|
|
|
06-15-2006, 04:08 PM
|
#13
|
LQ Newbie
Registered: Sep 2004
Posts: 16
Original Poster
Rep:
|
Yea thanks, least i know what the problem was now.
Cheers!
This was driving me mad and stopping things from working.
|
|
|
All times are GMT -5. The time now is 12:46 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|