Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

Iocage jail has no internet access with second NIC

Status
Not open for further replies.

waterboy1602

Neophyte
Joined
Dec 3, 2017
Messages
5
I'm on FreeNas 11.2 BETA2. I have a couple of Iocage jails. I want one of them on another subnet. So I have two NIC's both on a different subnet, by example: 192.168.1.16 and 192.168.3.16. I configured the jail to use the second NIC. I can access it of within the same subnet, but the jail itself has no internet access. I guess it has something to do with the gateway, but I can't fix it. Someone that has an idea how to fix this?
 

chris crude

Member
Joined
Oct 13, 2016
Messages
210
Do you have your router setup for multiple networks? You need to tell the router how to see the extra network you are adding. Most basic home routers can't add networks, you are stuck with whatever network your router address is on.
 

garm

Neophyte Sage
Joined
Aug 19, 2017
Messages
1,399
Do both vnet have bridge membership with the corresponding FreeNAS nics?
 

waterboy1602

Neophyte
Joined
Dec 3, 2017
Messages
5
There is no problem on the router side. I'm sure about that. No idea about my setup of the vnet bridge membership. Here is my ifconfig output. Is there something wrong about my configuration?
Code:
re0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
		options=82099<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
		ether 00:19:99:e7:2b:51
		hwaddr 00:19:99:e7:2b:51
		inet 192.168.1.16 netmask 0xffffff00 broadcast 192.168.1.255
		inet 192.168.1.2 netmask 0xffffff00 broadcast 192.168.1.255
		nd6 options=9<PERFORMNUD,IFDISABLED>
		media: Ethernet autoselect (100baseTX <full-duplex>)
		status: active
re1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
		options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
		ether 00:15:e9:6a:13:46
		hwaddr 00:15:e9:6a:13:46
		inet 192.168.3.2 netmask 0xffffff00 broadcast 192.168.3.255
		inet 192.168.3.3 netmask 0xffffff00 broadcast 192.168.3.255
		nd6 options=9<PERFORMNUD,IFDISABLED>
		media: Ethernet autoselect (100baseTX <full-duplex>)
		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:9c:0a:31:50: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: epair1a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
				ifmaxaddr 0 port 6 priority 128 path cost 2000
		member: epair0a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
				ifmaxaddr 0 port 5 priority 128 path cost 2000
		member: re0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
				ifmaxaddr 0 port 1 priority 128 path cost 200000
epair0a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
		options=8<VLAN_MTU>
		ether 02:c5:d0:00:05:0a
		hwaddr 02:c5:d0:00:05:0a
		nd6 options=1<PERFORMNUD>
		media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
		status: active
		groups: epair
epair1a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
		options=8<VLAN_MTU>
		ether 02:c5:d0:00:06:0a
		hwaddr 02:c5:d0:00:06:0a
		nd6 options=1<PERFORMNUD>
		media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
		status: active
		groups: epair
 

waterboy1602

Neophyte
Joined
Dec 3, 2017
Messages
5
I found a solution. I had to enable VNET in the iocage jail, but I also had to manually add the extra interface to bridge0:
Code:
ifconfig bridge0 addm re1
I also need to do this command every time on boot. So I added it to init/shutdown scripts. You can find that in the GUI under Tasks.
 
Status
Not open for further replies.
Top