Monday, July 26, 2010

Ubuntu Desktop 9-10 Change network setup from DHCP to Static

To change your network configuration from dhcp to static ip is not hard. You can follow these steps below:
1. Open your terminal client
2. Type this command:
$ sudo vim /etc/interfaces
3. Then you will see there are 2 network interface, lo and eth0. See example below:
auto lo
iface lo inet loopback
 
auto eth0
iface eth0 inet dhcp
4. Change the eth0 one according to your network setting (you can call your network administrator and tell you the setting) , see example below
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
5. Save that file and close
6. Restart your network to apply the new setting, with this command:
$ /etc/init.d/networking restart
7. See your network configuration by type:
$ ifconfig
That's it. Thanks for reading this article. Please leave any comment if you have another tips or input.

No comments:

Post a Comment