|
7620设置VLAN需要用mtk_esw命令。Padavan没有梅林里面的robocfg命令。
可以参考一下下面的链接:
https://bitbucket.org/padavan/rt ... -port-for-multiroom
Only Trunk port (w/o untagging) can use more one VLANs.
Now, you can assign VLANs via rtl8367 utility (or mtk_esw for MT7620/MT7621-based devices).
rtl8367 64 [MASK] [DATA]
Create VLAN entry
where is MASK:
((untag & 0xFF) << 16) | (member & 0xFF)
#define SWAPI_PORTMASK_LAN1 (1<<0)
#define SWAPI_PORTMASK_LAN2 (1<<1)
#define SWAPI_PORTMASK_LAN3 (1<<2)
#define SWAPI_PORTMASK_LAN4 (1<<3)
#define SWAPI_PORTMASK_WAN (1<<4)
#define SWAPI_PORTMASK_CPU_LAN (1<<5)
#define SWAPI_PORTMASK_CPU_WAN (1<<6)
#define SWAPI_PORTMASK_INIC (1<<7)
where is DATA:
((fid & 0x0FFF) << 16) | (vid & 0x0FFF)
Example: set ports WAN and LAN4 as member with VID 20:
rtl8367 64 0x00000018 0x00140014 |
|