User Tools

Site Tools


zh-cn:doc:uci:network:switch

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

zh-cn:doc:uci:network:switch [2014/03/06 08:24]
zh-cn:doc:uci:network:switch [2014/05/06 11:40] (current)
zz.zhangz.gmail.com
Line 16: Line 16:
   * 设备运行在kernel 2.6 或 3 的版本   * 设备运行在kernel 2.6 或 3 的版本
   * 设备使用swconfig类型的switch配置   * 设备使用swconfig类型的switch配置
-FIXME:​我觉得这一段的原文非常混乱 和图不太一样。 以至于完全无法理解他的表述是什么意思? 请高人指点! 
   * ---------------------------------------------------   * ---------------------------------------------------
-  * swithc位于eth1上。FIXME(应该在eth0上?)[Howto find out:?], 并且同样位于芯片上,例如:rtl8366s. +  * swithc位于eth1上。FIXME(大多是在eth0上)[Howto find out:/​proc/​switch directory appears to contain the right eth number for the switch. please confirm], 并且同样位于芯片上,例如:rtl8366s. 
-  * 5接口的交换,其中0-3连接外部,4没有连接,5连接到CPU的eth1 接口上(which adds up to six ports except that 4 is not counted) +  * 5接口的交换设备,其中0-3连接外部,4没有连接,5连接到CPU的eth1接口上(which adds up to six ports except that 4 is not counted) 
-  * ''​vlan0'' ​is to be all external ports but the last one +  * ''​vlan0'' ​仅表示所有的对外接口除了最后的那个。 
-  * ''​vlan1'' ​is only the last external port [Howto find out which Port corresponds:​] +  * ''​vlan1'' ​仅表示最后的那个对外接口。[Howto find out which Port corresponds:​] 
-  * ''​vlan0'' ​is the default ​vlan, meaning if a packet is untagged, it will be treated a vlan0 packet+  * ''​vlan0'' ​是默认的vlan,就是说如果包没有标签(untagged)将会被看作vlan0的包看待。
  
  
 +==== 配置 ====
  
-==== The configuration ==== 
  
 +=== 交换配置 ===
  
-=== The Switch === +在 ''/​etc/​config/​network''​
- +
-in ''/​etc/​config/​network''​+
  
 <​code>​ <​code>​
Line 38: Line 36:
    ​option '​enable_vlan'​ '​1'​    ​option '​enable_vlan'​ '​1'​
    ​option '​reset' ​      '​1'​    ​option '​reset' ​      '​1'​
 +   ​option '​pvid' ​       '​100'​
 </​code>​ </​code>​
  
Line 46: Line 45:
 == Notes == == Notes ==
  
-The number of the VLAN is specified on the ''​option ​vlan''​ line. The VID (VLAN IDassociated with a VLAN is by default the same as the number of the VLAN. This is overridden by using an ''​option pvid''​ line so, for example, that VLAN 1 could use VID 100+VLAN的数字在选项 ​vlan 行 是特殊的。 ​VID(vlan id)与vlan的关联默认与vlan的数字一样的。这个数字可以被选项:option pvid 更改。例如,VLAN1可以使用VID 100
  
 In the ''​option ports''​ line, a number indicates that the specified vlan includes the port with that number. ​ If the number is followed by a "​t"​ then packets **transmitted** out that port on this VLAN are tagged, and that packets **received** on that port may be received with this VLAN tag.  5 is generally the CPU or '​internal'​ port and is most often used as tagged. Other suffixes are ignored on devices using ''​swconfig''​ but Broadcom kmod-switch style interfaces (''/​proc/​switch/''​) use "​*"​ and "​u"​ to indicate PVID and untagged ports respectively (as they have the CPU port implicitly tagged one needs to use "​u"​ to untag it). In the ''​option ports''​ line, a number indicates that the specified vlan includes the port with that number. ​ If the number is followed by a "​t"​ then packets **transmitted** out that port on this VLAN are tagged, and that packets **received** on that port may be received with this VLAN tag.  5 is generally the CPU or '​internal'​ port and is most often used as tagged. Other suffixes are ignored on devices using ''​swconfig''​ but Broadcom kmod-switch style interfaces (''/​proc/​switch/''​) use "​*"​ and "​u"​ to indicate PVID and untagged ports respectively (as they have the CPU port implicitly tagged one needs to use "​u"​ to untag it).
zh-cn/doc/uci/network/switch.1394090659.txt.bz2 · Last modified: 2014/03/06 08:24 (external edit)