Change Ubuntu Server from DHCP to a Static IP Address
Information borrowed from http://www.howtogeek.com/howto/ubuntu/change-ubuntu-server-from-dhcp-to-a-static-ip-address/
/etc/network/interfaces
DHCP setup of the "interfaces" file
auto eth0
iface eth0 inet dhcp
iface eth0 inet dhcp
Static IP address example of the "interfaces" file
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
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
DNS Settings
/etc/resolv.conf
On the line ‘name server xxx.xxx.xxx.xxx’ replace the x with the IP of your name server.
sudo apt-get remove dhcp-clientNow we’ll just need to restart the networking components:
sudo /etc/init.d/networking restart
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.