Linux - NetworkingThis 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.
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.
Hello everyone,
I recently changed my network setup to use a router instead of the rp-pppoe setup I used to have running.
The problem I am having is that since I have started using dhcp, localhost does not seem to be resolved correctly anymore. This is really bothersome as many applications seem to try to resolve localhost before starting up and this takes a long while to time out.
When I try to ping the loopback address (127.0.0.1 or localhost) I am getting 100% packet loss. Interesting thing is that pinging my "outside" IP address (193.158.167.136 at the moment) works just fine.
Some other things that might be of interest:
The loopback device is activated (ifconfig -a: [snip]lo Link encap:Local Loopback[/snip]), the router is registered as a DNS (resolv.conf:[snip]nameserver 192.168.1.1[/snip]) and localhost is resolved to 127.0.0.1 (/etc/hosts: 127.0.0.1 localhost). Changing this to my current IP does not have an immediate effect.
Do you have an idea what could be causing this and how to fix it?
First you should do a route print to see what the local host is directed to, possible that it is incorrect, this caused me all sorts of headaches a few weeks ago while hooking up a VPN
Hi jdlcomputers,
thanks for your reply. Unfortunately I am not sure if I understand what you mean. I will try my best.
My best guess at what a route print might be:
Code:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
default broadband-gatew 0.0.0.0 UG 0 0 0 eth0
This does not seem to include the localhost, right? Is that my problem? Sorry, I feel a bit lost here. I have tried adding my loopback address using an example from the man page (route add -net 127.0.0.1), but that only produces an error (SIOCADDRT: Invalid argument).
I hope this gives you a clue.
Thanks for helping,
- drowstar
EDIT: I just checked on my fedora box. There the same command (route) yields:
Code:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
default broadband-gatew 0.0.0.0 UG 0 0 0 eth0
The problem this thread is about does not occur there.
Hi Drowstar,
Sorry about the confussion, I let some of my Windows training get the best of me..
Do the following
open a terminal window, type in SU then enter, log into your ROOT (should be a # not a $ you will need whatever you set up as root password to do so..from there simply type in route and press enter.. post your results, I will check back later today
Hi Jerry,
thanks for your replies. The output I pasted in my last post is the result of the commands you told me to type in. (Thanks for the detailed instructions. I dont need them quite this exact though.)
Thank you for the routing table hint. It made it possible for me to find out that I can work around the problem when I block the route to 127.0.0.1 (route add -net 127.0.0.1 netmask 255.255.255.255 reject). I am very certain that this is not the appropriate solution, but this ugly hack lets me at least work normally for now.
With that hack in place my routing table looks like this (I used route -n as that seems more to the point to me):
Code:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
127.0.0.1 - 255.255.255.255 !H 0 - 0 -
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
Thank you for your help. Your reply really made it a lot easier to work on this machine. You might be interested in another thread I opened on the topic (sorry, I didn't think you'd reply. I at least should have updated this thread.)
I'm glad that worked..
I am used to working with people with the knowlegde of the bathroom wall, so sometimes I get real detailed about the instructions... Sorry
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.