From owner-freebsd-isp@FreeBSD.ORG Mon Sep 12 23:30:27 2005 Return-Path: X-Original-To: freebsd-isp@freebsd.org Delivered-To: freebsd-isp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 03DE716A420 for ; Mon, 12 Sep 2005 23:30:27 +0000 (GMT) (envelope-from jeff@norristechs.net) Received: from scooby.norristechs.net (scooby.norristechs.net [71.36.89.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8F93443D62 for ; Mon, 12 Sep 2005 23:30:23 +0000 (GMT) (envelope-from jeff@norristechs.net) Received: from [127.0.0.1] [71.36.89.205] by scooby.norristechs.net with ESMTP (SMTPD-8.21) id AF8D016C; Mon, 12 Sep 2005 17:30:21 -0600 Message-ID: <43260F79.2030201@norristechs.net> Date: Mon, 12 Sep 2005 17:30:01 -0600 From: Jeff at NorrisTechs Organization: NorrisTechs.NET.COM User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: mike@lanline.com References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-isp@freebsd.org Subject: Re: virtual host ip aliases X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Sep 2005 23:30:27 -0000 Mike. If you wanted to do it in bash, here's a script you can call using /usr/local/etc/rc.d/999myalias.sh #!/usr/local/bin/bash # save to /usr/local/etc/rc.d/999myalias.sh # chmod 755 # BLAH BLAH BLAH.... NO COMMENT ###################################### # # change to interface name, e.g. fxp0, rl0, fxp1 , whatever NetName="fxp0" # How many aliases will we create Total="254" # change NUM=xx whre xx is the starting number for (( NUM=1; NUM <= $Total; NUM++ )) do # if you want to see the looping number # uncomment this the next line #echo $NUM # Change 192.168.1.XXX to match your network # change netmask to match you network ifconfig $NetName 192.168.1.$NUM netmask 255.255.255.0 alias done # if you dont want to see 254 IP addresses, just comment out the next line ifconfig | more #end Cheers. ------------------------------------------------------------------------ */Jeff Norris/* /~ Web Hosting ~ VPN Solutions ~ Network Management ~ Design, deploy, kick ass. / *N*orris*Techs* dot net http://www.norristechs.net *AOL IM or Yahoo IM: /ntshelper/* mike@lanline.com wrote: >Hi, > > I want to add like 254 ip aliases to a nic. Is there a better way >to do it than adding _alias# 's to the rc.conf. > >Thanks. > >-Mike > > >_______________________________________________ >freebsd-isp@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-isp >To unsubscribe, send any mail to "freebsd-isp-unsubscribe@freebsd.org" > > > > >