What interface do I choose when creating a new jail for plex with a static IP?

Digitaldreams

Explorer
Joined
Mar 7, 2017
Messages
80
Hi everyone. When creating a jail in FreeNAS prior to 11.2, it was very straightforward using basic mode to assigning a static IP. In 11.2, I have options to choose VNET, Berkeley Packet Filter and IPv4 Interface. If all I want to do is to mimic the old jail configuration to simply set a static IPv4 address, what options should I use? How do I properly do this?
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457

Digitaldreams

Explorer
Joined
Mar 7, 2017
Messages
80
https://www.ixsystems.com/documentation/freenas/11.2/jails.html#jail-wizard
This might help narrow it down. Tip, Plex need vnet. Otherwise, if you don't need/know what it is don't turn it on.
This will indeed be for Plex. Once I choose VNET, I have to choose an interface. If I manually assign an IP and choose VNET as the interface, the jail doesn't start due to VNET failure. I'll assume I shouldn't pick the VNET interface. Do I pick the existing epair0 or epair1 or the actual nic igb0/igb1?
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
You will need to select igb0/1. You are selecting the "exit" interface. FreeNAS kinda sucks with network setup...
 

Digitaldreams

Explorer
Joined
Mar 7, 2017
Messages
80
You are selecting the "exit" interface. FreeNAS kinda sucks with network setup...
Thanks! Yeah, it's not very explicit in explaining the options listed in the networking setup. I had gone through the guide prior to posting as well. Thanks again.
 

Digitaldreams

Explorer
Joined
Mar 7, 2017
Messages
80
You will need to select igb0/1. You are selecting the "exit" interface. FreeNAS kinda sucks with network setup...
It looks like I'm still having an issue here. The jail is created and when I log into it and run ifconfig, the IP I assigned it isn't there. Only the loopback is.

Code:
root@pms:/ # ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
        inet 127.0.0.1 netmask 0xff000000
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        groups: lo
root@pms:/ # 



This is the output from the system.

Code:
root@freenas:~ # ifconfig
igb0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=2400b9<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWTSO,RXCSUM_IPV6>
        ether xx:xx:6b:xx:xx:c4
        hwaddr xx:xx:6b:xx:xx:xx
        inet 192.168.1.3 netmask 0xffffff00 broadcast 192.168.1.255
        nd6 options=9<PERFORMNUD,IFDISABLED>
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
igb1: flags=8c02<BROADCAST,OACTIVE,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=6403bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
        ether ac:1f:6b:83:25:c5
        hwaddr ac:1f:6b:83:25:c5
        nd6 options=9<PERFORMNUD,IFDISABLED>
        media: Ethernet autoselect
        status: no carrier
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet 127.0.0.1 netmask 0xff000000
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        groups: lo
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 02:aa:25:5f:47:00
        nd6 options=1<PERFORMNUD>
        groups: bridge
        id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
        maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
        root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
        member: vnet0:12 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 9 priority 128 path cost 2000
        member: vnet0:11 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 7 priority 128 path cost 2000
        member: epair0a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 5 priority 128 path cost 2000
        member: epair1a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 6 priority 128 path cost 2000
        member: igb0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 1 priority 128 path cost 20000
epair1a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8<VLAN_MTU>
        ether 02:1e:d0:00:06:0a
        hwaddr 02:1e:d0:00:06:0a
        nd6 options=1<PERFORMNUD>
        media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
        status: active
        groups: epair
epair0a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8<VLAN_MTU>
        ether 02:1e:d0:00:05:0a
        hwaddr 02:1e:d0:00:05:0a
        nd6 options=1<PERFORMNUD>
        media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
        status: active
        groups: epair
vnet0:11: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        description: associated with jail: pms
        options=8<VLAN_MTU>
        ether 02:ff:60:57:7e:c0
        hwaddr 02:1e:d0:00:07:0a
        nd6 options=1<PERFORMNUD>
        media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
        status: active
        groups: epair
epair0b: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8<VLAN_MTU>
        ether 02:ff:60:57:7e:c1
        hwaddr 02:1e:d0:00:08:0b
        ether 02:ff:60:57:7e:c1
        hwaddr 02:1e:d0:00:08:0b
        nd6 options=1<PERFORMNUD>
        media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
        status: active
vnet0:12: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        description: associated with jail: pms
        options=8<VLAN_MTU>
        ether 02:ff:60:57:7e:c0
        hwaddr 02:1e:d0:00:09:0a
        nd6 options=1<PERFORMNUD>
        media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
        status: active
        groups: epair
