Date: Sun, 05 Apr 2009 13:28:09 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Glen Barber <glen.j.barber@gmail.com> Cc: freebsd-questions@freebsd.org, "lucian@lastdot.org" <lucian@lastdot.org> Subject: Re: range of IPs in rc.conf Message-ID: <49D8A3D9.30000@infracaninophile.co.uk> In-Reply-To: <4ad871310904050522h1483d1f7lbddd504fb9f5f9e4@mail.gmail.com> References: <49D89A2B.30906@lastdot.org> <4ad871310904050522h1483d1f7lbddd504fb9f5f9e4@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49D8A3D9.30000>