VyOS 1.4-rolling-202311100309
The configurations:
Primary:
set service dhcp-server shared-network-name LAN subnet 192.168.11.0/24 default-router '192.168.11.1' set service dhcp-server shared-network-name LAN subnet 192.168.11.0/24 name-server '192.168.11.1' set service dhcp-server shared-network-name LAN subnet 192.168.11.0/24 domain-name 'vyos.net' set service dhcp-server shared-network-name LAN subnet 192.168.11.0/24 range 0 start '192.168.11.20' set service dhcp-server shared-network-name LAN subnet 192.168.11.0/24 range 0 stop '192.168.11.250' set service dhcp-server shared-network-name LAN subnet 192.168.11.0/24 enable-failover set service dhcp-server failover source-address '192.168.11.11' set service dhcp-server failover name 'LAN' set service dhcp-server failover remote '192.168.11.12' set service dhcp-server failover status 'primary'
Secondary:
set service dhcp-server shared-network-name LAN subnet 192.168.11.0/24 default-router '192.168.11.1' set service dhcp-server shared-network-name LAN subnet 192.168.11.0/24 name-server '192.168.11.1' set service dhcp-server shared-network-name LAN subnet 192.168.11.0/24 domain-name 'vyos.net' set service dhcp-server shared-network-name LAN subnet 192.168.11.0/24 range 0 start '192.168.11.20' set service dhcp-server shared-network-name LAN subnet 192.168.11.0/24 range 0 stop '192.168.11.250' set service dhcp-server shared-network-name LAN subnet 192.168.11.0/24 enable-failover set service dhcp-server failover source-address '192.168.11.12' set service dhcp-server failover name 'LAN' set service dhcp-server failover remote '192.168.11.11' set service dhcp-server failover status 'secondary'
Checking:
vyos@Active# run sh dhcp server leases IP Address MAC address State Lease start Lease expiration Remaining Pool Hostname -------------- ----------------- ------- ------------------- ------------------- ----------- ------ --------------- 192.168.11.136 00:0c:29:a5:42:d2 active 2023/11/24 12:07:36 2023/11/25 12:07:36 23:04:17 LAN DESKTOP-HBDI2AP
vyos@Standby# run sh dhcp server leases IP Address MAC address State Lease start Lease expiration Remaining Pool Hostname -------------- ----------------- ------- ------------------- ------------------- ----------- ------ ---------- 192.168.11.133 00:50:79:66:68:04 active 2023/11/24 12:05:29 2023/11/25 12:05:29 23:01:54 LAN PC5 192.168.11.134 00:50:79:66:68:03 active 2023/11/24 12:13:37 2023/11/25 12:13:37 23:10:02 LAN PC4
vyos@Active# sudo netstat -putane | grep dhcp tcp 0 0 0.0.0.0:7911 0.0.0.0:* LISTEN 0 18812 4413/dhcpd tcp 0 0 192.168.11.11:647 0.0.0.0:* LISTEN 0 18814 4413/dhcpd udp 0 0 0.0.0.0:67 0.0.0.0:* 0 18811 4413/dhcpd
vyos@Standby# sudo netstat -putane | grep dhcp tcp 0 0 192.168.11.12:647 0.0.0.0:* LISTEN 0 19414 4803/dhcpd udp 0 0 0.0.0.0:67 0.0.0.0:* 0 19412 4803/dhcpd
But inside /config/dhcpd.leases file we can see the leased IP addresses.
Attaching both lease files{F3911042}
{F3911041}
{F3911045}