找回密码
 注册

QQ登录

只需一步,快速开始

楼主: spicahan

G300NH 用交换机硬件处理 FTTH IPTV VLAN的方法

[复制链接]
发表于 2012-6-7 22:52:43 | 显示全部楼层
spicahan 发表于 2012-6-7 09:42
如果要用 rtl8366s, 说明你的 g300nh 的硬件版本是一代的。
我看了一下,你这里只有3个vlan, 这是不对的 ...

接线是按照你说的做法,我确定没错。网络和iptv都不行:
1. /etc/config/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.                                     
  7. config interface lan                 
  8.         option ifname   eth0.1      
  9.         option type     bridge      
  10.         option proto    static      
  11.         option ipaddr   192.168.2.1  
  12.         option netmask  255.255.255.0
  13.                                     
  14. config interface wan                 
  15.         option ifname   eth0.81      
  16.         option proto    pppoe        
  17.         option username '123456789'
  18.         option password '123456'
  19.                               
  20. config switch                  
  21.         option name     switch0
  22.         option reset    1      
  23.         option enable_vlan 1   
  24.         option enable_vlan4k 1                                                  
  25.                                                                                 
  26. config switch_vlan vlan_lan                                                     
  27.         option device switch0                                                   
  28.         option vlan     1                                                      
  29.         option ports "1 5t"                                                     
  30.                                                                                 
  31. config switch_vlan vlan_iptvm                                                   
  32.         option device switch0                                                   
  33.         option vlan 51                                                         
  34.         option ports "0t 2 3"                                                   
  35.                                                                                 
  36. config switch_vlan vlan_iptvu                                                   
  37.         option device switch0                                                   
  38.         option vlan  85                                                         
  39.         option ports "0t 2 3"                                                   
  40.                                                                                 
  41. config switch_vlan vlan_wan                                                     
  42.         option device   switch0                                                
  43.         option device   81                                                      
  44.         option ports    "0 5t"                                                  
  45.                                                                                 
  46. config switch_port                                                              
  47.         option port     0                                                      
  48.         option pvid     81                                                      
  49.                                                                                 
  50. config swith_port                                                               
  51.         option port     1                                                      
  52.         option pvid     1                                                      
  53.                                                                                 
  54. config switch_port                                                              
  55.         option port     2                                                      
  56.         option pvid     85
  57.                                                                              
  58. config switch_port                                                              
  59.         option port     3                                                      
  60.         option pvid     85  
