06-12-2018 10:04 AM
I have a USG 3P running 184.108.40.20686045 and an old Lacie 2big NAS that is exhibiting some strange behavior. I have the Lacie set to use DHCP, and I've set it to a fixed IP in the controller. The USG correctly issues the IP to the Lacie, and the Lacie correctly uses the fixed IP. I can get to the Lacie using the IP, but not the host name. On the USG, neither the IP nor the MAC show up in "show dhcp leases" or /var/run/dhcpd.leases.
I tried setting the Lacie to a different static IP, then turning DHCP back on, and it correctly used the fixed IP again. I also set a different fixed IP in the controller, provisioned the USG, then rebooted the Lacie. It again grabbed the current fixed IP. So that shows that the USG is handing out the right IP, but why isn't it saving the DHCP lease or adding it to DNS? I'm not seeing anything relevant in /var/log/messages. Is there anywhere else I should be looking?
Thanks in advance for your help!
06-12-2018 10:16 AM
06-13-2018 08:14 AM
"show dhcp lease" won't show static mappings like you've set for the Lacie.
What you can do is SSH to the USG and type:
sudo tcpdump -npi ethx port 67 or port 68 -vv
where "x" = the LAN interface (eth1 on the USG3, or eth0 on the USG pro 4).
Then while you're running the tcpdump, renew the lease on the Lacie and check the DHCP request packet (source: 0.0.0.0:68 destination 255.255.255.255:67) and see if the Hostname Option 12 is there with the Lacie's hostname. Below is an example of my tcpdump for reference:
USG-XG:~$ sudo tcpdump -npi eth1.30 port 67 or port 68 -vv tcpdump: listening on eth1.30, link-type EN10MB (Ethernet), capture size 262144 bytes 10:11:12.554783 IP (tos 0x0, ttl 255, id 13259, offset 0, flags [none], proto UDP (17), length 328) 0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 3c:2e:ff:9a:xx:xx, length 300, xid 0x43524e31, Flags [none] (0x0000) Client-Ethernet-Address 3c:2e:ff:9a:xx:xx Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Request Parameter-Request Option 55, length 7: Subnet-Mask, Classless-Static-Route, Default-Gateway, Domain-Name-Server Domain-Name, Option 119, Option 252 MSZ Option 57, length 2: 1500 Client-ID Option 61, length 7: ether 3c:2e:ff:9a:xx:xx Requested-IP Option 50, length 4: 192.168.30.58 Lease-Time Option 51, length 4: 7776000 Hostname Option 12, length 10: "brandonphone"
06-13-2018 12:24 PM
Alright, so it's not sending option 12 (which is odd because it has a setting to specify the hostname).
I'm still perplexed by the leases though. Shouldn't there still be a lease in /var/run/dhcpd.leases with no expiration? It's been a while since I've used DHCPD, so I might be mistaken.
Do you have any idea when DHCP & DNS will be enhanced? There seem to be a lot of people screaming for improvements in this area. Looking at my old ASUS router, when you assign a permanent IP via DHCP, you can enter a hostname right there which must be feeding into DNS. That explains why this wasn't an issue on my old setup.
06-13-2018 02:34 PM
As far as with DNS and domain overrides, those will make their way into the controller, they're on the roadmap. I don't have an ETA for them though.
06-21-2018 01:30 AM
I'm having the same problem. But in my case Option 12 is sent by the client but not registered.
/etc/hosts is empty.
nslookup does not work as described in this thread:
admin@gateway:~$ sudo tcpdump -npi eth3 port 67 or port 68 -vv tcpdump: listening on eth3, link-type EN10MB (Ethernet), capture size 262144 bytes 10:19:57.968002 IP (tos 0x0, ttl 128, id 20187, offset 0, flags [none], proto UDP (17), length 328) 10.0.0.250.68 > 10.0.0.253.67: [udp sum ok] BOOTP/DHCP, Request from f4:6d:04:xxxxxx, length 300, xid 0x3abff1b6, Flags [none] (0x0000) Client-IP 10.0.0.250 Client-Ethernet-Address f4:6d:04:xxxxxxx Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Request Client-ID Option 61, length 7: ether f4:6d:04:xxxxxxx Hostname Option 12, length 5: "SPOCK" FQDN Option 81, length 8: "SPOCK" Vendor-Class Option 60, length 8: "MSFT 5.0" Parameter-Request Option 55, length 14: Subnet-Mask, Default-Gateway, Domain-Name-Server, Domain-Name Router-Discovery, Static-Route, Vendor-Option, Netbios-Name-Server Netbios-Node, Netbios-Scope, Option 119, Classless-Static-Route Classless-Static-Route-Microsoft, Option 252 10:19:57.975366 IP (tos 0xc0, ttl 64, id 16595, offset 0, flags [none], proto UDP (17), length 357) 10.0.0.253.67 > 10.0.0.250.68: [udp sum ok] BOOTP/DHCP, Reply, length 329, xid 0x3abff1b6, Flags [none] (0x0000) Client-IP 10.0.0.250 Your-IP 10.0.0.250 Server-IP 10.0.0.253 Client-Ethernet-Address f4:6d:04:xxxxxxx Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: ACK Server-ID Option 54, length 4: 10.0.0.253 Lease-Time Option 51, length 4: 86400 RN Option 58, length 4: 42294 RB Option 59, length 4: 74694 Subnet-Mask Option 1, length 4: 255.0.0.0 BR Option 28, length 4: 10.255.255.255 FQDN Option 81, length 21: [SO] 255/255 "unifi.benner.local" Domain-Name-Server Option 6, length 4: 10.0.0.253 Default-Gateway Option 3, length 4: 10.0.0.253 Domain-Name Option 15, length 12: "benner.local"
06-21-2018 06:24 AM - edited 06-21-2018 06:51 AM
Found out, that i had checked "use dnsmasq as dhcp server". After unchecking and ipconfig /renew on my windows client, everything works as expected -> client is in /etc/hosts and is "nslookable"
1529675103 f4:6d:04:xxxxxx 10.0.0.250 unifi 01:f4:6d:xxxxxxx
so the clienthostname "SPOCK" is registered as "unifi". I think that is because the unifi controller runs on that machine.
How can i change this?