I have a static IP address allocated by my Internet provider. However, support told me I have to use DHCP on my network interface, otherwise it may not work (and it actually does only work with DHCP). IP allocated with DHCP is always the same.
When saying "does not work" I mean it actually works for some time (a few minutes/hours), then is stops working (I can't ping
or nslookup anything
).
So my question is: why is this so and what can I do to make this work the static way? I'm using Centos 7, and I encounter issues when getting my IP through DHCP. My Wi-Fi access point stops working sometimes, and IP forwarding to LAN, too. When setting IP the static way, it works OK.
TYPE="Ethernet"
# BOOTPROTO="static"
BOOTPROTO="dhcp"
DEFROUTE="yes"
DEVICE="enp5s0"
ONBOOT="ys"
# IPADDR="*.*.*.*"
# NETMASK="255.255.255.0"
# GATEWAY="*.*.*.*"
DNS1="8.8.8.8"
DNS2="8.8.4.4"
NM_CONTROLLED="no"
ZONE="public"
I was not able to Google either of issues, because my knowledge on these topics is rather limited. My provider support is also rather poor, I was did not manage to get much support from them.