Changing IP to static IP on Linux platform is very easy. You need to follow the below steps to change it.
You need to open the text editor in the Linux. For opening the text editor you need to have the root access.
For user based operating system you need to type the below command
For run levelbased operating system you need to type the below command
Code:
~@Domain $-su -
Password:
Root@Domain $-
The above command will open the file in the text editor without worrying about root or you can log into the system as the root, edit the files.
Open the file /etc/resolv.conf and add some DNS address.
Code:
Nameserver XXX.XXX.XXX.XXX - IP address of primary name server
Nameserver XXX.XXX.XXX.XXX - IP address of secondary name server
You can add many DNS address. Now you need to edit the file /etc/network/interfaces and type the below configuration.
Code:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 208.88.34.106
netmask 255.255.255.248
broadcast 208.88.34.111
network 208.88.34.104
gateway 208.88.34.110
After this step you have change your IP to static IP.
Bookmarks