
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
18 lines
301 B
YAML
18 lines
301 B
YAML
network_config:
|
|
-
|
|
type: interface
|
|
name: em1
|
|
use_dhcp: false
|
|
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 |