找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 22049|回复: 11

AR7161,rtl8366s,WNDR3700/WNDR3800/WNDRMAC在OPENWRT下通过VLAN接IPTV问题【已解决】

[复制链接]
发表于 2014-4-23 23:08 | 显示全部楼层 |阅读模式
本帖最后由 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.
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 + 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 ===









本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
我的恩山、我的无线 The best wifi forum is right here.
 楼主| 发表于 2014-4-23 23:15 | 显示全部楼层
本帖最后由 ziranww 于 2014-7-15 18:40 编辑

http://www.chinadsl.net/forum.php?mod=viewthread&tid=74463

还有这个兄弟帖子中的方法也不行
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2014-5-11 14:51 | 显示全部楼层
本帖最后由 ziranww 于 2014-7-15 18:39 编辑

配置见5楼
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2014-5-12 21:05 | 显示全部楼层
有一款洋垃圾 SITECOM WL-351  RT3052  RTL8366  就是没有固件支持
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2014-6-25 09:06 | 显示全部楼层
楼主啊,你上面说的那些问题解决了吗?我也遇到相同的情况啊,求结果啊!!!

点评

解决了,改天发上来  详情 回复 发表于 2014-7-2 23:58
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2014-7-2 23:58 | 显示全部楼层
本帖最后由 ziranww 于 2014-9-9 10:04 编辑
h6706187610 发表于 2014-6-25 09:06
楼主啊,你上面说的那些问题解决了吗?我也遇到相同的情况啊,求结果啊!!!

解决了,改天发上来

注意:此方法适合机顶盒是PPPOE拨号的,DHCP方式不行!
wan口废弃,光猫出来网线接lan1,iptv接lan2,lan3和lan4可接电脑上网
network代码如下


  1. config interface 'loopback'
  2.         option ifname 'lo'
  3.         option proto 'static'
  4.         option ipaddr '127.0.0.1'
  5.         option netmask '255.0.0.0'

  6. config interface 'lan'
  7.         option ifname 'eth0.1'
  8.         option type 'bridge'
  9.         option proto 'static'
  10.         option ipaddr '192.168.1.1'
  11.         option netmask '255.255.255.0'
  12.         option ip6assign '60'

  13. config interface 'wan'
  14.         option ifname 'eth1'
  15.         option _orig_ifname 'eth1'
  16.         option _orig_bridge 'false'
  17.         option proto 'dhcp'

  18. config switch
  19.         option name 'switch0'
  20.         option reset '1'
  21.         option enable_vlan '1'
  22.         option blinkrate '2'
  23.         option enable_vlan4k '1'

  24. config switch_vlan
  25.         option device 'switch0'
  26.         option vlan '1'
  27.         option ports '2 3 5t'

  28. config switch_port
  29.         option device 'switch0'
  30.         option port '1'
  31.         option led '6'

  32. config switch_port
  33.         option device 'switch0'
  34.         option port '2'
  35.         option led '9'

  36. config switch_port
  37.         option device 'switch0'
  38.         option port '5'
  39.         option led '2'

  40. config switch_vlan
  41.         option device 'switch0'
  42.         option vlan '2'
  43.         option ports '0 1 5t'

  44. config interface 'GLAN'
  45.         option ifname 'eth0.2'
  46.         option _orig_ifname 'eth0.2'
  47.         option _orig_bridge 'false'
  48.         option proto 'pppoe'
  49.         option username '宽带账号'
  50.         option password '宽带密码'
复制代码



我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2014-7-17 00:58 | 显示全部楼层
配置在上面的6楼,不是5楼

点评

感谢,已修正,看走眼了,哈哈  详情 回复 发表于 2014-7-17 08:34
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2014-7-17 08:34 | 显示全部楼层
deepines 发表于 2014-7-17 00:58
配置在上面的6楼,不是5楼

感谢,已修正,看走眼了,哈哈
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2014-11-5 07:56 | 显示全部楼层
mark。。。。。。。。。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2015-10-2 07:13 | 显示全部楼层
你好,请问如果是接两路IPTV,应该如何修改呢,谢谢?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-5-12 09:56 | 显示全部楼层
你好,请问下我给iptv单独vlan后只能看点播,直播前三秒正常,后面就是画面卡死,声音抖动,这个能解决吗
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-2-28 09:16 | 显示全部楼层
此方法适合机顶盒是PPPOE拨号
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-3-29 02:55

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表