The case of the missing gateway

I've never quite understood the purpose of the NETWORK entry in the ifcfg file of the redhat-based linux distributions.
It can be derived from ip and mask, and if you leave it out altogether, the network works fine as well.
But if you decide to use it, be sure to write it correctly.
The other day I found an ESX machine (that's using redhat as the service console) that loses its default gateway after each reboot.
The gateway was correctly specified in the /etc/sysconfig/network file. After some fiddling I've noticed that the NETWORK clause in /etc/sysconfig/network-scripts/ifcfg-vswif0 was totally wrong. It's not even possible to set it with the vsphere client so I think someone mistyped it while manually configuring the ESX.
Once corrected, a

#service network restart

brought back the ESX online with the vcenter server.

No comments:

Post a Comment