Ubiquiti EdgeMax Lite and Bell Aliant FibreOp

2013-03-14 in Home Lab Edge Router , Bell Aliant

I had been excited to pick up a replacement for my Asus RT-N56U for some time as I was having some stability issues. It was still a lot better than the Actiontec provided by Bell Aliant, but I wanted something a bit more configurable anyway. The EdgeMax Lite seemed promising and I pre-ordered one quite a while ago. It’s essentially a fork of Vyatta but in a nice little package.

FibreOp requires a bit more configuration than the average connection as well especially with the IPTV component. The Internet piece runs in VLAN 35 which is where you will get your DHCP address from. They seem to have removed the requirement of cloning the MAC of the Actiontec so this has become slightly simpler. The IPTV piece runs on VLAN 34 but requires that the vlan-qos be set to 4, or all traffic is dropped. This was my config:

interfaces {
    bridge br0 {
        aging 300
        description "IPTV Bridge"
        hello-time 2
        max-age 20
        priority 0
        stp false
    }
    ethernet eth0 {
        address 192.168.2.1/24
        description "Local Network"
    }
    ethernet eth1 {
        bridge-group {
            bridge br0
        }
        description "IPTV Receivers"
    }
    ethernet eth2 {
        description Fiberop
        vif 34 {
            bridge-group {
                bridge br0
            }
            description "FibreOP IPTV"
            mtu 1500
        }
        vif 35 {
            address dhcp
            description "FiberOP Internet"
            firewall {
                in {
                    name WAN_IN
                }
                local {
                    name WAN_LOCAL
                }
            }
        }
    }
    loopback lo {
    }
}

This worked fine for me on the Internet side, but IPTV was still not working as I was not using the QoS properly. I couldn’t find a way to do this in the CLI at all. However, since this is Linux (Debian) I can use vconfig to perform this task. Unfortunately it appears that UBNT decided not to include this package in their distro. Grab the .deb file for the vpn mips package from Debian and stick it in /config/user-data. I’m putting this here as /config should survive through software updates.

The important commands are to modprobe 8021q and then perform the vconfig commands, but we want this to happen on a reboot automatically. Create a script /config/scripts/post-config.d/setup_8021q.sh and put the following in it:

#!/bin/bash

if [ ! -f /sbin/vconfig ]
then
    /usr/bin/dpkg -i /config/user-data/vlan_1.9-3_mips.deb
fi

# Sets the proper CoS for the IPTV
modprobe 8021q
/sbin/vconfig set_egress_map eth2.34 0 4

What this script will do is ensure not only that the proper VLAN QoS will be applied on a reboot, but it also will install the vlan package if vconfig is missing (such as after a reboot).

You will want to apply a firewall, NAT, etc as well to the config but this will solve the biggest problems of using a EdgeMax with Fibreop.