OPNsense Forum

Archive => 18.1 Legacy Series => Topic started by: tillsense on January 27, 2018, 09:06:57 pm

Title: New dhcp entries in the LAN are not resolved by unbound
Post by: tillsense on January 27, 2018, 09:06:57 pm
Hi all,

new dhcp entries in the LAN are not resolved by unbound. the option is activated (Register DHCP leases..) but only a restart of the service brings success.

cheers till
Title: Re: New dhcp entries in the LAN are not resolved by unbound
Post by: seanmahrt on April 04, 2018, 04:54:25 am
I'm having the same issues here with a brand new install.  I submitted a bug in the reporter, but I have copied the data here also:

Issue:  Unbound DNS does not leverage DHCP (static or dynamic) hostnames.  the /var/unbound/dhcpleases.conf file is blank


dmesg.boot


Copyright (c) 1992-2017 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
   The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.1-RELEASE-p8  76d691b36(stable/18.1) amd64
FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0)
VT(efifb): resolution 1280x1024
[HBSD LOG] logging to system: enabled
[HBSD LOG] logging to user: disabled
[HBSD HARDENING] procfs hardening: enabled
[HBSD ASLR] status: opt-out
[HBSD ASLR] mmap: 30 bit
[HBSD ASLR] exec base: 30 bit
[HBSD ASLR] stack: 42 bit
[HBSD ASLR] vdso: 28 bit
[HBSD ASLR] map32bit: 18 bit
[HBSD ASLR] disallow MAP_32BIT mode mmap: opt-in
[HBSD ASLR (compat)] status: opt-out
[HBSD ASLR (compat)] mmap: 14 bit
[HBSD ASLR (compat)] exec base: 14 bit
[HBSD ASLR (compat)] stack: 14 bit
[HBSD ASLR (compat)] vdso: 8 bit
[HBSD SEGVGUARD] status: opt-out
[HBSD SEGVGUARD] expiry: 120 sec
[HBSD SEGVGUARD] suspension: 600 sec
[HBSD SEGVGUARD] maxcrashes: 5
CPU: Intel(R) Celeron(R) CPU  J1800  @ 2.41GHz (2416.72-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0x30678  Family=0x6  Model=0x37  Stepping=8
  Features=0xbfebfbff
  Features2=0x41d8e3bf
  AMD Features=0x28100800
  AMD Features2=0x101
  Structured Extended Features=0x2282
  VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
  TSC: P-state invariant, performance statistics
real memory  = 2147483648 (2048 MB)
avail memory = 1922011136 (1832 MB)
Event timer "LAPIC" quality 600
ACPI APIC Table:
WARNING: L1 data cache covers less APIC IDs than a core
0 < 1
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
FreeBSD/SMP: 1 package(s) x 2 core(s)
random: unblocking device.
ACPI BIOS Warning (bug): 32/64X length mismatch in FADT/Gpe0Block: 128/32 (20170303/tbfadt-748)
ioapic0  irqs 0-86 on motherboard
SMP: AP CPU #1 Launched!
Timecounter "TSC-low" frequency 1208362430 Hz quality 1000
random: entropy device external interface
wlan: mac acl policy registered
netmap: loaded module
module_register_init: MOD_LOAD (vesa, 0xffffffff810ab110, 0) error 19
random: registering fast source Intel Secure Key RNG
random: fast provider: "Intel Secure Key RNG"
kbd1 at kbdmux0
nexus0
cryptosoft0:  on motherboard
acpi0:  on motherboard
acpi0: Power Button (fixed)
unknown: I/O range not supported
cpu0:  on acpi0
cpu1:  on acpi0
atrtc0:  port 0x70-0x77 on acpi0
atrtc0: Warning: Couldn't map I/O.
Event timer "RTC" frequency 32768 Hz quality 0
hpet0:  iomem 0xfed00000-0xfed003ff irq 8 on acpi0
Timecounter "HPET" frequency 14318180 Hz quality 950
Event timer "HPET" frequency 14318180 Hz quality 450
Event timer "HPET1" frequency 14318180 Hz quality 440
Event timer "HPET2" frequency 14318180 Hz quality 440
attimer0:  port 0x40-0x43,0x50-0x53 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0
pcib0:  port 0xcf8-0xcff on acpi0
pcib0: _OSC returned error 0x10
pci0:  on pcib0
vgapci0:  port 0xf080-0xf087 mem 0xd0000000-0xd03fffff,0xc0000000-0xcfffffff irq 16 at device 2.0 on pci0
vgapci0: Boot video device
ahci0:  port 0xf070-0xf077,0xf060-0xf063,0xf050-0xf057,0xf040-0xf043,0xf020-0xf03f mem 0xd0a11000-0xd0a117ff irq 19 at device 19.0 on pci0
ahci0: AHCI v1.30 with 2 3Gbps ports, Port Multiplier not supported
ahcich0:  at channel 0 on ahci0
xhci0:  mem 0xd0a00000-0xd0a0ffff irq 20 at device 20.0 on pci0
xhci0: 32 bytes context size, 64-bit DMA
xhci0: Port routing mask set to 0xffffffff
usbus0 on xhci0
usbus0: 5.0Gbps Super Speed USB v3.0
pci0:  at device 26.0 (no driver attached)
pcib1:  irq 16 at device 28.0 on pci0
pcib1: [GIANT-LOCKED]
pci1:  on pcib1
em0:  port 0xe000-0xe01f mem 0xd0900000-0xd091ffff,0xd0920000-0xd0923fff irq 16 at device 0.0 on pci1
em0: Using an MSI interrupt
em0: Ethernet address: 0c:e8:6c:68:4c:6d
em0: netmap queues/slots: TX 1/1024, RX 1/1024
pcib2:  irq 17 at device 28.1 on pci0
pcib2: [GIANT-LOCKED]
pci2:  on pcib2
em1:  port 0xd000-0xd01f mem 0xd0800000-0xd081ffff,0xd0820000-0xd0823fff irq 17 at device 0.0 on pci2
em1: Using an MSI interrupt
em1: Ethernet address: 0c:e8:6c:68:4c:6e
em1: netmap queues/slots: TX 1/1024, RX 1/1024
pcib3:  irq 18 at device 28.2 on pci0
pcib3: [GIANT-LOCKED]
pci3:  on pcib3
em2:  port 0xc000-0xc01f mem 0xd0700000-0xd071ffff,0xd0720000-0xd0723fff irq 18 at device 0.0 on pci3
em2: Using an MSI interrupt
em2: Ethernet address: 0c:e8:6c:68:4c:6f
em2: netmap queues/slots: TX 1/1024, RX 1/1024
pcib4:  irq 19 at device 28.3 on pci0
pcib4: [GIANT-LOCKED]
pci4:  on pcib4
em3:  port 0xb000-0xb01f mem 0xd0600000-0xd061ffff,0xd0620000-0xd0623fff irq 19 at device 0.0 on pci4
em3: Using an MSI interrupt
em3: Ethernet address: 0c:e8:6c:68:4c:70
em3: netmap queues/slots: TX 1/1024, RX 1/1024
isab0:  at device 31.0 on pci0
isa0:  on isab0
acpi_button0:  on acpi0
acpi_button1:  on acpi0
uart2: <16550 or compatible> port 0x3e0-0x3e7 irq 4 on acpi0
atkbdc0:  port 0x60,0x64 irq 1 on acpi0
atkbd0:  irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
ppc1:  port 0x378-0x37f,0x778-0x77f irq 5 drq 3 on acpi0
ppc1: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
ppc1: FIFO with 16/16/16 bytes threshold
ppbus0:  on ppc1
lpt0:  on ppbus0
lpt0: Interrupt-driven port
ppi0:  on ppbus0
ppc0: cannot reserve I/O port range
est0:  on cpu0
est1:  on cpu1
Timecounters tick every 1.000 msec
nvme cam probe device init
ugen0.1: <0x8086 XHCI root HUB> at usbus0
uhub0: <0x8086 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0
ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
ada0:  ACS-2 ATA SATA 3.x device
ada0: Serial Number SCRW18011112F0010
ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 512bytes)
ada0: Command Queueing enabled
ada0: 30029MB (61500000 512 byte sectors)
Trying to mount root from ufs:/dev/gpt/rootfs [rw,noatime]...
uhub0: 7 ports with 7 removable, self powered
Title: Re: New dhcp entries in the LAN are not resolved by unbound
Post by: seanmahrt on April 04, 2018, 05:06:59 am
FYI, I switched to DNSMASQ and it seems to be working....  more datapoints.  I like running my own resolver, but local names are a must...

