Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changing from Dynamic to Static IP address in Linux
01-30-2012, 01:35 AM
Post: #1
Changing from Dynamic to Static IP address in Linux
Once you have installed a brand new Linux distro on your machine, you might want to connect to internet using the static ip address provided by your ISP. This configuration will work on Debian based linux machines or the debian variants like Ubuntu, Mint Linux and others.

As a root user, edit your /etc/network/interfaces file.

nano /etc/network/interfaces

Change From DHCP TO Static IP On Debian

Edit the /etc/network/interfaces file. Note, use the ip addresses specific to your network instead of just copying pasting from below.

When you are finished your file should look like the following:

Quote:#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.1.200
network 192.168.1.0
dns-nameservers 192.168.1.1
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1

Once done, you might want to restart your networking service and up the interface by using the commands below..

Quote:/etc/init.d/networking restart
ifup eth0
and you are done. Congratulations, you can now use your static IP to connect to internet in Debian or Ubuntu.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)