Differences

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

doc:techref:swconfig [2012/11/06 17:40]
uvray313
doc:techref:swconfig [2014/03/16 16:55] (current)
gnyers A few aditional examples on how to change settings
Line 1: Line 1:
====== Swconfig ====== ====== Swconfig ======
-The program ''swconfig'' allows you to configure //configurable// switches, like the +The program ''swconfig'' allows you to configure //configurable// [[doc:hardware:switch|Ethernet network switches]].
-  * [[http://www.realtek.com.tw/products/productsView.aspx?Langid=1&PNid=18&PFid=15&Level=5&Conn=4&ProdID=197|RealTek RTL8366RB 5-port Gigabit switch]], e.g. in the [[toh/tp-link/tl-wr1043nd|WR1043ND]]. +
-  * [[http://www.realtek.com.tw/press/newsViewOne.aspx?NewsID=182|RealTek RTL8366S]], e.g. in the [[toh/d-link/DIR-825]] +
-  * Atheros AR8316, e.g. in the [[toh/ubiquiti/routerstation.pro|RouterStation Pro]], [[toh/buffalo/WBMR-HP-G300H]], ... +
-  * AR8216 +
-  * IC+ IP17xx +
-  * Realtek RTL8306S +
-  * AR7240 built-in switch +
-  * FIXME please fill on all supported switches FIXME+
===== Usage examples ===== ===== Usage examples =====
-  * LEDs:<code>swconfig dev rtl8366s port 0 set led 2</code>+ 
 +===== Show ===== 
 + 
 +  * <code>swconfig list</code> 
 +  * <code>swconfig dev switch0 show</code>
  * Show current configuration<code>   * Show current configuration<code>
swconfig dev rtl8366rb show swconfig dev rtl8366rb show
Line 25: Line 21:
</code> </code>
  * Show available features<code>   * Show available features<code>
-swconfig dev eth0 help+swconfig dev rt305x help 
 +switch0: rt305x(rt305x-esw), ports: 7 (cpu @ 6), vlans: 4096 
 +    --switch 
 +        Attribute 1 (int): enable_vlan (VLAN mode (1:enabled)) 
 +        Attribute 2 (int): alternate_vlan_disable (Use en_vlan instead of doubletag to disable VLAN mode) 
 +        Attribute 3 (none): apply (Activate changes in the hardware) 
 +        Attribute 4 (none): reset (Reset the switch) 
 +    --vlan 
 +        Attribute 1 (ports): ports (VLAN port mapping) 
 +    --port 
 +        Attribute 1 (int): disable (Port state (1:disabled)) 
 +        Attribute 2 (int): doubletag (Double tagging for incoming vlan packets (1:enabled)) 
 +        Attribute 3 (int): untag (Untag (1:strip outgoing vlan tag)) 
 +        Attribute 4 (int): led (LED mode (0:link, 1:100m, 2:duplex, 3:activity, 4:collision, 5:linkact, 6:duplcoll, 7:10mact, 8:1) 
 +        Attribute 5 (int): lan (HW port group (0:wan, 1:lan)) 
 +        Attribute 6 (int): recv_bad (Receive bad packet counter) 
 +        Attribute 7 (int): recv_good (Receive good packet counter) 
 +        Attribute 8 (int): pvid (Primary VLAN ID) 
 +        Attribute 9 (string): link (Get port link information) 
 +</code>or<code> 
 +swconfig dev rtl8366rb help 
 +switch1: rtl8366rb(RTL8366RB), ports: 6 (cpu @ 5), vlans: 4096 
 +    --switch 
 +        Attribute 1 (int): enable_learning (Enable learning, enable aging) 
 +        Attribute 2 (int): enable_vlan (Enable VLAN mode) 
 +        Attribute 3 (int): enable_vlan4k (Enable VLAN 4K mode) 
 +        Attribute 4 (none): reset_mibs (Reset all MIB counters) 
 +        Attribute 5 (int): blinkrate (Get/Set LED blinking rate (0 = 43ms, 1 = 84ms, 2 = 120ms, 3 = 170ms, 4 = 340ms, 5 = 670ms)) 
 +        Attribute 6 (int): enable_qos (Enable QOS) 
 +        Attribute 7 (none): apply (Activate changes in the hardware) 
 +        Attribute 8 (none): reset (Reset the switch) 
 +    --vlan 
 +        Attribute 1 (string): info (Get vlan information) 
 +        Attribute 2 (int): fid (Get/Set vlan FID) 
 +        Attribute 3 (ports): ports (VLAN port mapping) 
 +    --port 
 +        Attribute 1 (none): reset_mib (Reset single port MIB counters) 
 +        Attribute 2 (string): mib (Get MIB counters for port) 
 +        Attribute 3 (int): led (Get/Set port group (0 - 3) led mode (0 - 15)) 
 +        Attribute 4 (int): disable (Get/Set port state (enabled or disabled)) 
 +        Attribute 5 (int): rate_in (Get/Set port ingress (incoming) bandwidth limit in kbps) 
 +        Attribute 6 (int): rate_out (Get/Set port egress (outgoing) bandwidth limit in kbps) 
 +        Attribute 7 (int): pvid (Primary VLAN ID) 
 +        Attribute 8 (string): link (Get port link information)
</code> </code>
 +
 +===== Change =====
 +
 +Note: Make sure to apply any changes made previously with the "**set**" command.
 +
 +  * LEDs:<code>swconfig dev rtl8366s port 0 set led 2
 +wconfig dev rtl8366rb set apply</code>
 +  * Disable VLANs:<code>swconfig dev switch0 set enable_vlan 0
 +swconfig dev switch0 set apply</code>
 +
 +
 +
 +
===== References ===== ===== References =====
-  * [[http://inst.eecs.berkeley.edu/~pathorn/ip175c/]] +  * [[http://inst.eecs.berkeley.edu/~pathorn/ip175c/]] FIXME link down 
-  * [[http://inst.eecs.berkeley.edu/~pathorn/ip175c/phylib-swconfig/]]+  * [[https://web.archive.org/web/20110831151445/http://inst.eecs.berkeley.edu/~pathorn/ip175c/phylib-swconfig/]] (links to archive.org; content of original site is gone)
  * [[http://www.debwrt.net/2010/11/07/switch-configuration-command-line-tool-swconfig-ported-2/]]   * [[http://www.debwrt.net/2010/11/07/switch-configuration-command-line-tool-swconfig-ported-2/]]
  * [[http://www.icplus.com.tw/pp-IP175C.html]]   * [[http://www.icplus.com.tw/pp-IP175C.html]]
Line 36: Line 88:
  * [[https://forum.openwrt.org/viewtopic.php?id=28716|switch_port]]   * [[https://forum.openwrt.org/viewtopic.php?id=28716|switch_port]]
  * [[https://forum.openwrt.org/viewtopic.php?id=27485|Is VLAN trunking on WR1034ND with VLAN id higher than 15 possible]]   * [[https://forum.openwrt.org/viewtopic.php?id=27485|Is VLAN trunking on WR1034ND with VLAN id higher than 15 possible]]
 +
 +===== Tags =====
 +{{tag>swconfig rtl8366rb AR8316}}

Back to top

doc/techref/swconfig.1352220013.txt.bz2 · Last modified: 2012/11/06 17:40 by uvray313