Static IP stops internet from working?
#1
Hi,


In XBMC 12.2 I change my IP to static using this method http://wiki.xbmc.org/index.php?title=HOW..._static_IP:

Code:
sudo nano /etc/network/interfaces

Code:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.2.12
netmask 255.255.255.0
gateway 192.168.2.1

After this is set, I can gain access to xbmc via SSH to the set ip of 192.168.2.12 however for some reason the internet doesn't work. I get an error everytime xbmc turns on

Quote:unable to connect to remote server would you like to continue scanning

I have tried a few things in the forum but nothing worked. With some fault finding it has definitely got something to do with my static IP set. Can some one explain how I can set my static ip without losing internet.

This was working for ages in 11 and i thin 12 not sure about 12.1...

Thanks
Reply
#2
Try some basic tests - I suspect a DNS issue (quite likely as you stopped using DHCP you stopped getting issued DNS server information), but this will confirm:

ssh in and then
Code:
ping 192.168.2.1
ping 8.8.8.8
ping google-public-dns-a.google.com

The first tests local lan connectivity (to your gateway), the second tests internet connectivity (to a google server) and the third tests to the same server but with name resolution required.

Frankly a better way of keeping a static IP is to get your DHCP server (usually your ISP supplied router) to hand out the same address every time to that particular computer. Even the most basic domestic routers tend to have this feature, but the exact sequence to do it varies. In that way the router hands out the same IP every time the client needs a new DHCP lease, but also hands out all the other goodness like DNS servers etc.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#3
You forgot to add DNS settings to the system. Check /etc/resolv.conf

http://www.cyberciti.biz/tips/linux-how-...lient.html

I personally would not use static assignment in DHCP because that makes me reliant on the dhcp server. Even when the route is offline i am able to watch videos from my NAS now.
Reply
#4
Sorry for the late chime-in...

If you need to SSH to the machine via IP (rather than DNS), rather than setting a static IP address, try reserving your IP allocation under the DHCP or LAN settings on your router.
Reply

Logout Mark Read Team Forum Stats Members Help
Static IP stops internet from working?0