From owner-freebsd-questions@FreeBSD.ORG  Mon Mar 30 22:46:57 2015
Return-Path: <owner-freebsd-questions@FreeBSD.ORG>
Delivered-To: freebsd-questions@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by hub.freebsd.org (Postfix) with ESMTPS id CBFD27BE
 for <freebsd-questions@freebsd.org>; Mon, 30 Mar 2015 22:46:57 +0000 (UTC)
Received: from mail-ie0-x22d.google.com (mail-ie0-x22d.google.com
 [IPv6:2607:f8b0:4001:c03::22d])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G2" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 9205F5F1
 for <freebsd-questions@freebsd.org>; Mon, 30 Mar 2015 22:46:57 +0000 (UTC)
Received: by ierf6 with SMTP id f6so2338132ier.2
 for <freebsd-questions@freebsd.org>; Mon, 30 Mar 2015 15:46:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type:content-transfer-encoding;
 bh=2PmO81K6Qmg0CATw2C9M0czdNrF50Xg07V18qjbY61c=;
 b=EbCJ7Q8QSQV0f90b+R2jinvNVSMEZ1YSVY6NjsiaoDptslYX6gr4p1iWbIOtNJMqz5
 taznbZTc/r3hvyA1q+2IUZ5HbgJ6Ruf6GDsjMIjDLQw4QQiugU6nmvIMsr6Dmq4j5ql6
 m91fDwZBhZdo/1QYT7PS6dmw92yCE+O06JsMoRwX9KbCF6KoCP1Rc46R1v5dJRZa/4We
 ACpmJ6qx0iY0X9gbcTai+hqAO3Sj6V4KRhPEpzO1uae5ukLHCLyj/X5fK8CglVCnLvg2
 oh8KyfAFSTtHHFoOjdt3sLIYJNTBTLBQjL83dzAt+vrTWO9mjtsKyty4z+y24AiTDSdr
 U2nQ==
MIME-Version: 1.0
X-Received: by 10.107.3.17 with SMTP id 17mr9835523iod.60.1427755617049; Mon,
 30 Mar 2015 15:46:57 -0700 (PDT)
Received: by 10.36.111.15 with HTTP; Mon, 30 Mar 2015 15:46:57 -0700 (PDT)
In-Reply-To: <760A9E00-EA43-4DF1-8259-376D1987B2D5@conundrum.com>
References: <760A9E00-EA43-4DF1-8259-376D1987B2D5@conundrum.com>
Date: Mon, 30 Mar 2015 18:46:57 -0400
Message-ID: <CABW2x9pOjmZLJaosWW=WJJcm9nTS==M+DfpzhNxXbtt+QbLWjg@mail.gmail.com>
Subject: Re: rc.conf configured jail not getting IP addresses
From: Jason Unovitch <jason.unovitch@gmail.com>
To: Matthew Pounsett <matt@conundrum.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: freebsd-questions@freebsd.org
X-BeenThere: freebsd-questions@freebsd.org
X-Mailman-Version: 2.1.18-1
Precedence: list
List-Id: User questions <freebsd-questions.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions/>
List-Post: <mailto:freebsd-questions@freebsd.org>
List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Mar 2015 22:46:58 -0000

On Sat, Mar 28, 2015 at 3:21 PM, Matthew Pounsett <matt@conundrum.com> wrot=
e:
> 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 iss=
ue 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=3D"YES"
> jail_list=3D"test"
> jail_test_rootdir=3D"/var/jail/test"
> jail_test_hostname=3D"redacted"
> jail_test_ip=3D"67.xxx.xxx.xxx,2001:xxxx::xxxx"
> jail_test_devfs_enable=3D"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 s=
tuff.

> The jail starts, but no addresses are assigned to it.
> % sudo jexec test tcsh
> # ifconfig igb0
> igb0: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1=
500
>         options=3D401bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,V=
LAN_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 handboo=
k, 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=3D"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