Friday, November 25, 2011

Change IP Address In Ubuntu Server

To change IP address, you’ll need to edit /etc/network/interfaces
#sudo vi /etc/network/interfaces

For static IP addresses:
auto eth0
iface eth0 inet static
address 192.168.0.250
netmask 255.255.255.0
network 192.168.0.0
gateway 192.68.0.1
broadcast 192.168.0.255
 
For dynamic IP addresses:

auto eth0
iface eth0 inet dhcp

#sudo /etc/init.d/networking restart

0 comments:

Post a Comment