===== OpenWrt with Freedom Internet FttH using a Turris Omnia =====
This page is also available in [[handleidingen:netwerk:openwrt-freedom-ftth|Dutch]].
----
This article describes how to set up FttH for [[https://freedom.nl/|Freedom.nl]], using my own SFP module and router. I use this setup at home. I only use the internet; I do not watch "legacy" TV. So my network setup is relatively simple.
I opted not to receive Freedom's Fritzbox because I had no intention of ever using it. Those things offer **way** too much functionality to my liking, without providing any source code.
Luckily, Freedom is one of the few ISP's in the world not pushing mandatory devices on their customers. In fact, they let you select whether you want any of their hardware during the ordering process, and they even give a small discount if you don't want any.
I am a big proponent of modem and router freedom, so I do not agree with the current situation of nearly all ISP's forcing modemrouters upon their subscribers. The Germans call this **[[https://de.wikipedia.org/wiki/Routerzwang|Routerzwang]]**. (Of course, they have a word for it...)
As my router, I use my trusty [[https://www.turris.com/en/omnia/overview/|Turris Omnia]] running [[https://openwrt.org/|OpenWrt]]. My SFP module is a [[https://www.tp-link.com/nl/business-networking/accessory/tl-sm321b/|TP-Link TL-SM321B]], connected to my TK-01 FTU with an LC/PC to SC/APC cable.
----
\\
==== Configuring the Turris Omnia router ====
\\
=== Setting up the WAN interfaces ===
In ''/etc/config/network'', change the ''wan'' and ''wan6'' interfaces as follows.
# This sets the ethernet adapter's MTU to 1508, so we can use MTU 1500 in the PPPoE tunnel
config device
option name 'eth2'
option mtu '1508'
config interface 'wan'
option device 'eth2.6'
option mtu '1508'
option proto 'pppoe'
option username 'fake@freedom.nl'
option password '1234'
# Not necessary, but I prefer extra logging
option pppd_options 'debug'
Be sure to completely remove the ''wan6'' interface, as it is not needed. The PPPoE tunnel will create a virtual IPv6 WAN interface automatically.
\\
\\
=== Applying the settings ===
Restart the network service:
service network restart
\\
==== Success? ====
If you followed everything correctly, you should now receive a /32 IPv4 address and a /48 IPv6 prefix on your ''pppoe-wan'' interface.
Connected LAN clients should get a DHCPv4 lease, a DHCPv6 lease and a SLAAC address.
\\
----