BT Infinity with my linux router
I recently switched to BT Infinity Broadband which is a FTTC (Fibre To The Cabinet) network using VDSL2 (Very-high-bit-rate Digital Subscriber Line) over the copper telephone line from the street cabinet to your home. What I didn't want however, was to use BT's Home Hub; I have my own linux router and firewall.
The first hurdle was that I recevied a new Home Hub 5 from BT which has an integrated VDSL modem, rather than the combination of Home Hub and separate BT OpenReach VDSL modem. I had to swap equipment with my dad, as my intention was to connect my linux router directly to the modem.
BT Infinity uses PPPoE (Point-to-Point Protocol over Ethernet) which introduces an additional 8 bytes of overhead: 2 bytes for PPP + 6 bytes for PPPoE. The MTU (Maximum Transmission Unit) would be reduced to 1492 bytes from the standard 1500 bytes for ethernet.
Installing the PPPoE client
I installed the pppoe package which includes both a userspace client and a kernal module. I have chosen to use the kernel module as it should perform better.
# apt-get install pppoe
However the PPP package from Debian Squeeze includes an older version of the rp-pppoe.so (Roaring Penguin PPPoE) module, which will not negotiate an MTU of greater than 1492. This now works from version 3.11.
I downloaded and unpacked the latest version of rp-pppoe from Roaring Penguin.
# wget https://www.roaringpenguin.com/files/download/rp-pppoe-3.11.tar.gz # tar -xzf rp-pppoe-3.11.tar.gz
I then compiled and installed.
# apt-get install ppp-dev # cd ~/rp-pppoe-3.11/src # ./configure --enable-plugin # make # make install
I renamed the current version of the pppoe plugin being used by ppp and put the new version in its place.
# cd /usr/lib/pppd/2.4.5./ # mv rp-pppoe.so rp-pppoe.so.original # cp /etc/ppp/plugins/rp-pppoe.so rp-pppoe.so
Configuring the connection
I had been using an old quad port NIC (eth1-4) but the driver would not accept a MTU of 1508.
# ifconfig eth1 mtu 1508 SIOCSIFMTU: Invalid argument
However the more modern Realtek NIC (eth0) on my motherboard managed this without any problems.
The interface must be set for manual configuration, without any IP details and the MTU at 1508 bytes.
auto eth0 iface eth0 inet manual mtu 1508 auto btbroadband iface btbroadband inet ppp provider btbroadband pre-up /sbin/ifconfig eth0 up
You can install pppoeconf which will guide you through this configuration but I prefer just editing the files myself.
#BT Broadband # Use the pppoe kernel module. plugin rp-pppoe.so eth0 # Name this connection as ppp0. unit 0 user email@example.com # No default IP; allocated dynamically by ISP. noipdefault # Try to get name servers from ISP. usepeerdns # Use this connection as the default route. defaultroute # Replace the default route if already present replacedefaultroute # There is an 8 byte overhead for PPPoE; however, # we are using baby jumbo frames of 1508 on eth0 # to account for the extra 8 byte overhead. mtu 1500 mru 1500 # Exclude password string when logging packet contents. hide-password noauth # Try to reopen the connection if it is terminated. persist
BT Infinity uses CHAP (Challenge Handshake Authentication Protocol) and will accept a generic username with any password (or none).
# Secrets for authentication using CHAP # client server secret IP addresses "firstname.lastname@example.org" * "password"
Bring up the connection
# ifup btbroadband # ifconfig eth0 Link encap:Ethernet HWaddr 00:24:8c:48:6c:e4 inet6 addr: fe80::224:8cff:fe48:6ce4/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1508 Metric:1 RX packets:32767508 errors:635 dropped:0 overruns:634 frame:1 TX packets:19426108 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:45510833119 (42.3 GiB) TX bytes:2112888191 (1.9 GiB) Interrupt:21 Base address:0xe000 ppp0 Link encap:Point-to-Point Protocol inet addr:184.108.40.206 P-t-P:172.16.19.19 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:7933730 errors:0 dropped:0 overruns:0 frame:0 TX packets:4958501 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:3 RX bytes:10729227377 (9.9 GiB) TX bytes:409095334 (390.1 MiB)
Note that the MTU is 1500 for ppp0 and 1508 for eth0.