Is trunk port possbile?

Hello everyone,
is it possbile to create trunk port in lede/openwrt ?
as per my knowledge we have to define each vlan for tagging.
we cant give a range or cant create port as trunk port which allow all vlans without defining.

Yes.

See: https://openwrt.org/docs/guide-user/network/vlan/switch

That is correct, there is no configuration shortcut (that I know of) such as 1000-1010 that would add VLANs 1000 through 1010, inclusive, to a given port.

Things are somewhat complicated in UCI configuration as the switch driver often limits the number of VLANs in the switch's "table". The vlan parameter is effectively an index into that table and the VLAN tag is defaulted to the vlan parameter. For higher-numbered VLANs, the vid parameter needs to be specified explicitly in the UCI config (to be the desired VLAN tag). I make it my practice to explicitly call out the vid in my config, no matter then VLAN.

Thanks lleachii for the reply.
I have already refereed the link which you mentioned in the reply.But i didnt find the solution to pass all vlans without defining them explicitly.
I am having device which is having switch Atheros AR8337.

Typically you don't want to "pass all VLANs" as some are "internal only" in use. While Cisco switches/routers can be configured using 1000-1010 notation, I'm not aware of any "every VLAN" command except in the case of "stackable" switches where it is used to extend the switching fabric over multiple devices. These consumer-grade chips aren't suitable for enterprise-grade VLAN isolation, notably during power-up.

While some the Atheros switch chips can handle 4096 VLANs internally, the driver is often limited to a smaller number.

$ swconfig dev switch0 help
switch0: ag71xx-mdio.0(Atheros AR8327), ports: 7 (cpu @ 0), vlans: 128

While it might make for a larger config file, one can easily configure the VLANs involved on a one-by-one basis.

1 Like