FreeNAS uses jail and UI IP addresses on Primary interface

AVSION

Contributor
Joined
Dec 28, 2016
Messages
128
Hi,

i have installed my UniFi Jail using iocage, as i couldn't get the networking going i gave it a statice IP which was available, all working fine the FN and the jail but the jail IP is showing up on the same FN interface vmx1. the issue with that is in the dashboard the jail IP shows as the primary FN IP, as well when i type in the browser the jail IP without the port it redirect me to the FN UI. i cant find where is the settings that links both IPs to the same interface, i have checked both /etc/rc.conf and /etc/hosts in FN and in the jail. can this be fixed in some way? i prefer not to reinstall UniFi

FN Primary IP 192.168.1.6
Jail IP 192.168.1.5

Thank you

Screen Shot 2019-01-01 at 4.25.06 pm.png


Code:
root@freenas[~]# ifconfig
vmx0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000
        options=60039b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,TSO6,RXCSUM_IPV6,TXCSUM_IPV6>
        ether 00:0c:29:78:24:29
        hwaddr 00:0c:29:78:24:29
        inet 10.55.1.2 netmask 0xffff0000 broadcast 10.55.255.255
        nd6 options=9<PERFORMNUD,IFDISABLED>
        media: Ethernet autoselect
        status: active
vmx1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=60039b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,TSO6,RXCSUM_IPV6,TXCSUM_IPV6>
        ether 00:0c:29:78:24:33
        hwaddr 00:0c:29:78:24:33
        inet 192.168.1.6 netmask 0xffffff00 broadcast 192.168.1.255
        inet 192.168.1.5 netmask 0xffffff00 broadcast 192.168.1.255
        nd6 options=9<PERFORMNUD,IFDISABLED>
        media: Ethernet autoselect
        status: active
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
root@freenas[~]# 
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Your configuration is as expected for a jail created without using VNET. Have another look at the FreeNAS guide. Perhaps you needed to create a jail with it's own network stack by using VNET. If so, the next question is can convert your existing UniFi jail by editing it's configuration via the webUI? I've not personally tested that, so I'd be inclined to create a test jail to see if that actually works.
 

AVSION

Contributor
Joined
Dec 28, 2016
Messages
128
Hi @KrisBee thanks for your reply,

i Still cant get basic VNET to work, created s standard test jail ping default gateway fail

Test jail

Code:
root@freenas[~]# iocage create -r 11.2-RELEASE -n test ip4_addr="vnet0|192.168.1.40/24" defaultrouter=192.168.1.1 vnet=on boot=on allow_raw_sockets=1


FN ifconfig
Code:
root@freenas[~]# ifconfig
vmx0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000
    options=60039b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,TSO6,RXCSUM_IPV6,TXCSUM_IPV6>
    ether 00:0c:29:78:24:29
    hwaddr 00:0c:29:78:24:29
    inet 10.55.1.2 netmask 0xffff0000 broadcast 10.55.255.255
    nd6 options=9<PERFORMNUD,IFDISABLED>
    media: Ethernet autoselect
    status: active
vmx1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=200099<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,RXCSUM_IPV6>
    ether 00:0c:29:78:24:33
    hwaddr 00:0c:29:78:24:33
    inet 192.168.1.6 netmask 0xffffff00 broadcast 192.168.1.255
    inet 192.168.1.5 netmask 0xffffff00 broadcast 192.168.1.255
    nd6 options=9<PERFORMNUD,IFDISABLED>
    media: Ethernet autoselect
    status: active
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:c1:e1:57:6c: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:8 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 11 priority 128 path cost 2000
    member: vnet0:4 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 9 priority 128 path cost 2000
    member: vnet0:3 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 7 priority 128 path cost 2000
    member: vnet0:2 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 5 priority 128 path cost 2000
    member: vmx1 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 2 priority 128 path cost 2000
vnet0:2: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    description: associated with jail: test
    options=8<VLAN_MTU>
    ether 02:ff:60:ae:1b:75
    hwaddr 02:da:d0:00:05: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:ae:1b:76
    hwaddr 02:da:d0:00:06:0b
    ether 02:ff:60:ae:1b:76
    hwaddr 02:da:d0:00:06:0b
    ether 02:ff:60:ae:1b:76
    hwaddr 02:da:d0:00:06:0b
    nd6 options=1<PERFORMNUD>
    media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
    status: active
vnet0:3: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    description: associated with jail: test
    options=8<VLAN_MTU>
    ether 02:ff:60:ae:1b:75
    hwaddr 02:da:d0:00:07:0a
    nd6 options=1<PERFORMNUD>
    media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
    status: active
    groups: epair
