User Tools
databaseandnetworkmanagement:static_ip_on_redhat
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| databaseandnetworkmanagement:static_ip_on_redhat [2017/08/22 12:00] – created 1carew1 | databaseandnetworkmanagement:static_ip_on_redhat [2021/06/25 10:09] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Set Static IP on RedHat ====== | ||
| + | * # check the connected interface - usually eth0 but could be eth1, this affects what file we want to edit | ||
| + | * ifconfig | ||
| + | * # backup the config file of that interface | ||
| + | * sudo cp / | ||
| + | * # A Config File without a static IP will look like : | ||
| + | < | ||
| + | DEVICE=eth0 | ||
| + | HWADDR=F4: | ||
| + | TYPE=Ethernet | ||
| + | UUID=1c4472a7-41a3-43bf-8b16-c0643976b2f8 | ||
| + | ONBOOT=yes | ||
| + | NM_CONTROLLED=yes | ||
| + | BOOTPROTO=dhcp | ||
| + | </ | ||
| + | |||
| + | * # A config file with a static IP will look like : | ||
| + | |||
| + | |||
| + | < | ||
| + | DEVICE=eth0 | ||
| + | TYPE=Ethernet | ||
| + | UUID=1c4472a7-41a3-43bf-8b16-c0643976b2f8 | ||
| + | ONBOOT=yes | ||
| + | NM_CONTROLLED=no | ||
| + | BOOTPROTO=none | ||
| + | HWADDR=F4: | ||
| + | IPADDR=10.91.100.71 | ||
| + | PREFIX=24 | ||
| + | GATEWAY=10.91.100.1 | ||
| + | DNS1=10.91.100.71 | ||
| + | DNS2=10.5.5.15 | ||
| + | DEFROUTE=yes | ||
| + | IPV4_FAILURE_FATAL=yes | ||
| + | IPV6INIT=no | ||
| + | NAME=" | ||
| + | </ | ||
| + | |||
| + | * # make change as appropriate to the appropriate config file | ||
| + | * # save and exit | ||
| + | * # Be 100% confident with your changes - if you are not do not do this | ||
| + | * sudo service network restart | ||
| + | * # The server should now have the static ip you assigned it | ||