Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Jun 2007 12:00:05 +0200
From:      Roger Gujord <roger@gujord.com>
To:        freebsd-jail@freebsd.org
Subject:   Different Netmasks for jails
Message-ID:  <468386A5.9040900@gujord.com>

next in thread | raw e-mail | index | archive | help
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"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?468386A5.9040900>