vnet0:4: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    description: associated with jail: test
    options=8<VLAN_MTU>
    ether 02:ff:60:ae:1b:75
    hwaddr 02:da:d0:00:09:0a
    nd6 options=1<PERFORMNUD>
    media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
    status: active
    groups: epair
vnet0:8: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    description: associated with jail: test
    options=8<VLAN_MTU>
    ether 02:ff:60:ae:1b:75
    hwaddr 02:da:d0:00:0b:0a
    nd6 options=1<PERFORMNUD>
    media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
    status: active
    groups: epair
root@freenas[~]# 


Test Jail ifconfig

Code:
root@test:~ # 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 02:ff:60:ae:1b:76
        hwaddr 02:da:d0:00:0c:0b
        inet 192.168.1.40 netmask 0xffffff00 broadcast 192.168.1.255
        nd6 options=1<PERFORMNUD>
        media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
        status: active
        groups: epair
root@test:~ # 
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
The output of ifconfig on your FN host after you created and started the jail called test doesn't make sense to me. Why do you have multiple vnet0:x entries associated with the same jail? Why is there a "b" side epair entry on the FN host? I wouldn't expect the fact that you are running a virtualised FN under ESXI so alter how iocage/jail networks behave inside FN.

AFAIU, a jail created with VNET generates an epair, e.g. epair0a/epair0b, with the "b" side assigned to the jail itself. FreeNAS renames the epair "a" side to vnet0:x You can trace the creation etc of epairs in both the output of dmesg -a and from syslog messages with tail -f /var/log/mesages.

In your case, the epair0b in your test jail, corresponds to vnet0:8 on your FN host. I'd only expect to see one active vnet0:x entry associated with your test jail. Other users reporting jail problems in FN11.2 have a similar ifconfig output to yours.

To help analyse what's happening, I'd suggest stopping and then destroying the jail test. Then check ifconfig to see that vne0:x entries have been removed. Your may well be left with bridge0 until a reboot of FN.

Re-create & start the test jail as before, note output of jls, iocage list -l and ifconfig, also note output re: networking in both dmesg and syslog. Is there any indication of the creation of multiple epairs/vnet assigments for just the single test jail?

P.S. Is there a reason to have two virtual NICs vmx0/1 assigned to your virtualised FN ?
 
Last edited:

AVSION

Contributor
Joined
Dec 28, 2016
Messages
128
Hi @KrisBee thank you for your reply,

since changing from warden jails to iocage i could never get VNET to work. the only way to get the networking going on the iocage is to use a the physical interface. this apply when the FN was installed on barebone metal as well as vmware. referring to your questions not sure what is happening but it feels like FN / iocage doesn't remove the VNET setting when destroying the jail unless i reboot FN. when and recreating the new jail it adds another VNET to the jail.

in the past i also tried this changes but didn't help.
System > Tunables

Variable: cloned_interfaces, Value: bridge0, Type: rc.conf
Variable: ifconfig_bridge0, Value: addm vnet0 up, Type: rc.conf

rc.conf added rename ifconfig_epair0_name="epair0b"
Step 1: Existing Test jail outputs

Here are the outputs following your instructions, however there are no multiple vnet after destroying the jail but networking still not working. i can ping the jail from FN shell but cant ping the Gateway IP from the jail shell.

Code:
root@freenas[~]# tail -f /var/log/messages
Jan  4 09:13:04 freenas kernel: epair0a: link state changed to UP
Jan  4 09:13:04 freenas kernel: epair0b: link state changed to UP
Jan  4 09:13:04 freenas kernel: epair0b: link state changed to UP
Jan  4 09:13:04 freenas kernel: epair0a: changing name to 'vnet0:2'
Jan  4 09:13:04 freenas kernel: bridge0: link state changed to UP
Jan  4 09:13:04 freenas kernel: bridge0: link state changed to UP
Jan  4 09:13:04 freenas kernel: vmx1: promiscuous mode enabled
Jan  4 09:13:04 freenas kernel: vnet0:2: promiscuous mode enabled
Jan  5 00:00:00 freenas syslog-ng[2001]: Configuration reload request received, reloading configuration;
Jan  5 00:00:00 freenas syslog-ng[2001]: Configuration reload finished;


dmesg -a

Code:
Tue Jan  1 15:21:52 AEDT 2019
WARNING: 10.55.1.10 (iqn.1991-05.com.microsoft:windows10pro): no ping reply (NOP-Out) after 5 seconds; dropping connection
bridge0: Ethernet address: 02:c1:e1:57:6c:00
bridge0: link state changed to UP
vmx1: promiscuous mode enabled
epair0a: Ethernet address: 02:da:d0:00:05:0a
epair0b: Ethernet address: 02:da:d0:00:06:0b
epair0a: link state changed to UP
epair0b: link state changed to UP
epair0a: changing name to 'vnet0:2'
vnet0:2: promiscuous mode enabled
epair1a: Ethernet address: 02:da:d0:00:07:0a
epair1b: Ethernet address: 02:da:d0:00:08:0b
epair1a: link state changed to UP
epair1b: link state changed to UP
epair1a: changing name to 'vnet0:3'
epair1b: changing name to 'epair0b'
vnet0:3: promiscuous mode enabled
epair2a: Ethernet address: 02:da:d0:00:09:0a
epair2b: Ethernet address: 02:da:d0:00:0a:0b
epair2a: link state changed to UP
epair2b: link state changed to UP
epair2a: changing name to 'vnet0:4'
epair2b: changing name to 'epair0b'
vnet0:4: promiscuous mode enabled
epair3a: Ethernet address: 02:da:d0:00:0b:0a
epair3b: Ethernet address: 02:da:d0:00:0c:0b
epair3a: link state changed to UP
epair3b: link state changed to UP
epair3a: changing name to 'vnet0:5'
epair3b: changing name to 'epair0b'
vnet0:5: promiscuous mode enabled
vnet0:5: link state changed to DOWN
epair0b: link state changed to DOWN
in6_purgeaddr: err=65, destination address delete failed
epair3a: Ethernet address: 02:da:d0:00:0b:0a
epair3b: Ethernet address: 02:da:d0:00:0c:0b
epair3a: link state changed to UP
epair3b: link state changed to UP
epair3a: changing name to 'vnet0:6'
epair3b: changing name to 'epair0b'
vnet0:6: promiscuous mode enabled
vnet0:6: link state changed to DOWN
epair0b: link state changed to DOWN
in6_purgeaddr: err=65, destination address delete failed
epair3a: Ethernet address: 02:da:d0:00:0b:0a
epair3b: Ethernet address: 02:da:d0:00:0c:0b
epair3a: link state changed to UP
epair3b: link state changed to UP
epair3a: changing name to 'vnet0:8'
epair3b: changing name to 'epair0b'
vnet0:8: promiscuous mode enabled




Code:
Fri Jan  4 09:12:53 AEDT 2019
bridge0: Ethernet address: 02:c1:e1:57:6c:00
epair0a: Ethernet address: 02:da:d0:00:05:0a
epair0b: Ethernet address: 02:da:d0:00:06:0b
epair0a: link state changed to UP
epair0b: link state changed to UP
epair0a: changing name to 'vnet0:2'
bridge0: link state changed to UP
vmx1: promiscuous mode enabled
vnet0:2: promiscuous mode enabled
root@freenas[~]#


Step 2

Code:
root@freenas[~]# iocage destroy test

This will destroy jail test

Are you sure? [y/N]: y
Stopping test
Destroying test
root@freenas[~]# ifconfig
vmx0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000
    options=60039b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,TSO6,RXCSUM_IPV6,TXCSUM_IPV6>
    ether 00:0c:29:78:24:29
    hwaddr 00:0c:29:78:24:29
    inet 10.55.1.2 netmask 0xffff0000 broadcast 10.55.255.255
    nd6 options=9<PERFORMNUD,IFDISABLED>
    media: Ethernet autoselect
    status: active
vmx1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=60039b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,TSO6,RXCSUM_IPV6,TXCSUM_IPV6>
    ether 00:0c:29:78:24:33
    hwaddr 00:0c:29:78:24:33
    inet 192.168.1.6 netmask 0xffffff00 broadcast 192.168.1.255
    inet 192.168.1.5 netmask 0xffffff00 broadcast 192.168.1.255
    nd6 options=9<PERFORMNUD,IFDISABLED>
    media: Ethernet autoselect
    status: active
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:c1:e1:57:6c: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: vmx1 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 2 priority 128 path cost 2000
root@freenas[~]# 


Step 3

Code:
root@freenas[~]# ifconfig                                                                                                                           
vmx0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000
    options=60039b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,TSO6,RXCSUM_IPV6,TXCSUM_IPV6>
    ether 00:0c:29:78:24:29
    hwaddr 00:0c:29:78:24:29
    inet 10.55.1.2 netmask 0xffff0000 broadcast 10.55.255.255
    nd6 options=9<PERFORMNUD,IFDISABLED>
    media: Ethernet autoselect
    status: active
