From owner-freebsd-questions@FreeBSD.ORG Fri Feb 11 06:07:55 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A653106564A for ; Fri, 11 Feb 2011 06:07:55 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3fd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id C212E8FC0A for ; Fri, 11 Feb 2011 06:07:54 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [81.187.76.163]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.4/8.14.4) with ESMTP id p1B67o5j077906 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Fri, 11 Feb 2011 06:07:50 GMT (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: Sendmail DKIM Filter v2.8.3 smtp.infracaninophile.co.uk p1B67o5j077906 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infracaninophile.co.uk; s=201001-infracaninophile; t=1297404470; bh=kL4IXYAq/E0YFTOT8/WikyhZdP9lAAPNh3CyW7Av8yM=; h=Message-ID:Date:From:MIME-Version:To:Subject:References: In-Reply-To:Content-Type:Cc:Content-Type:Date:From:In-Reply-To: Message-ID:Mime-Version:References:To; z=Message-ID:=20<4D54D22F.2060607@infracaninophile.co.uk>|Date:=20F ri,=2011=20Feb=202011=2006:07:43=20+0000|From:=20Matthew=20Seaman= 20|User-Agent:=20Mozilla/5.0=20(M acintosh=3B=20U=3B=20Intel=20Mac=20OS=20X=2010.6=3B=20en-US=3B=20r v:1.9.2.13)=20Gecko/20101207=20Thunderbird/3.1.7|MIME-Version:=201 .0|To:=20freebsd-questions@freebsd.org|Subject:=20Re:=20how=20to=2 0add=20a=20few=20hundred=20ip=20on=20one=20interface?|References:= 20<4D547675.60506@ukr.net>=20|In-Reply-To:=20|X-Enigmail-Version:=201.1.1| OpenPGP:=20id=3D60AE908C|Content-Type:=20multipart/signed=3B=20mic alg=3Dpgp-sha1=3B=0D=0A=20protocol=3D"application/pgp-signature"=3 B=0D=0A=20boundary=3D"------------enig768D621D2C1E274B1397B9C4"; b=hp806A9rUHSsMNkYBaIN/wmIU62En+hfbhEPluQ7/7Md4oYjLYMVt9mk0QsUedrKD oBblIZcP3eRMuJ4VxnxQEy2SZHWfosGHi847TV3NHSFbs0w+VSVKAnNhpI3XWWnrXc nctoFTRXfZJdhAgSUk/GJWMNIcXuc0CiMdxsSjLk= Message-ID: <4D54D22F.2060607@infracaninophile.co.uk> Date: Fri, 11 Feb 2011 06:07:43 +0000 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <4D547675.60506@ukr.net> In-Reply-To: X-Enigmail-Version: 1.1.1 OpenPGP: id=60AE908C Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig768D621D2C1E274B1397B9C4" X-Virus-Scanned: clamav-milter 0.96.5 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_FAIL autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on lucid-nonsense.infracaninophile.co.uk Subject: Re: how to add a few hundred ip on one interface? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Feb 2011 06:07:55 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig768D621D2C1E274B1397B9C4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 10/02/2011 23:52, patrick wrote: > The standard way is to configure this in your /etc/rc.conf[.local]: >=20 > ifconfig_re0=3D"inet xxx.xxx.yyy.134 netmask 0xffffffnn" > ifconfig_re0_alias0=3D"inet xxx.xxx.yyy.135 netmask 0xffffffff" > ifconfig_re0_alias1=3D"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: ipv4_addrs_re0=3D"xxx.xxx.yyy.134-147/23" See rc.conf(5) for details. > See http://www.freebsd.org/doc/en/books/faq/networking.html#ETHERNET-AL= IASES > for more info. Note that aliases should have a netmask of 0xffffffff > (255.255.255.255). 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. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matthew@infracaninophile.co.uk Kent, CT11 9PW --------------enig768D621D2C1E274B1397B9C4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.16 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1U0jUACgkQ8Mjk52CukIzXiACff+rDkH0RF+un4jjuJ02Mk5R9 mkQAn16b/9XUYLkIKlbaBdWtGBgf+ISI =Hgkc -----END PGP SIGNATURE----- --------------enig768D621D2C1E274B1397B9C4--