[Solved] Setting up VLAN on TP-Link Archer C60 EU v2

How does one setup eth0 to use VLAN (in my case, VLAN 10)? The VLAN configuration screen shows "switch0" being CPU (eth1) and LAN 1 - 4 but there is no mention of eth0.

Thanks.

Add a VLAN with VLAN ID 10, set CPU to tagged, and whatever port you want in your VLAN to untagged (and make sure to disable it in VLAN 1).

If you want to use a port in multiple VLANs you should set it to tagged in both VLANs, unless your AR934x switch supports mixing tagged and untagged VLANs.

Thanks, @Borromini, but what puzzles me is that I need the VLAN to be on the WAN port and the configuration screen makes no mention of WAN, just LAN 1 to 4.

Check /etc/config/network to see what interface WAN is using (don't assume WAN is eth0, unless you already confirmed this) and set it there directly. Check the documentation on the wiki.

It all works, thanks @Borromini.

For others who find this, the WAN port's VLAN can not be set using the web interface but instead the file /etc/config/network has to be directly edited. The relevant sections of my configuration, which uses VLAN 10 to connect to the ISP over PPPoE, are:

config interface 'wan'
    option ifname 'eth0.10'
    option proto 'pppoe'
    option username 'XXXXXXXXX'
    option password 'XXXXXXXXX'
    option ipv6 'auto'

config device
    option name 'vlan1'
    option vid '10'
    option ifname 'eth0'

The command service network reload has to be given to apply the new configuration.

Hi,

Do you have a similar drawing to the below for the Archer C60? I'm struggling to understand the internal layout between ports and interfaces...

image

Is there an eth0 handling the WAN port in the C60?

here's the configuration I see from the CLI:

Global attributes:
        enable_vlan: 1
        mirror_monitor_port: 15
Port 0:
        enable_mirror_rx: 0
        enable_mirror_tx: 0
        pvid: 0
        link: port:0 link:up speed:1000baseT full-duplex txflow rxflow
Port 1:
        enable_mirror_rx: 0
        enable_mirror_tx: 0
        pvid: 1
        link: port:1 link:down
Port 2:
        enable_mirror_rx: 0
        enable_mirror_tx: 0
        pvid: 1
        link: port:2 link:down
Port 3:
        enable_mirror_rx: 0
        enable_mirror_tx: 0
        pvid: 1
        link: port:3 link:down
Port 4:
        enable_mirror_rx: 0
        enable_mirror_tx: 0
        pvid: 1
        link: port:4 link:down
VLAN 0:
        vid: 0
        ports: 0t
VLAN 1:
        vid: 1
        ports: 0t 1 2 3 4
VLAN 2:
        vid: 881
        ports: 0t

I'm confused by the vlan0 that is also using the port 0. I need my WAN to be tagged 881 to be able to use my Optical Fiber ONT (Router)...

@Soussef24, please make a new thread in the future.

There shouldn't be a VLAN 0 on a default OpenWrt config. VLAN 0 is invalid for use and a reserved number.

If you need your WAN tagged 881 - if your WAN s VLAN 2, simply renumber it and then mark the WAN port as tagged (it seems you've already done this).

Also, there's a web GUI for ease of use:

@lleachii thanks for your feedback. next time I'll create a new thread.

I don't recall creating the vlan0, but I might have created it by error? I guess it need to be enabled in the "Global Attributes" section?

Anyhow my biggest issue is that my default configuration doesn't have a WAN vlan, and doesn't show an eth0 or a WAN port... Here's the switch 0 configuration as you can see it from LUCI. So even if I want to create this WAN vlan, I should normally add the WAN port and the eth0 to it...

Yes, and:

  • to one of the ports your choose (1, 2, 3 or 4)
  • Can status on VLAN 2 for that port to Untagged
  • Change status n VLAN 1 on that same port to off
  • Done!

It's just an assignment of a VLAN to a port, pretty straightforward.

Thanks.

I think what you mean, is choose one of the 4 physical ports on the switch and use it as a WAN port. But the Archer C60 actually has 4 physical ports that show on the switch 0 interface and a physical and separate WAN port that doesn't show on the switch 0 interface...

I think that this WAN port is wired directly to eth0 on the CPU without using the hardware switch. Hence my confusion.

You'll have to make a bridge with a VLAN; and then assign the VLAN to the port.

It worked for me using the exact same solution as @Borromini, just replacing eth0.10 with eth0.881, so I added the below to the '/etc/config/network'

config interface 'wan'
    option ifname 'eth0.811'
    option proto 'pppoe'
    option username 'XXXXXXXXX'
    option password 'XXXXXXXXX'
    option ipv6 'auto'

config device
    option name 'vlan3'
    option vid '811'
    option ifname 'eth0'

There's no "config switch", nor "config switch_vlan", because all this WAN part isn't linked to the physical switch as in other devices.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.