Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My system is an Ubuntu 9.10. I want to use my new router but it can't get access to the internet at all. It works with all my Windows machines so the router seems to work.

My /etc/network/interfaces looks like the following:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
    address xxx.xxx.xxx.xxx
    netmask 255.255.255.0
    gateway xxx.xxx.xxx.xxx

Of course xxx.xxx.xxx.xxx is replaced with the actual ip of my router. The problem is that my Ubuntu box can't get access to any domain in the internet. Can anyone help me?

share|improve this question

migrated from serverfault.com Nov 16 '09 at 21:24

This question came from our site for professional system and network administrators.

1  
Giving your machine the same address as the router was probably not a wise move. –  womble Nov 15 '09 at 14:07
    
xxx.xxx.xxx.xxx shows up twice in your interfaces file, but it should only appear once. You should have a separate address yyy.yyy.yyy.yyy for either you address or gateway (i.e., they can't have the same value). Is this true? –  Suppressingfire Nov 29 '09 at 15:16
add comment

3 Answers 3

That's wrong. address should be the address of your pc, which is different than the gateway (router) address.

The DNS server address should also be properly configured (the router address probably will probably work ok for you).

Search with Google how to set up a static ip address on Ubuntu (which can be done using /etc/network/interfaces). There should be about a million results :)

share|improve this answer
    
Here's one good resource: help.ubuntu.com/9.10/internet/C/… –  Suppressingfire Nov 29 '09 at 16:09
    
And if you really want to use the command line / config file route: help.ubuntu.com/9.10/serverguide/C/network-configuration.html –  Suppressingfire Nov 29 '09 at 16:10
add comment

Firstly, we don't have enough information (I'd comment but not enough rep yet). Why are you using static IP's for a Desktop are all your windows machines static? if not this should be on DHCP too. next we can't see your IP addresses, your behind a router, a 192.168 or a 10.0 address aren't going to identify you to us and it's made it impossible to tell if your configuration is wrong.

share|improve this answer
add comment

This question probably belongs on superuser but I'll give you an answer.

From your Ubuntu box can you ping the router? If so you're most likely dealing with a DNS issue. You can see what your current DNS servers are set to by looking at /etc/resolv.conf.

If you're using DHCP to set your network settings try running "sudo /etc/init.d/networking restart" This should bounce your network and get the proper settings from your DHCP server in your router.

If you have this setup as a static IP address then you'll need to change your gateway setting in /etc/network/interfaces to point to the new router IP address. Then run the "sudo /etc/init.d/networking restart" to apply the changes.

share|improve this answer
    
I can ping the router but I can't ping any IP address at the internet. A DNS issue was my first idea too but I can't ping the IP address directly either. I restarted my network several times now but it didn't help. –  Hagbard Nov 13 '09 at 19:29
    
It works now. Changed my router configuration to DHCP and changed my interfaces file accordingly. Everything is fine now. –  Hagbard Nov 13 '09 at 19:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.