root@freenas:~ # 
 
Last edited:

Digitaldreams

Explorer
Joined
Mar 7, 2017
Messages
80
It seems the only way I can get the interface to show up in the jail is by selecting DHCP. But doing this doesn't allow me to manually assign the IP.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
It seems the only way I can get the interface to show up in the jail is by selecting DHCP. But doing this doesn't allow me to manually assign the IP.

@Digitaldreams I wonder if you got this sorted? But just to be clear, are you using the plex plugin, or creating a jail in which you will install plex yourself?

If you install the plex plugin as show in the FreeNAS guide in "Fig. 13.1.1 Viewing the List of Available Plugins" & "Fig. 13.1.2 Installing the Plex Plugin" the networking defaults to DHCP (in the background it will use virtual networking VNET, creating a vnet and bridge device) , but if you want a static IP then pick your physical NIC - igb0. In the later case, the system just creates an alias on your existing physical NIC which will appear to have more than one IP address.

If you are creating your own jail, then the networking choices are still VNET or shared IP. Only in this case, you can also configure VNET to have a static IP.

The properties of plugins or jails can be viewd in the shell with: iocage get all <jail/plugin name>
 

Digitaldreams

Explorer
Joined
Mar 7, 2017
Messages
80
@Digitaldreams I wonder if you got this sorted? But just to be clear, are you using the plex plugin, or creating a jail in which you will install plex yourself?

If you install the plex plugin as show in the FreeNAS guide in "Fig. 13.1.1 Viewing the List of Available Plugins" & "Fig. 13.1.2 Installing the Plex Plugin" the networking defaults to DHCP (in the background it will use virtual networking VNET, creating a vnet and bridge device) , but if you want a static IP then pick your physical NIC - igb0. In the later case, the system just creates an alias on your existing physical NIC which will appear to have more than one IP address.

If you are creating your own jail, then the networking choices are still VNET or shared IP. Only in this case, you can also configure VNET to have a static IP.

The properties of plugins or jails can be viewd in the shell with: iocage get all <jail/plugin name>

Hey @KrisBee. I wasn't able to figure this out so I left it using DHCP as that was the only method to get the jail up and pingable. I am not using a plug in. It's a clean, new jail in which I am going to install Plex on.

Not checking off DHCP while checking off VNET and choosing the physical NIC, fails when attempting to start the jail. It returns with a VNET failure error. I have 2 NIC's on my motherboard. So I have 2 epair's listed as options as well. Should I NOT check off VNET and just put the static IP I wish to use?

Thank you

EDIT:
The jail does start up but the ifconfig only shows 1 interface, the loopback IP and I get no reply when I ping the IP I set. I get the VNET failure message when I try creating the jail using Pentaflake 's guide found here: here
 
Last edited:

Neon

Dabbler
Joined
Dec 15, 2018
Messages
11
Can you try VNET0 as interface? it should be a the bottom of all the interfaces you can choose from. If you select that you can put in the IP, netmask, and gateway (default router).
 

Digitaldreams

Explorer
Joined
Mar 7, 2017
Messages
80
Can you try VNET0 as interface? it should be a the bottom of all the interfaces you can choose from. If you select that you can put in the IP, netmask, and gateway (default router).
Unfortunately, I did try and no dice. The jail would start but ifconfig only showed the loopback address when I ran the command from within it. It shows the VNET failure message I mentioned when I try to create the jail using Pentaflake 's guide found here: here
 

Neon

Dabbler
Joined
Dec 15, 2018
Messages
11
Can you do the following command in freenas?

Code:
iocage get all <jailname>


I can compare mine settings with yours
 

Digitaldreams

Explorer
Joined
Mar 7, 2017
Messages
80
Can you do the following command in freenas?

Code:
iocage get all <jailname>


I can compare mine settings with yours
Sure. I will do it tonight around 9pm EST.
 

Digitaldreams

Explorer
Joined
Mar 7, 2017
Messages
80
Can you do the following command in freenas?

Code:
iocage get all <jailname>


I can compare mine settings with yours

I was able to log in early. :D

After messing around with it some more, it finally worked. I don't know why it didn't work earlier but this is how i have it set up:

Only VNET is checked.
Use VNET for the interface
Ensure the static IP you want to use, the netmask and gateway is filled out.

Here is the iocage output...



