求助啊rtl8366s(WNDR3700 V1/V2/WNDR3800)在OPENWRT下划分VLAN的问题
本帖最后由 ziranww 于 2014-4-24 08:29 编辑折腾好几个月搞不定,谷歌百度了好多未果
感觉tl8366s比较特殊,和其他路由在OP下不一样,依葫芦画不出瓢,囧
如何设置VLAN,不通过电信交换机可上网,同时IPTV又可以播放?关于电信iptv有几点不解:
1.光纤和adsl是否完全不同?看到网友设置时需要pvid参数,另外的只需设置两个vlan即可
2.我这边adsl猫出来网线通过交换机后路由器和iptv都可正常工作,是否我不需要设置pvid参数直接划分vlan即可?
这个是查到的资料,openwrt的Wiki上也有类似说明
http://blog.sina.com.cn/s/blog_6f31085901017u9n.html
------------------------------------------------------------------------------
1) WNDR3700 Switch Ports (for VLANs)Numbers 0-3 are Ports 4 to 1 as labeled on the unit, 5 is the internal connection to the router itself. Don't be fooled: Port 1 on the unit is number 3 when configuring VLANs. vlan0 = eth0.0, vlan1 = eth0.1 and so on.
PortSwitch Port
CPU(eth0)5
No port4
Lan 13
Lan 22
Lan 31
Lan 40
WAN port is a gigabit port. VLANs can be configured to work on both LAN and WAN.To create a VLANx on WAN port (eth1) declare an interface as "eth1.x". It can be further bridged with one of the switch ports if necessary.For the LAN interface two actions are needed:
[*]Declare "eth0.x" interface
[*]Define switch_vlan configuration for each of the switch ports.
When vlans are defined on the switch ports VLAN0 cannot be used on eth0 any more. So the default router configuration must be changed, otherwise traffic stops on the switch ports and hard reset is needed.
2) Solution I: VLAN + BridgeGUI: For further reference:1) Go to Switch VLAN, set the port which is used to Off in VLAN 12) Add another VLAN (2), set the port used to untagged and CPU to tagged3) Go to WAN, go to physical settings, enable bridge and select eth1 and the VLAN interface you just created (eth0.2)4) Reboot by removing power and putting it back on.5) Enjoy
CLI: (Edit /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 interface 'lan' option ifname 'eth0.1' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option ipaddr '192.168.1.1'config interface 'wan' option proto 'dhcp' option type 'bridge' option ifname 'eth0.2 eth1'config switch option name 'rtl8366s' option reset '1' option enable_vlan '1' option blinkrate '2' option max_length '3' option enable_vlan4k '1'config switch_vlan option device 'rtl8366s' option vlan '1' option ports '0 1 2 5t'config switch_vlan option device 'rtl8366s' option vlan '2' option ports '3 5t'
3) Solution II: Switch LAN and WAN to use hardware VLANCLI: (Edit /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 'interface' 'lan' option 'ifname' 'eth1' option 'proto' 'static' option 'type' 'bridge' option 'netmask' '255.255.255.0' option 'ipaddr' '192.168.25.1'config 'interface' 'wan' option 'ifname' 'eth0.1' option 'proto' 'dhcp'config 'interface' 'digitv' option 'proto' 'dhcp' option 'ifname' 'eth0.2'config 'switch' option 'name' 'rtl8366s' option 'reset' '1' option 'enable_vlan' '1' option 'blinkrate' '2'config 'switch_vlan' option 'device' 'rtl8366s' option 'vlan' '1' option 'ports' '0 1 3 5t'config 'switch_vlan' option 'device' 'rtl8366s' option 'vlan' '2' option 'ports' '2 5t'
=== Reference ===http://wiki.openwrt.org/toh/netgear/wndr3700#switch.ports.for.vlans
https://forum.openwrt.org/viewtopic.php?id=24274
https://forum.openwrt.org/viewtopic.php?id=29299
https://forum.openwrt.org/viewtopic.php?id=36592
https://forum.openwrt.org/viewtopic.php?pid=121572
https://www.chinadsl.net/forum.php?mod=viewthread&tid=74463
还有这个兄弟帖子中的方法也不行
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config interface 'lan'
option ifname 'eth0.1'
option type 'bridge'
option proto 'static'
option netmask '255.255.255.0'
option ipaddr '192.168.1.1'
config interface 'wan'
option proto 'pppoe'
option username 'ad******'
option password '******'
option _orig_ifname 'eth0.81'
option _orig_bridge 'false'
option ifname 'eth0.81'
config switch
option name 'rtl8366s'
option reset '1'
option enable_vlan '1'
option enable_vlan4k '1'
config switch_vlan
option device 'rtl8366s'
option vlan '1'
option ports '0 1 5t'
config switch_port
option device 'rtl8366s'
option port '1'
option led '6'
config switch_port
option device 'rtl8366s'
option port '2'
option led '9'
config switch_port
option device 'rtl8366s'
option port '5'
option led '2'
config switch_vlan
option device 'rtl8366s'
option vlan '81'
option ports '3 5t'
config switch_vlan
option device 'rtl8366s'
option ports '2 3t'
option vlan '85'
config switch_vlan
option device 'rtl8366s'
option ports '2 3t'
option vlan '51'
全是英文 看不懂哦 可惜我这边的IPTV是需要在光猫里设置后才能上的 跟你们这边不一样 要不我可以试试你说的方法 keboy520 发表于 2014-4-24 12:37
全是英文 看不懂哦 可惜我这边的IPTV是需要在光猫里设置后才能上的 跟你们这边不一样 要不我可以试试你说的 ...
XD也是WNDR3700或3800吗? 周末再顶起来一下
页:
[1]