Saturday, December 30, 2006

Static IP address in Gnome

I prefer to use a static ip address on my FC6 box. It seems to make networking between all the computers here at home a lot easier. Go to the top panel and select System / Administration / Network. Enter root password. Your default ethernet card should be shown in the first window. Deactivate it. Select 'edit' from the icons at the top of the network configuration tool. Under the 'general' tab I select 'statically set ip address'. I enter my ip address, 192.168.1.101, my subnet mask, 255.255.255.0, and my default gateway, 192.168.1.1. Click 'ok'. Select the 'dns' tab. Enter your preferred hostname. For me this is 'dad'. The primary and secondary DNS address are usually already there by default as is the DNS search path. If yours are not there you need to find out what they are and enter them now. Click on the menu file / save. Click the 'devices' tab. Click on the 'activate' icon to activate your ethernet connection. Accept any alerts that are presented and you should now have a working static ip address that will not change upon reboot.

As part of setting a static ip address I need to edit my /etc/hosts file. Here's what I do:

At the command prompt, as regular user, type "sudo gedit /etc/hosts". I like to add the ip addresses and hostnames of all 5 computers on my network. Here's my default hosts file:

# Do not remove the following line, or various programs
# that require network functionality will fail.
::1 localhost.localdomain localhost

Here's what I added:
127.0.0.1 dad
192.168.1.100 meg
192.168.1.101 dad
192.168.1.102 neville
192.168.1.103 oldendorff
192.168.1.104 mom

Save and close your editor.

As always, comments and suggestions are welcome. If I'm in error and need to make a correction please, by all means, let me know. I want all info presented here to be accurate.

No comments: