Checking dhcp server for requests

On DNSMasq you must enable and set logging for DHCP queries.

For leases issued they are in /var/db/dns/dnsmasq.leases by default.

Code:
#log-dhcp
#log-queries
#log-facility=/var/log/dnsmasq.log
dhcp-leasefile=/var/db/dnsmasq/dnsmasq.leases
 
Kea or something else?

/var/db/kea/dhcp4.leases for Kea.
dnsmasq seems to use /var/log/daemon.log

Is there any way to couple up a DHCPREQUEST with a DHCPOFFER?

Having said that I'm never sure about the sequence of DHCPDISCOVER, DHCPOFFER, DHCPREQUEST, DHCPPACK.
 
I can see a time when all storage systems are prohibited and you must use the internet or a website to boot your computer.
How far out in time I cannot tell you.
That is the scare I get from iPXE
 
dnsmasq seems to use /var/log/daemon.log

Is there any way to couple up a DHCPREQUEST with a DHCPOFFER?

Having said that I'm never sure about the sequence of DHCPDISCOVER, DHCPOFFER, DHCPREQUEST, DHCPPACK.
the DHCP RFC is pretty readable, might want to take a moment out of your day and look at it
 
According to ChatGPT:

DHCP message sequence (DORA)

Client Server
| -- DHCPDISCOVER ---> |
| <--- DHCPOFFER ---- |
| -- DHCPREQUEST ---> |
| <--- DHCPACK ----- |

1769553367122.png
 
If I want to know if a particular host has been seeking an IP address I guess I need to grep FILE]/var/log/daemon[/FILE] for DHCPDISCOVER and the MAC address of the host.
 
Depends, typically set from the host for regular jails. VNET jails work a little different.

Depends on the interface.
Here is part of a log. I I can't make head nor tail of this. I presume that the jail generates the Ethernet addresses.

+em0: link state changed to UP
+vnet0.5: link state changed to DOWN
+epair0b: link state changed to DOWN
+em0: link state changed to DOWN
+em0: link state changed to UP
+epair0a: Ethernet address: 58:9c:fc:10:e9:53
+epair0b: Ethernet address: 58:9c:fc:10:65:21
+epair0a: link state changed to UP
+epair0b: link state changed to UP
+epair0a: changing name to 'vnet0.6'
+vnet0.6: promiscuous mode enabled
+em0: link state changed to DOWN
+lo0: link state changed to UP
+em0: link state changed to UP
+vnet0.6: link state changed to DOWN
+epair0b: link state changed to DOWN
+em0: link state changed to DOWN
+em0: link state changed to UP
+epair0a: Ethernet address: 58:9c:fc:10:e9:53
+epair0b: Ethernet address: 58:9c:fc:10:65:21
+epair0a: link state changed to UP
+epair0b: link state changed to UP
+epair1a: Ethernet address: 58:9c:fc:10:c2:6e
+epair1b: Ethernet address: 58:9c:fc:10:76:bb
+epair1a: link state changed to UP
+epair1b: link state changed to UP
+epair1a: changing name to 'vnet0.7'
+epair1b: changing name to 'epair0b'
+vnet0.7: promiscuous mode enabled
+em0: link state changed to DOWN
+lo0: link state changed to UP
+em0: link state changed to UP
+vnet0.7: link state changed to DOWN
+epair0b: link state changed to DOWN
+em0: link state changed to DOWN
+em0: link state changed to UP
+epair0a: link state changed to DOWN
+epair0b: link state changed to DOWN
+epair0a: Ethernet address: 58:9c:fc:10:e9:53
+epair0b: Ethernet address: 58:9c:fc:10:65:21
+epair0a: link state changed to UP
 
correct, with epair(4) interfaces the MAC addresses are generated at interface creation time. again, our advice to you is to read the documentation for the features you're trying to use. all of the pseudounderstanding you're going on via chatgpt is wrong.
 
After checking /var/log/daemon on my DHCP server I find very strange results which I cannot explain. Maybe someone else can.

I recently ran iocage start xxx on my ThinkPad X61 (192.168.1.28)on which I created two jails but an unable to start them because of a DHCP error.

Now checking /var/log/daemon for entries around the appropriate time I see:-

Code:
Jan 29 22:44:06 M73 dnsmasq-dhcp[1834]: DHCPREQUEST(em0) 192.168.1.24 00:e0:4b:36:2f:c9
Jan 29 22:44:06 M73 dnsmasq-dhcp[1834]: DHCPACK(em0) 192.168.1.24 00:e0:4b:36:2f:c9 X1
Jan 29 22:44:07 M73 dnsmasq-dhcp[1834]: DHCPREQUEST(em0) 192.168.1.24 00:e0:4b:36:2f:c9
Jan 29 22:44:07 M73 dnsmasq-dhcp[1834]: DHCPACK(em0) 192.168.1.24 00:e0:4b:36:2f:c9 X1
Jan 29 22:44:07 M73 dnsmasq-dhcp[1834]: DHCPREQUEST(em0) 192.168.1.24 00:e0:4b:36:2f:c9
Jan 29 22:44:07 M73 dnsmasq-dhcp[1834]: DHCPACK(em0) 192.168.1.24 00:e0:4b:36:2f:c9 X1
Jan 29 22:44:07 M73 dnsmasq-dhcp[1834]: DHCPREQUEST(em0) 192.168.1.24 00:e0:4b:36:2f:c9
Jan 29 22:44:07 M73 dnsmasq-dhcp[1834]: DHCPACK(em0) 192.168.1.24 00:e0:4b:36:2f:c9 X1
Jan 29 22:44:08 M73 dnsmasq-dhcp[1834]: DHCPREQUEST(em0) 192.168.1.24 00:e0:4b:36:2f:c9
Jan 29 22:44:08 M73 dnsmasq-dhcp[1834]: DHCPACK(em0) 192.168.1.24 00:e0:4b:36:2f:c9 X1
Jan 29 22:44:08 M73 dnsmasq-dhcp[1834]: DHCPREQUEST(em0) 192.168.1.24 00:e0:4b:36:2f:c9
Jan 29 22:44:08 M73 dnsmasq-dhcp[1834]: DHCPACK(em0) 192.168.1.24 00:e0:4b:36:2f:c9 X1
Jan 29 22:44:08 M73 dnsmasq-dhcp[1834]: DHCPREQUEST(em0) 192.168.1.24 00:e0:4b:36:2f:c9
Jan 29 22:44:08 M73 dnsmasq-dhcp[1834]: DHCPACK(em0) 192.168.1.24 00:e0:4b:36:2f:c9 X1

192.168.1.24 is my X1 Carbon (mac address matches above output) which does not have any jails and there is no reason for it to renew it's lease in this fashion.

This has me completely baffled and must go some way to explaining why my jails do not start.

Can anyone explain this?
 
Back
Top