ubuntu:networking:configuration:configure_a_static_ip
Differences
This shows you the differences between two versions of the page.
ubuntu:networking:configuration:configure_a_static_ip [2021/01/07 11:26] – created peter | ubuntu:networking:configuration:configure_a_static_ip [2021/01/08 15:28] (current) – removed peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Ubuntu - Networking - Configuration - Configure a static IP ====== | ||
- | |||
- | <code bash> | ||
- | sudo vim / | ||
- | </ | ||
- | |||
- | <file bash / | ||
- | # This file describes the network interfaces available on your system | ||
- | # and how to activate them. For more information, | ||
- | # The loopback network interface | ||
- | auto lo | ||
- | iface lo inet loopback | ||
- | # The primary network interface | ||
- | auto p5p1 | ||
- | iface p5p1 inet static | ||
- | address 192.168.0.99 | ||
- | netmask 255.255.255.0 | ||
- | network 192.168.0.0 | ||
- | broadcast 192.168.0.255 | ||
- | gateway 192.168.0.1 | ||
- | </ | ||
- | |||
- | Since Ubuntu 12.04 the handling of resolv.conf changed. | ||
- | If you want to add your own nameserver address(es) then edit the file / | ||
- | and add your nameserver there (e.g.: Google open dns) | ||
- | |||
- | <code bash> | ||
- | sudo vim / | ||
- | </ | ||
- | |||
- | <file bash / | ||
- | nameserver 8.8.8.8 | ||
- | nameserver 8.8.4.4 | ||
- | </ | ||
- | |||
- | save the file and then run | ||
- | |||
- | <code bash> | ||
- | sudo resolvconf -u | ||
- | </ | ||
- | |||
- | restart network settings | ||
- | |||
- | <code bash> | ||
- | sudo / | ||
- | </ | ||
ubuntu/networking/configuration/configure_a_static_ip.1610018777.txt.gz · Last modified: 2021/01/07 11:26 by peter