From fa4966f4dba8aab9fe17ac5711071e9e56384079 Mon Sep 17 00:00:00 2001 From: Dan Sneddon Date: Mon, 27 Apr 2015 18:39:37 -0700 Subject: Add flag for DEFROUTE=no in ifcfg files to ignore DHCP gateway When multiple interfaces are configured with DHCP, and more than one interface receives a gateway from the DHCP server(s), the resulting default gateway on the system is unpredictable. This change adds the "defroute" boolean to the configuration syntax for os-net-config. Any interface type may be marked so that the gateway received from the DHCP server will not be eligible as a default gateway for the system. This only works for ifcfg files, /etc/network/interfaces lacks an equivalent option. Change-Id: Id775f3506b2ec60c9a2833efd49fb8319151c00d Closes-Bug: 1449288 --- etc/os-net-config/samples/interface.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'etc/os-net-config/samples/interface.yaml') diff --git a/etc/os-net-config/samples/interface.yaml b/etc/os-net-config/samples/interface.yaml index 2e24ccc..4f76e07 100644 --- a/etc/os-net-config/samples/interface.yaml +++ b/etc/os-net-config/samples/interface.yaml @@ -6,3 +6,13 @@ network_config: addresses: - ip_netmask: 192.0.2.1/24 + routes: + - + ip_netmask: 0.0.0.0/0 + next_hop: 192.0.2.254 + default: true + - + type: interface + name: em2 + use_dhcp: true + defroute: no \ No newline at end of file -- cgit 1.2.3-korg