Google

2006-08-04

Configuring IP Address in Ubuntu

As most people, I have a small home-network. My ubuntu was getting the IP address from the router dynamically. I decided to use static addresses instead of DHCP. The procedure is a bit different then Red Hat Linux.

I first connected to my router and changed the DHCP range so that I would have plenty of static addresses. Then I backed up my /etc/network/interfaces file which had an entry like this:

iface eth0 inet dhcp

As I did not know how to edit this file, I ran the network-admin script:
/etc/network-admin, (you can also do this from GUI: System > Administration > Networking)
Clicked Deactivate Ethernet Connection
Clicked Properties & Changed the IP/NetMask/Gateway after choosing static
Clicked Activate Ethernet Connection
and examined the difference in /etc/network/interfaces file:

OLD <> iface eth0 inet static
NEW > address 192.168.1.3
NEW > netmask 255.255.255.0
NEW > gateway 192.168.1.1

Then, to be able to access my windows box, I added the following entry into /etc/hosts
192.168.1.2 windows

In Red Hat Enterprise, there are to bring up/down eth0, you would run
/etc/sysconfig/network-scripts/if-up eth0
/etc/sysconfig/network-scripts/if-down eth0

In Ubuntu, it's a little different
sudo /etc/ifup eth0
sudo /etc/ifdown eth0

[UPDATE - 08/09/2006]
I noticed a weird issue with the Gnome Network Applet icon on the top right corner. It has a little red exclamation mark and when hovered reads "No network connection" although my network connection is just fine...

No comments: