Mt7621如何设置vlan用于iptv,about mt7621with DSA setup vlan for iptv?

我路由器是小娱-c5,用的mt7621,最近一次从r9升级到r21.7.15后发现交换机构架变成了DSA ,然后老的设置就不起作用了。因为我要用vlan设置用于电信提供的iptv服务,请问dsa构架应该如何修改文件或者设置?
My router is xiaoyu-c5 mt7621. I recently upgraded from r9 to OpenWrt R21.7.15 and found that the switch became DSA, so the old setting method didn't work. How should DSA be set up?
The firmware comes from the source code of lede
Here is the old setting method: modify the following 2 files

/etc/config/network

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

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

/etc/dnsmasq.conf

dhcp-option-force=125,00:00:00:00:1a:02:06:48:47:57:2d:43:54:0a:02:20:00:0b:02:00:55:0d:02:00:2e dhcp-option=60,00:00:01:00:02:03:43:50:45:03:0e:45:38:20:47:50:4f:4e:20:52:4f:55:54:45:52:04:03:31:2E:30
dhcp-option=15
dhcp-option=28

但是现在变成 das 后就不知道怎么修改了。看了下官方文档,network 的内容和现在的也有出入,实在不会依葫芦画瓢。
But now it becomes das and I don't know how to modify it. After reading the official documents, the content of network is also different from the current one.

下面是现有的 /etc/config/network 部分内容,仅供参考
The following is part of the existing /etc/config/network, for reference only

config interface 'lan'
option type 'bridge'
option ifname 'lan1 lan2 lan3 lan4'
option proto 'static'
option ipaddr '192.168.0.1'
option netmask '255.255.255.0'
option ip6assign '60'
option dns '202.96.209.133 202.96.209.6'
option delegate '0'

Why don't you install Luci and configure the router using a browser instead? Probably much easier compared to editing the config files.

i have luci,but luci haven't vlan Set interface

Are you running official OpenWrt, or somebody's private build?
(There is no official OpenWrt r9 or r21.7.15)

The network syntax has recently changed, like you have noticed, but the LuCI available for the official builds should already have logic for the new stuff.

Switch & VLAN config is now in Network / Interfaces / Devices tab.

1 Like

my openwrt from coolsnowwolf/lede: Lean's OpenWrt source (github.com)

Sorry, you are on your own.
That seems to be a private repo, but not even a full fork of OpenWrt, instead a small import with only some 3600 commits, while a normal Openwrt source repo would have 51700 commits

Same goes for his LuCI repo: 179 commits, not a full fork.

2 Likes