Add option to disabled default gateway on bifrost
There are situations where we can have different nics living together, and the default gateway needs to be set externally, not in the nic managed by bifrost. The way dnsmasq works, is that if you do not set any ip for default gateway, it assumes that to be the dnsmasq management ip, and creates a default gateway in all nics attached to it. That prevents default gateway being set externally, causing errors of duplicated gateways. To disable it, we need to pass a simple dhcp-option=3. So adding this possibility to the template, just allowing a dnsmasq_router=false to be passed as option. Change-Id: I6279242de9bedf35d95c048fc2ce586435c3850b
This commit is contained in:
parent
e64010e595
commit
1d14c610fe
@ -69,6 +69,7 @@ dhcp_lease_time: 12h
|
|||||||
dhcp_static_mask: 255.255.255.0
|
dhcp_static_mask: 255.255.255.0
|
||||||
# Dnsmasq default route for clients. If not defined, dnsmasq will push to clients
|
# Dnsmasq default route for clients. If not defined, dnsmasq will push to clients
|
||||||
# as default route the same IP of the dnsmasq server.
|
# as default route the same IP of the dnsmasq server.
|
||||||
|
# If set to false, it will disable default route creation in clients.
|
||||||
# Default: undefined
|
# Default: undefined
|
||||||
# dnsmasq_router:
|
# dnsmasq_router:
|
||||||
|
|
||||||
|
@ -75,8 +75,12 @@ dhcp-range={{dhcp_pool_start}},{{dhcp_pool_end}},{{dhcp_lease_time}}
|
|||||||
# Override the default route supplied by dnsmasq, which assumes the
|
# Override the default route supplied by dnsmasq, which assumes the
|
||||||
# router is the same machine as the one running dnsmasq.
|
# router is the same machine as the one running dnsmasq.
|
||||||
{% if dnsmasq_router is defined %}
|
{% if dnsmasq_router is defined %}
|
||||||
|
{% if dnsmasq_router | bool == false %}
|
||||||
|
dhcp-option=3
|
||||||
|
{% else %}
|
||||||
dhcp-option=3,{{dnsmasq_router}}
|
dhcp-option=3,{{dnsmasq_router}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if dnsmasq_dns_servers is defined %}
|
{% if dnsmasq_dns_servers is defined %}
|
||||||
dhcp-option=6,{{dnsmasq_dns_servers}}
|
dhcp-option=6,{{dnsmasq_dns_servers}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user