in order to avoid the dhcpclient to set the default route based on the information received from the dhcp server on eth1.
I have a test case for this already. But I haven't figure out how to make it work as in sysconfig.py _render_subnets() does so on a per interface basis and thus there is no knowledge of the network topology.
And some more fun. We have to know the routes for all the interfaces. For example with the following configuration:
{'version': 1, 'config': [{'type': 'physical', 'mtu': 1500, 'subnets': [{'type': 'static', 'netmask': '255.255.240.0', 'routes': [{'netmask': '0.0.0.0', 'network': '0.0.0.0', 'gateway': '51.68.80.1'}], 'address': '51.68.89.122', 'ipv4': True}], 'mac_address': 'fa:16: 3e:25:b4: 59', 'name': 'eth0'}, {'type': 'physical', 'mtu': 9000, 'subnets': [{'type': 'dhcp4'}], 'mac_address': 'fa:16: 3e:b1:ca: 29', 'name': 'eth1'}, {'type': 'nameserver', 'address': '213.186.33.99'}]}
We need to generate ifcfg-eth1 that contains:
DHCLIENT_ SET_DEFAULT_ ROUTE=no
in order to avoid the dhcpclient to set the default route based on the information received from the dhcp server on eth1.
I have a test case for this already. But I haven't figure out how to make it work as in sysconfig.py _render_subnets() does so on a per interface basis and thus there is no knowledge of the network topology.