Heartbeat networks on AWS

What happens when you want a private non-routable network such that you would use for a cluster heartbeat or in this case, a vertica spread network, on AWS?

If like me, you use DHCP when attaching an ENI to your EC2 instance, then you will find that when your linux (centos or redhat distro) executes ifup-eth1, the default dhcp options will mean the default route will be set to this network.

The second network card in this configuration is on its own private non-routable network, and with AWS there is no way to remove the default gateway for this network. The best I could find was an article stating you could use ACL (access control list) to restrict the network to that subnet. This is of little use if your default gateway has been set to a router that blocks all traffic.

There is an answer however. The DHCP client looks for config files, and if they are not found, uses defaults.

The fix for my private non-routable network, create a file that looks like this:

/etc/dhcp/dhclient-eth1.conf
request subnet-mask, broadcast-address, time-offset,
interface-mtu;

This little file means only request the basic info from the DHCP Server. If we don't ask for the router, then we aren't going to get it.