Wednesday, January 2, 2013

Static IP address in Gnome on Debian Wheezy

DHCP makes connecting to a router easy, but it does have drawbacks. I have the router set up with port forwarding for Transmission, Amule and now Skype, which I recently installed. I was trying to connect with Skype the other day but couldn't. Later I remembered that my brother had visited recently and used his iPhone and laptop on the network, and my computer's IP address had changed. I don't know for sure if this is why Skype didn't work, but I think it might be.

My printer has had a static IP address for a while now, so I thought it was time to move the wired laptop connection to a static IP address. Network Manager makes it easy: change the connection method to manual and enter the address, netmask and gateway (the router address). The static IP address has to be outside the DHCP "pool". (The pool range and netmask address should be available by accessing the router configuration page.)


I made the changes, and Network Manager established a new connection, using the existing DNS address, previously forwarded to Network Manager by DHCP: 8.8.8.8- the Google DNS server.

Everything  seemed to work fine. I could view web pages. But then web pages stopped loaded with a "Looking up..." notification, which suggested a DNS problem to me. Rebooting the router fixed the problem for a few minutes, then it started again.

In the end I found a solution, as visible in the screenshot above: I set the DNS address to the router address, and DNS requests are handled by the router. I have no idea why DNS server addresses in Network Manager don't work for me, or rather why they work for a short time, then stop working. I've been looking for an answer all day, but haven't found one, so maybe a kind reader (if I have one) who knows the reason will leave a comment.


No comments:

Post a Comment