TS-8700 4 Ethernets

From embeddedTS Manuals

The CPU includes a single 10/100 port, but this baseboard includes a Marvell switch chip capable of aggregating the 1 port to 4 separate Ethernet ports. The total bandwidth of all ports is limited to 100MB full duplex, but is shared to the port that requires the bandwidth or evenly when multiple ports require bandwidth. The default behavior of the switch is to tag each incoming packet on each port with a VLAN ID of 1-4 corresponding with the incoming port which allows Linux to separate these into separate vlan interfaces.

TS-8700-ethvlan.png

In this case each port can be accessed in linux using the ethernet interface with "<interface>.<vlan id>". For example:

eth0      Link encap:Ethernet  HWaddr 00:D0:69:47:9C:7E  
          UP BROADCAST RUNNING MULTICAST  MTU:1508  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:22 

eth0.1    Link encap:Ethernet  HWaddr 00:D0:69:47:9C:7E  
          UP BROADCAST RUNNING MULTICAST  MTU:1504  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:1 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth0.2    Link encap:Ethernet  HWaddr 00:D0:69:47:9C:7E  
          UP BROADCAST RUNNING MULTICAST  MTU:1504  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:1 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth0.3    Link encap:Ethernet  HWaddr 00:D0:69:47:9C:7E  
          UP BROADCAST RUNNING MULTICAST  MTU:1504  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:1 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth0.4    Link encap:Ethernet  HWaddr 00:D0:69:47:9C:7E  
          UP BROADCAST RUNNING MULTICAST  MTU:1504  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:1 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

The eth0 interface still exists, but the switch will not route any packets to or from this interface so it should not be used directly in this case. Every other interface is entirely separate from each other can be treated as any other network interface.

Another switch configuration is the wlan mode. This configures one port two it's own VLAN, but connects the remaining 3 ports to a shared vlan. This is enabled with an option in /ts/config in the Debian root filesystem. Open the /ts/config file with an editor like vim/nano/emacs and change:

CFG_4ETH="1"
TS-8700-ethwlan.png

This wlan mode is similar to the other VLAN mode in that it still has eth0 which should not be used, but eth0.1 including only the first Ethernet port, and an eth0.2 which includes the remaining ports. The eth0.3 and eth0.4 interfaces do not exist in this mode.

The last configuration is the "switch" mode. This method uses only the eth0 interface and configure all remaining ports to pass through. No packets are VLAN tagged in this mode. This is enabled with an option in /ts/config in the Debian root filesystem. Open the /ts/config file with an editor like vim/nano/emacs and change:

CFG_4ETH="2"
TS-8700-ethswitch.png

All of the above modes can be configured using Debian's standard /etc/network/interfaces. See #Configuring_the_Network for more details.

Since the switch is always connected, Linux cannot detect when eth0 has an external link. You can use tshwctl to view the link status and network speed for each port:

# tshwctl --ethbb --ethinfo
switch_model=88E6070
switch_ports="a b c d"
switchporta_link=1
switchporta_speed=100FD
switchportb_link=0
switchportb_speed=10HD
switchportc_link=0
switchportc_speed=10HD
switchportd_link=0
switchportd_speed=10HD