I cannot find any documentation about how to set up, in ExpressoBin-ultra device, the ethernet switch mode managed by Topaz Switch.
I would like to find a way to make my ExpressoBin use the switch forwarding without the use of CPU.
Bascially, the /etc/network/interfaces file you have on default boot correctly implements this.
Here’s the correct bridge br0 configuration:
iface br0 inet static
address 192.168.84.1 #static address and netmask assignment
bridge_stp off #disables spanning-tree protocol features
bridge_fd 0 #forwarding begins as soon as interface is up
bridge_ports lan0 lan1 lan2 lan3 #lan ports are bridged together
#dnsmasq is a dns and dhcp server that listens on br0 interface and will give IP addresses from specified range to the systems in LAN
post-up dnsmasq –interface=br0 –except-interface=lo –bind-interfaces — dhcp-range=192.168.84.100,192.168.84.200,12h
#enables routing (communication between lan interfaces and wan through br0)
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
#performs Network Address Translation (NAT) between WAN and LAN
post-up iptables -t nat -A POSTROUTING -s ’192.168.84.0/24’ -o wan -j MASQUERADE
#disables routing, NAT and dhcp server if bridge is set down
post-down iptables -t nat -D POSTROUTING -s ’192.168.84.0/24’ -o wan -j MASQUERADE
post-down echo 0 > /proc/sys/net/ipv4/ip_forward post-down pkill dnsmasq
With this, the Topaz switch is used for forwarding (can be verified by listening to the eth0 interface with tcpdump for example. No packet should be visible as not treated by the OS). Other interfaces can be auto configured:
iface eth0 inet manual
up /sbin/ifconfig $IFACE 0.0.0.0 promisc up
down /sbin/ifconfig $IFACE down
Kernel driver for Topaz Switch uses DSA (Distributed Switch Architecture) API which automatically enable hardware forwarding between witch ports when network interfaces of switch ports are put into kernel bridge. It means that if you use standard linux tools for bridges (e.g. brctl, ip or bridge) and put lan0, lan1, etc. into br0 then kernel transparently enables hardware forwarding between lan0 and lan1 ports without using CPU.
So basically you do not need to do anything, hardware switching is enabled transparently.
As @robb_fr wrote, you can verify it via tcpdump on eth0 (this will show only packets which are going to CPU).