Date: Thu, 10 Feb 2011 15:52:35 -0800 From: patrick <gibblertron@gmail.com> To: "Vladislav V. Prodan" <universite@ukr.net> Cc: FreeBSD Questions Mailing List <freebsd-questions@freebsd.org> Subject: Re: how to add a few hundred ip on one interface? Message-ID: <AANLkTikQ10rJ5up-idYadytaa3xCJpQCXGYQTe5YaFMF@mail.gmail.com> In-Reply-To: <4D547675.60506@ukr.net> References: <4D547675.60506@ukr.net>
next in thread | previous in thread | raw e-mail | index | archive | help
The standard way is to configure this in your /etc/rc.conf[.local]: ifconfig_re0="inet xxx.xxx.yyy.134 netmask 0xffffffnn" ifconfig_re0_alias0="inet xxx.xxx.yyy.135 netmask 0xffffffff" ifconfig_re0_alias1="inet xxx.xxx.yyy.136 netmask 0xffffffff" ... etc. You could make a script to generate the correct configuration lines, and then include it in your rc.conf: /etc/rc.conf: . /path/to/ifconfig_entries.sh /path/to/ifconfig_entries.sh: ifconfig_re0="inet xxx.xxx.yyy.134 netmask 0xffffffnn" ifconfig_re0_alias0="inet xxx.xxx.yyy.135 netmask 0xffffffff" ifconfig_re0_alias1="inet xxx.xxx.yyy.136 netmask 0xffffffff" See http://www.freebsd.org/doc/en/books/faq/networking.html#ETHERNET-ALIASES for more info. Note that aliases should have a netmask of 0xffffffff (255.255.255.255). Patrick On Thu, Feb 10, 2011 at 3:36 PM, Vladislav V. Prodan <universite@ukr.net> wrote: > only a shell script at startup? or there are other standard tools? > Is there a limit on the number of IP on one interface? > > ## make aliases IP > for i in 134 135 136 137 138 139 140 141 142 143 144 145 146 147 > do > ifconfig re0 xxx.xxx.yyy.$i/23 alias > done > > for j in 134 135 136 137 138 139 140 141 142 143 144 145 146 147 > do > ifconfig re0 xxx.xxx.xxx.$i/23 alias > done > > > > -- > Vladislav V. Prodan > VVP24-UANIC > +38[067]4584408 > +38[099]4060508 > vlad11@jabber.ru > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikQ10rJ5up-idYadytaa3xCJpQCXGYQTe5YaFMF>