STREBLO
Patron
- Joined
- Oct 23, 2015
- Messages
- 245
I've been having some difficulties with iocage when using VNET. I have experience using iocage on FreeBSD with a shared IP, but never using VNET since I didn't need the functionality at that point.
After having some trouble figuring out how to configure a bridge correctly, I have finally gotten something working, but I keep getting this message in the log spewed out constantly:
When I just attempted to use the bridge that already existed for my second nic by specifying interfaces="vnet1:bridge1" in iocage, for some reason FreeNAS creates a new bridge instead of using bridge0 and bridge1. In order to get around this problem I use the following tunables at boot:
I created my jail with the following:
This is my exact setup:
bridge1 one already existed on my system, I would assume for the old style jails.
Here's my iocage config
[SPOILER/]
After having some trouble figuring out how to configure a bridge correctly, I have finally gotten something working, but I keep getting this message in the log spewed out constantly:
Code:
Dec 27 14:03:47 lilan kernel: arp: 02:ff:60:13:e8:fc is using my IP address 172.20.40.21 on vnet1!
When I just attempted to use the bridge that already existed for my second nic by specifying interfaces="vnet1:bridge1" in iocage, for some reason FreeNAS creates a new bridge instead of using bridge0 and bridge1. In order to get around this problem I use the following tunables at boot:
Code:
Variable: ifconfig_bridge1 Value: addm igb1 up Type: rc.conf
I created my jail with the following:
This is my exact setup:
Code:
iocage create --release 11.1-RELEASE --name emby \ boot="on" vnet=on \ ip4_addr="vnet1|172.20.40.21/24" \ interfaces="vnet1:bridge1" \ defaultrouter="172.20.40.1"
bridge1 one already existed on my system, I would assume for the old style jails.
Here's my iocage config
Code:
CONFIG_VERSION:9 allow_chflags:0 allow_mount:0 allow_mount_devfs:0 allow_mount_nullfs:0 allow_mount_procfs:0 allow_mount_tmpfs:0 allow_mount_zfs:0 allow_quotas:0 allow_raw_sockets:1 allow_set_hostname:1 allow_socket_af:0 allow_sysvipc:0 available:readonly basejail:no boot:on bpf:no children_max:0 cloned_release:11.1-RELEASE comment:none compression:lz4 compressratio:readonly coredumpsize:off count:1 cpuset:off cputime:off datasize:off dedup:off defaultrouter:172.20.40.1 defaultrouter6:none depends:none devfs_ruleset:4 dhcp:off enforce_statfs:2 exec_clean:1 exec_fib:0 exec_jail_user:root exec_poststart:/usr/bin/true exec_poststop:/usr/bin/true exec_prestart:/usr/bin/true exec_prestop:/usr/bin/true exec_start:/bin/sh /etc/rc exec_stop:/bin/sh /etc/rc.shutdown exec_system_jail_user:0 exec_system_user:root exec_timeout:60 host_domainname:none host_hostname:unifi.ramsden.network host_hostuuid:unifi host_time:yes hostid:5c8a3f6f-989f-11e6-8d50-0cc47a696994 interfaces:vnet1:bridge1 ip4:new ip4_addr:vnet1|172.20.40.20/24 ip4_saddrsel:1 ip6:new ip6_addr:none ip6_saddrsel:1 jail_zfs:off jail_zfs_dataset:data/unifi/data jail_zfs_mountpoint: last_started:2017-12-27 02:36:01 login_flags:-f root mac_prefix:02ff60 maxproc:off memorylocked:off memoryuse:off mount_devfs:1 mount_fdescfs:1 mount_linprocfs:1 mount_procfs:0 mountpoint:readonly msgqqueued:off msgqsize:off nmsgq:off notes:none nsemop:off nshm:off nthr:off openfiles:off origin:readonly owner:root pcpu:off priority:99 pseudoterminals:off quota:none release:11.1-RELEASE-p6 reservation:none resolver:search ramsden.network;nameserver 172.20.40.1;nameserver 8.8.8.8 rlimits:off securelevel:2 shmsize:off stacksize:off state:up stop_timeout:30 swapuse:off sync_state:none sync_target:none sync_tgt_zpool:none sysvmsg:new sysvsem:new sysvshm:new template:no type:jail used:readonly vmemoryuse:off vnet:on vnet0_mac:02ff608700b4,02ff608700b5 vnet1_mac:02ff60680091,02ff60680092 vnet2_mac:none vnet3_mac:none wallclock:off