iocage adding em0 instead of re0

7 views
Skip to first unread message

Farhan Khan

unread,
Jul 1, 2019, 4:31:47 PM7/1/19
to iocage
Hi all,

iocage seems to be adding em0 to bridge0 rather than re0 (which is already attached) when starting the jail.

I created a jail as follows:
iocage create -n mail_filter_east interfaces="vnet0:bridge0" ip4_addr="vnet0|192.168.10.8/24" defaultrouter="192.168.1.1" -r 12.0-RELEASE vnet=on

This machine has em0, which is used for management, and re0, which is the "public facing" network. When I start the jail, iocage attaches em0 to bridge0, where the other jails reside. I ran a diff(1) between "iocage get all FUNCTIONING_JAIL" and "iocage get all mail_filter_east" and the only difference I saw was the IPs, hostnames and MAC addresses.

My /etc/rc.conf is as follows:
ifconfig_em0="inet 192.168.4.40 netmask 255.255.240.0"
defaultrouter="192.168.1.1"
sshd_enable="YES"
ntpdate_enable="YES"
ntpd_enable="YES"
dumpdev="NO"
zfs_enable="YES"
cloned_interfaces="bridge0"
ifconfig_bridge0="addm re0 up"
ifconfig_re0="up"

Please assist,
Thanks!
Farhan

Brandon Schneider

unread,
Jul 1, 2019, 4:37:29 PM7/1/19
to Farhan Khan, iocage

Use the vnet_default_interface property to change what iocage puts in a bridge. It will by default choose the interface with the default route otherwise.

Brandon

--
You received this message because you are subscribed to the Google Groups "iocage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iocage+un...@googlegroups.com.
To post to this group, send email to ioc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iocage/d30c90fa-c986-4c5d-890f-e0bee3c1c11a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
signature.asc

Farhan Khan

unread,
Jul 1, 2019, 5:11:36 PM7/1/19
to iocage
Thank you very much Brandon!
To unsubscribe from this group and stop receiving emails from it, send an email to ioc...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages