TS-4712 Ethernet: Difference between revisions

From embeddedTS Manuals
No edit summary
No edit summary
Line 5: Line 5:
|}
|}


The default configuration will have the ports act as 2 individual ports on baseboards where this is supported.  When in this mode all network traffic should be directed to eth0.1 and eth0.2, but not eth0 which will not be forwarded outside of the switch.  On baseboards where the second port supports the VLAN ethernet, you can set soft jumper #2 to switch from vlan mode to switch mode.
The default configuration will have the ports act as 2 individual ports on baseboards where this is supported.  When in this mode all network traffic should be directed to eth0.1 and eth0.2, but not eth0 which will not be forwarded outside of the switch.  When using the network with the VLAN mode you should not attempt to configure eth0, but instead only use eth0.1 or eth0.2.  On baseboards where the second port supports the VLAN ethernet, you can set soft jumper #2 to switch from vlan mode to switch mode.
<source lang=bash>
<source lang=bash>
tshwctl --setjp 2
tshwctl --setjp 2
Line 27: Line 27:
   switchportb_speed=100FD
   switchportb_speed=100FD


Since the default is to configure for pass-through mode, when using the TS-4712 on a custom baseboard the Ethernet VLAN configuration will need to be enabled. For example, to manually set the network up for VLAN:
By default the VLAN configuration mode is only enabled when a recognized baseboard is connected.  To use this on a custom baseboard you would need to create a custom init script in /ts/init on the Debian root.
 
First, disable ifplugd from starting by setting jp5:
<source lang=bash>
tshwctl --setjp 5
</source>
 
Once ifplugd is disabled you can have it configure the network by creating a /ts/init script:
<source lang=bash>
<source lang=bash>
#!/bin/sh
#!/bin/sh
Line 38: Line 45:
</source>
</source>


This can be added to /ts/init to be run automatically before booting Debian/OpenEmbedded.
Once created, set permissions to execute:
<source lang=bash>
chmod a+x /ts/init
</source>

Revision as of 11:20, 7 August 2013

The Marvell Processor implements a 10/100 ethernet controller with support built into the Linux kernel. The TS-4712 includes an integrated Marvell Ethernet switch that allows multiple interfaces from one 10/100 port. This allows a total bandwidth of 100MB/s between both ports.

EthSwitch.png

The default configuration will have the ports act as 2 individual ports on baseboards where this is supported. When in this mode all network traffic should be directed to eth0.1 and eth0.2, but not eth0 which will not be forwarded outside of the switch. When using the network with the VLAN mode you should not attempt to configure eth0, but instead only use eth0.1 or eth0.2. On baseboards where the second port supports the VLAN ethernet, you can set soft jumper #2 to switch from vlan mode to switch mode.

tshwctl --setjp 2

On the next boot the eth0.1 and eth0.2 ports will not be present. In this case the switch is configured to transparently pass through packets rather than configuring the VLANs, so eth0 should be used.

Note: Some baseboards create 2 Ethernet ports using a USB Ethernet controller which will only transparently pass packets through the switch. This includes the TS-8100, TS-8390, and TS-8900.

You can use standard Linux utilities such as ifconfig/ip to control eth0 and the vlan interfaces. See the #Configuring the Network section for more details. For the specifics of this interface see the CPU manual.

The switch ports can also use tshwctl to detect link and the negotiated link speed:

 root@ts4712-f7c0ff:~# tshwctl --ethinfo
 baseboard_model=0xa
 baseboard=8900
 baseboard_rev=A
 switch_model=88E6020
 switch_ports=a b 
 switchporta_link=0
 switchporta_speed=10HD
 switchportb_link=1
 switchportb_speed=100FD

By default the VLAN configuration mode is only enabled when a recognized baseboard is connected. To use this on a custom baseboard you would need to create a custom init script in /ts/init on the Debian root.

First, disable ifplugd from starting by setting jp5:

tshwctl --setjp 5

Once ifplugd is disabled you can have it configure the network by creating a /ts/init script:

#!/bin/sh
vconfig add eth0 1
vconfig add eth0 2
tshwctl --ethvlan
ifconfig eth0 up
ifconfig eth0.1 up
ifconfig eth0.2 up

Once created, set permissions to execute:

chmod a+x /ts/init