cancel
Showing results for 
Search instead for 
Did you mean: 

Config for Ubiquiti ER-X EdgeRouter X on Plusnet FTTC

andy753
Newbie
Posts: 4
Thanks: 1
Registered: 13-02-2016

Config for Ubiquiti ER-X EdgeRouter X on Plusnet FTTC

I replaced my old Plusnet router with a Ubiquiti ER-X EdgeRouter X with WiFi provided by a Ubiquiti UAP-AC-LR UniFi, retaining the BT VDSL modem. Everything works well!
Configuring the ER-X took some research. Many thanks to those who have posted their experiences. Here is my config.boot, edited to remove names and passwords. It enables the inbuilt 4-port switch, opens a port for forwarding, has some static routes and provides local DNS with some static local hosts. It also enable 24V POE for the UAP-AC-LR on eth4. I had problems with downloading some web sites until I added the modify rule in the firewall (to keep all packets within the 1492 MTU).
Hope this helps!
firewall {
    all-ping enable
    broadcast-ping disable
    ipv6-receive-redirects disable
    ipv6-src-route disable
    ip-src-route disable
    log-martians enable
    modify pppoe-out {
        rule 1 {
            action modify
            modify {
                tcp-mss 1452
            }
            protocol tcp
            tcp {
                flags SYN
            }
        }
    }
    name WAN_IN {
        default-action drop
        description "WAN to internal"
        rule 10 {
            action accept
            description "Allow established/related"
            state {
                established enable
                related enable
            }
        }
        rule 20 {
            action drop
            description "Drop invalid state"
            state {
                invalid enable
            }
        }
    }
    name WAN_LOCAL {
        default-action drop
        description "WAN to router"
        rule 10 {
            action accept
            description "Allow established/related"
            state {
                established enable
                related enable
            }
        }
        rule 20 {
            action drop
            description "Drop invalid state"
            state {
                invalid enable
            }
        }
    }
    receive-redirects disable
    send-redirects enable
    source-validation disable
    syn-cookies enable
}
interfaces {
    ethernet eth0 {
        address dhcp
        description Internet
        duplex auto
        pppoe 0 {
            default-route auto
            firewall {
                in {
                    name WAN_IN
                }
                local {
                    name WAN_LOCAL
                }
                out {
                    modify pppoe-out
                }
            }
            mtu 1492
            name-server none
            password yourplusnetpassword
            user-id yourusername@plusdsl.net
        }
        speed auto
    }
    ethernet eth1 {
        description Local
        duplex auto
        speed auto
    }
    ethernet eth2 {
        description Local
        duplex auto
        speed auto
    }
    ethernet eth3 {
        description Local
        duplex auto
        speed auto
    }
    ethernet eth4 {
        description Local
        duplex auto
        poe {
            output pthru
        }
        speed auto
    }
    loopback lo {
    }
    switch switch0 {
        address 192.168.77.1/24
        description Local
        mtu 1500
        switch-port {
            interface eth1
            interface eth2
            interface eth3
            interface eth4
        }
    }
}
port-forward {
    auto-firewall enable
    hairpin-nat enable
    lan-interface switch0
    rule 1 {
        description vpn
        forward-to {
            address 192.168.77.77
            port 1194
        }
        original-port 1194
        protocol udp
    }
    wan-interface pppoe0
}
protocols {
    static {
        route 10.8.0.0/24 {
            next-hop 192.168.77.77 {
            }
        }
        route 192.168.80.0/24 {
            next-hop 192.168.77.77 {
            }
        }
    }
}
service {
    dhcp-server {
        disabled false
        hostfile-update disable
        shared-network-name my_dhcp {
            authoritative disable
            subnet 192.168.77.0/24 {
                default-router 192.168.77.1
                dns-server 192.168.77.1
                lease 86400
                start 192.168.77.100 {
                    stop 192.168.77.243
                }
            }
        }
    }
    dns {
        forwarding {
            cache-size 150
            listen-on switch0
            name-server 8.8.8.8
            name-server 8.8.4.4
        }
    }
    gui {
        https-port 443
    }
    nat {
        rule 5010 {
            log disable
            outbound-interface pppoe0
            protocol all
            type masquerade
        }
    }
    ssh {
        port 22
        protocol-version v2
    }
}
system {
    host-name ubnt
    login {
        user yourusername {
            authentication {
                encrypted-password longstringofrandomhex
                plaintext-password ""
            }
            level admin
        }
    }
    ntp {
        server 0.ubnt.pool.ntp.org {
        }
        server 1.ubnt.pool.ntp.org {
        }
        server 2.ubnt.pool.ntp.org {
        }
        server 3.ubnt.pool.ntp.org {
        }
    }
    static-host-mapping {
        host-name name1 {
            inet 192.168.77.77
        }
        host-name name2 {
            inet 192.168.80.93
        }
        host-name name3 {
            inet 192.168.77.12
        }
    }
    syslog {
        global {
            facility all {
                level notice
            }
            facility protocols {
                level debug
            }
        }
    }
    time-zone UTC
}
7 REPLIES
sfgreenwood
Dabbler
Posts: 14
Thanks: 1
Registered: 05-06-2013

