Package: dnsmasq
Followup-For: Bug #1056337
X-Debbugs-Cc: sam.lan...@gmail.com

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***


-- System Information:
Debian Release: 12.10
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-31-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_AU:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages dnsmasq depends on:
ii  dnsmasq-base [dnsmasq-base]  2.90-4~deb12u1
ii  init-system-helpers          1.65.2
ii  netbase                      6.4
ii  runit-helper                 2.15.2

dnsmasq recommends no packages.

Versions of packages dnsmasq suggests:
pn  resolvconf  <none>

-- Configuration Files:
/etc/dnsmasq.conf changed:
interface=enp1s0
dhcp-range=192.168.58.100,192.168.58.200,12h
dhcp-authoritative
log-dhcp
log-debug


-- no debconf information




### config file
--- /etc/dnsmasq.conf
interface=enp1s0
dhcp-range=192.168.58.100,192.168.58.200,12h
dhcp-authoritative
# Log lots of extra information about DHCP transactions.
log-dhcp
log-debug

### test log
# note: 
#   peeweep is the server, it has four ethernet interfaces 
#   toot is the client, it has on interface, e8:e0:b7:d4:67:5f, and was 
previously on 192.168.58.114

root@peeweep:/etc# tcpdump -i enp1s0 port 67 or port 68 -e  &
[2] 5730
root@peeweep:/etc# tcpdump: verbose output suppressed, use -v[v]... for full 
protocol decode
listening on enp1s0, link-type EN10MB (Ethernet), snapshot length 262144 bytes

root@peeweep:/etc# /usr/sbin/dnsmasq -d
dnsmasq: started, version 2.90 cachesize 150
dnsmasq: compile time options: IPv6 GNU-getopt DBus no-UBus i18n IDN2 DHCP 
DHCPv6 no-Lua TFTP conntrack ipset nftset auth cryptohash DNSSEC loop-detect 
inotify dumpfile
dnsmasq-dhcp: DHCP, IP range 192.168.58.100 -- 192.168.58.200, lease time 12h
dnsmasq: reading /etc/resolv.conf
dnsmasq: using nameserver 1.1.1.1#53
dnsmasq: using nameserver 1.0.0.1#53
dnsmasq: read /etc/hosts - 9 names
# (on toot, type: dhcping -s 192.168.58.2)
09:10:28.270039 toot > 00:e0:20:9e:e0:78 (oui Unknown), ethertype IPv4 
(0x0800), length 292: 192.168.58.114.bootpc > 192.168.58.2.bootps: BOOTP/DHCP, 
Request from 00:00:00:00:00:00 (oui Ethernet), length 250
^C
root@peeweep:/etc# 
root@peeweep:/etc# pkill tcpdump

1 packets captured
1 packets received by filter
0 packets dropped by kernel

# (on toot, see 'no answer')



### now try isc-dhcpd
root@peeweep:/etc/dhcp# /usr/sbin/dhcpd --version
isc-dhcpd-4.4.3-P1

### config file
--- /etc/dhcp/dhcpd.conf
default-lease-time 600;
max-lease-time 7200;
authoritative;

subnet 192.168.58.0 netmask 255.255.255.0 {
  range 192.168.58.100 192.168.58.200;
  option routers 192.168.58.2;
}
---

# test log
root@peeweep:/etc/dhcp# tcpdump -i enp1s0 port 67 or port 68 -e  &
[2] 5881
[1]   Done                    tcpdump -i enp1s0 port 67 or port 68 -e
root@peeweep:/etc/dhcp# tcpdump: verbose output suppressed, use -v[v]... for 
full protocol decode
listening on enp1s0, link-type EN10MB (Ethernet), snapshot length 262144 bytes

root@peeweep:/etc/dhcp# /usr/sbin/dhcpd -f -d
Internet Systems Consortium DHCP Server 4.4.3-P1
Copyright 2004-2022 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Config file: /etc/dhcp/dhcpd.conf
Database file: /var/lib/dhcp/dhcpd.leases
PID file: /var/run/dhcpd.pid
Wrote 1 leases to leases file.

No subnet declaration for enp4s0 (10.0.4.1).
** Ignoring requests on enp4s0.  If this is not what
   you want, please write a subnet declaration
   in your dhcpd.conf file for the network segment
   to which interface enp4s0 is attached. **
No subnet declaration for enp3s0 (10.0.3.1).
** Ignoring requests on enp3s0.  If this is not what <snip>
No subnet declaration for enp2s0 (10.0.2.1). <snip>
Listening on LPF/enp1s0/00:e0:20:9e:e0:78/192.168.58.0/24
Sending on   LPF/enp1s0/00:e0:20:9e:e0:78/192.168.58.0/24
Sending on   Socket/fallback/fallback-net
Server starting service.

DHCPREQUEST for 0.0.0.0 from 00:00:00:00:00:00 via enp1s0: wrong network.
DHCPNAK on 0.0.0.0 to 00:00:00:00:00:00 via enp1s0
DHCPRELEASE of 0.0.0.0 from 00:00:00:00:00:00 via enp1s0 (not found)
# (on toot, type: dhcping -s 192.168.58.2)
09:30:20.726586 toot > 00:e0:20:9e:e0:78 (oui Unknown), ethertype IPv4 
(0x0800), length 292: 192.168.58.114.bootpc > 192.168.58.2.bootps: BOOTP/DHCP, 
Request from 00:00:00:00:00:00 (oui Ethernet), length 250
09:30:20.727032 00:e0:20:9e:e0:78 (oui Unknown) > Broadcast, ethertype IPv4 
(0x0800), length 342: 192.168.58.2.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, 
Reply, length 300
09:30:20.727713 toot > 00:e0:20:9e:e0:78 (oui Unknown), ethertype IPv4 
(0x0800), length 286: 192.168.58.114.bootpc > 192.168.58.2.bootps: BOOTP/DHCP, 
Request from 00:00:00:00:00:00 (oui Ethernet), length 244
# on toot, see 'Got answer from 192.168.58.2')

Reply via email to