vmx1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=60039b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,TSO6,RXCSUM_IPV6,TXCSUM_IPV6>
    ether 00:0c:29:78:24:33
    hwaddr 00:0c:29:78:24:33
    inet 192.168.1.6 netmask 0xffffff00 broadcast 192.168.1.255
    inet 192.168.1.5 netmask 0xffffff00 broadcast 192.168.1.255
    nd6 options=9<PERFORMNUD,IFDISABLED>
    media: Ethernet autoselect
    status: active
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
root@freenas[~]# iocage list -l
+-----+------------------+------+-------+------+-----------------+---------------------+-----+----------+
| JID |       NAME       | BOOT | STATE | TYPE |     RELEASE     |         IP4         | IP6 | TEMPLATE |
+=====+==================+======+=======+======+=================+=====================+=====+==========+
| 1   | UniFi_Controller | on   | up    | jail | 11.2-RELEASE-p3 | vmx1|192.168.1.5/24 | -   | -        |
+-----+------------------+------+-------+------+-----------------+---------------------+-----+----------+
root@freenas[~]#  iocage create -r 11.2-RELEASE -n test ip4_addr="vnet0|192.168.1.40/24" defaultrouter=192.168.1.1 vnet=on boot=on allow_raw_sockets=1
test successfully created!
* Starting test
  + Started OK
  + Configuring VNET OK
  + Starting services OK
root@freenas[~]# iocage list -l                                                                                                                       
+-----+------------------+------+-------+------+-----------------+-----------------------+-----+----------+
| JID |       NAME       | BOOT | STATE | TYPE |     RELEASE     |          IP4          | IP6 | TEMPLATE |
+=====+==================+======+=======+======+=================+=======================+=====+==========+
| 1   | UniFi_Controller | on   | up    | jail | 11.2-RELEASE-p3 | vmx1|192.168.1.5/24   | -   | -        |
+-----+------------------+------+-------+------+-----------------+-----------------------+-----+----------+
| 2   | test             | on   | up    | jail | 11.2-RELEASE-p3 | vnet0|192.168.1.40/24 | -   | -        |
+-----+------------------+------+-------+------+-----------------+-----------------------+-----+----------+
root@freenas[~]# ifconfig
vmx0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000
    options=60039b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,TSO6,RXCSUM_IPV6,TXCSUM_IPV6>
    ether 00:0c:29:78:24:29
    hwaddr 00:0c:29:78:24:29
    inet 10.55.1.2 netmask 0xffff0000 broadcast 10.55.255.255
    nd6 options=9<PERFORMNUD,IFDISABLED>
    media: Ethernet autoselect
    status: active
vmx1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=200099<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,RXCSUM_IPV6>
    ether 00:0c:29:78:24:33
    hwaddr 00:0c:29:78:24:33
    inet 192.168.1.6 netmask 0xffffff00 broadcast 192.168.1.255
    inet 192.168.1.5 netmask 0xffffff00 broadcast 192.168.1.255
    nd6 options=9<PERFORMNUD,IFDISABLED>
    media: Ethernet autoselect
    status: active
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:c1:e1:57:6c: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:2 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 5 priority 128 path cost 2000
    member: vmx1 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 2 priority 128 path cost 2000
vnet0:2: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    description: associated with jail: test
    options=8<VLAN_MTU>
    ether 02:ff:60:ae:1b:75
    hwaddr 02:da:d0:00:05:0a
    nd6 options=1<PERFORMNUD>
    media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
    status: active
    groups: epair
root@freenas[~]# ping 192.168.1.40
PING 192.168.1.40 (192.168.1.40): 56 data bytes
64 bytes from 192.168.1.40: icmp_seq=0 ttl=64 time=0.077 ms
64 bytes from 192.168.1.40: icmp_seq=1 ttl=64 time=0.102 ms
64 bytes from 192.168.1.40: icmp_seq=2 ttl=64 time=0.113 ms
^C
--- 192.168.1.40 ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.077/0.097/0.113/0.015 ms
root@freenas[~]# iocage console test
FreeBSD 11.2-STABLE (FreeNAS.amd64) #0 r325575+fc3d65faae6(HEAD): Thu Dec 20 16:12:30 EST 2018

Welcome to FreeBSD!

Release Notes, Errata: https://www.FreeBSD.org/releases/
Security Advisories:   https://www.FreeBSD.org/security/
FreeBSD Handbook:      https://www.FreeBSD.org/handbook/
FreeBSD FAQ:           https://www.FreeBSD.org/faq/
Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/
FreeBSD Forums:        https://forums.FreeBSD.org/

Documents installed with the system are in the /usr/local/share/doc/freebsd/
directory, or can be installed later with:  pkg install en-freebsd-doc
For other languages, replace "en" with a language code like de or fr.

Show the version of FreeBSD installed:  freebsd-version ; uname -a
Please include that output and any error messages when posting questions.
Introduction to manual pages:  man man
FreeBSD directory layout:      man hier

