OpenWrt on a modem router, or two routers, or modem+router with VoIP?

Thank you for the reply ! My question was not clearly formulated: with "two WAN interfaces" in this context, I was asking about not having to configure anything when I replace the first router with a modem, instead of using both of them at the same time. Namely, if I have two wan interfaces set up: WAN1 as DHCP client for doube NAT, WAN2 as PPPoE for modem, on my FB4020 with OpenWRT. And I now let it hooked on FB7360: WAN1 is at work, WAN2 doesn't do anything (according to my observation on RasPi4: I can experiment things on it because I'm the only user now). Then tomorrow a modem X arrives. Then I configure the modem X, and quickly swap it with FB7360. My expectation/hope is, WAN2 starts working and WAN1 stops.

Would that work that way ? Or, perhaps WAN2 is disturbing something and I'm not seeing it ?

I believe that for seamless switch over you will need mwan3 or manually change the default route if WAN changes, but again, I have never tried that myself.

Thank you for the reply ! OK, mwan3, even if not both of the WANs are in use at the same time, then, if I don't want to touch the router when I swap the other router with a modem.
I will install mwan3 on RasPi-OpenWRT and check how it looks like.
Or, perhaps just stay with one WAN: changing it from DHCP client to PPPoE and entering the username etc doesn't take much time after all.... it's just a bit scary if I have to change something in a hurry.

Well, don't do that then :wink: You could simply configure for Wan1 and save /etc/config/network to /etc/config/network_wan1, and test this. Then do the same for wan2 and you can simply copy over either /etc/config/network_wan1 or /etc/config/network_wan2 over /etc/config/network and reload the network.
But in all honesty, if uptime was that important I would probably try mwan3 with a fali-over configuration or even a load balancing one ASAP.

Thank you very much for your hint ! Just did what you said :slight_smile: created network_wan1 and network_wan2, except that I can't test wan2 because I don't have a modem yet.

For PPPoE, I left the boxes
Access Concentrator
Service Name
just empty. Is that OK ?

Now, I also installed mwan3, but I get a strange warning on luci:
WARNING: Interface wan are not found in /etc/config/network
But if I do uci show network, "wan" is there:
network.WAN=interface
network.WAN.proto='dhcp'
network.WAN.device='eth0.123'

So I wonder why mwan3 is complaining... well, you said you never tried mwan3, perhaps someone else might help me, or I should open a new topic... mwan3 would be indeed better, because when I'm out of town, someone else babysits the system. With mwan3, she can just swap routers or modem, in case something fails.

1 Like

