From owner-freebsd-questions@FreeBSD.ORG Sun Apr 5 12:41:00 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 A79A91065674 for ; Sun, 5 Apr 2009 12:41:00 +0000 (UTC) (envelope-from lucian@lastdot.org) Received: from mail-ew0-f171.google.com (mail-ew0-f171.google.com [209.85.219.171]) by mx1.freebsd.org (Postfix) with ESMTP id 4073A8FC0A for ; Sun, 5 Apr 2009 12:41:00 +0000 (UTC) (envelope-from lucian@lastdot.org) Received: by ewy19 with SMTP id 19so1482290ewy.43 for ; Sun, 05 Apr 2009 05:40:59 -0700 (PDT) Received: by 10.210.11.17 with SMTP id 17mr2475019ebk.25.1238935259366; Sun, 05 Apr 2009 05:40:59 -0700 (PDT) Received: from erendi.lastdot.org (79-65-25-241.dynamic.dsl.as9105.com [79.65.25.241]) by mx.google.com with ESMTPS id 24sm5390737eyx.18.2009.04.05.05.40.58 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 05 Apr 2009 05:40:58 -0700 (PDT) Message-ID: <49D8A6DF.1060805@lastdot.org> Date: Sun, 05 Apr 2009 13:41:03 +0100 From: "lucian@lastdot.org" User-Agent: Thunderbird 2.0.0.18 (X11/20081120) MIME-Version: 1.0 To: Matthew Seaman , freebsd-questions@freebsd.org References: <49D89A2B.30906@lastdot.org> <4ad871310904050522h1483d1f7lbddd504fb9f5f9e4@mail.gmail.com> <49D8A3D9.30000@infracaninophile.co.uk> In-Reply-To: <49D8A3D9.30000@infracaninophile.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: 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:41:00 -0000 Matthew Seaman wrote: > 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 >>> trick: >>> http://wiki.centos.org/TipsAndTricks/RangeOfIpsOnEthx >>> >> >> 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. >> >> IMHO, this solution is a lot uglier than 30 extra lines in rc.conf. >> > > If this is a contiguous range of IPs, then use the ipv4_addrs_ifN > construct, which you can read all about in rc.conf(5). Eg: > > ipv4_addrs_em0="192.168.64.33-63/24" > > Cheers, > > Matthew > Wow, great, that's what I was looking for! Thanks much, guys!