Need some assistance setting up a proxmox SDN subnet with DHCP.
I've got the following configuration:
tldr: subnet called `nexus` with range `10.10.0.0/24`. Gatway `10.10.0.1` and DHCP range of `10.10.0.{20-254}`
I have an ubuntu container (ct 101) that is attached to this interface,
But, in the container, it is unable to get an IP address:
If I manually set a static IP, I can confirm that the subnet is working. It is just something wrong with DHCP.
dnsmasq is definitely running,
a tcp dump on the host shows that the container is trying to contact the DHCP server, but dnsmasq is not responding back
What have I configured incorrectly here?
If I look at the generated dnsmasq config, I can see that it's setting dhcp-range to static:
I've got the following configuration:
tldr: subnet called `nexus` with range `10.10.0.0/24`. Gatway `10.10.0.1` and DHCP range of `10.10.0.{20-254}`
Code:
root@goliath:~# tail /etc/pve/sdn/*.cfg
==> /etc/pve/sdn/subnets.cfg <==
subnet: nexus-10.10.0.0-24
vnet nexus
dhcp-range start-address=10.10.0.20,end-address=10.10.0.254
gateway 10.10.0.1
snat 1
==> /etc/pve/sdn/vnets.cfg <==
vnet: nexus
zone nexus
==> /etc/pve/sdn/zones.cfg <==
simple: nexus
dhcp dnsmasq
ipam pve
I have an ubuntu container (ct 101) that is attached to this interface,
Code:
root@goliath:~# pct config 101 | grep net
net0: name=eth0,bridge=nexus,hwaddr=BC:24:11:A9:FD:BC,ip=dhcp,type=veth
lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file
But, in the container, it is unable to get an IP address:
Code:
root@cockpit:~# nmcli device connect eth0
Error: Connection activation failed: (5) IP configuration could not be reserved (no available address, timeout, etc.).
root@cockpit:~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0@if83: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether bc:24:11:a9:fd:bc brd ff:ff:ff:ff:ff:ff link-netnsid 0
3: tailscale0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1280 qdisc pfifo_fast state UNKNOWN group default qlen 500
link/none
inet6 fe80::3f49:881c:b541:2302/64 scope link stable-privacy
valid_lft forever preferred_lft forever
If I manually set a static IP, I can confirm that the subnet is working. It is just something wrong with DHCP.
dnsmasq is definitely running,
Code:
dnsmasq 2341 0.0 0.0 14188 3088 ? S May26 0:00 /usr/sbin/dnsmasq -x /run/dnsmasq/dnsmasq.nexus.pid -u dnsmasq -7 /etc/dnsmasq.d/nexus,*.conf --conf-file=/dev/null --enable-dbus=uk.org.thekelleys.dnsmasq.nexus --local-service [...]
root@goliath:~# netstat -tulpn | grep dnsmasq
tcp 0 0 10.10.0.1:53 0.0.0.0:* LISTEN 2341/dnsmasq
tcp6 0 0 fe80::a4a4:24ff:fecf:53 :::* LISTEN 2341/dnsmasq
udp 0 0 10.10.0.1:53 0.0.0.0:* 2341/dnsmasq
udp 0 0 0.0.0.0:67 0.0.0.0:* 2341/dnsmasq
udp6 0 0 fe80::a4a4:24ff:fecf:53 :::* 2341/dnsmasq
a tcp dump on the host shows that the container is trying to contact the DHCP server, but dnsmasq is not responding back
Code:
root@goliath:~# tcpdump -i nexus -n port 67 or port 68
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on nexus, link-type EN10MB (Ethernet), snapshot length 262144 bytes
13:17:08.027035 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from bc:24:11:a9:fd:bc, length 291
13:17:10.027024 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from bc:24:11:a9:fd:bc, length 291
13:17:12.203120 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from bc:24:11:a9:fd:bc, length 291
13:17:16.637760 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from bc:24:11:a9:fd:bc, length 291
[repeats many times]
What have I configured incorrectly here?
If I look at the generated dnsmasq config, I can see that it's setting dhcp-range to static:
Code:
root@goliath:~# tail /etc/dnsmasq.d/nexus/*
==> /etc/dnsmasq.d/nexus/00-default.conf <==
[... removed cus irrelevant]
==> /etc/dnsmasq.d/nexus/10-nexus.conf <==
dhcp-range=set:nexus-10.10.0.0-24,10.10.0.0,static,255.255.255.0,infinite
dhcp-option=tag:nexus-10.10.0.0-24,option:router,10.10.0.1
interface=nexus
==> /etc/dnsmasq.d/nexus/ethers <==
BC:24:11:A9:FD:BC,10.10.0.20