Build for Fritzbox 4040, switch and LUCI working

Hello Thomas,
I would love to try your built. I am hesitant though because of these changes. I am having
WAN eth1.7 (has to be tagged vlan7 as a requirement of the ISP)
LAN eth0
FON eth0.4 (to speparate IP telephones)

If I were installing your built, what would the names of my interfaces be?

How did you test this? Is it not a matter of your contracted internet speed (mine is a 50 MBits/s line and performs usually sligthly better on


Would you mind to share the result of an iperf3 test for both 2,4 and 5 GHz wifi for reference? Mine is around 80 MBits/s for 2,4 GHz and ~ 350 MBits/s for the 5 GHz wireless connection (direct measurement between laptop and router). Would normally be entirely sufficient for me, but the connection is sometimes moody, with dropouts of the connection up to a minute or so. Hence the question.


Hi Oscar,
as mentioned before, the default config oy my build is:
LAN = eth0.1
WAN = eth0.2 (untagged) you would change that to VLAN 7, tagged on the WAN port.
FON would be eth0.4, you could add that VLAN in the Gui.

I was using the speedtest of my cable ISP, which does test the speed
to the cable modem and afterwards the speed to the router.
In both cases it was above 400 MBits/sec.


Hi Oscar,
i have very similar iperf3 results in both (2,5 and 5 GHz) frequence ranges, measured from my notebook against a debian box connected via cable to the lan port of the router.


Hi Thomas,

I have used your build openwrt-19.07.7-ipq40xx-generic-avm_fritzbox-4040-squashfs-eva.bin
and made the echo performance > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor into
System -> Startup -> Local Startup

I have now 4 VLAN's including the WAN Port!

Thank you very much it is working fine. :wink:


Hi Wolfgang,
here is my preferred way:

wget ""
copy/move to .config
make menuconfig
Target Profile, change from "Multiple devices" to "AVM Fritz!Box 4040"
Deselect "Build the OpenWrt Image Builder"
Deselect "Build the OpenWrt SDK"
Save & done

Short but important hint, snippet from my openwrt-19.07.7/target/linux/ipq40xx/base-files/etc/board.d/02_network

	ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
	ucidef_add_switch "switch0" \
		"0t@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"

Software flow offloading can be found in Network --> Firewall


Thanks Thomas, I will try :wink:

Found an issue when trying to install a "kmod"-package from the official repository , looks like my .config was too different.
New start from "", make, wait, sysupgrade and issue is gone.
New build and SHA256 sums are here:




1 Like

Hey Thomas, after trying many days to implement a VLAN an my FritzBox 4040 i found this thread an it works! Many thanks.

Are you willing to do this magic kind of stuff with the latest firmware?

Hi Gustavoo,
I have a 21.02.0 build, and it basically works, not much testing done till now.
Your feedback would be welcome ...


You could also have a look here:



Hi Thomas,

I just got a new FB4040, ran into the same VLAN troubles, and just ended up having to go into rescue mode to pseudo-fix it. :expressionless: so, first of all, thank you for making this! Any chance of a 21.02.1 build, and perhaps a custom attendedsysupgrade URL for future builds? Also, since you're linking to that other thread, is the implication that these builds from over there should work directly on the FB4040? (I'm guessing not, but it's been a loooong time since I last used OpenWRT)

Also, one thing I noticed:

The MTU setting on this device seems to malfunction weirdly, at least with the official build. Configure an MTU of 9018, jumbo frames stop working. Configure no MTU at all, jumboframes work just fine-->wth?

Here is my (untested) 21.02.1 build, just compiled but not flashed yet.
I never touched MTU size as I have no need for jumbo frames.
I've tried notengo's build, working fine, but for me, too much stuff inside.
In between he also offers a "slim" version of his build.

One question:
How did you manage to get into rescue mode on the FB4040 ?


Update, now with links.


Thank you, but I think you accidentally didn't post the actual link? As for the rescue mode, I just followed the generic rescue mode instructions while guessing that the WPS button would be the one to accomplish the task, which it indeed was.

updated my previous post (now with links)

1 Like

I have this router with last official version of openWRT installed, 21.02.1 from the official builds to it.

I have found your post, and feel curiosity.

What are the advantages of your build over the official build?


The only advantage is that you can configure VLANs from the GUI.

1 Like

Thank you, I am not using VLANS for now, as I don't need to separate traffic from different ports, just traffic from different wifi networks (at least for now, until I have a IOT device with no wifi interface and a ethernet interface). So it won't be of use for me.

Thank you for the answer.

Hi tomtom,
How you are building the new images for 21.02.1 to be specific how to handle the patch
"715-net-essedma-disable-default-vlan.patch" --> target/linux/ipq40xx/patches-4.14
patches-4.14 do not exist in 21.02.1 ...
Here you have patches-5.4?
Thanks for you help

Well I have finally created VLANS in the Fritz!bos in order to get separate guest, lan and iot networks.

It was a headache, due to the problem of not being able to change vlan in position 1 and 2 that is hardwired and turns the device unreachable until you reset it in failsafe mode.

I had not realized about that problem, I thought this built was only to be able to connect vlans to ethernet port.

I have solved it right now editing the network file and configuring the position of the vlans manually (which is different from the vlanid and which luci tends to use in position 1 and 2 even if vlanid is different).

Does this firmware solve that problem and let you configure vlans from luci without changing 1 and 2 vlan tables?

May I install it easily over the current openWRT 21.02 version conserving the config?

May I expect to see this solution integrated in the mainstream for this router in the near future?

The problem of installing it is that you won't be able to upgrade later when there are important changes in the main stream version.

Is it converted to DSA with separate lan1, lan2 etc ports or yet using eth0 switeches?
And the wan port?