Going From DHCP To Static
To set up your NIC for DHCP edit /etc/network/interfaces to read:
auto eth0 iface eth0 inet static address 192.168.1.20 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1
To set up your NIC for DHCP edit /etc/network/interfaces to read:
auto eth0 iface eth0 inet dhcp
Of course you will need to adjust ethX for the particular NIC you are making changes for. Following this you will want to run:
sudo /etc/init.d/networking restart
