UbuntuThis forum is for the discussion of Ubuntu Linux.
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.
I have three computers, including my laptop. All of them behind router. I have ubuntu installed on my laptop. It just replaced FC3 on it. Anyway I am having trouble connecting to the internet, but I can connect to other computers on the network.
What I have done so far:
So I set DNS Server to 192.168.0.1 and removed everything from Search Domains. I was able to connect to the internet. I suspended my laptop. When I brought it back up I couldn't connect anymore. I went to the Networking and DNS Server was back to 192.168.1.2, and there was something under Search Domains.
I removed everything and put 192.168.0.1 under DNS server. Didn't help. I then went to wired connection properties and switched from Automatic Configuration to Static. Putting IP as 192.168.0.6, subnet mask as 255.255.255.0, Gateway as 192.168.0.1 and was able to connect. Switched back to automatic couldn't connect anymore. Removed DNS Server and added back again, and was able to connect.
What a heck is going on?
So to summarize every time I restart my laptop or it goes to the stand by, my network settings get reset. DNS Server entry is replaced with 192.168.1.2, and something (forgot the name) is added to Search Domains. After switching between static and automatic, few times. It seems to work again. I never had this problem with FC3 or FC2. Seems it works more consistently with static IP, but it keeps resetting to auto for no apparent reason. Also on auto, when it works, I can only connect to certain websites. What is going on?
Thanks.
Last edited by UmneyDurak; 02-13-2007 at 01:15 AM.
Distribution: Debian and Fedora Core in equal measure
Posts: 264
Rep:
Quote:
Originally Posted by UmneyDurak
So to summarize every time I restart my laptop or it goes to the stand by, my network settings get reset. DNS Server entry is replaced with 192.168.1.2, and something (forgot the name) is added to Search Domains. After switching between static and automatic, few times. It seems to work again. I never had this problem with FC3 or FC2. Seems it works more consistently with static IP, but it keeps resetting to auto for no apparent reason. Also on auto, when it works, I can only connect to certain websites. What is going on?
Sounds like your PC is set up to pick up its IP address from a DHCP server. This will replace things like IP address, gateway address, DNS server address etc. Under these conditions, when the PC is booted or comes back from suspend, it broadcasts a DHCP request (basically saying to anyone listening on the network "Who am I? where is everyone?" a bit like when you wake on a Sunday morning after a too-enthusiastic Saturday night!)
First find the server that is responding, then edit the DHCP server configuration file so that it gives you the configuration you want the PC to have.
where the top line of the output shows the dhcpd process running. You could deal with this by killing the process (kill 4897 in this case), though this is only temporary, till restart, when the dhcpd daemon will be automatically restarted. Its a good way to prove a point, though, without doing any (potentially serious) damage.
Alternatively you could load something like ethereal on to one of the systems on the network, and use it to watch the dhcp sequence going down the wire at startup time. Debugging network problems with analysers like this is also worthwhile just for the knowledge of a very common and useful system tool (dhcpd) that you would gain.
Ultimately, you will need to use yum (Fedora) or synaptic (Debian) or something similar to get the dhcpd subsystem off the system.
Try that, then tell us how you get on
HTH
Jimbo
Of course, it could be that dhcpd is running on a windoze system on the net, in which case look in the services menu in the control panel, and STOP RUNNING WINDOZE
The default install is almost always set up for DCHP as is your router. You're using NAT on the router, hence the local IP addressing which can't be used outside your LAN. Truth is if you hadn't attempted to configure IP's everthing would have worked out of the box. Enable DCHP on all your boxes.
The default install is almost always set up for DCHP as is your router. You're using NAT on the router, hence the local IP addressing which can't be used outside your LAN. Truth is if you hadn't attempted to configure IP's everthing would have worked out of the box. Enable DCHP on all your boxes.
Thats the thing it didn't work out of the box. I had to twick it to get it to work. Honestly I have no idea what is going on. I leave it on static IP. Go to standby, come back it populates DNS Server with wrong local IP, and Search Domain Server with some value. After switching back and forth it seems work again.
FC3 worked out of the box, both of my windows machines automatically acquire local IP and work. This one doesn't. Really frustrating. Only thing that seems to work is switching from auto to static, and back. Through Network Tools it shows correct IP 192.168.0.2 for eth0 even when I can't connect to the internet. In all cases I can connect to my other local machines.
Last edited by UmneyDurak; 02-13-2007 at 11:37 PM.
where the top line of the output shows the dhcpd process running. You could deal with this by killing the process (kill 4897 in this case), though this is only temporary, till restart, when the dhcpd daemon will be automatically restarted. Its a good way to prove a point, though, without doing any (potentially serious) damage.
Alternatively you could load something like ethereal on to one of the systems on the network, and use it to watch the dhcp sequence going down the wire at startup time. Debugging network problems with analysers like this is also worthwhile just for the knowledge of a very common and useful system tool (dhcpd) that you would gain.
Ultimately, you will need to use yum (Fedora) or synaptic (Debian) or something similar to get the dhcpd subsystem off the system.
Try that, then tell us how you get on
HTH
Jimbo
Of course, it could be that dhcpd is running on a windoze system on the net, in which case look in the services menu in the control panel, and STOP RUNNING WINDOZE
It is restarted after laptop comes back from suspend. Resets the DNS Server entry and sets Search Domains to Belkin.
Last edited by UmneyDurak; 02-13-2007 at 11:36 PM.
Distribution: Debian and Fedora Core in equal measure
Posts: 264
Rep:
You wrote "Resets the DNS Server entry and sets Search Domains to Belkin". Well, there's a start... if the Search Domain is set to "Belkin", its almost certain where the DHCP server is located...it's in your Belkin Router.
I wonder, when you make your changes to the networking on the Ubuntu PC, do you just change them in the GUI rather than hacking the files? It could be that you are changing the set up from the GUI, but not hitting "save", so the changes are only valid for the duration of the session. This would give you the characteristics you describe.
I would be inclined to do one of two things:
1) Set up the DHCP server in your router so it serves the correct data. This is the preferable way forward, because any device that you put on your network in future will benefit. You will need to RTFM to know how to set the router, but they are usually pretty simple...if you have probs, tell us the Router type/number and we can probably help more (the manuals can most likely be downloaded from the manufacturer site);
2) Stop using/allowing DHCP all together, disable DHCP on your PCs, so they can't get any configs from any server, and set up the characteristics on each network interface completely statically. If you plan to do it this way, its probably best to actually hack the files directly, not use the GUI. It will take longer, and you will have to do some research, but at the end of the process, you will understand what is happening in the machine. (if you didn't care what was happening, you wouldn't be here!)
For what it's worth, unless you run servers that need to be accessed from the Internet, I would go with solution (1), it reduces management overhead and means you don't have to remember so much
One other point...I tend to agree with Fragos, that it should all work OOB, but there appears to be a misconfiguration of the Router, which seems to be serving wrong data.
Well I have wired Netgear router not Belkin. I don't have a clue where it is getting that information.
So here is my config files after I got Internet to work:
Quote:
root@alexlaptop:~# cat /etc/resolv.conf
search 192.168.0.1
nameserver 192.168.0.1
root@alexlaptop:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
root@alexlaptop:~# cat /etc/resolv.conf
search Belkin
nameserver 192.168.2.1
interfaces remains unchanged, but resolv.conf gets reset. Where the heck is it grabbing this information?
Here are my router settings. Looks ok to me, and other computer do grab correct IP from it. http://i104.photobucket.com/albums/m...rak/router.jpg
Ok, apparently my neighbor has Belkin router. So instead of grabbing the IP from my router using wired connection, or the connfig files it's grabbing it using wireless card from my neighbors router! How can I stop it?
Last edited by UmneyDurak; 02-14-2007 at 11:13 PM.
Distribution: Debian and Fedora Core in equal measure
Posts: 264
Rep:
Now that is *weird*!
I can only assume that your WLAN is, as you suggest, picking up the configuration from your neighbour's Belkin (is he in range?). That further presupposes that you are both using the same Wireless security method and crypto setup...what are the chances of that?? (Unless you are both running without security,on the wireless, and from what you have done so far, I guess you have sufficient smarts not to do that ). If that were not the case, there would be no wireless path for the DHCP to work over, so the problem would not occur.
OK, have you tried disabling the WLAN interface (or disabling dhcp on it) and rebooting with it disabled/down?...that would be a simple way of proving that the problem is coming from the neighbour's WLAN AP. Then, if the cause is proven, you can change your wireless security so that you can't establish a low-level link to the Belkin, then DHCP won't be able to access the AP, and your config should stay put.
That begs the question "Why did it not happen on FC3, but does on Ubuntu..."I guess that is down to a configurational issue, where they behave a bit differently OOB.
The only other thing to do would be to stop DHCP from changing the DNS configuration by some configuration changes specific to the WLAN i/face, and currently, I have *no idea* how to do that without being much more aggressive with the configs than you want, and disabling the "good" things its doing.
I think first stop is disable WLANO, reboot and see what happens, and post the results. Then we'll see what can be done!
Now it works just fine. Picking my IP from my wired router. So I guess it was picking up the info form my neighbors wireless router instead of mine wired router. Why would it do that, when my laptop is connected to my router by a cable? This works but now I have to modify that file to use my wireless. Is there a better solution?
Distribution: Debian and Fedora Core in equal measure
Posts: 264
Rep:
A bigger Concern....
OK, you have it working now, but there is a much greater concern than DHCP just now!
You have proven that you were picking up information from your neighbour's WLAN. This means that there is an open IP path over the wireless from you to his router. You were affected by it, in that is screwed your communications.
What is a much greater concern is that the security configuration between his network and yours is compromised (near non-existent). I'm not saying your neighbour would try anything, but if you can get IP communications with him, he can with you, and that eliminates any security between the two nets. He could use your bandwidth, you could potentially use his. Equally, if the security is so open that you have a fortuitous connection, then a third party with lesser morals could connect to either of your networks without too much effort and do all kinds of nasty things.
First thing to do is sort your wireless security. Use WPA-PSK (Wi-Fi Protected Access with Pre-Shared Key), stop broadcasting your SSID, and advise your neighbour to do the same.
OK, you have it working now, but there is a much greater concern than DHCP just now!
You have proven that you were picking up information from your neighbour's WLAN. This means that there is an open IP path over the wireless from you to his router. You were affected by it, in that is screwed your communications.
What is a much greater concern is that the security configuration between his network and yours is compromised (near non-existent). I'm not saying your neighbour would try anything, but if you can get IP communications with him, he can with you, and that eliminates any security between the two nets. He could use your bandwidth, you could potentially use his. Equally, if the security is so open that you have a fortuitous connection, then a third party with lesser morals could connect to either of your networks without too much effort and do all kinds of nasty things.
First thing to do is sort your wireless security. Use WPA-PSK (Wi-Fi Protected Access with Pre-Shared Key), stop broadcasting your SSID, and advise your neighbour to do the same.
Do it NOW!
I don't have wireless router, there is a physical cable connecting my laptop to my router! Unless you are talking about a card on my laptop?
And oh yeah my "brilliant" neighbor is running wireless with no encryption and default password on his router.
Thanks.
Last edited by UmneyDurak; 02-21-2007 at 10:00 AM.
Distribution: Debian and Fedora Core in equal measure
Posts: 264
Rep:
Well, you'll get out of prison for assaulting the neighbour for running an unprotected W-LAN soon , and when you do, you need to tighten up your own configs: you were definately picking up his DHCP service somehow, and you showed wlan0 in your config:
So I guess, in common with my Vaio, and a whole bunch of recent laptops, you have inbuilt wireless, and you were picking up any wireless in range (like your neighbour's). That potentially leaves you exposed on the wireless front!
You may have a nice simple solution: there should be a switch to disable the wireless, certainly my PC has one, as do others that have inbuilt wireless, try switching it off. Whatever, you need to do some wireless security work, and so does your neighbour!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.