Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux_wiki:static_ip [2018/03/06 10:05] billdozor [Debian/Ubuntu Systems] |
linux_wiki:static_ip [2019/05/25 23:50] (current) |
||
---|---|---|---|
Line 15: | Line 15: | ||
if possible, bring interface down first: ifdown eth0. | if possible, bring interface down first: ifdown eth0. | ||
- | * Edit / | + | * Edit / |
* DHCP Setup Example (Default)< | * DHCP Setup Example (Default)< | ||
Line 35: | Line 35: | ||
==== Redhat/ | ==== Redhat/ | ||
- | 1) Edit / | + | Classic and NetworkManager methods of setting IP addresses for EL distros. |
- | <code bash> | + | |
- | vi / | + | |
- | </ | + | |
- | 2) DHCP Setup Example (Default) | + | === Classic (network) Method === |
- | <code bash> | + | |
- | DEVICE=eth0 | + | Using config files and the network service. |
+ | |||
+ | * Edit / | ||
+ | |||
+ | * DHCP Setup Example (Default)< | ||
ONBOOT=no (change to yes to have DHCP start automatically) | ONBOOT=no (change to yes to have DHCP start automatically) | ||
NM_CONTROLLED=yes | NM_CONTROLLED=yes | ||
- | BOOTPROTO=dhcp | + | BOOTPROTO=dhcp</ |
- | </ | + | |
- | 3) Static Setup Example | + | * Static Setup Example< |
- | <code bash> | + | |
- | DEVICE=eth0 | + | |
ONBOOT=yes | ONBOOT=yes | ||
NM_CONTROLLED=no | NM_CONTROLLED=no | ||
Line 56: | Line 54: | ||
IPADDR=192.168.0.101 | IPADDR=192.168.0.101 | ||
NETMASK=255.255.255.0 | NETMASK=255.255.255.0 | ||
- | GATEWAY=192.168.0.254 | + | GATEWAY=192.168.0.254</ |
- | </ | + | |
- | 4) Edit / | + | * Edit / |
- | <code bash> | + | |
- | vi / | + | |
nameserver 8.8.8.8 | nameserver 8.8.8.8 | ||
- | nameserver 8.8.4.4 | + | nameserver 8.8.4.4</ |
- | </ | + | |
+ | * Restart network service< | ||
+ | |||
+ | === Network Manager === | ||
+ | |||
+ | Using the NetworkManager service. | ||
+ | |||
+ | \\ | ||
+ | Static IP/ | ||
+ | * Set a static IP on an existing interface (eth0)< | ||
+ | * Apply settings< | ||
+ | |||
+ | \\ | ||
+ | Static DNS | ||
+ | * Set a static DNS entry< | ||
+ | * Apply changes< | ||
+ | |||
+ | ---- | ||
- | 5) Restart network service | ||
- | <code bash> | ||
- | / | ||
- | </ |