User Tools

Site Tools


doc:uci:network:switch

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
doc:uci:network:switch [2012/11/30 04:19]
uvray313
doc:uci:network:switch [2014/08/16 19:15] (current)
gregorg Wrong option name for VLAN ID
Line 13: Line 13:
  
 ==== Assumptions ==== ==== Assumptions ====
 +FIXME Some of the assumptions,​ does not see to add up with the provided diagram. Someone familiar with the matter, should either fix them or add a better explanation.
   * device is running kernel 2.6 or 3   * device is running kernel 2.6 or 3
   * device uses an ''​swconfig''​ type switch configuration   * device uses an ''​swconfig''​ type switch configuration
   * ---------------------------------------------------   * ---------------------------------------------------
-  * The switch is on ''​eth1''​. ​ FIXME (Many are on ''​eth0''​) ​ [Howto find out:?], and also on chips like ''​rtl8366s''​+  * The switch is on ''​eth1''​. ​ FIXME (Many are on ''​eth0''​) ​ [Howto find out: -> /​proc/​switch directory appears to contain the right eth number for the switch. please confirm], and also on chips like ''​rtl8366s''​
   * Five-port switch with 0-3 connected externally, 4 not connected, and 5 connected to the CPU's eth1 interface (which adds up to six ports except that 4 is not counted)   * Five-port switch with 0-3 connected externally, 4 not connected, and 5 connected to the CPU's eth1 interface (which adds up to six ports except that 4 is not counted)
   * ''​vlan0''​ is to be all external ports but the last one   * ''​vlan0''​ is to be all external ports but the last one
Line 45: Line 45:
 == Notes == == Notes ==
  
-The number of the VLAN is specified on the option vlan line. The VID (VLAN ID) associated 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.+The number of the VLAN is specified on the ''​option vlan'' ​line. The VID (VLAN ID) associated with a VLAN is by default the same as the number of the VLAN. This is overridden by using an ''​option ​vid'' ​line so, for example, that VLAN 1 could use 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 implicitely ​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).
  
  
Line 54: Line 54:
  
  
-Tagged packets received on a port will be directed to the VLAN indicated by the VID contained in the packet. Untagged packets received on a port will be directed to the default port VLAN (usually called the PVID). A separate config switch_port section is required to set the default port VLAN.+Tagged packets received on a port will be directed to the VLAN indicated by the VID contained in the packet. Untagged packets received on a port will be directed to the default port VLAN (usually called the PVID). A separate ​''​config switch_port'' ​section is required to set the default port VLAN.
  
  
Line 98: Line 98:
  
 config '​interface' ​ '​wan'​ config '​interface' ​ '​wan'​
-   ​option '​ifname' ​ '​eth0'​ +   ​option '​ifname' ​ 'eth0.2
-   ​option '​proto' ​  '​dhcp'+   ​option '​proto' ​  '​pppoe'​ 
 +   ​option '​username'​ '​szabozsolt-em'​ 
 +   ​option '​password'​ '​M3IuWBt4'
 </​code>​ </​code>​
  
-Of course, if you only had a five port switch on eth0 (and no other interfaces),​ you might make the ''​wan''​ interface ''​eth0.1'' ​and and the lan ''​eth0.0''​ with appropriately matching ''​switch'',​ ''​switch_vlan''​ and ''​switch_port''​ sections.+Of course, if you only had a five port switch on eth0 (and no other interfaces),​ you might make the ''​wan''​ interface ''​eth0.1''​ and the lan ''​eth0.0''​ with appropriately matching ''​switch'',​ ''​switch_vlan''​ and ''​switch_port''​ sections.
  
 +See also [[wp>​backplane]].
doc/uci/network/switch.1354245560.txt.bz2 · Last modified: 2012/11/30 04:19 by uvray313