- Show all Docs ( 5 ) Collapse Docs
- Show all Docs ( 309 ) Collapse Docs
- Show all Docs ( 1 ) Collapse Docs
- Show all Docs ( 31 ) Collapse Docs
How to Set Manual or static IP Address on Debian server
In this article we will discuss about how to set Manual or static IP Address on Debian server, there will come a moment in your career as a Linux system administrator when you will be tasked with the responsibility of configuring networking on your machine. On desktop computers, you are able to utilise dynamic IP addresses; but, in order to set up a server architecture, you will need to configure a static IP address (at least in most cases).
The following information on Internet Protocol version 4 (IPv4) will be used so that we may accomplish the objectives of this tutorial.
IP address: 192.168.10.10 Netmask: 255.255.255.0 Hostname: microhost.example.com Domain name: example.com Gateway: 192.168.10.1 DNS Server 1: 126.96.36.199 DNS Server 2: 188.8.131.52
Before doing anything, first check the network device name of your system, in which you want to set static ip.
To configure static IP address in Debian/ Ubuntu, open the following file:
# vi /etc/network/interfaces
You will see the below lines in the above opened file.
auto eth0 iface eth0 inet dhcp
Change the line to the below code.
auto eth0 iface eth0 inet static address 192.168.0.100 netmask 255.255.255.0 gateway 192.168.0.1 dns-nameservers 184.108.40.206 dns-nameservers 220.127.116.11
Save the file and exit the file.
Now make the required entry in /etc/resolv.conf file as follow
[/console]# vi /etc/resolv.conf [/console]
nameserver 18.104.22.168 nameserver 22.214.171.124
Now just down your network device and then up the same to made the changes reflected.
# ifdown eth0
# ifup eth0
Now confirm whether your changes just reflected yet or not.