Add IPv6 support for Dnsmasq and NetworkManager
Signed-off-by: Timothy Middelkoop <tmiddelkoop@internet2.edu>
This commit is contained in:
@@ -284,10 +284,27 @@ writeFile: true
|
||||
Filename: etc/dnsmasq.d/ww4-hosts6.conf
|
||||
# This file was autgenerated by warewulf
|
||||
|
||||
dhcp-range=2001:db8::100,2001:db8::0:1FF,slaac,6h
|
||||
dhcp-option=option6:bootfile-url,tftp://[2001:db8::1]/
|
||||
dhcp-option=option6:ntp-server,[2001:db8::1]
|
||||
# enable services
|
||||
enable-ra
|
||||
enable-tftp
|
||||
|
||||
# match archtecture (client-arch=61)
|
||||
dhcp-match=set:x86PC,option6:61,0007 # EFI x86-64
|
||||
dhcp-match=set:aarch64,option6:61,0011 # EFI aarch64
|
||||
dhcp-vendorclass=set:x86PC,enterprise:343,PXEClient:Arch:00007 # EFI x86-64
|
||||
dhcp-vendorclass=set:aarch64,enterprise:343,PXEClient:Arch:00011 # EFI aarch64
|
||||
|
||||
# match iPXE
|
||||
dhcp-userclass=set:iPXE,iPXE
|
||||
|
||||
# send iPXE EFI binary
|
||||
dhcp-option=tag:x86PC,option6:bootfile-url,"tftp://[2001:db8::1]/warewulf/ipxe-snponly-x86_64.efi"
|
||||
dhcp-option=tag:aarch64,option6:bootfile-url,"tftp://[2001:db8::1]/warewulf/snponly.efi"
|
||||
# iPXE binary will get the following configuration file
|
||||
dhcp-option=tag:iPXE,option6:bootfile-url,"http://[2001:db8::1]:9873/ipxe/${mac:hexhyp}?assetkey=${asset}&uuid=${uuid}"
|
||||
|
||||
# DHCP range and entries
|
||||
dhcp-range=2001:db8::100,2001:db8::0:1FF,6h
|
||||
dhcp-host=e6:92:39:49:7b:03,set:warewulf,node1,2001:db8::111,infinite
|
||||
dhcp-host=9a:77:29:73:14:f1,set:warewulf,node1,2001:db8::112,infinite
|
||||
dhcp-host=e6:92:39:49:7b:04,set:warewulf,node2,2001:db8::121,infinite
|
||||
|
||||
@@ -5,16 +5,16 @@ nodes:
|
||||
device: wwnet0
|
||||
hwaddr: e6:92:39:49:7b:03
|
||||
ipaddr: 192.168.3.21
|
||||
ip6addr: 2001:db8::111
|
||||
ipaddr6: 2001:db8::111
|
||||
secondary:
|
||||
device: wwnet1
|
||||
hwaddr: 9a:77:29:73:14:f1
|
||||
ipaddr: 192.168.3.22
|
||||
ip6addr: 2001:db8::112
|
||||
ipaddr6: 2001:db8::112
|
||||
node2:
|
||||
network devices:
|
||||
default:
|
||||
device: wwnet0
|
||||
hwaddr: e6:92:39:49:7b:04
|
||||
ipaddr: 192.168.3.23
|
||||
ip6addr: 2001:db8::121
|
||||
ipaddr6: 2001:db8::121
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
ipaddr6: 2001:db8::1/64
|
||||
ipaddr6: 2001:db8::1
|
||||
prefixlen6: 64
|
||||
dhcp:
|
||||
enabled: true
|
||||
range6 start: 2001:db8::100
|
||||
|
||||
@@ -30,8 +30,10 @@ dhcp-no-override
|
||||
enable-tftp
|
||||
tftp-root={{ $.Tftp.TftpRoot }}
|
||||
{{- end }}
|
||||
{{ if and $.Dhcp.RangeStart $.Dhcp.RangeEnd -}}
|
||||
# define the the range
|
||||
dhcp-range={{$.Dhcp.RangeStart}},{{$.Dhcp.RangeEnd}},{{$.Netmask}},6h
|
||||
{{ end -}}
|
||||
{{ range $node := $.AllNodes -}}
|
||||
{{ range $devname, $netdev := $node.NetDevs -}}
|
||||
{{ if and $netdev.Ipaddr $netdev.Hwaddr -}}
|
||||
|
||||
@@ -1,9 +1,34 @@
|
||||
# This file was autgenerated by warewulf
|
||||
{{ nobackup }}
|
||||
dhcp-range={{$.Dhcp.Range6Start}},{{$.Dhcp.Range6End}},slaac,6h
|
||||
dhcp-option=option6:bootfile-url,tftp://[{{$.Ipaddr6}}]/
|
||||
dhcp-option=option6:ntp-server,[{{$.Ipaddr6}}]
|
||||
{{ if .Ipv6 -}}
|
||||
# enable services
|
||||
enable-ra
|
||||
enable-tftp
|
||||
|
||||
# match archtecture (client-arch=61)
|
||||
dhcp-match=set:x86PC,option6:61,0007 # EFI x86-64
|
||||
dhcp-match=set:aarch64,option6:61,0011 # EFI aarch64
|
||||
dhcp-vendorclass=set:x86PC,enterprise:343,PXEClient:Arch:00007 # EFI x86-64
|
||||
dhcp-vendorclass=set:aarch64,enterprise:343,PXEClient:Arch:00011 # EFI aarch64
|
||||
|
||||
# match iPXE
|
||||
dhcp-userclass=set:iPXE,iPXE
|
||||
|
||||
# send iPXE EFI binary
|
||||
{{ with (index $.Tftp.IpxeBinaries "00:07" ) -}}
|
||||
dhcp-option=tag:x86PC,option6:bootfile-url,"tftp://[{{$.Ipaddr6}}]/warewulf/{{ index $.Tftp.IpxeBinaries "00:07" }}"
|
||||
{{ end -}}
|
||||
{{ with (index $.Tftp.IpxeBinaries "00:0B" ) -}}
|
||||
dhcp-option=tag:aarch64,option6:bootfile-url,"tftp://[{{$.Ipaddr6}}]/warewulf/{{ index $.Tftp.IpxeBinaries "00:0B" | basename }}"
|
||||
{{ end -}}
|
||||
|
||||
# iPXE binary will get the following configuration file
|
||||
dhcp-option=tag:iPXE,option6:bootfile-url,"http://[{{$.Ipaddr6}}]:{{$.Warewulf.Port}}/ipxe/${mac:hexhyp}?assetkey=${asset}&uuid=${uuid}"
|
||||
|
||||
# DHCP range and entries
|
||||
{{ if and $.Dhcp.Range6Start $.Dhcp.Range6End -}}
|
||||
dhcp-range={{$.Dhcp.Range6Start}},{{$.Dhcp.Range6End}},6h
|
||||
{{ end -}}
|
||||
{{ range $node := $.AllNodes -}}
|
||||
{{ range $devname, $netdev := $node.NetDevs -}}
|
||||
{{ if and $netdev.Ipaddr6 $netdev.Hwaddr -}}
|
||||
@@ -11,3 +36,4 @@ dhcp-host={{$netdev.Hwaddr}},set:warewulf,{{$node.Id}},{{$netdev.Ipaddr6}},infin
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
|
||||
7
overlays/host/rootfs/etc/dnsmasq.d/ww4-listen.conf.ww
Normal file
7
overlays/host/rootfs/etc/dnsmasq.d/ww4-listen.conf.ww
Normal file
@@ -0,0 +1,7 @@
|
||||
# This file was autgenerated by warewulf
|
||||
{{ nobackup }}
|
||||
listen-address={{ .Ipaddr }}
|
||||
{{ if .Ipaddr6 -}}
|
||||
listen-address={{ .Ipaddr6 }}
|
||||
interface=*
|
||||
{{ end -}}
|
||||
Reference in New Issue
Block a user