Two Interfaces each running a DHCP Client

I recently had a case where I had a Linux server with two Ethernet cards in it that were both configured using DHCP. The issue I ran into was that eth0 was my gateway to the Internet and when eth1 would get it's DHCP values it was overwriting both my domain name server entries and default route (gateway) information and preventing access to the Internet. The DNS issues are easily solved in Redhat Enterprise (or in my case Centos) by adding PEERDNS=no to /etc/sysconfig/network-scripts/ifcfg-eth1, however the default route/gateway issue was much bigger. The dhclient program can get it's parameters from a file called /etc/dhclient-eth1.conf (or whatever interface you want). I saw that it has a nice feature to tell dhclient just which options to accept from the server using the request keyword. So I created a /etc/dhclient-eth1.conf that looked like this:

request subnet-mask, broadcast-address;

What I discovered was that this still received the routers option from the server. Seems like a bug to me, since one of the request items is routers, it shouldn't be returned by default every time. So, next I noticed there is another configuration keyword, supersede, that allows you to override a value sent by the DHCP server. By setting the routers option to all zeros, you can now have it ignore anything sent by the DHCP server. So now I have a /etc/dhclient-eth1.conf file that looks like this:

request subnet-mask, broadcast-address;
supersede routers 0.0.0.0;

And one last little trick, which is to delete the old leases file, /var/lib/dhclient/dhclient-eth1.leases, so it forgets that it ever had a routers option and then everything works as I expect.