Differences
This shows you the differences between two versions of the page.
linux_wiki:static_ip [2018/07/12 22:09] billdozor [Redhat/CentOS Systems] |
linux_wiki:static_ip [2019/05/25 23:50] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Static IP ====== | ||
- | |||
- | **General Information** | ||
- | |||
- | Configure static IP, Mask, Gateway, and DNS. | ||
- | |||
- | **Checklist** | ||
- | * Distro(s): Debian or Enterprise Linux | ||
- | |||
- | FIXME -> Add section for NetworkManager setup via nmcli and nmtui | ||
- | |||
- | ---- | ||
- | |||
- | ===== Configure Static Network Info ===== | ||
- | |||
- | ==== Debian/ | ||
- | if possible, bring interface down first: ifdown eth0. | ||
- | |||
- | * Edit / | ||
- | |||
- | * DHCP Setup Example (Default)< | ||
- | iface eth0 inet dhcp</ | ||
- | |||
- | * Static Setup Example< | ||
- | iface eth0 inet static | ||
- | address 192.168.0.100 | ||
- | netmask 255.255.255.0 | ||
- | gateway 192.168.0.254 | ||
- | dns-nameservers 8.8.8.8 8.8.4.4</ | ||
- | |||
- | * Bring the interface up (if brought down at the start)< | ||
- | |||
- | * Otherwise, restart to fix nameserver conflicts between dhclient and static.< | ||
- | |||
- | ---- | ||
- | |||
- | ==== Redhat/ | ||
- | |||
- | Classic and NetworkManager methods of setting IP addresses for EL distros. | ||
- | |||
- | === Classic (network) Method === | ||
- | |||
- | Using config files and the network service. | ||
- | |||
- | * Edit / | ||
- | |||
- | * DHCP Setup Example (Default)< | ||
- | ONBOOT=no (change to yes to have DHCP start automatically) | ||
- | NM_CONTROLLED=yes | ||
- | BOOTPROTO=dhcp</ | ||
- | |||
- | * Static Setup Example< | ||
- | ONBOOT=yes | ||
- | NM_CONTROLLED=no | ||
- | BOOTPROTO=static | ||
- | IPADDR=192.168.0.101 | ||
- | NETMASK=255.255.255.0 | ||
- | GATEWAY=192.168.0.254</ | ||
- | |||
- | * Edit / | ||
- | |||
- | nameserver 8.8.8.8 | ||
- | nameserver 8.8.4.4</ | ||
- | |||
- | * Restart network service< | ||
- | |||
- | === Network Manager === | ||
- | |||
- | Using the NetworkManager service. | ||
- | |||
- | Static IP/Gateway | ||
- | * Set a static IP on an existing interface (eth0)< | ||
- | * Apply settings< | ||
- | |||
- | \\ | ||
- | Static DNS | ||
- | * Set a static DNS entry< | ||
- | * Apply changes< | ||
- | |||
- | ---- | ||