复制代码
如下为 swconfig dev rtl8366s show 内容如下:
  1. Global attributes:
  2.         enable_learning: 1
  3.         enable_vlan: 1
  4.         enable_vlan4k: 1
  5.         blinkrate: 0
  6.         max_length: 1
  7. Port 0:
  8.         mib: Port 0 MIB counters
  9. IfInOctets                          : 25230
  10. EtherStatsOctets                    : 25230
  11. EtherStatsUnderSizePkts             : 0
  12. EtherFragments                      : 0
  13. EtherStatsPkts64Octets              : 5
  14. EtherStatsPkts65to127Octets         : 249
  15. EtherStatsPkts128to255Octets        : 40
  16. EtherStatsPkts256to511Octets        : 0
  17. EtherStatsPkts512to1023Octets       : 0
  18. EtherStatsPkts1024to1518Octets      : 0
  19. EtherOversizeStats                  : 0
  20. EtherStatsJabbers                   : 0
  21. IfInUcastPkts                       : 119
  22. EtherStatsMulticastPkts             : 0
  23. EtherStatsBroadcastPkts             : 175
  24. EtherStatsDropEvents                : 0
  25. Dot3StatsFCSErrors                  : 0
  26. Dot3StatsSymbolErrors               : 0
  27. Dot3InPauseFrames                   : 0
  28. Dot3ControlInUnknownOpcodes         : 0
  29. IfOutOctets                         : 0
  30. Dot3StatsSingleCollisionFrames      : 0
  31. Dot3StatMultipleCollisionFrames     : 0
  32. Dot3sDeferredTransmissions          : 0
  33. Dot3StatsLateCollisions             : 0
  34. EtherStatsCollisions                : 0
  35. Dot3StatsExcessiveCollisions        : 0  
  36. Dot3OutPauseFrames                  : 0  
  37. Dot1dBasePortDelayExceededDiscards  : 0  
  38. Dot1dTpPortInDiscards               : 294
  39. IfOutUcastPkts                      : 0  
  40. IfOutMulticastPkts                  : 0  
  41. IfOutBroadcastPkts                  : 0  
  42.                                          
  43.         led: 2                           
  44.         pvid: 81                        
  45.         link: port:0 link:down           
  46. Port 1:                                 
  47.         mib: Port 1 MIB counters         
  48. IfInOctets                          : 0  
  49. EtherStatsOctets                    : 0  
  50. EtherStatsUnderSizePkts             : 0  
  51. EtherFragments                      : 0  
  52. EtherStatsPkts64Octets              : 0  
  53. EtherStatsPkts65to127Octets         : 0  
  54. EtherStatsPkts128to255Octets        : 0  
  55. EtherStatsPkts256to511Octets        : 0  
  56. EtherStatsPkts512to1023Octets       : 0  
  57. EtherStatsPkts1024to1518Octets      : 0   
  58. EtherOversizeStats                  : 0   
  59. EtherStatsJabbers                   : 0   
  60. IfInUcastPkts                       : 0   
  61. EtherStatsMulticastPkts             : 0   
  62. EtherStatsBroadcastPkts             : 0   
  63. EtherStatsDropEvents                : 0   
  64. Dot3StatsFCSErrors                  : 0   
  65. Dot3StatsSymbolErrors               : 0  
  66. Dot3InPauseFrames                   : 0  
  67. Dot3ControlInUnknownOpcodes         : 0  
  68. IfOutOctets                         : 0  
  69. Dot3StatsSingleCollisionFrames      : 0  
  70. Dot3StatMultipleCollisionFrames     : 0  
  71. Dot3sDeferredTransmissions          : 0  
  72. Dot3StatsLateCollisions             : 0  
  73. EtherStatsCollisions                : 0  
  74. Dot3StatsExcessiveCollisions        : 0  
  75. Dot3OutPauseFrames                  : 0  
  76. Dot1dBasePortDelayExceededDiscards  : 0  
  77. Dot1dTpPortInDiscards               : 0  
  78. IfOutUcastPkts                      : 0  
  79. IfOutMulticastPkts                  : 0  
  80. IfOutBroadcastPkts                  : 0  
  81.                                          
  82.         led: 3                           
  83.         pvid: 1                          
  84.         link: port:1 link:down           
  85. Port 2:                                 
  86.         mib: Port 2 MIB counters      
  87. IfInOctets                          : 0   
  88. EtherStatsOctets                    : 0   
  89. EtherStatsUnderSizePkts             : 0   
  90. EtherFragments                      : 0   
  91. EtherStatsPkts64Octets              : 0   
  92. EtherStatsPkts65to127Octets         : 0   
  93. EtherStatsPkts128to255Octets        : 0   
  94. EtherStatsPkts256to511Octets        : 0   
  95. EtherStatsPkts512to1023Octets       : 0   
  96. EtherStatsPkts1024to1518Octets      : 0   
  97. EtherOversizeStats                  : 0  
  98. EtherStatsJabbers                   : 0  
  99. IfInUcastPkts                       : 0  
  100. EtherStatsMulticastPkts             : 0  
  101. EtherStatsBroadcastPkts             : 0  
  102. EtherStatsDropEvents                : 0  
  103. Dot3StatsFCSErrors                  : 0  
  104. Dot3StatsSymbolErrors               : 0  
  105. Dot3InPauseFrames                   : 0  
  106. Dot3ControlInUnknownOpcodes         : 0  
  107. IfOutOctets                         : 0  
  108. Dot3StatsSingleCollisionFrames      : 0  
  109. Dot3StatMultipleCollisionFrames     : 0  
  110. Dot3sDeferredTransmissions          : 0  
  111. Dot3StatsLateCollisions             : 0  
  112. EtherStatsCollisions                : 0  
  113. Dot3StatsExcessiveCollisions        : 0  
  114. Dot3OutPauseFrames                  : 0  
  115. Dot1dBasePortDelayExceededDiscards  : 0  
  116. Dot1dTpPortInDiscards               : 0  
  117. IfOutUcastPkts                      : 0  
  118. IfOutMulticastPkts                  : 0  
  119. IfOutBroadcastPkts                  : 0  
  120.                                           
  121.         led: 4                             
  122.         pvid: 85                           
  123.         link: port:2 link:down            
  124. Port 3:                                    
  125.         mib: Port 3 MIB counters           
  126. IfInOctets                          : 0   
  127. EtherStatsOctets                    : 0   
  128. EtherStatsUnderSizePkts             : 0   
  129. EtherFragments                      : 0   
  130. EtherStatsPkts64Octets              : 0  
  131. EtherStatsPkts65to127Octets         : 0  
  132. EtherStatsPkts128to255Octets        : 0  
  133. EtherStatsPkts256to511Octets        : 0  
  134. EtherStatsPkts512to1023Octets       : 0  
  135. EtherStatsPkts1024to1518Octets      : 0  
  136. EtherOversizeStats                  : 0  
  137. EtherStatsJabbers                   : 0  
  138. IfInUcastPkts                       : 0  
  139. EtherStatsMulticastPkts             : 0  
  140. EtherStatsBroadcastPkts             : 0  
  141. EtherStatsDropEvents                : 0  
  142. Dot3StatsFCSErrors                  : 0  
  143. Dot3StatsSymbolErrors               : 0  
  144. Dot3InPauseFrames                   : 0  
  145. Dot3ControlInUnknownOpcodes         : 0  
  146. IfOutOctets                         : 0  
  147. Dot3StatsSingleCollisionFrames      : 0  
  148. Dot3StatMultipleCollisionFrames     : 0  
  149. Dot3sDeferredTransmissions          : 0  
  150. Dot3StatsLateCollisions             : 0  
  151. EtherStatsCollisions                : 0  
  152. Dot3StatsExcessiveCollisions        : 0  
  153. Dot3OutPauseFrames                  : 0
  154. Dot1dBasePortDelayExceededDiscards  : 0   
  155. Dot1dTpPortInDiscards               : 0   
  156. IfOutUcastPkts                      : 0   
  157. IfOutMulticastPkts                  : 0   
  158. IfOutBroadcastPkts                  : 0   
  159.                                           
  160.         led: 5                             
  161.         pvid: 85                           
  162.         link: port:3 link:down            
  163. Port 4:                                    
  164.         mib: Port 4 MIB counters         
  165. IfInOctets                          : 0  
  166. EtherStatsOctets                    : 0  
  167. EtherStatsUnderSizePkts             : 0  
  168. EtherFragments                      : 0  
  169. EtherStatsPkts64Octets              : 0  
  170. EtherStatsPkts65to127Octets         : 0  
  171. EtherStatsPkts128to255Octets        : 0  
  172. EtherStatsPkts256to511Octets        : 0  
  173. EtherStatsPkts512to1023Octets       : 0  
  174. EtherStatsPkts1024to1518Octets      : 0  
  175. EtherOversizeStats                  : 0  
  176. EtherStatsJabbers                   : 0  
  177. IfInUcastPkts                       : 0  
  178. EtherStatsMulticastPkts             : 0  
  179. EtherStatsBroadcastPkts             : 0  
  180. EtherStatsDropEvents                : 0  
  181. Dot3StatsFCSErrors                  : 0  
  182. Dot3StatsSymbolErrors               : 0  
  183. Dot3InPauseFrames                   : 0  
  184. Dot3ControlInUnknownOpcodes         : 0  
  185. IfOutOctets                         : 0  
  186. Dot3StatsSingleCollisionFrames      : 0  
  187. Dot3StatMultipleCollisionFrames     : 0  
  188. Dot3sDeferredTransmissions          : 0   
  189. Dot3StatsLateCollisions             : 0   
  190. EtherStatsCollisions                : 0   
  191. Dot3StatsExcessiveCollisions        : 0   
  192. Dot3OutPauseFrames                  : 0   
  193. Dot1dBasePortDelayExceededDiscards  : 0   
  194. Dot1dTpPortInDiscards               : 0   
  195. IfOutUcastPkts                      : 0   
  196. IfOutMulticastPkts                  : 0   
  197. IfOutBroadcastPkts                  : 0   
  198.                                          
  199.         led: ???                        
  200.         pvid: 0                          
  201.         link: port:4 link:down           
  202. Port 5:                                 
  203.         mib: Port 5 MIB counters         
  204. IfInOctets                          : 15903
  205. EtherStatsOctets                    : 15903
  206. EtherStatsUnderSizePkts             : 0   
  207. EtherFragments                      : 0   
  208. EtherStatsPkts64Octets              : 192  
  209. EtherStatsPkts65to127Octets         : 0   
  210. EtherStatsPkts128to255Octets        : 3   
  211. EtherStatsPkts256to511Octets        : 8   
  212. EtherStatsPkts512to1023Octets       : 0   
  213. EtherStatsPkts1024to1518Octets      : 0   
  214. EtherOversizeStats                  : 0   
  215. EtherStatsJabbers                   : 0   
  216. IfInUcastPkts                       : 0   
  217. EtherStatsMulticastPkts             : 18   
  218. EtherStatsBroadcastPkts             : 185  
  219. EtherStatsDropEvents                : 0   
  220. Dot3StatsFCSErrors                  : 0   
  221. Dot3StatsSymbolErrors               : 0
  222. Dot3InPauseFrames                   : 0   
  223. Dot3ControlInUnknownOpcodes         : 0   
  224. IfOutOctets                         : 0   
  225. Dot3StatsSingleCollisionFrames      : 0   
  226. Dot3StatMultipleCollisionFrames     : 0   
  227. Dot3sDeferredTransmissions          : 0   
  228. Dot3StatsLateCollisions             : 0   
  229. EtherStatsCollisions                : 0   
  230. Dot3StatsExcessiveCollisions        : 0   
  231. Dot3OutPauseFrames                  : 0   
  232. Dot1dBasePortDelayExceededDiscards  : 0   
  233. Dot1dTpPortInDiscards               : 203  
  234. IfOutUcastPkts                      : 0   
  235. IfOutMulticastPkts                  : 0   
  236. IfOutBroadcastPkts                  : 0                                    
  237.                                                                            
  238.         led: ???                                                           
  239.         pvid: 1                                                            
  240.         link: port:5 link:up speed:1000baseT full-duplex txflow rxflow auto
  241. VLAN 1:                                                                    
  242.         info: VLAN 1: Ports: '15t', members=0022, untag=0002, fid=0        
  243.         fid: 0                                                            
  244.         ports: 1 5t                                                        
  245. VLAN 51:                                                                  
  246.         info: VLAN 51: Ports: '0t23', members=000d, untag=000c, fid=0      
  247.         fid: 0                                                            
  248.         ports: 0t 2 3      
  249. VLAN 85:                                                                  
  250.         info: VLAN 85: Ports: '0t23', members=000d, untag=000c, fid=0      
  251.         fid: 0                                                            
  252.         ports: 0t 2 3                              
