Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Sep 2014 09:40:00 -0500
From:      dweimer <>
To:        FreeBSD Questions <>
Subject:   FreeBSD 10 Multiple IPs in a jail
Message-ID:  <>

Next in thread | Raw E-Mail | Index | Archive | Help

I know that we can now do multiple IPs in a jail, and I have a 
configuration that works for it.

testjail {
         jid = 100;
         host.hostname = testjail.local;
         ip4.addr = 'em0|';
         ip4.addr += 'em0|';
         path = /jails/devel/ROOT;
         exec.start = "/bin/sh /etc/rc";
         exec.stop = "/bin/sh /etc/rc.shutdown";
         exec.prestart = "/jails/devel/";
         exec.poststop = "/jails/devel/";
         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|'
   This replaces the IP on the jail.

Then I tried using:
   jail -n testjail -m 'ip4.addr+='em0|'
   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?

    Dean E. Weimer

Want to link to this message? Use this URL: <>