From owner-freebsd-questions@FreeBSD.ORG Thu Sep 18 17:21:09 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 280C7BF2 for ; Thu, 18 Sep 2014 17:21:09 +0000 (UTC) Received: from relay.mailchannels.net (si-002-i152.relay.mailchannels.net [108.178.49.164]) by mx1.freebsd.org (Postfix) with ESMTP id CD4E28CD for ; Thu, 18 Sep 2014 17:21:07 +0000 (UTC) X-Sender-Id: _forwarded-from|184.56.208.198 Received: from mail-24.name-services.com (ip-10-237-13-110.us-west-2.compute.internal [10.237.13.110]) by relay.mailchannels.net (Postfix) with ESMTPA id 73DEA60969; Thu, 18 Sep 2014 17:10:48 +0000 (UTC) X-Sender-Id: _forwarded-from|184.56.208.198 Received: from mail-24.name-services.com (mail-24.name-services.com [10.227.41.147]) (using TLSv1 with cipher AES128-SHA) by 0.0.0.0:2500 (trex/5.2.13); Thu, 18 Sep 2014 17:10:49 GMT X-MC-Relay: Forwarding X-MailChannels-SenderId: _forwarded-from|184.56.208.198 X-MailChannels-Auth-Id: demandmedia X-MC-Loop-Signature: 1411060248801:1845925976 X-MC-Ingress-Time: 1411060248800 Received: from [192.168.1.100] (cpe-184-56-208-198.neo.res.rr.com [184.56.208.198]) by mail-24.name-services.com with SMTP; Thu, 18 Sep 2014 10:10:40 -0700 Message-ID: <541B120D.1000606@a1poweruser.com> Date: Thu, 18 Sep 2014 13:10:37 -0400 From: Fbsd8 User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: dweimer@dweimer.net Subject: Re: FreeBSD 10 Multiple IPs in a jail References: <480aebf1080d12f717695748ef92b4d4@dweimer.net> In-Reply-To: <480aebf1080d12f717695748ef92b4d4@dweimer.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2014 17:21:09 -0000 dweimer wrote: > I know that we can now do multiple IPs in a jail, and I have a > configuration that works for it. > > jail.conf: > testjail { > jid = 100; > host.hostname = testjail.local; > ip4.addr = 'em0|10.20.190.190/24'; > ip4.addr += 'em0|10.20.190.191/24'; > path = /jails/devel/ROOT; > allow.mount.devfs; > mount.devfs; > allow.sysvipc; > exec.start = "/bin/sh /etc/rc"; > exec.stop = "/bin/sh /etc/rc.shutdown"; > exec.prestart = "/jails/devel/prestart.sh"; > exec.poststop = "/jails/devel/poststop.sh"; > exec.consolelog = "/jails/devel/console.log"; > } > > This works great, my question is now that I have this figured out and I > am done testing it, how can I apply it to a running jail without > rebooting the jail? > > I tried using: > jail -n testjail -m 'ip4.addr='em0|10.20.190.191/24' > This replaces the IP on the jail. > > Then I tried using: > jail -n testjail -m 'ip4.addr+='em0|10.20.190.191/24' > I get an error "unknown parameter ip4.addr+" > > Am I stuck waiting until after hours to add the secondary IP when I can > reboot the production jail? Or is there another way I haven't figured > out yet to add the secondary IP to the running jail? > How about jail -n testjail -m 'ip4.addr='em0|10.20.190.190/24,em0|10.20.190.191/24'