Changing Ip Address on Ubuntu / Debian From Dhcp to Static.
Posted by Isaac Zarb on November 20th, 2009So we start by editing the /etc/network/interfaces file, I will be using vim, however you can use any editor you like
sudo vim /etc/network/interfaces
Let’s assume you want to do the changes for eth0, you will see these lines:
auto eth0
iface eth0 inet dhcp
As you can see, the server is set to use DHCP right now.
We will change over from dhcp to static, Edit your file to the following
auto eth0
iface eth0 inet static
address 192.168.0.10 (Change this you whatever address you want to specify)
netmask 255.255.255.0 (Use your subnet mask)
network 192.168.0.0 (Your network address)
broadcast 192.168.0.255 (your broadcast address)
gateway 192.168.0.1 (Your default gateway, ip of fw or router)
Save the Changes and exit the editor Read the rest of this entry »
Recent Comments