From owner-freebsd-jail@FreeBSD.ORG Thu Jun 28 10:16:06 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 0B05D16A468 for ; Thu, 28 Jun 2007 10:16:06 +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 9A99713C45D for ; Thu, 28 Jun 2007 10:16:05 +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 l5SA06qV010078 for ; Thu, 28 Jun 2007 12:00:07 +0200 Message-ID: <468386A5.9040900@gujord.com> Date: Thu, 28 Jun 2007 12:00:05 +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 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-MailScanner-Information: Please contact the ISP for more information X-MailScanner: Found to be clean Subject: 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: Thu, 28 Jun 2007 10:16:06 -0000 Hi, I'm about to set up jails for a production environment and I stumbled across a problem with different netmasks for my jails. 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. Thanx! :-) --Roger This is my rc.conf: ------------------------------------------------------------------------------- defaultrouter="192.168.1.49" hostname="myhost.mydomain.com" ifconfig_bge0="inet 192.168.1.1 netmask 255.255.255.128" # FreeBSD jail: jail_enable="YES" jail_set_hostname_allow="YES" jail_interface="bge0" jail_devfs_enable="YES" jail_devfs_ruleset="devfsrules_jail" jail_procfs_enable="YES" jail_socket_unixiproute_only="YES" # Space separated list of names of jails: jail_list="jailhosta jailhostb" # Jail: jailhosta.mydomain.com (the netmask for this jail should be 255.255.255.128) jail_jailhosta_hostname="jailhosta.mydomain.com" jail_jailhosta_ip="192.168.1.2" jail_jailhosta_rootdir="/usr/jails/jailhosta.mydomain.com" # Jail: jailhostb.mydomain.com (the netmask for this jail should be 255.255.255.240) jail_jailhostb_hostname="jailhostb.mydomain.com" jail_jailhostb_ip="192.168.1.54" jail_jailhostb_rootdir="/usr/jails/jailhostb.mydomain.com"