Debian 9 Static IP

Опубликовано: 11 Октябрь 2024
на канале: solron75
2,300
10

This video shows how to set static IP address Debian 9 (Debian Stretch). By default after installation of Debian 9, your IP address will be dynamic. So how to assign static IP address in Debian 9?

In this video, the example is shown on a local console. If you are working on an ssh connection, check my article. Basically, you down bring the network interface card down and up again. You will lose connection. Just do the changes in /etc/network/interfaces and reboot the server. That is the easiest way if working on an ssh connection. If working on a local console, just follow the video.

The commands used in this video:
ifdown ens3 (This will take the network interface down and release the IP)

vim /etc/network/interface (Will open the vim editor and start editing the interface settings file). Press i to start edit in vim. When finished press ESC and then type :wq (include the :) to save the file and close vim. Nano might be easier to use than vim.

service networking restart (To restart the networking service)
ifup ens3 (Bring the network interface online again)

ip a (is used to check the ip addresses for the network interfaces)

This is how you do Debian 9 static IP. Check this article for written instruction and more information https://soltveit.org/debian-9-static-ip/