Friday, December 26, 2014

VLAN bridge.multiple Unipi account with single fiber line

ref:
http://net.doit.wisc.edu/~dwcarder/captivator/linux_trunking_bridging.txt

UPDATE: brctl method not working on my setting. maybe working on someone else. on centos, i'm using this method and it is working: https://sites.google.com/site/ghidit/how-to-2/configure-bridging-on-centos

UPDATE: 30/12/2014 - to connect second unifi account, please use interface ETH=br10 (bridge interface) not ETH=2.500 

VLAN id 10 on eth0:

/etc/sysconfig/network-scripts/ifcfg-eth0.10

# Intel Corporation 82546EB Gigabit Ethernet Controller (Copper)
DEVICE=eth0.10
HWADDR=00:04:xx:xx:xx:xx
ONBOOT=yes
HOTPLUG=no
BOOTPROTO=none
TYPE=Ethernet
VLAN=yes
BRIDGE=br10

VLAN id 11 on eth0:

/etc/sysconfig/network-scripts/ifcfg-eth0.11

# Intel Corporation 82546EB Gigabit Ethernet Controller (Copper)
DEVICE=eth0.11
HWADDR=00:04:xx:xx:xx:xx
ONBOOT=yes
HOTPLUG=no
BOOTPROTO=none
TYPE=Ethernet
VLAN=yes
BRIDGE=br10

The bridges need to be configured too:

/etc/sysconfig/network-scrips/ifcfg-br10
DEVICE=br10
TYPE=Bridge
#IPADDR=1.2.3.4
#GATEWAY=1.2.3.1
#NETMASK=255.255.255.0
ONBOOT=yes
BOOTPROTO=none
IPV6INIT=no
IPV6_AUTOCONF=no
DELAY=5
STP=yes

store for future reference: currently not able to experiment


# setup vlans:

modprobe 8021q

/sbin/vconfig add eth2 970
/sbin/vconfig add eth2 972
/sbin/vconfig add eth3 971
/sbin/vconfig add eth3 973

# You should see: 
#
# Added VLAN with VID == 970 to IF -:eth2:-
# Added VLAN with VID == 972 to IF -:eth2:-
# Added VLAN with VID == 971 to IF -:eth3:-
# Added VLAN with VID == 973 to IF -:eth3:-

# bring interfaces up

ifconfig eth2 up
ifconfig eth3 up
ifconfig eth2.970 up
ifconfig eth2.972 up
ifconfig eth3.971 up
ifconfig eth3.973 up

# setup bridging

# create a bridge called "br970" and put vlans 970 and 971 in it
brctl addbr br970
brctl addif br970 eth2.970
brctl addif br970 eth3.971

# create a bridge called "br972" and put vlans 972 and 973 in it
brctl addbr br972
brctl addif br972 eth2.972
brctl addif br972 eth3.973

# bring the bridge virtual interfaces up on each bridge
ifconfig br970 192.168.70.5 netmask 255.255.254.0 up
ifconfig br972 192.168.72.5 netmask 255.255.254.0 up

# verify the bridging config looks legit:

brctl show

# You should see something like:
#
#  bridge name     bridge id               STP enabled     interfaces
#  br970           8000.000423ab99d8       no              eth2.970
#                                                          eth3.971
#  br972           8000.000423ab99d8       no              eth2.972
#                                                          eth3.973
Related Posts Plugin for WordPress, Blogger...