dhcpcd.conf.tpl 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # A sample configuration for dhcpcd.
  2. # See dhcpcd.conf(5) for details.
  3. # Allow users of this group to interact with dhcpcd via the control socket.
  4. #controlgroup wheel
  5. # Inform the DHCP server of our hostname for DDNS.
  6. hostname
  7. # Use the hardware address of the interface for the Client ID.
  8. #clientid
  9. # or
  10. # Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
  11. # Some non-RFC compliant DHCP servers do not reply with this set.
  12. # In this case, comment out duid and enable clientid above.
  13. clientid
  14. # Persist interface configuration when dhcpcd exits.
  15. persistent
  16. # Rapid commit support.
  17. # Safe to enable by default because it requires the equivalent option set
  18. # on the server to actually work.
  19. option rapid_commit
  20. # A list of options to request from the DHCP server.
  21. option domain_name_servers, domain_name, domain_search, host_name
  22. option classless_static_routes
  23. # Most distributions have NTP support.
  24. option ntp_servers
  25. # Respect the network MTU. This is applied to DHCP routes.
  26. option interface_mtu
  27. # A ServerID is required by RFC2131.
  28. require dhcp_server_identifier
  29. # Generate SLAAC address using the Hardware Address of the interface
  30. #slaac hwaddr
  31. # OR generate Stable Private IPv6 Addresses based from the DUID
  32. slaac private
  33. {{- range $key, $value := .}}
  34. interface {{$key}}
  35. static ip_address={{$value.Address}}
  36. static routers={{$value.Gateway}}
  37. {{- end}}