From owner-freebsd-questions@FreeBSD.ORG Sun Apr 5 12:28:16 2009 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 48F5F106564A for ; Sun, 5 Apr 2009 12:28:16 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (gate6.infracaninophile.co.uk [IPv6:2001:8b0:151:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id A714D8FC15 for ; Sun, 5 Apr 2009 12:28:15 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.3/8.14.3) with ESMTP id n35CS9AC082156; Sun, 5 Apr 2009 13:28:10 +0100 (BST) (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: Sendmail DKIM Filter v2.8.2 smtp.infracaninophile.co.uk n35CS9AC082156 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infracaninophile.co.uk; s=200708; t=1238934490; bh=9dWVfiMYKT5/kSYfDiumuR7aeGbAUTcovBsE8vHoaSU=; h=Message-ID:Date:From:MIME-Version:To:CC: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<49D8A3D9.30000@infracaninophile.co.uk>|Date:=20Sun ,=2005=20Apr=202009=2013:28:09=20+0100|From:=20Matthew=20Seaman=20 |Organization:=20Infracaninophile |User-Agent:=20Thunderbird=202.0.0.21=20(X11/20090321)|MIME-Versio n:=201.0|To:=20Glen=20Barber=20|CC:=20"lu cian@lastdot.org"=20,=20=0D=0A=20freebsd-quest ions@freebsd.org|Subject:=20Re:=20range=20of=20IPs=20in=20rc.conf| References:=20<49D89A2B.30906@lastdot.org>=20<4ad871310904050522h1 483d1f7lbddd504fb9f5f9e4@mail.gmail.com>|In-Reply-To:=20<4ad871310 904050522h1483d1f7lbddd504fb9f5f9e4@mail.gmail.com>|X-Enigmail-Ver sion:=200.95.6|Content-Type:=20multipart/signed=3B=20micalg=3Dpgp- sha256=3B=0D=0A=20protocol=3D"application/pgp-signature"=3B=0D=0A= 20boundary=3D"------------enig600CFFBB09A77344388B15E4"; b=4brl+j2QpnG0IpMjqn6ls1QSdn5qJ1f7aJp0D3Zmf9h693g91l2kV1w9aBBtlUlg8 Jk8eDxiBoqpNxGf3mE8I21n5iGh6h+/Mj9Ve3Z4PZ8Dn6D8tsWr0+mX12U/kj4rBEy Q1BZcAw71s25cAeFVfGpF2We3lpJBTLowvqfD8Fk= X-Authentication-Warning: happy-idiot-talk.infracaninophile.co.uk: Host localhost [IPv6:::1] claimed to be happy-idiot-talk.infracaninophile.co.uk Message-ID: <49D8A3D9.30000@infracaninophile.co.uk> Date: Sun, 05 Apr 2009 13:28:09 +0100 From: Matthew Seaman Organization: Infracaninophile User-Agent: Thunderbird 2.0.0.21 (X11/20090321) MIME-Version: 1.0 To: Glen Barber References: <49D89A2B.30906@lastdot.org> <4ad871310904050522h1483d1f7lbddd504fb9f5f9e4@mail.gmail.com> In-Reply-To: <4ad871310904050522h1483d1f7lbddd504fb9f5f9e4@mail.gmail.com> X-Enigmail-Version: 0.95.6 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig600CFFBB09A77344388B15E4" X-Virus-Scanned: clamav-milter 0.95 at happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VERIFIED,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on happy-idiot-talk.infracaninophile.co.uk Cc: freebsd-questions@freebsd.org, "lucian@lastdot.org" Subject: Re: range of IPs in rc.conf 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: Sun, 05 Apr 2009 12:28:16 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig600CFFBB09A77344388B15E4 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Glen Barber wrote: > On Sun, Apr 5, 2009 at 7:46 AM, lucian@lastdot.org = wrote: >> Hi, >> >> I need to use around 30 IPs on a freebsd 7 machine. Is there a way to = avoid >> adding 30 lines of aliases in rc.conf? On RedHat/Centos I use this tri= ck: >> http://wiki.centos.org/TipsAndTricks/RangeOfIpsOnEthx >> >=20 > You could create a customized rc file (I personally use rc.local) > which will be run at boot. You could then use #!/bin/sh and a 'for' > loop to create the devices. >=20 > IMHO, this solution is a lot uglier than 30 extra lines in rc.conf. >=20 If this is a contiguous range of IPs, then use the ipv4_addrs_ifN=20 construct, which you can read all about in rc.conf(5). Eg: ipv4_addrs_em0=3D"192.168.64.33-63/24" Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enig600CFFBB09A77344388B15E4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREIAAYFAknYo9kACgkQ8Mjk52CukIz3DgCfapEmMUrORk8EU+SlVOUfHteD yasAn3ShuD6ZcMqZ3DX/G4aLshK4k2mA =HwrT -----END PGP SIGNATURE----- --------------enig600CFFBB09A77344388B15E4--