Properly creating iocage bridges for VNET

Status
Not open for further replies.

STREBLO

Patron
Joined
Oct 23, 2015
Messages
245
What would the correct way to create a bridge for iocage VNET/VIMAGE to use on igb1?

I'm currently doing the following which works but I end up with three bridges.

Code:
Variable:   ifconfig_bridge1
Value:   addm igb1 up
Type:	rc.conf

Code:
Variable:  cloned_interfaces
Value:   bridge0 bridge1
Type:	rc.conf   


Using this I end up with bridge0, bridge1, and bridge2. Does this seem right?

Code:
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 0c:c4:7a:69:69:94 
		hwaddr 0c:c4:7a:69:69:94 
		inet 172.20.30.2 netmask 0xffffff00 broadcast 172.20.30.255  
		nd6 options=9<PERFORMNUD,IFDISABLED> 
		media: Ethernet autoselect (1000baseT <full-duplex>) 
		status: active 
igb1: 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 0c:c4:7a:69:69:95 
		hwaddr 0c:c4:7a:69:69:95 
		inet 170.20.40.2 netmask 0xffffff00 broadcast 170.20.40.255  
		nd6 options=9<PERFORMNUD,IFDISABLED> 
		media: Ethernet autoselect (1000baseT <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=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 
		ether 02:9f:22:c8:2b:00 
		nd6 options=9<PERFORMNUD,IFDISABLED> 
		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 0 ifcost 0 port 0 
bridge1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 
		ether 02:9f:22:c8:2b:01 
		nd6 options=9<PERFORMNUD,IFDISABLED> 
		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: vnet1:4 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP> 
				ifmaxaddr 0 port 9 priority 128 path cost 2000 
		member: vnet1:3 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP> 
				ifmaxaddr 0 port 8 priority 128 path cost 2000 
		member: vnet1:2 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP> 
				ifmaxaddr 0 port 7 priority 128 path cost 2000 
		member: vnet1:1 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP> 
				ifmaxaddr 0 port 6 priority 128 path cost 2000 
		member: igb1 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP> 
				ifmaxaddr 0 port 2 priority 128 path cost 55 
vnet1:1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500 
		description: associated with jail: emby 
		options=8<VLAN_MTU> 
		ether 02:ff:60:df:d9:04 
		hwaddr 02:e2:50:00:06:0a 
		nd6 options=1<PERFORMNUD> 
		media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>) 
		status: active 
		groups: epair  
vnet1:2: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500 
		description: associated with jail: unifi 
		options=8<VLAN_MTU> 
		ether 02:ff:60:68:00:91 
		hwaddr 02:e2:50:00:07:0a 
		nd6 options=1<PERFORMNUD> 
		media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>) 
		status: active 
		groups: epair  
vnet1:3: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500 
		description: associated with jail: deluge 
		options=8<VLAN_MTU> 
		ether 02:ff:60:8f:9e:47 
		hwaddr 02:e2:50:00:08:0a 
		nd6 options=1<PERFORMNUD> 
		media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>) 
		status: active 
		groups: epair  
vnet1:4: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500 
		description: associated with jail: syncthing 
		options=8<VLAN_MTU> 
		ether 02:ff:60:29:85:61 
		hwaddr 02:e2:50:00:09:0a 
		nd6 options=1<PERFORMNUD> 
		media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>) 
		status: active 
		groups: epair  
bridge2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 
		ether 02:9f:22:c8:2b:02 
		nd6 options=9<PERFORMNUD,IFDISABLED> 
		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: epair11a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP> 
				ifmaxaddr 0 port 18 priority 128 path cost 2000 
		member: epair10a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP> 
				ifmaxaddr 0 port 17 priority 128 path cost 2000 
		member: epair9a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP> 
				ifmaxaddr 0 port 16 priority 128 path cost 2000 
		member: epair8a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP> 
				ifmaxaddr 0 port 15 priority 128 path cost 2000 
		member: epair7a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP> 
				ifmaxaddr 0 port 14 priority 128 path cost 2000 
		member: epair6a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP> 
				ifmaxaddr 0 port 13 priority 128 path cost 2000 
		member: epair5a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP> 
				ifmaxaddr 0 port 12 priority 128 path cost 2000 
		member: epair4a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP> 
				ifmaxaddr 0 port 11 priority 128 path cost 2000 
		member: igb0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP> 
				ifmaxaddr 0 port 1 priority 128 path cost 20000 
