DEV Community

Christoph Dieck
Christoph Dieck

Posted on Originally published at slashgordon.link

Goodbye Fritz!Box, Hello Ubiquiti

Ubiquiti Cloud Gateway Ultra in action

Why switch at all?

The Fritz!Box 7690 is a capable device. Telephony, Wi-Fi, DECT, smart home, all in one box. That is also the problem. I want a network I actually control: VLANs, firewall rules, a proper dashboard. The Fritz!Box does a bit of everything; I want something that does the routing well and leaves the rest to me.

On top of that, I kept running into performance problems over the past few months. The Wi-Fi would slow down for no obvious reason, in the middle of the day, with the same number of devices as always. Streaming stuttered, video calls lagged. A reboot fixed it every time, but who wants to restart their router on a schedule? It felt more and more like the box was overwhelmed by everything it had to handle: smart home devices, DECT phones, VPN, guest network, AdGuard as DNS. At some point it just could not keep up.

I went with the Ubiquiti Cloud Gateway Ultra (UCG Ultra). Small, reasonably priced, and the UniFi ecosystem has everything a homelab network needs.

Step 1: reading the Fritz!Box config

Before unplugging the old router, you should know what it actually does. The Fritz!Box has an export function under System → Backup → Save. The result is an .export file, basically a massive text dump of every configuration file on the device.

The relevant WAN settings live inside ar7.cfg. Opening that file for the first time feels a bit like doing your taxes. Thousands of lines, cryptic variable names. But the handful of values you actually need are easy to spot once you know what to look for.

One thing to keep in mind: the export file is encrypted if you set a password during export. Passwords and credentials inside the config are additionally encoded. If you need to extract plaintext credentials from the file (e.g. SIP credentials for VoIP), you can use my Fritz!Box Config Decrypt Tool.

Step 2: understanding the WAN settings

My ISP is Buchholz Digital (BuDi) with an FTTH connection. The setup is refreshingly simple: no PPPoE, no credentials. The router connects via Ethernet to the ONT, tags VLAN 700, and gets a public IP through DHCP.

Here is the relevant section from the Fritz!Box config:

dslifaces {
        enabled = yes;
        name = "internet";
        dsl_encap = dslencap_ether;
        dslinterfacename = "dsl";
        no_masquerading = no;
        stackmode = stackmode_ipv4only;
        vlancfg {
                vlanencap = vlanencap_fixed_prio;
                tagtype = vlantagtype_customer;
                vlanid = 700;
                vlanprio = 0;
        }
        ppptarget = "internet";
        mtu = 0;
        etherencapcfg {
                use_dhcp = yes;
        }
        stay_always_online = yes;
}
Enter fullscreen mode Exit fullscreen mode

The key values at a glance:

Setting Value
Connection type DHCP (no PPPoE)
Internet VLAN 700
VoIP VLAN 650
TR-069 VLAN 550
IPv4 via DHCP
IPv6 Automatic (dual-stack)
MTU 1500 (auto)

Three VLANs in total. For the UCG Ultra, only VLAN 700 matters. VLAN 650 handles telephony and VLAN 550 is for remote management by the ISP. The UCG Ultra needs neither.

Step 3: configuring the UCG Ultra

The UniFi Network Controller makes this surprisingly painless:

  1. Under Internet/WAN, set connection type to DHCPv4.
  2. Set VLAN ID to 700. This is the one that matters.
  3. MAC Address Override is there if the ISP expects the Fritz!Box MAC. I did not need it, but it is good to know it exists. You can find the old MAC in the export file under user.cfg, where the Fritz!Box itself is listed as a device:
usercfg {
        users2 {
                type = internet_user_ip;
                landeviceUID = 8511;
                mac = 34:E1:A9:24:97:3D;
        }
}
Enter fullscreen mode Exit fullscreen mode

The MAC is also on the sticker on the bottom of the Fritz!Box, or in the web interface under Home Network → Network.

  1. Set IPv6 to "Auto" or "DHCPv6" for dual-stack.
  2. Set DNS to custom servers (in my case 192.168.50.250 for AdGuard and 1.1.1.1 as fallback).

UniFi UCG Ultra WAN setup with VLAN ID and MAC override

Cable from the ONT into the WAN port of the UCG Ultra, configure VLAN 700, done. It worked on the first try. I was almost disappointed there was no drama.

Step 4: migrating LAN settings

I carried the Fritz!Box settings over to the LAN side. The subnet is 192.168.50.0/24 with gateway 192.168.50.1 and a DHCP range from 192.168.50.20 to 192.168.50.200.

Static DHCP leases:

Device IP MAC
NAS 192.168.50.2 90:09:D0:35:57:8B
Proxmox 192.168.50.24 98:FA:9B:2E:20:CB
Docker host 192.168.50.46 BC:24:11:A5:65:6F

For the IPv6 ULA prefix I set fd15:d91c:273f::/48 manually on the UCG Ultra so that local IPv6 addresses (like AdGuard on fd15:d91c:273f::250) stay stable.

Does the ISP notice the switch?

Yes, and it does not matter.

The MAC address on the WAN port is different. With a DHCP connection like mine that is not a problem: the DHCP server just hands out a new lease. If it does cause trouble, the UCG Ultra lets you override the MAC. The DHCP hostname also changes, since the Fritz!Box sends fritz.box and the UCG Ultra sends something else. That is purely cosmetic.

TR-069 goes away. The Fritz!Box was remotely managed by the ISP via TR-069 on VLAN 550, and the UCG Ultra does not support it, so the ISP loses remote access to the router. In my case a quick phone call to BuDi sorted it out. Everything else stays the same: VLAN 700 works identically, DHCP-based IP assignment is device-independent, and the fiber connection at the ONT is unchanged.

What about VoIP?

The Fritz!Box handled telephony over VLAN 650, and the UCG Ultra cannot do SIP. If you still need a landline, you can run the Fritz!Box as an IP client behind the UCG Ultra just for telephony, or use a standalone SIP phone or adapter.

I went with the first option. The Fritz!Box now sits on a LAN port of the UCG Ultra in IP client mode and only handles DECT and phone calls. To set that up, go to Internet → Account Information → Internet Access in the Fritz!Box UI and switch to "Use existing internet connection (IP client)". Retirement for the Fritz!Box, but with a small side gig.

What I learned

The Fritz!Box export files are the key to this. All WAN settings live in ar7.cfg, and once you have fought through the text dump you can find the relevant values in a few minutes. For FTTH with BuDi you only need three things: VLAN 700, DHCP, no PPPoE.

Swapping the router on a DHCP connection is painless. No call to the ISP, no activation, no waiting. Plug it in, configure the VLAN, it works. TR-069 going away feels more like a feature than a bug, and the Fritz!Box lives on as a dedicated telephony device in IP client mode instead of going in the bin.

The 35-watt roommate now has a new neighbor in the network cabinet. Part 8 is about the UniFi VLAN setup, because once you have a proper router you might as well do proper network segmentation.


This post was originally published on www.slashgordon.link.

Top comments (0)