More than 254 hosts on the LAN


I have two questions:

  1. How can I create more than 254 hosts on the LAN and DHCP still dole out the numbers? Is it by giving static IP address to the Lan interface in the format like
    Will this work?

  2. I have a vlan 1 for lan and vlan 2 for guests. All our devices like TV are on vlan 1 but if any of our guests is using the guest interface (i.e vlan 2) they are unable to chrome cast some interesting video clips they have.... Is there a way for guest zone to chrome cast to lan zone?

Sorry if my questions are stupid.

Thank you.

it should work
subnet /23

IP Address:||
Usable Host IP Range:| -|
Broadcast Address:||
Total Number of Hosts:|512|
Number of Usable Hosts:|510|
Subnet Mask:||


Awesome. But how will dhcp be configured. By default it says start is 100 but the 100 will come twice. Once in and second time in So what will this point to. And instead of 150 lease default, can we specify 225?

Appreciate help.


No, it doesn't. You're thinking too hard about it. If all you did was change/ 24 to /23 - it comes once in the same location (i.e. using the above example).

If you realize that, then you simply realize your avaliable limit simply increased by ~256 addresses.

Hope this helps.

Yes, that was your inquiry.


The limit parameter in the DHCP configuration does not refer to the last address octet but to the number of addresses relative to the start offset.


  • network:
  • start: 100
  • limit: 400
  • =
  • + 100 = (first lease address)
  • + 400 = (last lease address)

Fantastic explained! Even people like me can understand this. Thank you thank you.

What would happen to these two addresses: &
Will they become valid host addresses? As the broadcast will be


Yes, within a CIDR scheme, these would be completely normal host addresses. There might be broken software however which treats *.*.*.0 and *.*.*.255 special, disregarding the actual netmask.


Thank you. Understood, Best to avoid even if technically valid.

You will need to add a dhcpleasemax 250 line to the global dnsmasq configuration. By default dnsmasq will not issue more than 150 dynamic IPs, even if an interface's limit is more than that.



There is /etc/config/dhcp and there is /etc/dnsmasq. My /etc/dnsmasq is all commented out. Just add one line at the end or will it go into /etc/config/dhcp ? Please LMK.

root@r6220-GW:/etc# cat dnsmasq.conf 
# Change the following lines if you want dnsmasq to serve SRV
# records.
# You may add multiple srv-host lines.
# The fields are <name>,<target>,<port>,<priority>,<weight>

# A SRV record sending LDAP for the domain to
# port 289,,389

# Two SRV records for LDAP, each with different priorities,,389,1,,389,2

# A SRV record indicating that there is no LDAP server for the domain

# The following line shows how to make dnsmasq serve an arbitrary PTR
# record. This is useful for DNS-SD.
# The fields are <name>,<target>
#ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services"

# Change the following lines to enable dnsmasq to serve TXT records.
# These are used for things like SPF and zeroconf.
# The fields are <name>,<text>,<text>...

#Example SPF.,"v=spf1 a -all"

#Example zeroconf,name=value,paper=A4

# Provide an alias for a "local" DNS name. Note that this _only_ works
# for targets which are names from DHCP or /etc/hosts. Give host
# "bert" another name, bertrand
# The fields are <cname>,<target>

Put the option in the first block (config dnsmasq) of the file /etc/config/dhcp.

And the number should be at least 510 not 250 that I posted before. Large numbers of leases should not take a lot of RAM.


Thank you so much, Mike. Appreciate your help.
It will be like:

config dnsmasq
	option domainneeded '1'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.d/'
	option localservice '1'
	option ednspacket_max '1232'
	option dnssec '1'
	option dnsseccheckunsigned '1'
	option cachesize '8192'
        option dhcpleasemax '1000'

Wonderful the solution has been working without any hiccups. Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.