A Bit of Sense

Here I talk about my expericne with computers, software and computer programming. Let me warn you that some of this stuff will be technical. I'll aim to give you fair notice for technical posts.

My Photo
Name:
Location: Massachusetts, United States

Sunday, January 25, 2009

HOWTO: Update to static IP Address in Ubuntu 8.10 (Intrepid Ibex)

A bug in network manager causes static IP'ed systems to revert to DHCP upon reboot. In fact I haven't gotten network manager to setup static IPs at all.

Here is a work around I found here at
http://www.ubuntugeek.com/how-to-set-a-static-ip-address-in-ubuntu-810-intrepid-ibex.html

I've condensed the solution to the minimum. I the 'x' character is when you should use a number that is correct for your network. If you are using a typical broadband connection w/a router then your numbers may be something like this:

address 192.168.1.40
netmask 255.255.255.0
gateway 192.168.1.1
nameserver 192.168.1.1

Check the numbers before you begin any of the instructions using ifconfig in order to get the IP and netmask. Use route -n to get the gateway and cat /etc/resolv.conf to get the name server(s).

Solution:

Disable network manager at start up:
sudo update-rc.d -f NetworkManager remove

Make a backup of interfaces file:
sudo cp /etc/network/interfaces /etc/network/interfaces.XXX

sudo nano /etc/network/interfaces

You interfaces should look something like this. Comment out the bit of

auto lo eth0
iface lo inet loopback
iface eth0 inet static
address xxx.xxx.xxx.xxx
netmask xxx.xxx.xxx.xxx
gateway xxx.xxx.xxx.xxx

This second part will probably already be ok, but double check to be sure.

sudo nano /etc/resolv.conf

# Generated by NetworkManager
nameserver xxx.xxx.xxx.xxx(enter your dns server ip)
nameserver xxx.xxx.xxx.xxx(enter your alt dns server ip)

0 Comments:

Post a Comment

<< Home