Configure static IP in ubuntu system
From Notes_Wiki
Home > Ubuntu > Server or Desktop administration > Configure static IP in ubuntu system
To configure static IP in ubuntu edit /etc/network/interfaces as follows:
auto eth0 iface eth0 inet static address 192.168.3.3 netmask 255.255.255.0 gateway 192.168.3.1 dns-search example.com dns-nameservers 192.168.3.45 192.168.8.10
Restart using:
systemctl restart networking
as use of /etc/init.d/networking restart is deprecated
For DNS we can also create /etc/resolvconf/resolv.conf.d/tail file with desired "resolv.conf" static contents and do
resolvconf -u
for settings to take effect.
Refer:
- https://help.ubuntu.com/lts/serverguide/network-configuration.html
- https://askubuntu.com/questions/143819/how-do-i-configure-my-static-dns-in-interfaces
Home > Ubuntu > Server or Desktop administration > Configure static IP in ubuntu system