how to add a few hundred ip on one interface?
m.seaman at infracaninophile.co.uk
Fri Feb 11 06:07:55 UTC 2011
On 10/02/2011 23:52, patrick wrote:
> 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.
That used to be the case, but in fact no longer. Nowadays you can put
this single line into /etc/rc.conf to configure a whole raft of IP
addresses on an interface:
See rc.conf(5) for details.
> 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
Also something that was once true, but is actually no longer required.
Nowadays you can give alias IPs the natural netmask of the network they
belong to. Which has the handy consequence that there's no real
distinction between what was the first address, and what are aliases --
so you can easily renumber an interface on the fly, simply by adding a
new address/netmask, then removing the old one.
Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
JID: matthew at infracaninophile.co.uk Kent, CT11 9PW
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 267 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20110211/6415953d/signature.pgp
More information about the freebsd-questions