Change the IP to static in Ubuntu

vim /etc/network/interfaces

Remove the entry : iface eth0 inet dhcp
Add the below information :

iface eth0 inet static
address Actual_IP_address
netmask Actual_Mask
gateway Actual_gateway

Restart the network service : /etc/init.d/networking restart
Note : you can try the below for the changes to take effect but make sure that you have direct access to server other than ssh :

ifdown eth0
ifup eth0
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s