epair4a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500 
		options=8<VLAN_MTU> 
		ether 02:e2:50:00:0b:0a 
		hwaddr 02:e2:50:00:0b:0a 
		nd6 options=1<PERFORMNUD> 
		media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>) 
		status: active 
		groups: epair  
epair5a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500 
		options=8<VLAN_MTU> 
		ether 02:e2:50:00:0c:0a 
		hwaddr 02:e2:50:00:0c:0a 
		nd6 options=1<PERFORMNUD> 
		media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>) 
		status: active 
		groups: epair  
epair6a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500 
		options=8<VLAN_MTU> 
		ether 02:e2:50:00:0d:0a 
		hwaddr 02:e2:50:00:0d:0a 
		nd6 options=1<PERFORMNUD> 
		media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>) 
		status: active 
		groups: epair  
epair7a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500 
		options=8<VLAN_MTU> 
		ether 02:e2:50:00:0e:0a 
		hwaddr 02:e2:50:00:0e:0a 
		nd6 options=1<PERFORMNUD> 
		media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>) 
		status: active 
		groups: epair  
epair8a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500 
		options=8<VLAN_MTU> 
		ether 02:e2:50:00:0f:0a 
		hwaddr 02:e2:50:00:0f:0a 
		nd6 options=1<PERFORMNUD> 
		media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>) 
		status: active 
		groups: epair  
epair9a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500 
		options=8<VLAN_MTU> 
		ether 02:e2:50:00:10:0a 
		hwaddr 02:e2:50:00:10:0a 
		nd6 options=1<PERFORMNUD> 
		media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>) 
		status: active 
		groups: epair  
epair10a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500 
		options=8<VLAN_MTU> 
		ether 02:e2:50:00:11:0a 
		hwaddr 02:e2:50:00:11:0a 
		nd6 options=1<PERFORMNUD> 
		media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>) 
		status: active 
		groups: epair  
epair11a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500 
		options=8<VLAN_MTU> 
		ether 02:e2:50:00:12:0a 
		hwaddr 02:e2:50:00:12:0a 
		nd6 options=1<PERFORMNUD> 
		media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>) 
		status: active 
		groups: epair


A bridge already exists on the system for the old warden jails using igb0, which I would assume is the bridge2. If I just want to connect my iocage jails to bridge1, what should my tunables be set to? Should I end up with three bridges?
 

STREBLO

Patron
Joined
Oct 23, 2015
Messages
245
Did you find a solution for this?

The only way that seems to work for mecurrently is the same as the one I quoted in the original post.

I'm currently doing the following which works but I end up with three bridges.

Code:
Variable:   ifconfig_bridge1
Value:   addm igb1 up
Type:	rc.conf

Code:
Variable:  cloned_interfaces
Value:   bridge0 bridge1
Type:	rc.conf  


Using this I end up with bridge0, bridge1, and bridge2.

Maybe it makes sense that I end up with three bridges, one made for the warden jails, created by default, and two that I have made in the rc.conf.

This is currently functional, but I'm not sure if it's correct. Basically I wanted some validatation that I'm doing the right thing.
 

alexisph

Cadet
Joined
Aug 1, 2014
Messages
6
You've got the automatically created bridge2 because you haven't configured bridge0, as you had done for bridge1. Add the following:

Variable: ifconfig_bridge0
Value: addm igb0 up
Type: rc.conf
 

STREBLO

Patron
Joined
Oct 23, 2015
Messages
245
You've got the automatically created bridge2 because you haven't configured bridge0, as you had done for bridge1. Add the following:

Variable: ifconfig_bridge0
Value: addm igb0 up
Type: rc.conf

I thought the system was already doing this by default. bridge0 seems to already exist even before my modifications to the bridges. Why does the interface need to be added again?

I'll try that and see if it works.
 
Status
Not open for further replies.
Top