Configure static IP on Debian 8

Share this post to your friends !
  • 1

SystemMen - Configure static IP on Debian 8. I wrote a similar post for Ubuntu 16. Generally, Ubuntu-based or Debian-based operating systems have a pretty similar configuration.

Define the interface to configure static ip

Define the interface you want to set up. A server with multiple network interfaces is normal. So you need to determine which interface you want to configure the static IP.

You can use one of the following commands to display all the interfaces that are present in the server.

ifconfig -a
ip a
ip link show

Personally I think you should use the command ip link show.

Configure static IP on Debian

Step 1, open the /etc/network/interfaces file using the nano command below.

nano /etc/network/interfaces

Step 2, copy the following configuration to the file and change the information that matches your system. For example, I would set up an interface named eth1.

auto eth1
iface eth1 inet static
configure-static-ip-on-debian-8 Configure static IP on Debian 8
Configure static IP for interface ‘eth1’ on Debian 8.

Step 3, restart the server’s network service to apply the new configuration. Note that you need to make sure that it is possible to console or connect to another server’s IP. Because after restart the network service, the old IP of the interface will be lost.

systemctl restart networking.service

Check new IP

Now you can type the following command to test whether the IP has been applied to the interface you want or not.

ip a | grep eth1
configure-static-ip-on-debian-8-01 Configure static IP on Debian 8
Check new IP were successful apply.
If you liked this article, then please subscribe to our YouTube Channel for more video tutorials. You can also find us on Twitter and Facebook.

Share this post to your friends !
  • 1
If you appreciate what we share in this blog, you can support us by:
  1. Stay connected to: Facebook | Twitter | Google Plus | YouTube
  2. Subscribe email to recieve new posts from us: Sign up now.
  3. Start your own blog with SSD VPS - Free Let's Encrypt SSL ($2.5/month).
  4. Become a Supporter - Make a contribution via PayPal.
  5. Support us by purchasing Ribbon Lite Child theme being using on this website.

We are thankful for your support.

«« »»

Got something to say? Join the discussion

Please keep in mind that all comments are subject to our Comment Policy. Your email address will not be published.
This site uses Akismet to reduce spam. Learn how your comment data is processed.