Sean
Title: Re: New dhcp entries in the LAN are not resolved by unbound
Post by: elektroinside on April 04, 2018, 07:00:14 am
Are you using actually using DHCP for the clients or static IPs?
Also, did you verify that the leases are there (in Services: DHCPv4: Leases)?
Title: Re: New dhcp entries in the LAN are not resolved by unbound
Post by: seanmahrt on April 05, 2018, 01:50:19 am
Yes and yes.  The file is empty in unbound, so it doesn't seem to be scraping the leases if I understand how unbound does it.  just turning off unbound and turning on DNSMASQ makes it work perfectly.
Title: Re: New dhcp entries in the LAN are not resolved by unbound
Post by: Davesworld on April 05, 2018, 02:39:57 am
Since you hijacked a thread, are you sure it's the same issue as the OP?

As far as that file that is blank, mine is as well and it should be since I have only static mapped dhcp addresses in my lan and no leases to anything that is not mapped statically. I would expect no different. For the few hosts that do not use dhcp I added entries in overrides under unbound. Was there any good reason to include dmesg other than to make a post that is five pages long? Dmesg is only a kernel log, it has nothing whatsoever to do with resolvers dhcp servers and leases. It only shows that the drivers were loaded for your nics and all the other hardware kernel relationships that mean nothing in this subject.

Were you NOT able to reach any destination on your lan by hostname and in the leases does it show those hosts as being online when you used unbound? If you ticked the box to have dhcp write them they will be in host_entries.conf, statically mapped entries will be there as well. The nice benefit of knee-jerkingly switching to a different resolver is when you have over 40 statically mapped dhcp server entries, you get to do it all over again in dnsmasq. What could be more fun?  OK, now on to the OP.
Title: Re: New dhcp entries in the LAN are not resolved by unbound
Post by: Davesworld on April 05, 2018, 02:42:58 am
Hi all,

new dhcp entries in the LAN are not resolved by unbound. the option is activated (Register DHCP leases..) but only a restart of the service brings success.

cheers till

After you set it up and saved it, the big apply settings banner you should have seen would (hopefully) have restarted the dhcp server. Without doing that it wouldn't and shouldn't work. You are saying you had to do a manual server restart?