d34dh0r53 f856f3bfaf Fix MNAIO Flat Networking
In order to get flat networking working correctly we need to create
a new veth pair that neutron can use on the host machines.  Neutron can
take the veth end of this pair for the brq bridge while the other end
remains in br-flat allowing communication back to the VM.  This also
expands the DHCP range for the veth pairs and changes the
host_bind_override to use the new veth.

Change-Id: I9cd161599ba659890142143d4718420d680d7dca
2018-05-17 14:21:21 -05:00

57 lines
1.9 KiB
Django/Jinja

ddns-update-style none;
allow booting;
allow bootp;
log-facility local7;
authoritative;
shared-network all-networks {
{% for dhcp in dhcp_list %}
subnet {{ dhcp.subnet }} netmask {{ dhcp.netmask }} {
range {{ dhcp.range_start }} {{ dhcp.range_end }};
option broadcast-address {{ dhcp.broadcast }};
option routers {{ dhcp.gateway }};
option domain-name-servers {{ dhcp.dns }};
option subnet-mask {{ dhcp.netmask }};
{% if dhcp.default_lease_time is defined and dhcp.default_lease_time > 0 %}
default-lease-time {{ dhcp.default_lease_time }};
{% else %}
default-lease-time {{ dhcp_default_lease_time }};
{% endif %}
{% if dhcp.max_lease_time is defined and dhcp.max_lease_time > 0 %}
max-lease-time {{ dhcp.max_lease_time }};
{% else %}
max-lease-time {{ dhcp_max_lease_time }};
{% endif %}
{% if dhcp.tftp_server is defined and dhcp.tftp_server|ipaddr %}
next-server {{ dhcp.tftp_server }};
{% elif tftp_server is defined and tftp_server|length > 0 %}
next-server {{ tftp_server }};
{% endif %}
if exists user-class and ( option user-class = "iPXE" ) {
{% if dhcp.ipxe_boot_file is defined and dhcp.ipxe_boot_file|ipaddr %}
filename "{{ dhcp.ipxe_boot_file }}";
{% elif ipxe_boot_file is defined and ipxe_boot_file|length > 0 %}
filename "{{ ipxe_boot_file }}";
{% endif %}
} else {
filename "ipxe.lkrn";
}
}
{% endfor %}
group {
{% for item in groups['pxe_servers'] %}
host {{ hostvars[item]['server_hostname'] }} {
hardware ethernet {{ hostvars[item]['server_mac_address'] | lower }};
fixed-address {{ hostvars[item]['server_vm_fixed_addr'] }};
option host-name "{{ hostvars[item]['server_hostname'] }}";
}
{% endfor %}
}
}