After a blog series about using 4G as house Wifi, I need an short article to breathe a bit. So this is gonna be a short one.
Background
Last year, I decided to upgrade the network in my house. My home network was not much to speak of, just a Viettel modem (H646EW) connected to the previously mentioned TP-Link Archer C50. My home server was connected to the network through Wifi, because the router is in the kitchen while the server was in my room adjacent to it, and wiring is out of the question. The router slowly became a bottleneck, as the number of devices connected to it increased and my server had to serve media contents around the house as well as download contents from the Internet. Internet bandwidth was also increased by the ISP to 150 Mbps and my old router could not utilized it fully, only averaging 65 Mbps. So I replaced the main router with an Asus RT-AC1300UHP. It's a 2.4/5 GHz Wifi Router with Gigabit LAN. Its specs include a quad-core Qualcomm IPQ4018 ARM processor at 700 MHz, 256 MB RAM, much more powerful than the Archer with single-core Mediatek MT7628A MIPS running at 580 MHz with only 64 MB RAM.
I replaced the router by connecting LAN1 from H646EW to WAN of the Asus router, went in the configuration page of Asus router, changed WAN type to DHCP (or in this case Automatic IP). And that was it. Speed test using either speedtest.net or fast.com gave me full 150 Mbps symmetrical.
One day, as I was browsing through Facebook, I came across this group talking about PPPoE and using another router to "dial" it instead of the one provided by the ISP. So it got me thinking: "What if I can apply it to my network then?"
Point-to-Point over Ethernet (PPPoE) and bridge mode
PPPoE is a network protocol for using PPP on Ethernet. Back in the old days, PPP is used for dial-up Internet access. Nowadays, PPPoE is used for customer authentication, record on DSL network, fiber network. When you register for Internet service, your provider will give you a username for the PPPoE account, and they pre-configured the account in their modem with the password. Then from the modem, you would connect another, better router to it, use it as the main point to connect to the Internet for all devices in your house. The reason is that ISP modems are usually weak, unreliable if left to handle anything to heavy. But by using 2 routers, this leads to a situation called "double NAT", where traffic coming to and from a client has to route twice before hitting the Internet, increasing latency and causing problems to programs that need to open port. The first drawback is why you would want to turn your modem to bridge mode, so the router has to do most of the heavy lifting, the modem's only job is conversion from fiber to Ethernet. The second downside is kind of meaningless, as in IPv4, you most likely have an IP address given by the ISP, which allows Internet access but the outside world can't connect to you because a lot of users around your house also have that same address (which is a large problem if you want to do anything involving P2P like torrenting, VOIP, online gaming. Fixing this is a story for another time).
Bridge mode essentially turns your modem into a bridge, "bridge" the ISP end to your router on the other end. It bypasses routing, DHCP of the modem, sends traffic directly to the router.
Disclaimer
Before performing this, I should warn you. When I performed this, I locked myself out of the modem multiple times, lost access to the Internet, had to call their technician before resetting the modem fixed the issue so that I could try again. So if your Internet is running fine, you shouldn't bother doing this. Maybe you can look into DMZ setting if available.
Another point is that each modem is different and each ISP is different. Some modems may not have bridge mode available. Go through your modem's settings first, talk to the ISP technician if needed before trying this.
Additionally, your router must be more powerful than your modem to go through this procedure. Because dialing PPPoE is a single-threaded task [1].
How to do it?
First, we need to change the modem to bridge mode. This depends on model, so these steps is for my Viettel GPON modem H646EW.
Login to the configuration page using https://192.168.1.1/. Turn it into Advanced Mode. First go to Advanced Setup on the left panel -> LAN settings to disable DHCP and Wifi Setup to disable Wifi on the modem.
Then go to Advanced Setup -> WAN Connections.
Click Edit on any profile that is PPPoE mode if your ISP doesn't give you your credential when registering for Internet service. It contains your credential.
Right click on the Password text box and click Inspect Element. Find the <input> tag that points to the Password box, change type from "PASSWORD" to "text". It shall reveal your PPPoE password. Copy PPPoE username and password, set status to Deactivated and click Apply.
Back at WAN Connections, we add a new entry, Bridge Mode, then click Add.
Set status to Activated. IP choose IPv4/IPv6. At 802.1q, you have 2 options:
- Tag VLAN at the modem: VLAN 35 for Viettel
- Passthrough: pass VLAN Tagging to the router. You can usually find this option under IPTV
For demonstration, I chose tagging VLAN at the modem.
After that, look under the modem for its MAC address. Then connect the modem LAN1 to WAN of the router. For this instance, it's an Asus RT-AC1300UHP. Login to Asus configuration page at http://192.168.0.1/. Go to Advanced Settings -> WAN. Change WAN Connection Type to PPPoE. Fill in your PPPoE username and password. At Special Requirement from ISP, set No to all and put MAC address the address you found under the modem. Then click Apply. The router should now dial directly to ISP to get Internet service, instead of going through routing from the modem.
References:
- Facebook wifi technology community
- Wikipedia - Point-to-point over Ethernet
- Why do ISPs still use PPPoATM or PPPoE instead of 802.1x?