Re: Config for Ubiquiti ER-X EdgeRouter X on Plusnet FTTC

I've tried setting this up a couple of times and have had no joy - did it take a while to sync or anything like that? I'm logging a successful connection but it gives me a 172.0.0.0 address instead of my static IP and I can't connect to anything.

SpendLessTime
Aspiring Hero
Posts: 2,523
Thanks: 671
Fixes: 60
Registered: 21-09-2009

Re: Config for Ubiquiti ER-X EdgeRouter X on Plusnet FTTC

The most common reason for an address in the private range of 172.16.0.0 - 172.31.255.255 is that there is an error in the username or password fields used to create the PPPoE link, so the connection works but you cannot be logged in by the Radius servers.

 

The username is in the format username@plusdsl.net and the password is the one used to log into the Plusnet members centre.

sfgreenwood
Dabbler
Posts: 14
Thanks: 1
Registered: 05-06-2013

Re: Config for Ubiquiti ER-X EdgeRouter X on Plusnet FTTC

Ah yes, that's part of the problem. I'll give it another try.

sfgreenwood
Dabbler
Posts: 14
Thanks: 1
Registered: 05-06-2013

Re: Config for Ubiquiti ER-X EdgeRouter X on Plusnet FTTC

Got it working now. The password was the first issue. I got that right and the connection came up.

However, I think I've come across something which may trip up other people so I'll add it as a note.

I intend to use the router with another connection in a load balancing config, which had been set up previously, so I left eth0 unconnected for the second connection and reset the router. I brought up the pppoe connection on eth1 and configured a switch for my home network but couldn't get a connection between the switch and the Internet. Now, I can hear several people jumping up and down with their hands up... That doesn't work if you don't have load balancing configured. You have to use eth0 as the connection. Connect the modem to eth0 and then connectivity comes up once the pppoe connection has sorted itself out.

sfgreenwood
Dabbler
Posts: 14
Thanks: 1
Registered: 05-06-2013

Re: Config for Ubiquiti ER-X EdgeRouter X on Plusnet FTTC

Just to add something else - I found that I had problems with a few sites as andy753 mentioned - generally CDN type services either not responding at all or not delivering static files. Enabling TCP MSS clamping using the Feature Wizard in the Wizards tab fixed this.

wolter
Newbie
Posts: 1
Registered: 29-12-2016

Re: Config for Ubiquiti ER-X EdgeRouter X on Plusnet FTTC

I just got mine up and running and saw this post. I had the same problem, some sites where not loading or connections where very slow to load. TCP MSS clamping helped me to start with, but I found a different solution that might help some users.

 

This will only work if your modem supports jumbo frames (mtu 1500>). I have a Draytek Vigor 130 and it work very well.

 

Set your MTU for the connection to your modem to 1508, once you save this it will allow you to increase the MTU for your PPPoE connection to 1500.

Now you don't need MSS Clamping and it might help if you enable the OFFLOAD function for 'forwarding' and 'pppoe' to speedup your edge router (if your model supports this).

interfaces {
    ethernet eth0 {
        address 10.0.1.1/24
        description "Local Network 1"
        duplex auto
        speed auto
    }
    ethernet eth1 {
        address 192.168.2.10/24
        description "Internet (PPPoE)"
        duplex auto
        mtu 1508
        pppoe 0 {
            default-route auto
            firewall {
                in {
                    name WAN_IN
                }
                local {
                    name WAN_LOCAL
                }
            }
            mtu 1500
            name-server auto
            password ********
            user-id *******@plusdsl.net
        }
        speed auto
    }
    ethernet eth2 {
        address 10.0.2.1/24
        description "Local Network 2"
        duplex auto
        speed auto
    }

You can check if it works on http://www.letmecheck.it/mtu-test.php

The maximum MTU size for ***.***.***.*** is: 1500

 

I gained a good 5Mb/s increase with this configuration over the standard Plusnet router thingy .

jabuzzard
Newbie
Posts: 4
Registered: 22-01-2013

Re: Config for Ubiquiti ER-X EdgeRouter X on Plusnet FTTC

Given this is the top Google result for using Plusnet with an Edgerouter, I would like to add that a better option for doing the MSS clamping if configuring it via the command line is to do

set firewall options mss-clamp interface-type pppoe
set firewall options mss-clamp mss 1452

Compared to using the modify firewall rule in the original post this has the advantage of not disabling the hardware acceleration for NAT, which will give a performance boost. Probably similar to that you can gain by setting the MTU to 1508 if you have a Draytek 130 modem instead of one of the Openreach provided ones.