From owner-freebsd-questions@FreeBSD.ORG Thu Feb 10 23:52:36 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 614AC106566B for ; Thu, 10 Feb 2011 23:52:36 +0000 (UTC) (envelope-from gibblertron@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1E9358FC1E for ; Thu, 10 Feb 2011 23:52:35 +0000 (UTC) Received: by iwn39 with SMTP id 39so1869314iwn.13 for ; Thu, 10 Feb 2011 15:52:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=M2u1NQOcylPI/HlySbxvcJnUy2+QeGFZqnjK0NB8dPg=; b=NnfuFgzlbeydYXvAlrHH2Uns+jnFyRKxIgXmozCyI/5mA3oAz3pLYa4nCB7lXMr82V mwfnZBkA2EY3THZ9xBiHXohjXXSKxpjno32hhIAp2Roc92VpTNA/DPlNcSYFGdEyiOB0 /TfJp+/0t3f3QZlQfzbqV1wHkBP2KyrK4Y0xo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=a9oclztukmEcfhyUXgx3CqE3us6sTXp+B8C0gR05PexCiIL+NIqhv86GOFAXtbkG9S CrmxCyqxYUk7kHB0QUbYQRUiNRcXZ24hdQosRg//kR4f/BN6SzM7jIRsFNM/gQZz7Dgy 31XVBAwS8J3Y9nE5g9QwROMDpWhyD38Nev8BM= MIME-Version: 1.0 Received: by 10.231.36.68 with SMTP id s4mr23021007ibd.178.1297381955301; Thu, 10 Feb 2011 15:52:35 -0800 (PST) Received: by 10.231.14.197 with HTTP; Thu, 10 Feb 2011 15:52:35 -0800 (PST) In-Reply-To: <4D547675.60506@ukr.net> References: <4D547675.60506@ukr.net> Date: Thu, 10 Feb 2011 15:52:35 -0800 Message-ID: From: patrick To: "Vladislav V. Prodan" Content-Type: text/plain; charset=ISO-8859-1 Cc: FreeBSD Questions Mailing List 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: Thu, 10 Feb 2011 23:52:36 -0000 The standard way is to configure this in your /etc/rc.conf[.local]: ifconfig_re0="inet xxx.xxx.yyy.134 netmask 0xffffffnn" ifconfig_re0_alias0="inet xxx.xxx.yyy.135 netmask 0xffffffff" ifconfig_re0_alias1="inet xxx.xxx.yyy.136 netmask 0xffffffff" ... etc. You could make a script to generate the correct configuration lines, and then include it in your rc.conf: /etc/rc.conf: . /path/to/ifconfig_entries.sh /path/to/ifconfig_entries.sh: ifconfig_re0="inet xxx.xxx.yyy.134 netmask 0xffffffnn" ifconfig_re0_alias0="inet xxx.xxx.yyy.135 netmask 0xffffffff" ifconfig_re0_alias1="inet xxx.xxx.yyy.136 netmask 0xffffffff" See http://www.freebsd.org/doc/en/books/faq/networking.html#ETHERNET-ALIASES for more info. Note that aliases should have a netmask of 0xffffffff (255.255.255.255). Patrick On Thu, Feb 10, 2011 at 3:36 PM, Vladislav V. Prodan wrote: > only a shell script at startup? or there are other standard tools? > Is there a limit on the number of IP on one interface? > > ## make aliases IP > for i in 134 135 136 137 138 139 140 141 142 143 144 145 146 147 > do > ifconfig re0 xxx.xxx.yyy.$i/23 alias > done > > for j in 134 135 136 137 138 139 140 141 142 143 144 145 146 147 > do > ifconfig re0 xxx.xxx.xxx.$i/23 alias > done > > > > -- > Vladislav V. Prodan > VVP24-UANIC > +38[067]4584408 > +38[099]4060508 > vlad11@jabber.ru > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" >