本帖最后由 ziranww 于 2014-4-24 08:29 编辑
% G, p9 E2 U& H" T/ Y) u& P b
1 O5 K0 r. O2 h7 Z6 }6 X7 Q! C折腾好几个月搞不定,谷歌百度了好多未果% m- Y" a( ^+ F
感觉tl8366s比较特殊,和其他路由在OP下不一样,依葫芦画不出瓢,囧
6 }/ g) A3 s8 G c如何设置VLAN,不通过电信交换机可上网,同时IPTV又可以播放?关于电信iptv有几点不解:& ?6 `& `0 p0 U E$ A# Z
1.光纤和adsl是否完全不同?看到网友设置时需要pvid参数,另外的只需设置两个vlan即可
* T: K/ W3 f. y3 A! ^- U# J; a2 u7 x2.我这边adsl猫出来网线通过交换机后路由器和iptv都可正常工作,是否我不需要设置pvid参数直接划分vlan即可?7 z Z6 ~. z) y+ f" w" |' l1 P2 j
* T& R3 a( d6 N$ l3 \+ D. J
$ v* X) b. S- f% |+ E9 c7 K) V6 A9 k/ d5 D ]
3 q {" ?5 ~' }7 b6 v, d W! Z8 b- H
8 G+ v8 M. Y+ s2 Y' ~# @2 \" |这个是查到的资料,openwrt的Wiki上也有类似说明& G/ e, D' e1 K+ z( {* }. ~ q+ n
http://blog.sina.com.cn/s/blog_6f31085901017u9n.html
1 N( T0 W( V" b------------------------------------------------------------------------------7 ^1 Y4 w+ U2 V8 w7 I D" ^
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. Port | Switch Port | CPU(eth0) | 5 | No port | 4 | Lan 1 | 3 | Lan 2 | 2 | Lan 3 | 1 | Lan 4 | 0 | . i- Z! T; i0 d5 f: e
; O+ ]; `% ?- n3 |5 DWAN 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: 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. ( D2 [" x% b8 d# P: H# i
2) Solution I: VLAN + Bridge GUI: For further reference: 1) Go to Switch VLAN, set the port which is used to Off in VLAN 1 2) Add another VLAN (2), set the port used to untagged and CPU to tagged 3) 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
7 n* s$ ?2 S; ]+ B: E5 Y
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'
* h" u1 |0 g) s% k! @& V, U
3) Solution II: Switch LAN and WAN to use hardware VLAN 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' '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'
" W: K4 `3 q9 e& U, i0 [3 T9 A- K
=== Reference === ' `; M Q4 j8 M7 R, @7 E1 r1 d
|