本帖最后由 ziranww 于 2014-10-14 10:50 编辑
已解决 ,路由配置在6楼,此方法适合机顶盒是PPPOE拨号的,DHCP方式不行
不过后来我又继续折腾,见这个帖子https://www.right.com.cn/forum/thread-145077-1-1.html
一个方法是把8蕊网线拆成两根网线,每根都只接1,2,3,6,这样通过拆分的两条网线,IPTV接光猫的IPTV口,路由接上网的口,路由上也不用设置VLAN了
另外一个方法,不过要花点钱,增加两个设备:一对电力猫。多媒体箱一个接光猫IPTV口,电视柜IPTV上再接另外一个电力猫,这样相当于IPTV走的是电线:光猫IPTV口---网线---电力猫---电线---电力猫---网线---IPTV机顶盒,而本身的一路网线走无线路由。
===========================================
由于装修时多媒体箱到电视机柜墙上只埋了一条网络,光猫放在多媒体箱,而我的无线路由又放在电视柜,HTPC、电视盒子、电信IPTV等设备也放在电视柜,很多又是通过网线连接路由的,毕竟千兆有线本地传1080P视频文件比无线快太多了。这样就造成一个问题:连接光猫的到无线路由WAN口只有一条网线了,拉明线实在太难看了又碍事,不拉线就只能要么接网线上网,要么接IPTV,太纠结了,听说VLAN可以解决IPTV的问题,可以让IPTV通过路由器再拨号,于是开始折腾
折腾好几个月搞不定,谷歌百度了好多未果
感觉tl8366s比较特殊,和其他路由在OP下不一样,依葫芦画不出瓢,囧
如何设置VLAN,不通过交换机可上网,同时IPTV又可以播放?
这个是查到的资料,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. Port | Switch Port | CPU(eth0) | 5 | No port | 4 | Lan 1 | 3 | Lan 2 | 2 | Lan 3 | 1 | Lan 4 | 0 |
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: 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 + 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
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 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'
=== Reference ===
|