复制代码
发表于 2012-6-7 22:54:39 | 显示全部楼层
另外,默认的openwrt 刚刚刷完,/etc/config/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. config interface 'wan'
  13.         option ifname 'eth1'
  14.         option proto 'dhcp'

  15. config switch
  16.         option name 'switch0'
  17.         option reset '1'
  18.         option enable_vlan '1'

  19. config switch_vlan
  20.         option device 'switch0'
  21.         option vlan '1'
  22.         option ports '0 1 2 3 5t'
复制代码
跟格式有关系么?
 楼主| 发表于 2012-6-8 09:25:43 | 显示全部楼层
see_3000 发表于 2012-6-7 22:52
接线是按照你说的做法,我确定没错。网络和iptv都不行:
1. /etc/config/network的内容如下:如下为 swc ...

你看你现在的 swconfig show 的结果,最后还有只有 1, 51 和 85 三个 vlan, 少了 81, 所以肯定是跟 vlan 81 有关的配置写错了。我看了一下,你贴的 /etc/config/network 文件里有错误,41到44行你写的是:
config switch_vlan vlan_wan                                                     
        option device   switch0                                                
        option device   81                                                      
        option ports    "0 5t"   

option device 81 这里错了,应该是 option vlan 81

点评

不好意思,中午回家修改一下.  详情 回复 发表于 2012-6-8 09:59
发表于 2012-6-8 09:59:28 | 显示全部楼层
spicahan 发表于 2012-6-8 09:25
你看你现在的 swconfig show 的结果,最后还有只有 1, 51 和 85 三个 vlan, 少了 81, 所以肯定是跟 vlan  ...

不好意思,中午回家修改一下.
发表于 2012-6-8 22:26:26 | 显示全部楼层
本帖最后由 see_3000 于 2012-6-8 22:28 编辑

spicahan,你好!
修改之后,网络可以了(无线和有线),iptv还是不行,机顶盒连接不进网络。
/etc/config/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.2.1
  11.         option netmask         255.255.255.0

  12. config interface wan
  13.         option ifname         eth0.81
  14.         option proto         pppoe
  15.         option username '123456789'
  16.         option password '123456'

  17. config switch
  18.         option name         switch0
  19.         option reset         1
  20.         option enable_vlan 1
  21.         option enable_vlan4k 1

  22. config switch_vlan vlan_lan
  23.         option device switch0
  24.         option vlan         1
  25.         option ports "1 5t"

  26. config switch_vlan vlan_iptvm
  27.         option device switch0
  28.         option vlan 51
  29.         option ports "0t 2 3"
  30.         
  31. config switch_vlan vlan_iptvu
  32.         option device switch0
  33.         option vlan  85
  34.         option ports "0t 2 3"
  35.         
  36. config switch_vlan vlan_wan
  37.         option device         switch0
  38.         option vlan        81
  39.         option ports         "0 5t"

  40. config switch_port
  41.         option port        0
  42.         option pvid        81
  43.         
  44. config swith_port
  45.         option port        1
  46.         option pvid        1
  47.         
  48. config switch_port
  49.         option port        2
  50.         option pvid        85
  51.         
  52. config switch_port
  53.         option port        3
  54.         option pvid        85
