I'm new at OpenWRT and networking in general.
While reading this , noticed that it uses same physical device (eth0) in two different interfaces in lan
and wan
, => eth0.1
and eth0.2
.
I don't understand what it means or how it can happen, if you give me some links, openwrt related or in general it would be very helpful
Thank you all
eth0 is essentially the physical interface. A network defined under eth0 is untagged (i.e. normal ethernet). When you add a .x to it -- so eth0.x -- it is a VLAN defined under that interface. This means that the traffic on the interface will be tagged.
If eth0 happens to be connected to a switch inside your device, this allows you to use the switch in VLAN aware mode to have multiple different networks defined on that switch (WAN, LAN, additional LANs, etc.) which can be assigned to ports individually or in combinations (known as trunks).
Some reading that might help:
VLANS on OpenWrt (referencing the switch configuration, as well)
General Wikipedia page on VLANs .
5 Likes
Thank you for the detailed explanation, now it makes much more sense.
neheb
December 22, 2020, 10:55am
4
Some platforms support DSA, where each port shows up as an interface in addition to eth0 (lan1, 2, 3, 4, etc...). VLANs get defined by bridging that way.
1 Like
Hegabo
December 22, 2020, 5:06pm
5
Note that some routers have more than one CPU port, in which case you would have eth0 and eth1, then the VLAN suffix goes like normal.
For example, the default config for Archer C7 has eth0.2 for WAN and eth1.1 for LAN.
3 Likes
Which ones are DSA compliant?
neheb
December 23, 2020, 1:31am
7
target/linux/apm821xx/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/arc770/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/archs38/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/armvirt/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/at91/sam9x/config-default:CONFIG_HAVE_NET_DSA=y
target/linux/at91/sama5/config-default:CONFIG_HAVE_NET_DSA=y
target/linux/ath25/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/ath79/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/bcm27xx/bcm2708/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/bcm27xx/bcm2709/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/bcm27xx/bcm2710/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/bcm27xx/bcm2711/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/bcm47xx/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/bcm53xx/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/bcm63xx/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/gemini/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/imx6/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/ipq40xx/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/ipq806x/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/ipq807x/config-default:CONFIG_HAVE_NET_DSA=y
target/linux/kirkwood/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/lantiq/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/layerscape/armv7/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/layerscape/armv8_64b/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/malta/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/mediatek/mt7622/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/mediatek/mt7623/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/mediatek/mt7629/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/mpc85xx/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/mvebu/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/mxs/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/octeon/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/octeontx/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/omap/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/oxnas/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/pistachio/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/ramips/mt7620/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/ramips/mt7621/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/ramips/mt76x8/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/ramips/rt288x/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/ramips/rt305x/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/ramips/rt3883/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/rockchip/config-default:CONFIG_HAVE_NET_DSA=y
target/linux/sunxi/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/tegra/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/uml/config/i386:CONFIG_HAVE_NET_DSA=y
target/linux/uml/config/x86_64:CONFIG_HAVE_NET_DSA=y
target/linux/x86/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/zynq/config-5.4:CONFIG_HAVE_NET_DSA=y
target/linux/apm821xx/nand/config-default:CONFIG_SWCONFIG=y
target/linux/ath25/config-5.4:CONFIG_SWCONFIG=y
target/linux/ath79/config-5.4:CONFIG_SWCONFIG=y
target/linux/bcm47xx/config-5.4:CONFIG_SWCONFIG=y
target/linux/bcm53xx/config-5.4:CONFIG_SWCONFIG=y
target/linux/bcm63xx/config-5.4:CONFIG_SWCONFIG=y
target/linux/ipq40xx/config-5.4:CONFIG_SWCONFIG=y
target/linux/ipq806x/config-5.4:CONFIG_SWCONFIG=y
target/linux/ipq807x/config-default:CONFIG_SWCONFIG=y
target/linux/lantiq/config-5.4:CONFIG_SWCONFIG=y
target/linux/mediatek/mt7622/config-5.4:CONFIG_SWCONFIG=y
target/linux/mediatek/mt7623/config-5.4:CONFIG_SWCONFIG=y
target/linux/mediatek/mt7629/config-5.4:CONFIG_SWCONFIG=y
target/linux/mpc85xx/config-5.4:CONFIG_SWCONFIG=y
target/linux/ramips/mt7620/config-5.4:CONFIG_SWCONFIG=y
target/linux/ramips/mt76x8/config-5.4:CONFIG_SWCONFIG=y
target/linux/ramips/rt288x/config-5.4:CONFIG_SWCONFIG=y
target/linux/ramips/rt305x/config-5.4:CONFIG_SWCONFIG=y
target/linux/ramips/rt3883/config-5.4:CONFIG_SWCONFIG=y
target/linux/realtek/config-5.4:CONFIG_SWCONFIG=y
target/linux/sunxi/config-5.4:CONFIG_SWCONFIG=y
the overlapping ones use swconfig and not DSA. There's work on transitioning everything to DSA but the work is not complete.
2 Likes
faser
December 23, 2020, 1:50am
8
Unfortunately not anymore true for the C7 v5, only the old versions had that.
1 Like
system
Closed
January 2, 2021, 1:50am
9
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.