Just a report on experience with mwan3:
First I created wan2 with PPPoE, it did nothing and nothing happened (because I didn't have a modem: it just arrived). Then I installed mwan3 (but didn't configure anything since I don't know how to use it) and then in 15 min or so, the internet stopped working ! I thought that with this combination something wrong happened, so erased wan2. Then the internet started working again. But then I was on the other router a while, and then came back to RasPi. After about 15 Min, the internet stopped working again. So I uninstalled mwan3. Then the internet works again.
It's not clear if it is really mwan3's fault, but before installing mwan3, I never had this kind of problem. I think there is something wrong with it, or it's meant for those who exactly know what to do with it and do it right away instead of just letting it sit there.

For now I will stick with the idea of having network_wan1 and network_wan2 available and just cp to network if I want to change quickly.

I got Speedport entry 2, set it into modem mode. Then I realized there is no place to set VLAN7 for Telekom. This would mean that I have to set it on OpenWRT-RasPi. So I changed VLAN for WAN from eth0.123 to eth0.7. I suppose the port on the switch to connect to speedport should be set vlan7 tagged, is that right ? (For FB7360 I had it untagged: tagged didn't work)

Now, for Draytek Vigor there are a few more things to set: PI 01, VCI 32, MTU 1492. (I watched a youtube video by iDomix on Draytek) I have little idea what these things are... In Advanced setting in OpenWRT Wan interface, there is "override MTU", with default value 1500. Should I set it to 1492 ?
PI and VCI seem to have to do with setting a static address. I usually use static lease. Do I set a static address for the speedport, with these numbers PI and VCI ?

Otherwise, is there anything else I should do ? My WAN config for network_wan2 is
network_wan2.WAN=interface
network_wan2.WAN.device='eth0.7'
network_wan2.WAN.proto='pppoe'
network_wan2.WAN.username='xx@t-online.de'
network_wan2.WAN.password='xx'
network_wan2.WAN.ipv6='auto'

I would appreciate very much your advice ! I have to get up around 4am to try to connect (when there is no client), I want to be prepared as much as possible, so that I don't have to do it in vain.

OpenWrt defaults to ising MSS clamping to deal with the PPPoE overhead. Reducing the interface MTU to 1492 is not the right solution, since you still need the 8byte pppeo header so the IPv4 MSS would be only be 1444 then.... the key issue is the PPPoE header needs to live inside the MTU. Typically the default MSS clamping does work andvyoy do not need to worry.

Here is a link to a german thread about using/configuring the speedport entry 2 as modem. A bit lengthy but probably worth your time?
https://www.onlinekosten.de/forum/showthread.php?t=145761

As I have personally not tried that I have no first hand experience to share, sorry.

@moeller0 Hello ! Thank you very much for your info ! I did try this morning, and it worked in principle with my VLAN7 tagged ! But I ran into another problem: on AP, I didn't get the right bandwidth: if I connect with the switch untagged over ethernet cable, I get about 80 Mbs, but on the AP I tried, I got just 7Mbs or so. At the location, with my FB7360--FB4020--AP setting, I get about 60Mbs. So I reversed the procedure quickly, now it's back to FB7360-4020 ;;
Since I got a decent speed through ethernet cable, it is very unlikely that speedport is guilty of it. I ran out of time and didn't manage to investigate further, but I don't understand what could cause this drop down to 10%: I would understand better if it didn't work at all: then I made a mistake. But how could it drop by mistake ?

By the way, another question, you mentioned earlier
...if I had not desired to see DSL error stats...

I would like to see DSL errors, too, like on FB. Could you tell me how to do it ?

According to https://www.onlinekosten.de/forum/showthread.php?p=2372354#post2372354 you can (assuming sufficiently recent firmware) use LAN port 2 to connect to the status page (169.254.2.1/html/login/modem.html, so you will need to make sure the interface connecting is in the proper subnet).

The following post claims one can get more information with some contortions: https://www.onlinekosten.de/forum/showthread.php?p=2432917#post2432917

But again, I have myself never used the speedport entry 2 and hence have no first hand experience to offer.

Thanks a lot for the links !
I had thought that you installed/configured something on your OpenWRT so that DSL error statistics shows up there. The status page over 169.254.2.1 didn't seem to have much info, but I looked it up before connecting it to DSL, perhaps something would show up once I actually connect it to DSL. I will also try the nice looking script from the other page (will see if it works on Mac...)
Anyway I have to first find out why I got only 7Mbs where I get 60Mbs with double NAT....

I run DSLstats (from a linux host inside my network) to monitor some stats from my zyxel vmg1312-b30a modem in bridge mode (also a broadcom modem suited for up to 100/40 profile 17a VDSL2 links), but that is considerably less restricted and hence DSLstats can get the required telnet login into the modem and then can run/collect/parse the output of broadcom's xdsl utility. I am pretty sure Deutsche Telekom had the manufacturer of the Entry 2 (Sercomm IIRC) nail down all hatches, so neither telnet not ssh login are likely to be available in modem mode, sorry.
(I also use @takimata's nice collectd script to get data from the modem into the openwrt GUI (which also requires telnet access), as well as his method to keep the RRDtool database persistent so I can look at aggregates over more than the current uptime of the router...)

That is unlikely, as it is tailored for linux binaries like "ip" from iputils2, but it should be possible to have that run from a linux machine... or as much as it pains me, being the one recommending the entry 2 as an option, switch to something less bolted down like a zyxel vmg1312-b30a...

Thank you for the reply !
I looked up "ip" it seems my mac has ip. Only, sometimes usage of a linux command is a bit different, I hope it's not that different that I can modify it to work. Otherwise, I can also try the circus of pressing Esc quickly etc, as it was originally suggested.

I have another project, now I know that I should consider telnetability into account in buying a modem :slight_smile:

I just tried speedtest on FB7360-Rp4 (with SG108PE)-AP, using an AP with no client, it did come out decently. So there is nothing wrong with Rp and the switch. I will try with Speedport again tomorrow: perhaps the last time I didn't wait long enough for it to "warm up" properly.

A linux running in a VM on the mac would work :wink:

That's right. I had forgotten that I had installed linux on Virtualbox (as I started working on Internet thing). It hangs all the time so I haven't really gotten to use it. I have to figure out first why it hangs so much.
But may be it works also on Mac directly, that would be nice.

So, what I would do is set up a second cable from the router to LAN2 on the Entry 2, configure it correctly, such that the router will simply route packets to the modem's address as part of its normal work, in which case the script can be shortened considerably... as no interfaces need to be set up, it requires however that the router has one port available (on its switch) that can be dedicated for that purpose (or worst case a switch can be placed between router and modem, that "splits" the routers uplink to two cables into the modem)....
But I would first look whether the information supplied there is sufficient for your purposes, as I fear it might be a bit too thin... (then again, as long as a link is stable not much monitoring seems needed ;))

Out of curiosity, because I see this recommended all the time: Is there any appreciable benefit from running two cables?

I simply defined a modem interface on the same ethernet port as WAN (in my case eth0.2, my modem is set to 10.127.0.1/24, so my interface will use the next best IP):

config interface 'modem'
        option ifname 'eth0.2'
        option proto 'static'
        option ipaddr '10.127.0.2'
        option netmask '255.255.255.0'

and then I put the modem interface into the wan firewall zone.

If the WAN port is tagged it might very slightly complicate things, requiring another untagged VLAN on that same port for that purpose (I never tried, my modem tags the PPPoE connection on its own so I never had to tag my WAN port).

I think the issue is that the speedport entry 2 in 'modem-mode'apparently only bridges LAN1 with the dsl interface and only allows access to its webserver via LAN2. So two cables seem unavoidable, at least on the modem, no?

From the router one cable and two interface definitions on the same ethernet device should work elegantly, but that requires a bridge between router and modem, as far as I understand.

Mind you I never tested the entry2 so it might be possible to reach the the modem's webpage via lan1, but I just do not know.....

But as I understand the Entry 2 if set to modem mode allows zero configuration, but will bridge lan port LAN1 to the DSL modem and will also respond as 169.254.2.1 on LAN2 (apparently only there); if one wants to configure anything, one needs to reset the modem to convert it back to router mode (in which it accepts requests to its webserver on all LAN ports). All in all not a bad design, limited, sure, but inherently pretty safe by default. Alas, only 100Mbps fast ethernet ports (like the zyxel).