Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a bunch of RedHat VMs that I need to set a static IPv4 routing table. I want to centralize this configuration and it came to my mind the DHCP service that could provide this information (see RFC3442).

  • Does any of the DHCP clients that came with RHEL 5, and RHEL6 supports this feature?
  • Is there any other alternative for doing routing table provisioning?
  • Switching to IPv6 would ease this configurations?

Any other idea is welcome.

See: RFC3442 - Classless Static Route Option for DHCPv4

share|improve this question
up vote 3 down vote accepted

Have you considered handling this via Puppet or Chef? I would think that it would be fairly easy to write a module that would check to make sure that the routes are present and apply them if they are not available. That gives you the same flexibility and centralized control that you have with a single DHCP service config file.

If the VMs are set up with static IPs, you could set that in the network interface's route config file such as '/etc/sysconfig/network-scripts/route-eth0'. That could also be easily managed by a configuration management tool.

If you wish to do this via DHCP, ensure that your have properly configured your DHCP client per the RedHat Knowledgebase article (

To ensure that RFC3442-standard classless static routes provided by a DHCP server are processed correctly when using NetworkManager, the following lines should be placed into /etc/dhclient.conf or, if using per-interface DHCP options, /etc/dhclient-.conf:

option rfc3442-classless-static-routes code 121 = array of unsigned integer 8; 
option ms-classless-static-routes code 249 = array of unsigned integer 8; 
also request rfc3442-classless-static-routes;
also request ms-classless-static-routes;

These lines will ensure that RFC3442 classless static routes are requested from the DHCP server, and that they are properly processed by NetworkManager.

share|improve this answer
I prefer DHCP as it will be consistent with Windows machines. But I will think about Puppet. Thank you for the answer. – Mircea Vutcovici Oct 3 '12 at 12:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.