VLAN setup eth0 eth1 PPPoE

I would just like to do a quick check whether this is setup correctly. The router (R7800) is directly connected to the internet (to a fiber cable box) via PPPoE and using vlan6.
I am a bit confused regarding two CPU (eth0 and eth1) currently eth1 is off. Is this correct/optimal? And am I doing the tagged/untagged correctly?

/etc/config/network

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fdec:a0e9:aa86::/48'

config device
	option name 'eth0'
	option mtu '1508'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth0.1'
	option mtu '1500'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '64'

config interface 'wan'
	option ifname 'eth0.6'
	option mtu '1508'
	option proto 'pppoe'
	option username 'something'
	option password 'something'
	option ipv6 'auto'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option vid '1'
	option ports '0t 1 2 3 4'

config switch_vlan
	option device 'switch0'
	option vlan '6'
	option vid '6'
	option ports '0t 5t'

Yes, this looks like the standard configuration.

1 Like

Allright thanks for the sanity check!

When would one use the eth1 out of curiosity? Is this really a second CPU?

Your router has a CPU (or several of them, but that does not matter here) and an internal switch. The eth_ interfaces are the physical connections from the CPU to the switch or to the LAN/WAN ports (it depends on the model).

The eth_._ interfaces are the VLANs. You are currently using VLAN 1 from the eth0 interface for you LAN connection.

1 Like

That switch setup differs from OpenWrt defaults and is not ideal. ipq806x has two CPU ports connected to the same hardware switch, usually one is used for the WAN interface, the other for LAN (and potentially additional VLANs). Using only a single CPU port reduces the maximum attainable throughput.

2 Likes

How comes i did not notice he is ilusing eth0 for both LAN and WAN!? I must be getting old...

Allright thanks, so I put e.g. LAN on eth1 also "tagged" and then keep the "tagged" option on eth0 for LAN as well or remove that?

You need to keep the tagging on eth0/WAN, because your PPPeE needs to use a specific VLAN.

You can keep the tagging on eth1/LAN, or remove it.

1 Like

Thanks for your help!
Maybe I am not doing it right but if I put eth1/LAN on tagged or untagged the clients loose internet connection.
Example of tagged:

You must also move the LAN interface to eth1 (if untagged) or eth1.1 (if tagged).

2 Likes

Cheers. all working now!

Maybe useful for others:

config device
        option name 'eth0'
        option mtu '1508'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth1'
        option mtu '1500'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '64'

config interface 'wan'
        option ifname 'eth0.6'
        option mtu '1508'
        option proto 'pppoe'
        option username 'username'
        option password 'password'
        option ipv6 'auto'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option vid '1'
        option ports '1 2 3 4 6'

config switch_vlan
        option device 'switch0'
        option vlan '6'
        option vid '6'
        option ports '0t 5t'
1 Like

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