Edit /etc/motd to change this login announcement.
root@test:~ # 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 02:ff:60:ae:1b:76
    hwaddr 02:da:d0:00:06:0b
    inet 192.168.1.40 netmask 0xffffff00 broadcast 192.168.1.255
    nd6 options=1<PERFORMNUD>
    media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
    status: active
    groups: epair
root@test:~ # ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
ping: sendto: Host is down
ping: sendto: Host is down
ping: sendto: Host is down
ping: sendto: Host is down
ping: sendto: Host is down
ping: sendto: Host is down
^C
--- 192.168.1.1 ping statistics ---
11 packets transmitted, 0 packets received, 100.0% packet loss
root@test:~ # exit
logout
root@freenas[~]# ifconfig           
vmx0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000
    options=60039b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,TSO6,RXCSUM_IPV6,TXCSUM_IPV6>
    ether 00:0c:29:78:24:29
    hwaddr 00:0c:29:78:24:29
    inet 10.55.1.2 netmask 0xffff0000 broadcast 10.55.255.255
    nd6 options=9<PERFORMNUD,IFDISABLED>
    media: Ethernet autoselect
    status: active
vmx1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=200099<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,RXCSUM_IPV6>
    ether 00:0c:29:78:24:33
    hwaddr 00:0c:29:78:24:33
    inet 192.168.1.6 netmask 0xffffff00 broadcast 192.168.1.255
    inet 192.168.1.5 netmask 0xffffff00 broadcast 192.168.1.255
    nd6 options=9<PERFORMNUD,IFDISABLED>
    media: Ethernet autoselect
    status: active
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:c1:e1:57:6c: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:2 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 5 priority 128 path cost 2000
    member: vmx1 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 2 priority 128 path cost 2000
vnet0:2: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    description: associated with jail: test
    options=8<VLAN_MTU>
    ether 02:ff:60:ae:1b:75
    hwaddr 02:da:d0:00:05:0a
    nd6 options=1<PERFORMNUD>
    media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
    status: active
    groups: epair
root@freenas[~]# tail -f /var/log/messages
Jan  5 10:31:12 freenas epair0b: Ethernet address: 02:da:d0:00:06:0b
Jan  5 10:31:12 freenas kernel: epair0a: link state changed to UP
Jan  5 10:31:12 freenas kernel: epair0a: link state changed to UP
Jan  5 10:31:12 freenas kernel: epair0b: link state changed to UP
Jan  5 10:31:12 freenas kernel: epair0b: link state changed to UP
Jan  5 10:31:12 freenas kernel: epair0a: changing name to 'vnet0:2'
Jan  5 10:31:13 freenas kernel: bridge0: link state changed to UP
Jan  5 10:31:13 freenas kernel: bridge0: link state changed to UP
Jan  5 10:31:13 freenas kernel: vmx1: promiscuous mode enabled
Jan  5 10:31:13 freenas kernel: vnet0:2: promiscuous mode enabled

^C
root@freenas[~]# 


Code:
Sat Jan  5 10:00:20 AEDT 2019
bridge0: Ethernet address: 02:c1:e1:57:6c:00
epair0a: Ethernet address: 02:da:d0:00:05:0a
epair0b: Ethernet address: 02:da:d0:00:06:0b
epair0a: link state changed to UP
epair0b: link state changed to UP
epair0a: changing name to 'vnet0:2'
bridge0: link state changed to UP
vmx1: promiscuous mode enabled
vnet0:2: promiscuous mode enabled
root@freenas[~]# 
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
At the stage of your step3 above, the output of ifconfig on both FN & in jail looks as you might expect. Leaving aside the ping issue in your test jail for the moment, what happens from this stage if you stop and then restart your test jail? Do you end up with multiple vnet0:x entries in your ifconfig output on FN, and what's showing in dmesg & syslog?

The ping: sendto: Host is down message when you ping 192.168.1.1 ( your router?) from your jail, normally means there's no IP to MAC address map to identify it - nothing in the arp table for 192.168.1.1 ( The normal test is something like, clear arp cache arp -d -a , ping the ip , check for an arp entry for that ip, arp <ip to test> or just arp -a. ) Can you at least ping the FN host from your jail?

You said you've had no success with iocage + VNET on baremetal or when FN is virtualised. From what I've seen on the forum iocage networking seems to have been broken as various times during the past few months. But in my basic testing in FN11.2 things seem to work. Hopefully, you've deleted those tunables you mentioned, they should not be needed and the old rc.conf added rename ifconfig_epair0_name="epair0b" fix could create errors.
 

AVSION

Contributor
Joined
Dec 28, 2016
Messages
128
Hi @KrisBee

At the stage of your step3 above, the output of ifconfig on both FN & in jail looks as you might expect. Leaving aside the ping issue in your test jail for the moment, what happens from this stage if you stop and then restart your test jail? Do you end up with multiple vnet0:x entries in your ifconfig output on FN, and what's showing in dmesg & syslog?

