03550bc8c8
It should be possible to configure the DHCP server to provide the mtu option for inspection subnets. This uses the dhcp-option-force so that the option is provided also when the client does not ask for it. According to dnsmasq manual page this is sometimes required when sending options to PXELINUX. Closes-Bug: #1845487 Change-Id: Ic95dbf1867fb5397f1b6d8f23466910a97051cb6
53 lines
1.6 KiB
Plaintext
53 lines
1.6 KiB
Plaintext
port=0
|
|
interface=<%= @dnsmasq_interface %>
|
|
<% if @dhcp_debug %>
|
|
log-dhcp
|
|
log-queries
|
|
<% end %>
|
|
<% @dnsmasq_ip_subnets_real.each do |s| -%>
|
|
<% if s['tag'] and s['netmask'] -%>
|
|
dhcp-range=set:<%= s['tag'] -%>,<%= s['ip_range'] -%>,<%= s['netmask'] -%>,10m
|
|
<% elsif s['tag'] -%>
|
|
dhcp-range=set:<%= s['tag'] -%>,<%= s['ip_range'] -%>,10m
|
|
<% else -%>
|
|
dhcp-range=<%= s['ip_range'] -%>,10m
|
|
<% end -%>
|
|
<% if s['gateway'] -%>
|
|
<% if s['tag'] -%>
|
|
dhcp-option=tag:<%= s['tag'] -%>,option:router,<%= s['gateway'] %>
|
|
<% else -%>
|
|
dhcp-option=option:router,<%= s['gateway'] %>
|
|
<% end -%>
|
|
<% end -%>
|
|
<% if s['mtu'] -%>
|
|
<% if s['tag'] -%>
|
|
dhcp-option-force=tag:<%= s['tag'] -%>,option:mtu,<%= s['mtu'] %>
|
|
<% else -%>
|
|
dhcp-option-force=option:mtu,<%= s['mtu'] %>
|
|
<% end -%>
|
|
<% end -%>
|
|
<% if s['classless_static_routes'] -%>
|
|
<%- @_routes = [] -%>
|
|
<%- s['classless_static_routes'].each do |route| -%>
|
|
<%- @_routes << route['destination'] + ',' + route['nexthop'] -%>
|
|
<% end -%>
|
|
<% if s['tag'] -%>
|
|
dhcp-option=tag:<%= s['tag'] -%>,option:classless-static-route,<%= @_routes.join(',') -%>
|
|
<% else -%>
|
|
dhcp-option=option:classless-static-route,<%= @_routes.join(',') -%>
|
|
<% end -%>
|
|
<% end -%>
|
|
<% end -%>
|
|
dhcp-boot=pxelinux.0,localhost.localdomain,<%= @dnsmasq_local_ip %>
|
|
dhcp-sequential-ip
|
|
<% if @dnsmasq_dhcp_hostsdir %>
|
|
dhcp-hostsdir=<%= @dnsmasq_dhcp_hostsdir %>
|
|
<% end %>
|
|
<% if @enable_ppc64le -%>
|
|
# Client is ppc64le (OPAL) box and doesn't need a chain loader, but does need a custom config
|
|
dhcp-match=set:ppc64le,option:client-arch,14
|
|
dhcp-boot=tag:ppc64le,
|
|
dhcp-option=tag:ppc64le, 210,<%= @tftp_root_real %>/ppc64le/
|
|
dhcp-option=tag:ppc64le, 209,default
|
|
<% end -%>
|