I've just assigned my CentOS machine with a static IP address using the /etc/sysconfig/network-scripts/ifcfg-eth0 which has the following lines and seems to be working
HWADDR=*hardware address here*
when i use ifconfig I see that ip address is 10.0.0.66, however when I try to assign a gateway with /etc/sysconfig/network
It doesn't seem to be working, when I use route -n I see that the gateway is 10.0.0.0
How do I set the gateway to work like my static IP?
I've just found that if I run dhclient it works. When I check the /etc/resolv.conf it has the nameserver 10.0.0.2 which I want.
I don't know why this fixes it but is there a way that I don't have to run dhclient every time? It doesn't seem right it should have the nameserver in the resolv.conf on boot?