Each time i restart the jail the count "x"changes on the vnet0:x but i dont get multiple vnet0:x entries as show in the OP. here is the output

Code:
root@freenas[~]# ifconfig                 
vmx0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000
    options=60039b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,TSO6,RXCSUM_IPV6,TXCSUM_IPV6>
    ether 00:0c:29:78:24:29
    hwaddr 00:0c:29:78:24:29
    inet 10.55.1.2 netmask 0xffff0000 broadcast 10.55.255.255
    nd6 options=9<PERFORMNUD,IFDISABLED>
    media: Ethernet autoselect
    status: active
vmx1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=200099<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,RXCSUM_IPV6>
    ether 00:0c:29:78:24:33
    hwaddr 00:0c:29:78:24:33
    inet 192.168.1.6 netmask 0xffffff00 broadcast 192.168.1.255
    inet 192.168.1.5 netmask 0xffffff00 broadcast 192.168.1.255
    nd6 options=9<PERFORMNUD,IFDISABLED>
    media: Ethernet autoselect
    status: active
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:c1:e1:57:6c: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:2 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 5 priority 128 path cost 2000
    member: vmx1 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 2 priority 128 path cost 2000
vnet0:2: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    description: associated with jail: test
    options=8<VLAN_MTU>
    ether 02:ff:60:ae:1b:75
    hwaddr 02:da:d0:00:05:0a
    nd6 options=1<PERFORMNUD>
    media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
    status: active
    groups: epair
root@freenas[~]# ping 192.168.1.40       
PING 192.168.1.40 (192.168.1.40): 56 data bytes
64 bytes from 192.168.1.40: icmp_seq=0 ttl=64 time=0.077 ms
64 bytes from 192.168.1.40: icmp_seq=1 ttl=64 time=0.045 ms
^C
--- 192.168.1.40 ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.045/0.061/0.077/0.016 ms
root@freenas[~]# iocage list -l           
+-----+------------------+------+-------+------+-----------------+-----------------------+-----+----------+
| JID |       NAME       | BOOT | STATE | TYPE |     RELEASE     |          IP4          | IP6 | TEMPLATE |
+=====+==================+======+=======+======+=================+=======================+=====+==========+
| 1   | UniFi_Controller | on   | up    | jail | 11.2-RELEASE-p3 | vmx1|192.168.1.5/24   | -   | -        |
+-----+------------------+------+-------+------+-----------------+-----------------------+-----+----------+
| 2   | test             | on   | up    | jail | 11.2-RELEASE-p3 | vnet0|192.168.1.40/24 | -   | -        |
+-----+------------------+------+-------+------+-----------------+-----------------------+-----+----------+
root@freenas[~]#
root@freenas[~]# ifconfig         
vmx0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000
    options=60039b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,TSO6,RXCSUM_IPV6,TXCSUM_IPV6>
    ether 00:0c:29:78:24:29
    hwaddr 00:0c:29:78:24:29
    inet 10.55.1.2 netmask 0xffff0000 broadcast 10.55.255.255
    nd6 options=9<PERFORMNUD,IFDISABLED>
    media: Ethernet autoselect
    status: active
vmx1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=200099<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,RXCSUM_IPV6>
    ether 00:0c:29:78:24:33
    hwaddr 00:0c:29:78:24:33
    inet 192.168.1.6 netmask 0xffffff00 broadcast 192.168.1.255
    inet 192.168.1.5 netmask 0xffffff00 broadcast 192.168.1.255
    nd6 options=9<PERFORMNUD,IFDISABLED>
    media: Ethernet autoselect
    status: active
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:c1:e1:57:6c: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:3 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 5 priority 128 path cost 2000
    member: vmx1 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 2 priority 128 path cost 2000
vnet0:3: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    description: associated with jail: test
    options=8<VLAN_MTU>
    ether 02:ff:60:ae:1b:75
    hwaddr 02:da:d0:00:05:0a
    nd6 options=1<PERFORMNUD>
    media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
    status: active
    groups: epair
root@freenas[~]# iocage test restart
Usage: iocage [OPTIONS] COMMAND [ARGS]...

Error: No such command "test".
root@freenas[~]# iocage restart test
* Stopping test
  + Running prestop OK
  + Stopping services OK
  + Tearing down VNET OK
  + Removing devfs_ruleset: 6 OK
  + Removing jail process OK
  + Running poststop OK
* Starting test
  + Started OK
  + Configuring VNET OK
  + Starting services OK
