From owner-freebsd-jail@FreeBSD.ORG Fri Jun 29 07:29:18 2007 Return-Path: X-Original-To: freebsd-jail@freebsd.org Delivered-To: freebsd-jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D85C816A474 for ; Fri, 29 Jun 2007 07:29:18 +0000 (UTC) (envelope-from roger@gujord.com) Received: from red.newsgrip.com (red.newsgrip.com [193.69.188.102]) by mx1.freebsd.org (Postfix) with ESMTP id 71DBD13C480 for ; Fri, 29 Jun 2007 07:29:18 +0000 (UTC) (envelope-from roger@gujord.com) Received: from [192.168.1.2] ([192.168.1.2]) by red.newsgrip.com (8.12.8/8.12.5) with ESMTP id l5T7TEqV027263; Fri, 29 Jun 2007 09:29:14 +0200 Message-ID: <4684B4C9.90101@gujord.com> Date: Fri, 29 Jun 2007 09:29:13 +0200 From: Roger Gujord Organization: Gujord.com User-Agent: Thunderbird 1.5.0.12 (X11/20070530) MIME-Version: 1.0 To: freebsd-jail@freebsd.org References: <468386A5.9040900@gujord.com> <20070628213520.6e561b42@localhost> In-Reply-To: <20070628213520.6e561b42@localhost> Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-MailScanner-Information: Please contact the ISP for more information X-MailScanner: Found to be clean Cc: beto@octantis.com.au Subject: Re: Different Netmasks for jails X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jun 2007 07:29:18 -0000 Norberto Meijome wrote: > On Thu, 28 Jun 2007 12:00:05 +0200 > Roger Gujord wrote: > > >> How can I have a netmask like 255.255.255.128 for one jail and a netmask >> like 255.255.255.240 for another jail without creating static aliases at >> hosts boot-time in /etc/rc.conf ? >> I would like the /etc/rc.d/jail to create the network aliases according >> to the jails respective network mask. I see that /etc/rc.d/jail sets the >> netmask to 255.255.255.255 for all network aliases. >> > > Hi :) > > I'm pretty sure this is the same FAQ as seen in questions@ / net@ wrt netmasks > of aliases. In short, if your aliased interfaces are in the *same* subnet as > your main IP (eg, the main IP's subnet includes all the aliased subnets), they > will be /32. > Thanks for your answer Norberto :-) If I understand you correctly, you are saying that the same netmask as the one for the hosts main IP will apply to all jails and therefore there is no need to specify a netmask other than /32 for each jail in the same subnet. But this is not my case. I have two different subnets in the same IP-range with different netmasks (of course) and also another IP-range. ------------------------------------------------------- Subnet ID Broadcast Address Subnet Mask ------------------------------------------------------- 192.168.1.0 /25 192.168.1.127 255.255.255.128 192.168.1.48 /28 192.168.1.62 255.255.255.240 192.168.2.96 /27 192.168.2.127 255.255.255.224 I'm trying to configure jails to run in all three subnets on the same host: mainHost 192.168.1.1/25 jailHostA 192.168.1.2/25 jailHostB 192.168.1.54/28 jailHostC 192.168.2.100/27 I guess the jailHostA is OK since it's running in the same subnet as the mainHost. But how do I configure jailHostB and C without creating a static aliased interface (in /etc/rc.conf) when all jails are started up with netmask /32 (from /etc/rc.d/jail) ? Thanks! :-) --Roger