According to the manual binding ip ranges has been merged into the default ifconfig_<iface>_alias<n> line, however, if you try to bind a /24 it stops at ip 35. Ie: ifconfig_bce0_alias0="inet 10.0.68.3-254/24" Binds ip's 10.0.68.3-10.0.68.35 and not the full 254 Using the old and deprecated syntax is also broken: ipv4_addrs_bce0="10.0.68.3-254/24" However, using the old syntax in FreeBSD 9.1 works fine and binds all 252 ip's to the nic. Fix: Worked fine in 9.1-RELEASE so one should only have to check what's changed. How-To-Repeat: Add this line to your /etc/rc.conf ifconfig_bce0_alias0="inet 10.0.68.3-254/24" reload or reboot IP's 10.0.68.3 through 10.0.68.35 will be binded and not the full 252 ip's.
Responsible Changed From-To: freebsd-bugs->freebsd-rc reclassify.
Intentionally broken in r252015. We need to remove the _IPEXPANDMAX limit. This is a regression over how it previously worked.
https://reviews.freebsd.org/D727 fixes it
Sorry, I had missed this PR. I am thinking that making _IPEXPANDMAX be user-configurable in rc.conf is better than removing it completely because the number of resulting addresses can be too large. Do you have any specific reason that we should remove this restriction at all?
May I ask why having the restriction at all? If one wants to bind a /16, let the dude do so! :D
(In reply to Hiroki Sato from comment #4) > Sorry, I had missed this PR. I am thinking that making _IPEXPANDMAX be > user-configurable in rc.conf is better than removing it completely because > the number of resulting addresses can be too large. Do you have any > specific reason that we should remove this restriction at all? My reasoning is that it is a regression over how the _addrs mechanism has always worked. It would make sense to limit the ranges by the size of the CIDR mask, but a blanket limit is not right IMHO. If the user specifies X-N/MASK they expect all IPS between X and N to be added, at least for the size of the mask.
Created attachment 147097 [details] A patch to make the limit user-configurable and bump the default value up to 2048. _IPEXPANDMAX was not intended for a hard limit of this functionality, just a safety-belt though I did not add it as a user-configurable knob. The reason why I added it is that a misconfiguration can unexpectedly generate a very very large number of addresses, especially in IPv6 because range specification handling in a shell-script is not so robust. A typo in IPv6 address can generate over 2^64 addresses. So, the moot point is whether this limit is still problematic even when it is user-configurable and an appropriate warning message is displayed. My proposed patch is attached. With this patch, one can increase it arbitrarily in rc.conf.
(In reply to Hiroki Sato from comment #7) > Created attachment 147097 [details] > A patch to make the limit user-configurable and bump the default value up to > 2048. This is acceptable to me for now. Please also add a note in rc.conf.5 near the ipv4_addrs_ content about the limit and how to change. Possibly even noting it in the warning that "netif_ipexpand_max=${netif_ipexpand_max} was exceeded".
A commit references this bug: Author: hrs Date: Thu Sep 11 12:30:30 UTC 2014 New revision: 271424 URL: http://svnweb.freebsd.org/changeset/ports/271424 Log: - Add $netif_ipexpand_max to specify the upper limit for the number of addresses generated by an address range specification. The default value is 2048. This can be increased by setting $netif_ipexpand_max in rc.conf. - Fix warning messages when an address range spec exceeds the upper limit. PR: 186841 Changes: head/etc/defaults/rc.conf head/etc/network.subr head/share/man/man5/rc.conf.5
Committed the patch and rc.conf(5) manual page update to 11-CURRENT. I will MFC them to stable branches.
A commit references this bug: Author: bdrewery Date: Sun Oct 5 23:32:59 UTC 2014 New revision: 272577 URL: https://svnweb.freebsd.org/changeset/base/272577 Log: MFC r271424: - Add $netif_ipexpand_max to specify the upper limit for the number of addresses generated by an address range specification. The default value is 2048. This can be increased by setting $netif_ipexpand_max in rc.conf. PR: 186841 Changes: _U stable/10/ stable/10/etc/defaults/rc.conf stable/10/etc/network.subr stable/10/share/man/man5/rc.conf.5
Also committed to stable/9 in r272581. Will petition to get it into 10.1.
A commit references this bug: Author: bdrewery Date: Mon Oct 13 14:52:55 UTC 2014 New revision: 273039 URL: https://svnweb.freebsd.org/changeset/base/273039 Log: MFS r272577,r272577: - Add $netif_ipexpand_max to specify the upper limit for the number of addresses generated by an address range specification. The default value is 2048. This can be increased by setting $netif_ipexpand_max in rc.conf. PR: 186841 Approved by: re (hrs) Changes: _U releng/10.1/ releng/10.1/etc/defaults/rc.conf releng/10.1/etc/network.subr releng/10.1/share/man/man5/rc.conf.5