root@freenas[~]# ifconfig           
vmx0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000
    options=60039b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,TSO6,RXCSUM_IPV6,TXCSUM_IPV6>
    ether 00:0c:29:78:24:29
    hwaddr 00:0c:29:78:24:29
    inet 10.55.1.2 netmask 0xffff0000 broadcast 10.55.255.255
    nd6 options=9<PERFORMNUD,IFDISABLED>
    media: Ethernet autoselect
    status: active
vmx1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=200099<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,RXCSUM_IPV6>
    ether 00:0c:29:78:24:33
    hwaddr 00:0c:29:78:24:33
    inet 192.168.1.6 netmask 0xffffff00 broadcast 192.168.1.255
    inet 192.168.1.5 netmask 0xffffff00 broadcast 192.168.1.255
    nd6 options=9<PERFORMNUD,IFDISABLED>
    media: Ethernet autoselect
    status: active
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:c1:e1:57:6c: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:4 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 5 priority 128 path cost 2000
    member: vmx1 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 2 priority 128 path cost 2000
vnet0:4: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    description: associated with jail: test
    options=8<VLAN_MTU>
    ether 02:ff:60:ae:1b:75
    hwaddr 02:da:d0:00:05:0a
    nd6 options=1<PERFORMNUD>
    media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
    status: active
    groups: epair
root@freenas[~]# tail -f /var/log/messages
Jan  6 13:25:41 freenas kernel: epair0b: link state changed to DOWN
Jan  6 13:25:41 freenas kernel: in6_purgeaddr: err=65, destination address delete failed
Jan  6 13:25:42 freenas epair0a: Ethernet address: 02:da:d0:00:05:0a
Jan  6 13:25:42 freenas epair0b: Ethernet address: 02:da:d0:00:06:0b
Jan  6 13:25:42 freenas kernel: epair0a: link state changed to UP
Jan  6 13:25:42 freenas kernel: epair0a: link state changed to UP
Jan  6 13:25:42 freenas kernel: epair0b: link state changed to UP
Jan  6 13:25:42 freenas kernel: epair0b: link state changed to UP
Jan  6 13:25:42 freenas kernel: epair0a: changing name to 'vnet0:4'
Jan  6 13:25:42 freenas kernel: vnet0:4: promiscuous mode enabled
^C
root@freenas[~]# dmesg -a 
Sat Jan  5 10:00:20 AEDT 2019
bridge0: Ethernet address: 02:c1:e1:57:6c:00
epair0a: Ethernet address: 02:da:d0:00:05:0a
epair0b: Ethernet address: 02:da:d0:00:06:0b
epair0a: link state changed to UP
epair0b: link state changed to UP
epair0a: changing name to 'vnet0:2'
bridge0: link state changed to UP
vmx1: promiscuous mode enabled
vnet0:2: promiscuous mode enabled
vnet0:2: link state changed to DOWN
epair0b: link state changed to DOWN
in6_purgeaddr: err=65, destination address delete failed
epair0a: Ethernet address: 02:da:d0:00:05:0a
epair0b: Ethernet address: 02:da:d0:00:06:0b
epair0a: link state changed to UP
epair0b: link state changed to UP
epair0a: changing name to 'vnet0:3'
vnet0:3: promiscuous mode enabled
vnet0:3: link state changed to DOWN
epair0b: link state changed to DOWN
in6_purgeaddr: err=65, destination address delete failed
epair0a: Ethernet address: 02:da:d0:00:05:0a
epair0b: Ethernet address: 02:da:d0:00:06:0b
epair0a: link state changed to UP
epair0b: link state changed to UP
epair0a: changing name to 'vnet0:4'
vnet0:4: promiscuous mode enabled
root@freenas[~]# 



The ping: sendto: Host is down message when you ping 192.168.1.1 ( your router?) from your jail, normally means there's no IP to MAC address map to identify it - nothing in the arp table for 192.168.1.1 ( The normal test is something like, clear arp cache arp -d -a , ping the IP , check for an arp entry for that IP, arp <IP to test> or just arp -a. ) Can you at least ping the FN host from your jail?

Yes 192.168.1.1 is my router IP pinging from the test jail. Yes i can ping my FN from jail, is that mean we need to update the hosts file (FN or test) and add the Gateway ip? here is the output