复制代码
如下为 swconfig dev rtl8366s show 内容如下:
  1. Global attributes:
  2.         enable_learning: 1
  3.         enable_vlan: 1
  4.         enable_vlan4k: 1
  5.         blinkrate: 0
  6.         max_length: 1
  7. Port 0:
  8.         mib: Port 0 MIB counters
  9. IfInOctets                          : 30286463
  10. EtherStatsOctets                    : 30286463
  11. EtherStatsUnderSizePkts             : 0
  12. EtherFragments                      : 0
  13. EtherStatsPkts64Octets              : 973
  14. EtherStatsPkts65to127Octets         : 3742
  15. EtherStatsPkts128to255Octets        : 798
  16. EtherStatsPkts256to511Octets        : 323
  17. EtherStatsPkts512to1023Octets       : 351
  18. EtherStatsPkts1024to1518Octets      : 20339
  19. EtherOversizeStats                  : 0
  20. EtherStatsJabbers                   : 0
  21. IfInUcastPkts                       : 25768
  22. EtherStatsMulticastPkts             : 0
  23. EtherStatsBroadcastPkts             : 758
  24. EtherStatsDropEvents                : 0
  25. Dot3StatsFCSErrors                  : 0
  26. Dot3StatsSymbolErrors               : 0
  27. Dot3InPauseFrames                   : 0
  28. Dot3ControlInUnknownOpcodes         : 0
  29. IfOutOctets                         : 1379141
  30. Dot3StatsSingleCollisionFrames      : 0
  31. Dot3StatMultipleCollisionFrames     : 0
  32. Dot3sDeferredTransmissions          : 2632
  33. Dot3StatsLateCollisions             : 0
  34. EtherStatsCollisions                : 0
  35. Dot3StatsExcessiveCollisions        : 0
  36. Dot3OutPauseFrames                  : 0
  37. Dot1dBasePortDelayExceededDiscards  : 0
  38. Dot1dTpPortInDiscards               : 10434
  39. IfOutUcastPkts                      : 11181
  40. IfOutMulticastPkts                  : 0
  41. IfOutBroadcastPkts                  : 32

  42.         led: 2
  43.         pvid: 81
  44.         link: port:0 link:up speed:100baseT full-duplex
  45. Port 1:
  46.         mib: Port 1 MIB counters
  47. IfInOctets                          : 1040645
  48. EtherStatsOctets                    : 1040645
  49. EtherStatsUnderSizePkts             : 0
  50. EtherFragments                      : 0
  51. EtherStatsPkts64Octets              : 3000
  52. EtherStatsPkts65to127Octets         : 5469
  53. EtherStatsPkts128to255Octets        : 75
  54. EtherStatsPkts256to511Octets        : 260
  55. EtherStatsPkts512to1023Octets       : 316
  56. EtherStatsPkts1024to1518Octets      : 75
  57. EtherOversizeStats                  : 0
  58. EtherStatsJabbers                   : 0
  59. IfInUcastPkts                       : 9101
  60. EtherStatsMulticastPkts             : 32
  61. EtherStatsBroadcastPkts             : 62
  62. EtherStatsDropEvents                : 0
  63. Dot3StatsFCSErrors                  : 0
  64. Dot3StatsSymbolErrors               : 0
  65. Dot3InPauseFrames                   : 0
  66. Dot3ControlInUnknownOpcodes         : 0
  67. IfOutOctets                         : 11856774
  68. Dot3StatsSingleCollisionFrames      : 0
  69. Dot3StatMultipleCollisionFrames     : 0
  70. Dot3sDeferredTransmissions          : 458
  71. Dot3StatsLateCollisions             : 0
  72. EtherStatsCollisions                : 0
  73. Dot3StatsExcessiveCollisions        : 0
  74. Dot3OutPauseFrames                  : 0
  75. Dot1dBasePortDelayExceededDiscards  : 0
  76. Dot1dTpPortInDiscards               : 0
  77. IfOutUcastPkts                      : 10804
  78. IfOutMulticastPkts                  : 51
  79. IfOutBroadcastPkts                  : 150

  80.         led: 3
  81.         pvid: 1
  82.         link: port:1 link:up speed:1000baseT full-duplex txflow rxflow
  83. Port 2:
  84.         mib: Port 2 MIB counters
  85. IfInOctets                          : 5884
  86. EtherStatsOctets                    : 5884
  87. EtherStatsUnderSizePkts             : 0
  88. EtherFragments                      : 0
  89. EtherStatsPkts64Octets              : 15
  90. EtherStatsPkts65to127Octets         : 2
  91. EtherStatsPkts128to255Octets        : 0
  92. EtherStatsPkts256to511Octets        : 0
  93. EtherStatsPkts512to1023Octets       : 8
  94. EtherStatsPkts1024to1518Octets      : 0
  95. EtherOversizeStats                  : 0
  96. EtherStatsJabbers                   : 0
  97. IfInUcastPkts                       : 3
  98. EtherStatsMulticastPkts             : 0
  99. EtherStatsBroadcastPkts             : 22
  100. EtherStatsDropEvents                : 0
  101. Dot3StatsFCSErrors                  : 0
  102. Dot3StatsSymbolErrors               : 0
  103. Dot3InPauseFrames                   : 0
  104. Dot3ControlInUnknownOpcodes         : 0
  105. IfOutOctets                         : 0
  106. Dot3StatsSingleCollisionFrames      : 0
  107. Dot3StatMultipleCollisionFrames     : 0
  108. Dot3sDeferredTransmissions          : 0
  109. Dot3StatsLateCollisions             : 0
  110. EtherStatsCollisions                : 0
  111. Dot3StatsExcessiveCollisions        : 0
  112. Dot3OutPauseFrames                  : 0
  113. Dot1dBasePortDelayExceededDiscards  : 0
  114. Dot1dTpPortInDiscards               : 0
  115. IfOutUcastPkts                      : 0
  116. IfOutMulticastPkts                  : 0
  117. IfOutBroadcastPkts                  : 0

  118.         led: 4
  119.         pvid: 85
  120.         link: port:2 link:up speed:100baseT full-duplex
  121. Port 3:
  122.         mib: Port 3 MIB counters
  123. IfInOctets                          : 2632
  124. EtherStatsOctets                    : 2632
  125. EtherStatsUnderSizePkts             : 0
  126. EtherFragments                      : 0
  127. EtherStatsPkts64Octets              : 4
  128. EtherStatsPkts65to127Octets         : 0
  129. EtherStatsPkts128to255Octets        : 0
  130. EtherStatsPkts256to511Octets        : 0
  131. EtherStatsPkts512to1023Octets       : 4
  132. EtherStatsPkts1024to1518Octets      : 0
  133. EtherOversizeStats                  : 0
  134. EtherStatsJabbers                   : 0
  135. IfInUcastPkts                       : 0
  136. EtherStatsMulticastPkts             : 0
  137. EtherStatsBroadcastPkts             : 8
  138. EtherStatsDropEvents                : 0
  139. Dot3StatsFCSErrors                  : 0
  140. Dot3StatsSymbolErrors               : 0
  141. Dot3InPauseFrames                   : 0
  142. Dot3ControlInUnknownOpcodes         : 0
  143. IfOutOctets                         : 0
  144. Dot3StatsSingleCollisionFrames      : 0
  145. Dot3StatMultipleCollisionFrames     : 0
  146. Dot3sDeferredTransmissions          : 0
  147. Dot3StatsLateCollisions             : 0
  148. EtherStatsCollisions                : 0
  149. Dot3StatsExcessiveCollisions        : 0
  150. Dot3OutPauseFrames                  : 0
  151. Dot1dBasePortDelayExceededDiscards  : 0
  152. Dot1dTpPortInDiscards               : 0
  153. IfOutUcastPkts                      : 0
  154. IfOutMulticastPkts                  : 0
  155. IfOutBroadcastPkts                  : 0

  156.         led: 5
  157.         pvid: 85
  158.         link: port:3 link:down
  159. Port 4:
  160.         mib: Port 4 MIB counters
  161. IfInOctets                          : 0
  162. EtherStatsOctets                    : 0
  163. EtherStatsUnderSizePkts             : 0
  164. EtherFragments                      : 0
  165. EtherStatsPkts64Octets              : 0
  166. EtherStatsPkts65to127Octets         : 0
  167. EtherStatsPkts128to255Octets        : 0
  168. EtherStatsPkts256to511Octets        : 0
  169. EtherStatsPkts512to1023Octets       : 0
  170. EtherStatsPkts1024to1518Octets      : 0
  171. EtherOversizeStats                  : 0
  172. EtherStatsJabbers                   : 0
  173. IfInUcastPkts                       : 0
  174. EtherStatsMulticastPkts             : 0
  175. EtherStatsBroadcastPkts             : 0
  176. EtherStatsDropEvents                : 0
  177. Dot3StatsFCSErrors                  : 0
  178. Dot3StatsSymbolErrors               : 0
  179. Dot3InPauseFrames                   : 0
  180. Dot3ControlInUnknownOpcodes         : 0
  181. IfOutOctets                         : 0
  182. Dot3StatsSingleCollisionFrames      : 0
  183. Dot3StatMultipleCollisionFrames     : 0
  184. Dot3sDeferredTransmissions          : 0
  185. Dot3StatsLateCollisions             : 0
  186. EtherStatsCollisions                : 0
  187. Dot3StatsExcessiveCollisions        : 0
  188. Dot3OutPauseFrames                  : 0
  189. Dot1dBasePortDelayExceededDiscards  : 0
  190. Dot1dTpPortInDiscards               : 0
  191. IfOutUcastPkts                      : 0
  192. IfOutMulticastPkts                  : 0
  193. IfOutBroadcastPkts                  : 0

  194.         led: ???
  195.         pvid: 0
  196.         link: port:4 link:down
  197. Port 5:
  198.         mib: Port 5 MIB counters
  199. IfInOctets                          : 13316993
  200. EtherStatsOctets                    : 13316993
  201. EtherStatsUnderSizePkts             : 0
  202. EtherFragments                      : 0
  203. EtherStatsPkts64Octets              : 1934
  204. EtherStatsPkts65to127Octets         : 10648
  205. EtherStatsPkts128to255Octets        : 617
  206. EtherStatsPkts256to511Octets        : 564
  207. EtherStatsPkts512to1023Octets       : 818
  208. EtherStatsPkts1024to1518Octets      : 7614
  209. EtherOversizeStats                  : 0
  210. EtherStatsJabbers                   : 0
  211. IfInUcastPkts                       : 21982
  212. EtherStatsMulticastPkts             : 53
  213. EtherStatsBroadcastPkts             : 160
  214. EtherStatsDropEvents                : 0
  215. Dot3StatsFCSErrors                  : 0
  216. Dot3StatsSymbolErrors               : 0
  217. Dot3InPauseFrames                   : 0
  218. Dot3ControlInUnknownOpcodes         : 0
  219. IfOutOctets                         : 17562346
  220. Dot3StatsSingleCollisionFrames      : 0
  221. Dot3StatMultipleCollisionFrames     : 0
  222. Dot3sDeferredTransmissions          : 1670
  223. Dot3StatsLateCollisions             : 0
  224. EtherStatsCollisions                : 0
  225. Dot3StatsExcessiveCollisions        : 0
  226. Dot3OutPauseFrames                  : 0
  227. Dot1dBasePortDelayExceededDiscards  : 0
  228. Dot1dTpPortInDiscards               : 10
  229. IfOutUcastPkts                      : 25005
  230. IfOutMulticastPkts                  : 32
  231. IfOutBroadcastPkts                  : 250

  232.         led: ???
  233.         pvid: 81
  234.         link: port:5 link:up speed:1000baseT full-duplex txflow rxflow auto
  235. VLAN 1:
  236.         info: VLAN 1: Ports: '15t', members=0022, untag=0002, fid=0
  237.         fid: 0
  238.         ports: 1 5t
  239. VLAN 51:
  240.         info: VLAN 51: Ports: '0t23', members=000d, untag=000c, fid=0
  241.         fid: 0
  242.         ports: 0t 2 3
  243. VLAN 81:
  244.         info: VLAN 81: Ports: '05t', members=0021, untag=0001, fid=0
  245.         fid: 0
  246.         ports: 0 5t
  247. VLAN 85:
  248.         info: VLAN 85: Ports: '0t23', members=000d, untag=000c, fid=0
  249.         fid: 0
  250.         ports: 0t 2 3
