My CentOS 7.4 server currently acquires its IP address over DHCP from my router. The problem I have with this is the server is choosing to utilise a public dynamic IP which keeps changing.
I would like the server to acquire a permanent static IP using 'bootproto=static' which can be set in my network configuration file at: /etc/sysconfig/network-scripts/ifcfg-enp2s0 however I am having hard time providing the correct details for a static setup.
A guide I have found on setting up bootproto=static can be found here: https://www.techrepublic.com/article/ho ... -centos-7/ .
I'm unsure on what information to provide for the following entries:-
My server uses the IP 81.143.9.98 for all virtual accounts so would I pass IPADDR=81.143.9.98 as the entry? My ISP tells me my netmask=255.255.255.248 which appears accurate. My router is presumably the gateway which has the IP 192.168.1.254 AND 81.143.9.97 so which IP address would I use for the GATEWAY= entry? Lastly, is the DNS1= entry the same has the GATEWAY= entry?IPADDR=
NETMASK=
GATEWAY=
DNS1=
Many thanks in advance for any advice.