I've just set up a static IP Address for my CentOS Machine using the following settings in /etc/sysconfig/network-scripts/ifcfg-eth0
#eth0 Config #IPv4 DEVICE="eth0" NM_CONTROLLED="yes" ONBOOT=yes HWADDR=*get from ifconfig* TYPE=Ethernet BOOTPROTO=static NAME="System eth0" IPADDR=10.0.0.66 NETMASK=255.255.255.0 GATEWAY=10.0.0.2 DNS1=126.96.36.199 DNS2=188.8.131.52
That's all working but when I reboot the machine I can't connect to the network and I see it's because it doesn't have the gateway which is 10.0.0.2
I tried to add it as well with /etc/sysconfig/network
NETWORKING=yes NETWORKING_IPV6=no HOSTNAME=centos66
When I reboot I see that the hostname is now centos66 but it still doesn't have the gateway?
Anyone know what I'm doing wrong and how to fix this?
The DNS had to be added which fixed the issues, I'll leave this here for whoever might be helped by it