What's new

YazFi Reserved DHCP Issue

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

sbsnb

Very Senior Member
I just noticed that any clients with a DHCP reservation in /jffs/configs/dnsmasq.conf.add will receive that IP address when connecting to a YazFi guest network even when it has a completely different subnet.

For example:
Code:
dhcp-host=DE:AD:BE:EF:CA:FE,iPhone,192.168.1.23,12h

Will cause that client to receive the 192.168.1.23 address even when they connect to YazFi guest network configured with a 192.168.10.1 subnet.
 
Makes sense to me, you are issuing a specific directive directly, outside of a controlled UI, that states "assign this ip if you get a request from this mac". Besides the fact that this is potentially done by design as there could be a number of valid use cases, most manual commands assume the user knows what they are doing. MAC/IP assignment should be independent of the connection mechanism, IMO. The command should not be based on SSID, band, hard wired etc. It is a generic "if it matches" statement.

This is based on basic networking as I have not looked at YazFi in any way, shape or form personally so I don't know why you might expect it to behave differently.
 
It makes sense to you for a DHCP server to issue an address it knows is invalid based on its own configuration?
 
Where are you seeing the incorrect IP, on the device itself or somewhere in the router?
 
From the manual, it looks like dnsmasq will honor the reservation if it is in any valid subnet:
Code:
Addresses allocated like this are not constrained to be in the range given by
 the --dhcp-range option, but they must be in the same subnet as some valid dhcp-range.
I think this means that because dnsmasq is aware of the guest subnet, it assumes it won't be invalid when used.
 
From the manual, it looks like dnsmasq will honor the reservation if it is in any valid subnet:
Code:
Addresses allocated like this are not constrained to be in the range given by
the --dhcp-range option, but they must be in the same subnet as some valid dhcp-range.
I think this means that because dnsmasq is aware of the guest subnet, it assumes it won't be invalid when used.
regardless of the IP given, the client should have no connectivity since the firewall rules are done by interface and not subnet
 
From the manual, it looks like dnsmasq will honor the reservation if it is in any valid subnet:
Code:
Addresses allocated like this are not constrained to be in the range given by
the --dhcp-range option, but they must be in the same subnet as some valid dhcp-range.
I think this means that because dnsmasq is aware of the guest subnet, it assumes it won't be invalid when used.
That's what I thought, but even though the YazFi guest network is configured with a DHCP range of 192.168.2.2-254, dnsmasq is still assigning an IP to the client outside of that subnet. It seems more like a dnsmasq bug than a YazFi problem. dnsmasq is written to allow it to serve DHCP on multiple subnets, but for some reason you cannot specify an interface or subnet for the dhcp-host directive.
 
That's what I thought, but even though the YazFi guest network is configured with a DHCP range of 192.168.2.2-254, dnsmasq is still assigning an IP to the client outside of that subnet. It seems more like a dnsmasq bug than a YazFi problem. dnsmasq is written to allow it to serve DHCP on multiple subnets, but for some reason you cannot specify an interface or subnet for the dhcp-host directive.
I don't regard this as a dnsmasq bug, it's doing exactly what you've asked it to do. If you need to place restrictions on the dhcp-host option you would use dnsmasq's tag system.
 
I saw the tag option on the dnsmasq man page, but there is nowhere that I can find that clearly explains how to use them to segregate subnets.
 
Or, I should say, how they could be used to reserve different IP addresses for the same MAC depending on the interface the DHCP request arrives on. For example, assign the machine with a MAC of DE:AD:BE:EF:CA:FE 192.168.1.2 on wl0.1 and 192.168.2.2 on wl0.2.
 
I don't use YazFi so I don't know what it's dnsmasq configuration looks like or if/how it uses tags. But there's an explanation of the tag system near the bottom of the man page. It starts at "The tag system works as follows: "
 
I just noticed that any clients with a DHCP reservation in /jffs/configs/dnsmasq.conf.add will receive that IP address when connecting to a YazFi guest network even when it has a completely different subnet.

For example:
Code:
dhcp-host=DE:AD:BE:EF:CA:FE,iPhone,192.168.1.23,12h

Will cause that client to receive the 192.168.1.23 address even when they connect to YazFi guest network configured with a 192.168.10.1 subnet.
try something like
Code:
dhcp-host=DE:AD:BE:EF:CA:FE,set:DE:AD:BE:EF:CA:FE,192.168.1.23

add the host name in /jffs/configs/host.add
 

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top