复制代码
 楼主| 发表于 2012-6-9 06:35:00 | 显示全部楼层
see_3000 发表于 2012-6-8 22:26
spicahan,你好!
修改之后,网络可以了(无线和有线),iptv还是不行,机顶盒连接不进网络。
/etc/config ...

你的网络设备是怎么接的?G300的端口0上接的是什么?是不是电信给的带路由功能的光猫?如果是的话,那就不对了,不能这么玩了。如果接的是那种单口的纯光猫,那我也搞不清楚问题出在哪里了。。。

点评

0接的是入户的网线。 电信说光猫是要交200的,我有g300nh所以就不要光猫了, 我这里是陕西电信的,跟地域有关系不?  详情 回复 发表于 2012-6-9 09:25
发表于 2012-6-9 09:25:00 | 显示全部楼层
spicahan 发表于 2012-6-9 06:35
你的网络设备是怎么接的?G300的端口0上接的是什么?是不是电信给的带路由功能的光猫?如果是的话,那就不 ...

0接的是入户的网线。 电信说光猫是要交200的,我有g300nh所以就不要光猫了, 我这里是陕西电信的,跟地域有关系不?
 楼主| 发表于 2012-6-9 15:12:45 | 显示全部楼层
see_3000 发表于 2012-6-9 09:25
0接的是入户的网线。 电信说光猫是要交200的,我有g300nh所以就不要光猫了, 我这里是陕西电信的,跟地域 ...

