What's new

RT-AC86U with VLAN tagged WAN port

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

mrblack1134

New Around Here
Hi all,

I currently have a simple cable modem setup for my internet access:
PC <-> [LAN port] RT-AC86U [WAN port] <-> Cable modem <-> Internet

I'm tempted to switch to fiber and am told that the provider (Bell/ebox) provides both a Nokia modem (ie. an ONT) and a pre-configured router.

I'm told that I can use my own router (I have Merlin configured on my RT-AC86U, with openvpn's, samba shares, etc.), but that I'll need to tag the packets with VLAN 40 on the WAN port for the modem.

I'm trying to achieve this:
PC <-> [LAN port] RT-AC86U [WAN port with tagged VLAN 40] <-> Fiber modem <-> Internet

I've done some research and I seem to have found two approaches:
1. Enable dual WAN, set Primary WAN as say Lan port 3, and use the 'Lan -> IPTV' menu to do VLAN tagging on Lan port 3 (see: https://www.asus.com/us/support/FAQ/1034366/)
2. Manual approach using vlanctl (see: https://www.snbforums.com/threads/a...-by-u128393-i-found-on-a-chinese-forum.63113/)

With the first approach, it seems like I would lose a port on the router (ie. I won't be able to use the WAN port for anything else after).

With the second manual approach, I'm not quite sure how it would work. It seems I'd have to do something like this on startup to setup the eth0.v40 interface:
Code:
vlanctl --mcast --if-create eth0 40
vlanctl --if eth0 --rx --tags 1 --filter-vid 40 0 --pop-tag --set-rxif eth0.v40 --rule-append
vlanctl --if eth0 --tx --tags 0 --filter-txif eth0.v40 --push-tag --set-vid 40 0 --rule-append
ifconfig eth0.v40 up

and then somehow convince Merlin to use eth0.v40 as the wan interface?
Code:
nvram set wan_ifnames=eth0.v40
nvram set wan_ifname=eth0.v40
nvram set wan0_ifname=eth0.v40

Am I in the right direction? do I need bridges or anything else? I'm assuming DHCP/DNS/etc. would all magically work since everyhing in Merlin is based on the wan_ifname nvram variables?

Thanks for the help!
 
... or maybe I can simply stay in normal (single) WAN setup and set the 'Internet VID' to 40?

(see picture)

1672712397109.png


I seem to see confirmation that it may work (https://www.snbforums.com/threads/vlan-tag-vid-in-special-isp-settings.25751/), but I'm not quite convinced (the menu says 'LAN Port' ...).

I'm tracing thru the Merlin code to see which nvram it being set here and what is the effect of the Internet VID.

Thanks
 
Just set VLAN 40 on the IPTV page. I also recently moved to Ebox, their Nokia Beam 2 is sitting in its box in a drawer. My GT-AXE16000 is happily shoveling traffic through the new 1 Gbps FTTH link.

Make sure to request your PPPoE login from Ebox (fastest is through their Direct Support forum at dslreports.com).
 
@RMerlin just to double-confirm (sorry for being annoying)

I've seen posts confirming that the method you and @ColinTaylor describe works for other routes, but just wanted to confirm that it also works for the RT-AC86U, as I've read that it uses a different chipset (HND?).

I believe setting the VLAN to 40 will set the switch_wan0tagid nvram variable.

Here's what I *think* should be doing the actual setting of the vlan, just want to confirm I'm not mistaken.

In config_switch() in init-qca.c
(abridged version to show the code flow):

Code:
void config_switch(void)
{
    ...

    if (is_routing_enabled()) {

        ...

        if (!nvram_match("switch_wantag", "none")&&!nvram_match("switch_wantag", "")) {
            ...

            if (!strncmp(nvram_safe_get("switch_wantag"), "unifi", 5)) {
                ...

            // manual mode
            else {

                ...
              
                if(strcmp(nvram_safe_get("switch_wan0tagid"), "") != 0) {
                    // Internet on WAN (port 4)
                    if ((p = nvram_get("switch_wan0tagid")) != NULL) {
                        t = safe_atoi(p);
                        if((t >= 2) && (t <= 4094))
                            vlan_val = t;
                    }

                    if((p = nvram_get("switch_wan0prio")) != NULL && *p != '\0')
                        prio_val = safe_atoi(p);

                    ...

                    __setup_vlan(2, 0, 0x00100210);
                }

There is also a call to set_wan_tag() in init_ralink.c but this one doesn't seem to apply to the RT-AC86U (big switch case). Then there's a check for switch_stb >= 7, which I don't think would apply either.

Thanks for double-confirming :)
 
@mrblack1134 You're looking at the wrong code. That is code for Qualcomm hardware. Your router has a Broadcom switch. It's the same NVRAM variable though.

What seems to be the problem? Can you not get it to work?
 
@mrblack1134 You're looking at the wrong code. That is code for Qualcomm hardware. Your router has a Broadcom switch.

What seems to be the problem? Can you not get it to work?
I can't test it right now, and I don't want to call my ISP to do the switch unless I'm 100% sure it'll work. I just wanted a confirmatiom that I can set a vlan tag on the WAN port from either a RT-AC86U owner, or being able to trace in the code where it actually does it.

I didn't realize that init-qca was Qualcomm only... Would init-ralink be Broadcom? (according to this the AC86U would be BCM4906). The only other reference to switch_wan0tagid in the Merlin codebase seems to end up at set_wan_tag, which does a switch/case on a buch of router model #s, but not the RT-AC86U :( (and neither GT-AXE16000's Merlin strangely, which tells me there might be something else that I'm missing...).

I wish I could validate this differently.
 
I can't test it right now, and I don't want to call my ISP to do the switch unless I'm 100% sure it'll work.
It will work. Plenty of us are using an Asus router on Ebox.
 
It will work. Plenty of us are using an Asus router on Ebox.
Ok thanks.

I was somehow under the impression that RT-AC86U was "different" than other Asus routers, but I found an old post of yours saying it's just the name they use for newer platforms:

I really like my AC86U and the way it's setup.
I'll trust you and go for it.

Thanks!
 
Ok thanks.

I was somehow under the impression that RT-AC86U was "different" than other Asus routers, but I found an old post of yours saying it's just the name they use for newer platforms:

I really like my AC86U and the way it's setup.
I'll trust you and go for it.

Thanks!
Even an older RT-AC68U would work fine, as long it's a model that has the IPTV tab where you can specify the VLAN tag on the Internet port. How the switch is configured internally may differ between models, but since it's done automatically through the webui it doesn`t matter.
 
Thank you for this thread, this helped me work out my direct connection of the Asus RT-AC86U to a fiber modem.
Before that I had my Asus router connected to the ISP router, which worked but I could not set up a VPN Server on the Asus router for example.

I will add the steps I succesfully followed, to help noobs like me:

Check if your ethernet cable (coming from the fiber modem) is well connected to the WAN port of your router.
Login to your router.
Go to "LAN" > "IPTV", then change "Select ISP Profile" = Manual Setting (in drop down) and change "internet" / "VID" = 10 or 20 or 40 or ... (number depending on the instructions of your Internet Service Provider - for me it was 10).
Click on APPLY below.
Go to "WAN" > "Internet Connection" > "Basic Config", then change "WAN Connection Type" = PPPoE. You will be asked to enter in "Account Settings" (further below) your ISP "username" & "Password".
(the username and PW are either given by the ISP when you start paying for their services or can normally be changed on their customer portal).
Click on APPLY below.

Good luck!
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top