Code:
root@freenas:~ # iocage get all textplex
CONFIG_VERSION:14
allow_chflags:0
allow_mlock: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
allow_tun:0
available:readonly
basejail:no
boot:on
bpf:no
children_max:0
cloned_release:11.2-RELEASE
comment:none
compression:lz4
compressratio:readonly
coredumpsize:off
count:1
cpuset:off
cputime:off
datasize:off
dedup:off
defaultrouter:192.168.1.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:textplex
host_hostuuid:textplex
host_time:yes
hostid:18ceae75-5347-11e8-97c9-ac1f6b8325c4
hostid_strict_check:off
interfaces:vnet0:bridge0
ip4:new
ip4_addr:vnet0|192.168.1.35/24
ip4_saddrsel:1
ip6:new
ip6_addr:none
ip6_saddrsel:1
jail_zfs:off
jail_zfs_dataset:iocage/jails/textplex/data
jail_zfs_mountpoint:none
last_started:2018-12-17 19:21:44
login_flags:-f root
mac_prefix:02ff60
maxproc:off
memorylocked:off
memoryuse:off
mount_devfs:1
mount_fdescfs:1
mount_linprocfs:0
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.2-RELEASE-p6
reservation:none
resolver:/etc/resolv.conf
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:02ff600eef7b 02ff600eef7c
vnet1_mac:none
vnet2_mac:none
vnet3_mac:none
vnet_default_interface:none
vnet_interfaces:none
wallclock:off
root@freenas:~ # 

root@textplex:/ # ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128 
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
        inet 127.0.0.1 netmask 0xff000000 
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        groups: lo 
epair0b: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8<VLAN_MTU>
        ether xx:xx:xx:0e:ef:xx
        hwaddr xx:1e:xx:xx:xx:xx
        inet 192.168.1.35 netmask 0xffffff00 broadcast 192.168.1.255 
        nd6 options=1<PERFORMNUD>
        media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
        status: active
        groups: epair 
root@textplex:/ # 




 

Neon

Dabbler
Joined
Dec 15, 2018
Messages
11
I was able to log in early. :D

After messing around with it some more, it finally worked. I don't know why it didn't work earlier but this is how i have it set up:

Only VNET is checked.
Use VNET for the interface
Ensure the static IP you want to use, the netmask and gateway is filled out.

Here is the iocage output...

Good to hear! I also had some problems getting it to work at first because i chose the wrong ipv4 interface and was messing around with the interfaces option.
 
Joined
Mar 6, 2014
Messages
686
You will need to select igb0/1. You are selecting the "exit" interface. FreeNAS kinda sucks with network setup...
For me, this didn't work. I also had to select the vnet0 interface. Any ideay why? I also would've expected igb0 had to be selected here.
 

BoogaBooga

Cadet
Joined
Sep 7, 2013
Messages
8
Hmm. I am seeing the exact same issue.
I am using a standard jail type, not plugin.
DHCP works but if I set a static IP and select the real interface and start the jail, only the loopack interface exists within the iocage jail.

warden jails are fine.

Edit: selecting the vnet0 interface works.
 

Matt_G

Explorer
Joined
Jan 24, 2016
Messages
65
I know the OP got this working but for anyone reading this going forward, there is another alternative.
Let the jail get an IP via DHCP.
Look at the lease...you should be able to get the MAC address of the virtual adapter.
Or you can use ARP to get it.
Then create a reservation on the DHCP server for that MAC with whatever IP you want it to have.
Restart the jail.
It should pull the IP you reserved.
Basically it's the same thing as a static since it will always get that reserved IP address.
 

urza

Dabbler
Joined
Mar 17, 2019
Messages
38
I know the OP got this working but for anyone reading this going forward, there is another alternative.
Let the jail get an IP via DHCP.
Look at the lease...you should be able to get the MAC address of the virtual adapter.
Or you can use ARP to get it.
Then create a reservation on the DHCP server for that MAC with whatever IP you want it to have.
Restart the jail.
It should pull the IP you reserved.
Basically it's the same thing as a static since it will always get that reserved IP address.

I ended up doing this. Can we get the feedback to Freenas developers that their networking UX really sux for normal users? Ideally I only want to select "I want this jail on this IP, figure out the rest" in Freenas.
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
I ended up doing this. Can we get the feedback to Freenas developers that their networking UX really sux for normal users? Ideally I only want to select "I want this jail on this IP, figure out the rest" in Freenas.
That's not how networking works. Generally each interface would be assigned a vlan/subnet combo. O e you have that, then you could just pick an IP and have the correct vnet selected automatically ish.
 
Top