哦,那就对了。。IPTV用51和85两个VLAN是上海电信的设置。。陕西电信用的是什么VLAN ID你要先确认一下的。。我在网上大概查了一下,好像陕西的IPTV只用到了一个VLAN, 有说用 46 的,也有说用 2441 的(可能性不大),你试试看把 /etc/config/network 里所有的 85 改成 46 或者 2441 看看行不行吧。。最好是直接问当地电信的人,把 VLAN ID 要过来应该就搞定啦

点评

应该是46 我更改了85 变更为46 iptv无效 之后把51也更改成为46 也是不行的 /etc/config/network配置如下:swconfig dev rtl8366s show 内容如下:请不吝赐教。 前几天我帮同学设置了一个h618b的设置,按照网  详情 回复 发表于 2012-6-9 19:49
发表于 2012-6-9 19:49:44 | 显示全部楼层
spicahan 发表于 2012-6-9 15:12
哦,那就对了。。IPTV用51和85两个VLAN是上海电信的设置。。陕西电信用的是什么VLAN ID你要先确认一下的。 ...

应该是46
我更改了85 变更为46  iptv无效
之后把51也更改成为46 也是不行的

/etc/config/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.2.1
  11.         option netmask         255.255.255.0

  12. config interface wan
  13.         option ifname         eth0.81
  14.         option proto         pppoe
  15.         option username '02989387137'
  16.         option password 'a1b2c3'

  17. config switch
  18.         option name         switch0
  19.         option reset         1
  20.         option enable_vlan 1
  21.         option enable_vlan4k 1

  22. config switch_vlan vlan_lan
  23.         option device switch0
  24.         option vlan         1
  25.         option ports "1 5t"

  26. config switch_vlan vlan_iptvm
  27.         option device switch0
  28.         option vlan 46
  29.         option ports "0t 2 3"
  30.        
  31. config switch_vlan vlan_iptvu
  32.         option device switch0
  33.         option vlan  46
  34.         option ports "0t 2 3"
  35.        
  36. config switch_vlan vlan_wan
  37.         option device         switch0
  38.         option vlan        81
  39.         option ports         "0 5t"

  40. config switch_port
  41.         option port        0
  42.         option pvid        81
  43.        
  44. config swith_port
  45.         option port        1
  46.         option pvid        1
  47.        
  48. config switch_port
  49.         option port        2
  50.         option pvid        46
  51.        
  52. config switch_port
  53.         option port        3
  54.         option pvid        46
