rc.conf configured jail not getting IP addresses

Jason Unovitch jason.unovitch at gmail.com
Mon Mar 30 22:46:58 UTC 2015


On Sat, Mar 28, 2015 at 3:21 PM, Matthew Pounsett <matt at conundrum.com> wrote:
> I've been having some issues with ezjail and freebsd-update, so I decided to give a more basic jail setup a try.  I'm following the instructions in the handbook[1] for setting up a new jail, but seem to have run into an issue with jail startup and IP address assignment.
>
> My host system is 9.3-RELEASE-p10.  My rc.conf looks like the following:
> % grep jail /etc/rc.conf
> jail_enable="YES"
> jail_list="test"
> jail_test_rootdir="/var/jail/test"
> jail_test_hostname="redacted"
> jail_test_ip="67.xxx.xxx.xxx,2001:xxxx::xxxx"
> jail_test_devfs_enable="YES"
>
> Startup of the jail takes a surprising amount of time .. about 30 seconds, but no errors are reported.
> % time sudo service jail start test
> Configuring jails:.
> Starting jails: redacted.
> sudo service jail start test  0.13s user 0.16s system 0% cpu 30.292 total
>
Likely some service timing out because it's attempting to network related stuff.

> The jail starts, but no addresses are assigned to it.
> % sudo jexec test tcsh
> # ifconfig igb0
> igb0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
>         options=401bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,VLAN_HWTSO>
>         ether d4:85:64:53:91:44
>         media: Ethernet autoselect (100baseTX <full-duplex>)
>         status: active
>
> Am I missing something here?  I've double checked the docs in the handbook, and it doesn't look like I've missed any steps up to this point.
>
> [1]: <https://www.freebsd.org/doc/handbook/jails-build.html>
>

Actually, I'm not seeing it in the Handbook or man pages but I only
took a quick look.  You either need to assign your addresses in
advance using the ifconfig_igb0_alias syntax shown in rc.conf(5) or
have them assigned at jail start time with this syntax.

jail_test_ip="igb0|67.xxx.xxx.xxx,igb0:2001:xxxx::xxxx"

It looks like this <interface>|<address> format is shown a little bit
later on in the Handbook.
https://www.freebsd.org/doc/en/books/handbook/jails-ezjail.html

-Jason


More information about the freebsd-questions mailing list