Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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 (https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/6/html/6.1_Technical_Notes/ar01s04s05.html)

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
1  
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

 
discard

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.