复制代码
swconfig dev rtl8366s show 内容如下:
  1. Global attributes:
  2.         enable_learning: 1
  3.         enable_vlan: 1
  4.         enable_vlan4k: 1
  5.         blinkrate: 0
  6.         max_length: 1
  7. Port 0:
  8.         mib: Port 0 MIB counters
  9. IfInOctets                          : 42415665
  10. EtherStatsOctets                    : 42415665
  11. EtherStatsUnderSizePkts             : 0
  12. EtherFragments                      : 0
  13. EtherStatsPkts64Octets              : 2447
  14. EtherStatsPkts65to127Octets         : 7734
  15. EtherStatsPkts128to255Octets        : 2120
  16. EtherStatsPkts256to511Octets        : 1194
  17. EtherStatsPkts512to1023Octets       : 1354
  18. EtherStatsPkts1024to1518Octets      : 27172
  19. EtherOversizeStats                  : 0
  20. EtherStatsJabbers                   : 0
  21. IfInUcastPkts                       : 40648
  22. EtherStatsMulticastPkts             : 0
  23. EtherStatsBroadcastPkts             : 1373
  24. EtherStatsDropEvents                : 0
  25. Dot3StatsFCSErrors                  : 0
  26. Dot3StatsSymbolErrors               : 0
  27. Dot3InPauseFrames                   : 0
  28. Dot3ControlInUnknownOpcodes         : 0
  29. IfOutOctets                         : 4919502
  30. Dot3StatsSingleCollisionFrames      : 0
  31. Dot3StatMultipleCollisionFrames     : 0
  32. Dot3sDeferredTransmissions          : 794
  33. Dot3StatsLateCollisions             : 0
  34. EtherStatsCollisions                : 0
  35. Dot3StatsExcessiveCollisions        : 0
  36. Dot3OutPauseFrames                  : 0
  37. Dot1dBasePortDelayExceededDiscards  : 0
  38. Dot1dTpPortInDiscards               : 691
  39. IfOutUcastPkts                      : 35787
  40. IfOutMulticastPkts                  : 4
  41. IfOutBroadcastPkts                  : 15

  42.         led: 2
  43.         pvid: 81
  44.         link: port:0 link:up speed:100baseT full-duplex
  45. Port 1:
  46.         mib: Port 1 MIB counters
  47. IfInOctets                          : 0
  48. EtherStatsOctets                    : 0
  49. EtherStatsUnderSizePkts             : 0
  50. EtherFragments                      : 0
  51. EtherStatsPkts64Octets              : 0
  52. EtherStatsPkts65to127Octets         : 0
  53. EtherStatsPkts128to255Octets        : 0
  54. EtherStatsPkts256to511Octets        : 0
  55. EtherStatsPkts512to1023Octets       : 0
  56. EtherStatsPkts1024to1518Octets      : 0
  57. EtherOversizeStats                  : 0
  58. EtherStatsJabbers                   : 0
  59. IfInUcastPkts                       : 0
  60. EtherStatsMulticastPkts             : 0
  61. EtherStatsBroadcastPkts             : 0
  62. EtherStatsDropEvents                : 0
  63. Dot3StatsFCSErrors                  : 0
  64. Dot3StatsSymbolErrors               : 0
  65. Dot3InPauseFrames                   : 0
  66. Dot3ControlInUnknownOpcodes         : 0
  67. IfOutOctets                         : 0
  68. Dot3StatsSingleCollisionFrames      : 0
  69. Dot3StatMultipleCollisionFrames     : 0
  70. Dot3sDeferredTransmissions          : 0
  71. Dot3StatsLateCollisions             : 0
  72. EtherStatsCollisions                : 0
  73. Dot3StatsExcessiveCollisions        : 0
  74. Dot3OutPauseFrames                  : 0
  75. Dot1dBasePortDelayExceededDiscards  : 0
  76. Dot1dTpPortInDiscards               : 0
  77. IfOutUcastPkts                      : 0
  78. IfOutMulticastPkts                  : 0
  79. IfOutBroadcastPkts                  : 0

  80.         led: 3
  81.         pvid: 1
  82.         link: port:1 link:down
  83. Port 2:
  84.         mib: Port 2 MIB counters
  85. IfInOctets                          : 46886
  86. EtherStatsOctets                    : 46886
  87. EtherStatsUnderSizePkts             : 0
  88. EtherFragments                      : 0
  89. EtherStatsPkts64Octets              : 63
  90. EtherStatsPkts65to127Octets         : 418
  91. EtherStatsPkts128to255Octets        : 0
  92. EtherStatsPkts256to511Octets        : 0
  93. EtherStatsPkts512to1023Octets       : 7
  94. EtherStatsPkts1024to1518Octets      : 0
  95. EtherOversizeStats                  : 0
  96. EtherStatsJabbers                   : 0
  97. IfInUcastPkts                       : 470
  98. EtherStatsMulticastPkts             : 4
  99. EtherStatsBroadcastPkts             : 14
  100. EtherStatsDropEvents                : 0
  101. Dot3StatsFCSErrors                  : 0
  102. Dot3StatsSymbolErrors               : 0
  103. Dot3InPauseFrames                   : 0
  104. Dot3ControlInUnknownOpcodes         : 0
  105. IfOutOctets                         : 33908
  106. Dot3StatsSingleCollisionFrames      : 0
  107. Dot3StatMultipleCollisionFrames     : 0
  108. Dot3sDeferredTransmissions          : 0
  109. Dot3StatsLateCollisions             : 0
  110. EtherStatsCollisions                : 0
  111. Dot3StatsExcessiveCollisions        : 0
  112. Dot3OutPauseFrames                  : 0
  113. Dot1dBasePortDelayExceededDiscards  : 0
  114. Dot1dTpPortInDiscards               : 0
  115. IfOutUcastPkts                      : 88
  116. IfOutMulticastPkts                  : 0
  117. IfOutBroadcastPkts                  : 348

  118.         led: 4
  119.         pvid: 46
  120.         link: port:2 link:up speed:100baseT full-duplex
  121. Port 3:
  122.         mib: Port 3 MIB counters
  123. IfInOctets                          : 0
  124. EtherStatsOctets                    : 0
  125. EtherStatsUnderSizePkts             : 0
  126. EtherFragments                      : 0
  127. EtherStatsPkts64Octets              : 0
  128. EtherStatsPkts65to127Octets         : 0
  129. EtherStatsPkts128to255Octets        : 0
  130. EtherStatsPkts256to511Octets        : 0
  131. EtherStatsPkts512to1023Octets       : 0
  132. EtherStatsPkts1024to1518Octets      : 0
  133. EtherOversizeStats                  : 0
  134. EtherStatsJabbers                   : 0
  135. IfInUcastPkts                       : 0
  136. EtherStatsMulticastPkts             : 0
  137. EtherStatsBroadcastPkts             : 0
  138. EtherStatsDropEvents                : 0
  139. Dot3StatsFCSErrors                  : 0
  140. Dot3StatsSymbolErrors               : 0
  141. Dot3InPauseFrames                   : 0
  142. Dot3ControlInUnknownOpcodes         : 0
  143. IfOutOctets                         : 0
  144. Dot3StatsSingleCollisionFrames      : 0
  145. Dot3StatMultipleCollisionFrames     : 0
  146. Dot3sDeferredTransmissions          : 0
  147. Dot3StatsLateCollisions             : 0
  148. EtherStatsCollisions                : 0
  149. Dot3StatsExcessiveCollisions        : 0
  150. Dot3OutPauseFrames                  : 0
  151. Dot1dBasePortDelayExceededDiscards  : 0
  152. Dot1dTpPortInDiscards               : 0
  153. IfOutUcastPkts                      : 0
  154. IfOutMulticastPkts                  : 0
  155. IfOutBroadcastPkts                  : 0

  156.         led: 5
  157.         pvid: 46
  158.         link: port:3 link:down
  159. Port 4:
  160.         mib: Port 4 MIB counters
  161. IfInOctets                          : 0
  162. EtherStatsOctets                    : 0
  163. EtherStatsUnderSizePkts             : 0
  164. EtherFragments                      : 0
  165. EtherStatsPkts64Octets              : 0
  166. EtherStatsPkts65to127Octets         : 0
  167. EtherStatsPkts128to255Octets        : 0
  168. EtherStatsPkts256to511Octets        : 0
  169. EtherStatsPkts512to1023Octets       : 0
  170. EtherStatsPkts1024to1518Octets      : 0
  171. EtherOversizeStats                  : 0
  172. EtherStatsJabbers                   : 0
  173. IfInUcastPkts                       : 0
  174. EtherStatsMulticastPkts             : 0
  175. EtherStatsBroadcastPkts             : 0
  176. EtherStatsDropEvents                : 0
  177. Dot3StatsFCSErrors                  : 0
  178. Dot3StatsSymbolErrors               : 0
  179. Dot3InPauseFrames                   : 0
  180. Dot3ControlInUnknownOpcodes         : 0
  181. IfOutOctets                         : 0
  182. Dot3StatsSingleCollisionFrames      : 0
  183. Dot3StatMultipleCollisionFrames     : 0
  184. Dot3sDeferredTransmissions          : 0
  185. Dot3StatsLateCollisions             : 0
  186. EtherStatsCollisions                : 0
  187. Dot3StatsExcessiveCollisions        : 0
  188. Dot3OutPauseFrames                  : 0
  189. Dot1dBasePortDelayExceededDiscards  : 0
  190. Dot1dTpPortInDiscards               : 0
  191. IfOutUcastPkts                      : 0
  192. IfOutMulticastPkts                  : 0
  193. IfOutBroadcastPkts                  : 0

  194.         led: ???
  195.         pvid: 0
  196.         link: port:4 link:down
  197. Port 5:
  198.         mib: Port 5 MIB counters
  199. IfInOctets                          : 5035318
  200. EtherStatsOctets                    : 5035318
  201. EtherStatsUnderSizePkts             : 0
  202. EtherFragments                      : 0
  203. EtherStatsPkts64Octets              : 9156
  204. EtherStatsPkts65to127Octets         : 15953
  205. EtherStatsPkts128to255Octets        : 9110
  206. EtherStatsPkts256to511Octets        : 173
  207. EtherStatsPkts512to1023Octets       : 402
  208. EtherStatsPkts1024to1518Octets      : 663
  209. EtherOversizeStats                  : 0
  210. EtherStatsJabbers                   : 0
  211. IfInUcastPkts                       : 35319
  212. EtherStatsMulticastPkts             : 118
  213. EtherStatsBroadcastPkts             : 20
  214. EtherStatsDropEvents                : 0
  215. Dot3StatsFCSErrors                  : 0
  216. Dot3StatsSymbolErrors               : 0
  217. Dot3InPauseFrames                   : 0
  218. Dot3ControlInUnknownOpcodes         : 0
  219. IfOutOctets                         : 42491257
  220. Dot3StatsSingleCollisionFrames      : 0
  221. Dot3StatMultipleCollisionFrames     : 0
  222. Dot3sDeferredTransmissions          : 113
  223. Dot3StatsLateCollisions             : 0
  224. EtherStatsCollisions                : 0
  225. Dot3StatsExcessiveCollisions        : 0
  226. Dot3OutPauseFrames                  : 0
  227. Dot1dBasePortDelayExceededDiscards  : 0
  228. Dot1dTpPortInDiscards               : 138
  229. IfOutUcastPkts                      : 40556
  230. IfOutMulticastPkts                  : 0
  231. IfOutBroadcastPkts                  : 339

  232.         led: ???
  233.         pvid: 81
  234.         link: port:5 link:up speed:1000baseT full-duplex txflow rxflow auto
  235. VLAN 1:
  236.         info: VLAN 1: Ports: '15t', members=0022, untag=0002, fid=0
  237.         fid: 0
  238.         ports: 1 5t
  239. VLAN 46:
  240.         info: VLAN 46: Ports: '0t23', members=000d, untag=000c, fid=0
  241.         fid: 0
  242.         ports: 0t 2 3
  243. VLAN 81:
  244.         info: VLAN 81: Ports: '05t', members=0021, untag=0001, fid=0
  245.         fid: 0
  246.         ports: 0 5t
复制代码
请不吝赐教。
前几天我帮同学设置了一个h618b的设置,按照网上教程的设置,vlan id就是46
发表于 2012-6-9 19:53:11 | 显示全部楼层
设置h618b的时候参考了这个帖子
blog.sina.com.cn/s/blog_67babd7f01010lw7.html
*滑块验证:
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|宽带技术网 |网站地图

粤公网安备 44152102000001号

GMT+8, 2024-4-26 23:08 , Processed in 0.032179 second(s), 9 queries , Redis On.

Powered by Discuz! X3.5 Licensed

Copyright © 2001-2020, Tencent Cloud.

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