Code:
root@freenas[~]#
root@freenas[~]# arp -a       
? (192.168.1.107) at 30:05:5c:13:f3:94 on vmx1 expires in 803 seconds [ethernet]
? (192.168.1.1) at 04:18:d6:f1:71:c8 on vmx1 expires in 1183 seconds [ethernet]
? (192.168.1.5) at 00:0c:29:78:24:33 on vmx1 permanent [ethernet]
? (192.168.1.101) at c4:2c:03:16:fa:4c on vmx1 expires in 911 seconds [ethernet]
? (192.168.1.6) at 00:0c:29:78:24:33 on vmx1 permanent [ethernet]
? (192.168.1.155) at a4:d1:8c:90:ea:cc on vmx1 expires in 1112 seconds [ethernet]
? (192.168.1.223) at 04:1e:64:ef:06:e7 on vmx1 expires in 497 seconds [ethernet]
? (192.168.1.51) at 80:2a:a8:16:dd:22 on vmx1 expires in 812 seconds [ethernet]
? (192.168.1.50) at 80:2a:a8:16:bd:92 on vmx1 expires in 810 seconds [ethernet]
? (192.168.1.118) at 00:05:cd:aa:21:20 on vmx1 expires in 1154 seconds [ethernet]
? (10.55.0.1) at 00:50:56:68:e6:ab on vmx0 expires in 721 seconds [ethernet]
? (10.55.1.2) at 00:0c:29:78:24:29 on vmx0 permanent [ethernet]
root@freenas[~]# iocage console test     
Last login: Sat Jan  5 10:34:05 on pts/0
FreeBSD 11.2-STABLE (FreeNAS.amd64) #0 r325575+fc3d65faae6(HEAD): Thu Dec 20 16:12:30 EST 2018

Welcome to FreeBSD!

Release Notes, Errata: https://www.FreeBSD.org/releases/
Security Advisories:   https://www.FreeBSD.org/security/
FreeBSD Handbook:      https://www.FreeBSD.org/handbook/
FreeBSD FAQ:           https://www.FreeBSD.org/faq/
Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/
FreeBSD Forums:        https://forums.FreeBSD.org/

Documents installed with the system are in the /usr/local/share/doc/freebsd/
directory, or can be installed later with:  pkg install en-freebsd-doc
For other languages, replace "en" with a language code like de or fr.

Show the version of FreeBSD installed:  freebsd-version ; uname -a
Please include that output and any error messages when posting questions.
Introduction to manual pages:  man man
FreeBSD directory layout:      man hier

Edit /etc/motd to change this login announcement.
root@test:~ # ping 192.168.1.6
PING 192.168.1.6 (192.168.1.6): 56 data bytes
64 bytes from 192.168.1.6: icmp_seq=0 ttl=64 time=0.076 ms
64 bytes from 192.168.1.6: icmp_seq=1 ttl=64 time=0.033 ms
64 bytes from 192.168.1.6: icmp_seq=2 ttl=64 time=0.027 ms
64 bytes from 192.168.1.6: icmp_seq=3 ttl=64 time=0.041 ms
64 bytes from 192.168.1.6: icmp_seq=4 ttl=64 time=0.029 ms
64 bytes from 192.168.1.6: icmp_seq=5 ttl=64 time=0.043 ms
^C
--- 192.168.1.6 ping statistics ---
6 packets transmitted, 6 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.027/0.042/0.076/0.016 ms
root@test:~ # arp -a
? (192.168.1.40) at 02:ff:60:ae:1b:76 on epair0b permanent [ethernet]
? (192.168.1.6) at 00:0c:29:78:24:33 on epair0b expires in 1161 seconds [ethernet]
root@test:~ # ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
ping: sendto: Host is down
ping: sendto: Host is down
ping: sendto: Host is down
^C
--- 192.168.1.1 ping statistics ---
8 packets transmitted, 0 packets received, 100.0% packet loss
root@test:~ # arp -a
? (192.168.1.40) at 02:ff:60:ae:1b:76 on epair0b permanent [ethernet]
? (192.168.1.1) at (incomplete) on epair0b expired [ethernet]
? (192.168.1.6) at 00:0c:29:78:24:33 on epair0b expires in 1099 seconds [ethernet]
root@test:~


You said you've had no success with iocage + VNET on baremetal or when FN is virtualised. From what I've seen on the forum iocage networking seems to have been broken as various times during the past few months. But in my basic testing in FN11.2 things seem to work. Hopefully, you've deleted those tunables you mentioned, they should not be needed and the old rc.conf added rename ifconfig_epair0_name="epair0b" fix could create errors.

Yes i have deleted the tunables and the old rc.conf entries.

Thank you
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
The good news is that your jail networking on the FN side now seems to be working as expected. The "X" in the vnet0:X matches the jail's numerical id which changes after the jail is stopped and then started.

IIRC, a packet destined for an IP on the same subnet doesn't involve routing or DNS. But if you can't ping your router or the internet from your test jail then you probably need someone who knows more about networking ( and esxi?) than me. I'd start a new thread in the networking section of the forum which focuses on this specific issue.

Incidentally, I did test you can change the networking properties of an iocage jail via the FN11.2 new web UI from a "shared ip", as your current UniFi jail is configured, to the same jail using VNET. That worked for me.
 
Top