User Tools

Site Tools


docs:techref:hardware:switch

Ethernet Network Switch

Many devices supported by OpenWrt contain an Ethernet network switch. Most switches are configurable and driver options are available. Typical features include ethernet frame tagging and VLAN support. We require two software components:

  1. a kind of a driver
  2. a utility

DSA Distributed Network Switch

The preferred contemporary driver architecture for ethernet switches in the Linux kernel is DSA (distributed switch architecture).

For a user the main difference to past OpenWrt switch drivers is that all the switch ports that on a consumer router have names such as LAN1, LAN2, … or WAN also appear as independent network interfaces in userspace and those can be handled like any other network interfaces using the ip tool or ethtool.

The Linux kernel also has userspace configuration examples on how to use the DSA switches in Linux.

Switchdev

The previous switch driver model invented by OpenWrt was switchdev and the corresponding configuration utility was swconfig. This is used in legacy patches and userspace, but is not recommended when implementing switch drivers for new devices. Please write new code using DSA and help out to convert old drivers to DSA if you can.

Ethernet Network Switch models

Realtek

Qualcomm / Atheros

Note: Atheros Switch-Chips with the 'N' designation include the Hardware NAT function.

Broadcom

Vitesse

VSC7384 datasheet

Other

  • IC+ IP17xx

Features

  • some Switches contain a functionality called “Hardware NAT; support for this features has not yet been included into OpenWrt. Since the cpus used in CPE Routers are relatively slow, expect 2 to 4 times performance gain if you were to use Hardware NAT, e.g. without hardware NAT some router could achieve 400Mbit/s at full CPU load, with hardware NAT it could achieve 900Mbit/s at full CPU load. OpenWrt developer is supposed to have said, that implementing HW-NAT support would be unacceptably hacky to accomplish.
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
docs/techref/hardware/switch.txt · Last modified: 2019/08/20 17:33 by linus