Difference between revisions of "Configure static IP in ubuntu system"
From Notes_Wiki
|  (Created page with "<yambe:breadcrumb>Ubuntu|Ubuntu</yambe:breadcrumb> =Configure statis IP in ubuntu system=  To configure static IP in ubuntu edit /etc/network/interfaces as follows: <pre>    a...") | m | ||
| Line 1: | Line 1: | ||
| [[Main Page|Home]] > [[Ubuntu]] > [[Configure static IP in ubuntu system]] | |||
| To configure static IP in ubuntu edit /etc/network/interfaces as follows: | To configure static IP in ubuntu edit /etc/network/interfaces as follows: | ||
| Line 29: | Line 28: | ||
| * https://help.ubuntu.com/lts/serverguide/network-configuration.html | * https://help.ubuntu.com/lts/serverguide/network-configuration.html | ||
| * https://askubuntu.com/questions/143819/how-do-i-configure-my-static-dns-in-interfaces | * https://askubuntu.com/questions/143819/how-do-i-configure-my-static-dns-in-interfaces | ||
| [[Main Page|Home]] > [[Ubuntu]] > [[Configure static IP in ubuntu system]] | |||
Revision as of 07:02, 31 March 2022
Home > Ubuntu > 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