Ethernet/Network (Linux)
Introductionβ
This articles provides instructions on how to use utilities for network configuration provided in the Toradex BSP reference images. It contains information on how to use connman and/or systemd-networkd, or how to replace connman with NetworkManager using Yocto.
Yocto BSP Reference Imagesβ
The Toradex BSP reference images currently provide two utilities for network configuration: connman and systemd-networkd. By default, the Ethernet port is managed by connman, and the USB RNDIS interface by systemd-networkd. Depending on the application, it might make sense to use one of those utilities over the other.
By default, connman will try to configure any available network interfaces and tries to keep only (the best) connection connected at any time. The design is targeted toward interactive, wireless devices such as tablets, etc. The systemd-provided utility systemd-networkd, on the other hand, emphasizes headless server systems with static configuration.
TorizonCoreβ
TorizonCore uses NetworkManager. Even though this article has some information about it, it's meant for people using the Yocto BSP reference images, not people using TorizonCore. If you are using TorizonCore, go directly to Networking with TorizonCore.
ConnManβ
Our latest V2.x images use connman as the overall connection management framework. The GUI management tool can be started with connman-properties or by starting the taskbar applet connman-applet.
The command-line interface tool connmanctl can be used in an interactive shell mode or as a single command using arguments.
# connmanctl services
*AO Wired { ethernet_00142d269dfd_cable }
# connmanctl services ethernet_00142d269dfd_cable
[ ethernet_00142d269dfd_cable ]
Type = ethernet
Security = [ ]
State = online
Favorite = True
Immutable = False
AutoConnect = True
Name = Wired
Ethernet = { Method=auto Interface=enp7s0 Address=00:14:2D:26:9D:FD MTU=1500 }
IPv4 = { Method=dhcp Address=192.168.10.162 Netmask=255.255.255.0 Gateway=192.168.10.1 }
IPv4.Configuration = { Method=dhcp }
IPv6 = { }
IPv6.Configuration = { Method=auto Privacy=disabled }
Nameservers = [ 8.8.8.8 ]
Nameservers.Configuration = [ ]
Timeservers = [ 192.168.10.1 ]
Timeservers.Configuration = [ ]
Domains = [ colibri.net ]
Domains.Configuration = [ ]
Proxy = { URL=http://wpad.colibri.net/wpad.dat Method=auto }
Proxy.Configuration = { }
Provider = { }
Using the interactive mode to configure a static Ethernet address:
# connmanctl
connmanctl> config ethernet_00142d259a48_cable --ipv4 manual 192.168.10.2 255.255.255.0 192.168.10.1
connmanctl> exit
Using the interactive mode to configure the nameservers (DNS):
# connmanctl config ethernet_00142d259a48_cable --nameservers 8.8.8.8
Using the interactive mode to get an IP automatically via DHCP:
# connmanctl
connmanctl> config ethernet_00142d259a48_cable --ipv4 dhcp
connmanctl> exit
Tetheringβ
ConnMan can be used for tethering which allows sharing a connection of a device for another locally connected device. The Toradex module running ConnMan would be the device sharing the connection.
Tethering puts some requirements on the kernel. The README in the ConnMan source tree holds more information on these requirements.
USB gadget tetheringβ
Since image V2.4 systemd-networkd
has control over the USB gadget Ethernet interface (RNDIS). Remove the rndis.network
file under /etc/systemd/networkd
and make sure usb/rndis
is not part of NetworkInterfaceBlacklist
in /etc/connman/main.conf
.
To enable tethering on the USB gadget interface make sure the USB gadget driver is loaded/enabled first (see USB Device Mode (Linux)). Then ConnMan can be used to enable tethering mode:
# connmanctl
connmanctl> tether gadget on
connmanctl> [ 194.725436] device usb0 entered promiscuous mode
[ 194.737525] tether: port 1(usb0) entered forwarding state
[ 194.743077] tether: port 1(usb0) entered forwarding state
Enabled tethering for gadget
To preconfigure ConnMan to automatically start Gadget interfaces upon start-up two configuration files are needed:
The main.conf
under /etc/connman/main.conf
[General]
PersistentTetheringMode=true
TetheringTechnologies=gadget
The service settings file under /var/lib/connman/settings
[global]
OfflineMode=false
[Wired]
Enable=true
Tethering=false
[Gadget]
Enable=true
Tethering=true
For other configuration options, the Python interface documentation has some useful configuration examples: https://pythonhosted.org/pyconnman/config.html
Multiple active connectionsβ
By default, ConnMan is configured to only have one connected technology. This means it will connect only to one interface after boot, even if there are multiple available and configured to auto-connect. But sometimes one wants to have two or more interfaces to be auto connected, e.g. ethernet and WiFi. To achieve this, one can change the ConnMan configuration file at /etc/connman/main.conf
, e.g. to enable auto-connect for both ethernet and WiFi, change the following entries accordingly in the configuration file:
PreferredTechnologies=wifi,ethernet
SingleConnectedTechnology=false
Check the man-page of the ConnMan configuration file for more details.
NetworkManagerβ
If you want to use NetworkManager, remove connman and add NetworkManager on a custom OpenEmbedded build. See an example below:
# Remove connman
IMAGE_INSTALL:remove = " connman"
IMAGE_INSTALL:remove = " connman-client"
IMAGE_INSTALL:remove = " connman-gnome"
IMAGE_INSTALL:remove = " connman-plugin-wifi"
IMAGE_INSTALL:remove = " connman-plugin-ethernet"
IMAGE_INSTALL:remove = " connman-plugin-loopback"
# Add NetworkManager
IMAGE_INSTALL:append = " networkmanager"
IMAGE_INSTALL:append = " modemmanager"
Check out the OpenEmbedded (core) article to learn how to build and customize a sample Linux image with OpenEmbedded.
systemd-networkdβ
If you plan to use systemd-networkd
as the primary network configuration utility, you should remove connman first (when using a console-only image, you won't need to remove connman-gnome
). You can use the package manager to remove the package from pre-built images by invoking
# opkg remove connman-gnome connman
To remove connman when building an image using OpenEmbedded remove CONMANPKGS
from IMAGE_INSTALL
in the image recipe recipes/images/angstrom-lxde-image.bb
in the meta-toradex
layer (see OpenEmbedded (core) how to build a complete image).
Manual Configuration for Wired Connectionsβ
If you are using TorizonCore, go directly to Networking with TorizonCore - Static Network Configuration.
Create a file named 'wired.network' under /etc/systemd/network/
# vi /etc/systemd/network/wired.network
For dynamic IP connection fill in the file with the following content:
[Match]
Name=eth0
[Network]
DHCP=ipv4
For static IP connection:
[Match]
Name=eth0
[Network]
Address=192.168.0.1/24
Gateway=192.168.0.254
DNS=8.8.8.8
Bridgeβ
Using systemd-networkd
one can easily setup a network bridge between two Ethernet interfaces:
[Match]
Name=eth*
[Network]
Bridge=br0
[Match]
Name=br0
[Network]
DHCP=ipv4
VLANβ
This example configures a dynamic IP configuration on the ethernet device (untagged) and also creates a new Ethernet interface associated with VLAN 100 (tagged). The example uses a dynamic IP configuration on VLAN 100 too.
[Match]
Name=eth0
[Network]
DHCP=ipv4
VLAN=eth0.100
[NetDev]
Name=eth0.100
Kind=vlan
[VLAN]
Id=100
[Match]
Name=eth0.100
[Network]
DHCP=v4
Integrating Network Files Into an OpenEmbedded/Yocto Imageβ
The integration should be done similarly to the existing rndis.network
file, see bbappend
and files
subdirectory of our systemd configuration:
Place the above file 'wired.network' inside systemd folder at your oe-core layer directory (at ${LAYERDIR}/meta-toradex/recipes-core/systemd
) and edit the bbappend file adding the 'wired.network' file like bellow:
FILESEXTRAPATHS:prepend := "${THISDIR}/systemd:"
SRC_URI += " \
file://wired.network \
file://rndis.network \
file://0001-systemd-udevd.service.in-set-MountFlags-shared.patch \
"
PACKAGECONFIG:append = " networkd"
do_install:append() {
# The network files need to be in /usr/lib/systemd, not ${systemd_unitdir}...
install -d ${D}${prefix}/lib/systemd/network/
install -d ${D}/etc/systemd/network/
install -m 0644 ${WORKDIR}/rndis.network ${D}${prefix}/lib/systemd/network/
install -m 0644 ${WORKDIR}/wired.network ${D}/etc/systemd/network/
}
FILES_${PN} += " \
${nonarch_base_libdir}/systemd/network \
"
Manual Network Configurationβ
For testing and debugging purposes, one can use iproute2
utilities to manually set up a static IP and BusyBox's udhcpc
utility to explicitly request an IP address using DHCP.
This configuration will not be persistent across reboots.
Make sure to disable the networking management daemons to avoid interference:
# systemctl stop connman.service
# systemctl stop systemd-networkd.socket
# systemctl stop systemd-networkd.service
Get a list of interfaces using ip link
:
# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,DYNAMIC> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
link/ether 00:14:2d:59:ca:81 brd ff:ff:ff:ff:ff:ff
3: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default
link/sit 0.0.0.0 brd 0.0.0.0
4: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN mode DEFAULT group default qlen 10
link/can
For the BSP, Ethernet interfaces are named eth<x>
, which <x>
represents the number of the interface, as we can see in the example above.
For TorizonCore the ethernet interfaces are named ethernet<x>
. To read more about the Torizon standard, refer to Networking with TorizonCore
Static Network Configurationβ
Enable the network interface (e.g. eth0
):
# ip link set <interface> up
Assign a static IP address:
# ip addr add <IP_address>/<subnet_mask> broadcast <broadcast_address> dev <interface>
Then add your gateway IP address:
# ip route add default via <default_gateway>
For example:
# ip link set eth0 up
# ip addr add 192.168.10.2/24 broadcast 192.168.10.255 dev eth0
# ip route add default via 192.168.10.1
To undo these configurations (e.g. before switching to a dynamic IP), first remove any assigned IP address:
# ip addr flush dev <interface>
Then remove any assigned gateway:
# ip route flush dev <interface>
And finally disable the interface:
# ip link set <interface> down
Dynamic Network Configurationβ
The utility udhcpc
can be used to get a one time lease for an IP address from the DHCP server serving the local network:
# udhcpc -i eth0
udhcpc (v1.23.2) started
...
Sending discover...
Sending select for 192.168.10.108...
Lease of 192.168.10.108 obtained, lease time 86400
...
Ethernet/Network interfacesβ
Apalis iMX6β
The Apalis iMX6 modules provide a Gigabit Ethernet network connection using an internal Ethernet controller communicating via the RGMII interface.
[ 1.447124] fec 2188000.ethernet eth0: registered PHC device 0
[ 6.725715] fec 2188000.ethernet eth0: Freescale FEC PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=2188000.ethernet:07, irq=70)
[ 6.744126] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 300.899121] fec 2188000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[ 300.907002] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
The IEEE 1588 main clock required to provide accurate timestamps is routed through an external SoC Pad GPIO16 (SPDIF1_IN). This is a hardware limitation, for details refer to the Apalis iMX6 Datasheet Chapter 5.3 Ethernet. The following device tree changes make sure the time stamping clock is properly routed to the IEEE 1588 block:
--- a/arch/arm/boot/dts/imx6qdl-apalis.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-apalis.dtsi
@@ -688,6 +688,7 @@
MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b0b0
MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b0b0
MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b0b0
+ MX6QDL_PAD_GPIO_16__ENET_REF_CLK ((1<<30) | 0x1b0b0)
>;
};
pinctrl_enet_ctrl: enet_ctrlgrp {
@@ -871,7 +872,6 @@
spdif {
pinctrl_spdif: spdifgrp {
fsl,pins = <
- MX6QDL_PAD_GPIO_16__SPDIF_IN 0x1b0b0
MX6QDL_PAD_GPIO_17__SPDIF_OUT 0x1b0b0
>;
};
Apalis iMX8β
The Apalis iMX8 modules provide a Gigabit Ethernet network connection using an internal Ethernet controller communicating via RGMII interface.
# dmesg | grep fec
[ 2.753007] fec 5b040000.ethernet: 5b040000.ethernet supply phy not found, using dummy regulator
[ 2.783775] libphy: fec_enet_mii_bus: probed
[ 2.791087] fec 5b040000.ethernet eth0: registered PHC device 0
[ 13.962747] fec 5b040000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
Disconnect and reconnect the network cable:
[ 42.626377] fec 5b040000.ethernet eth0: Link is Down
[ 42.644164] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 44.674417] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 44.682705] fec 5b040000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
Colibri iMX6, iMX6ULL, iMX7 and iMX8Xβ
The Colibri iMX6, iMX6ULL, iMX7, and iMX8X modules provide an Ethernet network connection through Microchip/Micrel KSZ8041NL Ethernet PHY:
[ 0.669871] fec 30be0000.ethernet: Linked as a consumer to regulator.12
[ 0.681626] libphy: fec_enet_mii_bus: probed
[ 0.682447] fec 30be0000.ethernet eth0: registered PHC device 0
...
[ 5.140230] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 5.152342] Micrel KSZ8041 30be0000.ethernet-1:00: attached PHY driver [Micrel KSZ8041] (mii_bus:phy_addr=30be0000.ethernet-1:00, irq=POLL)
[ 5.152698] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
...
[ 7.273061] fec 30be0000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
Verdinβ
According to the Verdin Family Specification, one Gigabit Ethernet port is Always Compatible. It is a 10/100/1000 Mbit media-dependent interface, with the Ethernet PHY on the module.
Second Ethernetβ
If the SoM is capable, a second Ethernet can be achieved using the reduced gigabit media independent interface (RGMII) on Reserved pins. This is the case for Verdin iMX8M Plus. To use it, you must place an Ethernet PHY on your carrier board. Our open-source Verdin Development Board can be used as a reference design.
Note that the Ethernet PHY provided in this design has the power switching controlled by PWR_CTRL_4 signal, which is connected to the GPIO Expander.
You should assign the pin for Power Switching - ETH_PWR_EN
in the Device Tree. Check how it is done for the Verdin Development Board:
reg_eth2phy: regulator-eth2phy {
compatible = "regulator-fixed";
enable-active-high;
gpio = <&gpio_expander_21 4 GPIO_ACTIVE_HIGH>; /* ETH_PWR_EN */
off-on-delay = <500000>;
regulator-max-microvolt = <3300000>;
regulator-min-microvolt = <3300000>;
regulator-name = "+V3.3_ETH";
startup-delay-us = <200000>;
vin-supply = <®_3p3v>;
};
Learn more about the pin-compatibility concepts of Always Compatible, Reserved and Module-specific in the Verdin Family Specification.
Verdin iMX8M Miniβ
Since the i.MX 8M Mini SoC features only a single Ethernet MAC, only the Always Compatible Verdin Ethernet is available on a module. The standard SKU versions of the Verdin iMX8M Mini feature an on-module Microchip KSZ9131 Gigabit Ethernet PHY and therefore provide the media-dependent interface.
Modules with RGMII output are available as build-to-order assembly variants.
# dmesg | grep fec
[ 3.621159] libphy: fec_enet_mii_bus: probed
[ 3.626634] fec 30be0000.ethernet eth0: registered PHC device 0
[ 11.267886] fec 30be0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
Disconnect and reconnect the network cable:
[ 220.094536] fec 30be0000.ethernet eth0: Link is Down
[ 220.113357] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 225.941052] fec 30be0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[ 225.948853] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Early samples of the Verdin iMX8M Mini modules such as V1.0A and V1.0B are using the KSZ9031 PHY which works on BSP 3.0, however, adding the correct skew settings are recommended. Refer to Example of Device Tree customization to add support for KSZ9131 for correct settings.
Verdin iMX8M Plusβ
The two Ethernet MAC that the i.MX 8M Plus SoC provides are slightly different from the i.MX 8M Mini. Both Ethernet controllers support Energy Efficient Ethernet (EEE), Ethernet AVB, and IEEE 1588. Only one Ethernet controller features additional Time-Sensitive Networking (TSN). This controller is used for the Always Compatible on-module Gigabit Ethernet PHY, the Microchip KSZ9131.
# dmesg | grep imx-dwmac
[ 1.302554] imx-dwmac 30bf0000.ethernet: IRQ eth_lpi not found
[ 1.308468] imx-dwmac 30bf0000.ethernet: no reset control found
[ 3.284332] imx-dwmac 30bf0000.ethernet: IRQ eth_lpi not found
[ 3.290382] imx-dwmac 30bf0000.ethernet: no reset control found
[ 3.308229] imx-dwmac 30bf0000.ethernet: User ID: 0x10, Synopsys ID: 0x51
[ 3.315157] imx-dwmac 30bf0000.ethernet: DWMAC4/5
[ 3.320046] imx-dwmac 30bf0000.ethernet: DMA HW capability register supported
[ 3.327315] imx-dwmac 30bf0000.ethernet: RX Checksum Offload Engine supported
[ 3.334582] imx-dwmac 30bf0000.ethernet: TX Checksum insertion supported
[ 3.341410] imx-dwmac 30bf0000.ethernet: Wake-Up On Lan supported
[ 3.347650] imx-dwmac 30bf0000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[ 3.355452] imx-dwmac 30bf0000.ethernet: Enabled Flow TC (entries=8)
[ 3.361930] imx-dwmac 30bf0000.ethernet: Enabling HW TC (entries=256, max_off=256)
[ 5.947505] imx-dwmac 30bf0000.ethernet eth0: PHY [stmmac-1:07] driver [Microchip KSZ9131 Gigabit PHY]
[ 5.986512] imx-dwmac 30bf0000.ethernet eth0: No Safety Features support found
[ 5.986532] imx-dwmac 30bf0000.ethernet eth0: IEEE 1588-2008 Advanced Timestamp supported
[ 5.990368] imx-dwmac 30bf0000.ethernet eth0: registered PTP clock
[ 6.040561] imx-dwmac 30bf0000.ethernet eth0: configuring for phy/rgmii-id link mode
Connect, disconnect and reconnect the network cable:
[ 2335.143057] imx-dwmac 30bf0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[ 2335.151363] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 2348.452145] imx-dwmac 30bf0000.ethernet eth0: Link is Down
[ 2366.886638] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 2366.893330] imx-dwmac 30bf0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
The second Ethernet controller (without TSN) is available as an RGMII interface on Reserved pins of the module edge connector pins.
# dmesg | grep fec
[ 1.224395] libphy: fec_enet_mii_bus: probed
[ 1.229590] fec 30be0000.ethernet eth1: registered PHC device 0
[ 5.428439] fec 30be0000.ethernet eth1: Link is Up - 100Mbps/Full - flow control rx/tx
Connect, disconnect and reconnect the network cable:
[ 2191.837002] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[ 2191.843574] fec 30be0000.ethernet eth1: Link is Up - 1Gbps/Full - flow control rx/tx
[ 2198.461504] fec 30be0000.ethernet eth1: Link is Down
[ 2205.465840] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[ 2205.469285] fec 30be0000.ethernet eth1: Link is Up - 1Gbps/Full - flow control rx/tx
The Gigabit Ethernet MAC in the i.MX8M Plus SoC integrates an accurate IEEE 1588 compliant timer for clock synchronization for distributed control nodes used in industrial automation applications. The interface features external IEEE 1588 synchronization pins on alternate functions. The Ethernet interface supports Audio Video Bridging (AVB) and Time-Sensitive Networking (TSN).
Ethernet Benchmark (iperf3)β
The Colibri SoMs provide a sustained data rate of around 95 Mbits/sec for a 100Base-T connection while the Apalis and Verdin SoMs provide a sustained data rate of around 700-900 Mbits/sec for a 1000Base-T connection. The CPU utilization usually stays well below 25 % on one single core.
The i.MX6 bandwidth is limited to around 400 Mbits/sec, see NXP's Errata ERR004512.
The CPU's DVFS in combination with TCP's flow control may negatively impact throughput.
Ethernet Benchmark, SoM as Clientβ
Start server on Host:
$ iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 192.168.10.215, port 52568
[ 5] local 192.168.10.1 port 5201 connected to 192.168.10.215 port 52570
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 102 MBytes 852 Mbits/sec
[ 5] 1.00-2.00 sec 112 MBytes 939 Mbits/sec
[ 5] 2.00-3.00 sec 112 MBytes 941 Mbits/sec
[ 5] 3.00-4.00 sec 112 MBytes 940 Mbits/sec
[ 5] 4.00-5.00 sec 112 MBytes 941 Mbits/sec
[ 5] 5.00-6.00 sec 112 MBytes 941 Mbits/sec
[ 5] 6.00-7.00 sec 112 MBytes 940 Mbits/sec
[ 5] 7.00-8.00 sec 112 MBytes 941 Mbits/sec
[ 5] 8.00-9.00 sec 112 MBytes 940 Mbits/sec
[ 5] 9.00-10.00 sec 112 MBytes 942 Mbits/sec
[ 5] 10.00-10.04 sec 4.51 MBytes 935 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate
[ 5] 0.00-10.04 sec 1.09 GBytes 932 Mbits/sec receiver
-
Start client on SoM:
# iperf3 -c 192.168.10.1
Connecting to host 192.168.10.1, port 5201
[ 5] local 192.168.10.215 port 52570 connected to 192.168.10.1 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 108 MBytes 905 Mbits/sec 0 508 KBytes
[ 5] 1.00-2.00 sec 113 MBytes 947 Mbits/sec 0 508 KBytes
[ 5] 2.00-3.00 sec 112 MBytes 937 Mbits/sec 0 508 KBytes
[ 5] 3.00-4.00 sec 113 MBytes 944 Mbits/sec 0 508 KBytes
[ 5] 4.00-5.00 sec 112 MBytes 939 Mbits/sec 0 508 KBytes
[ 5] 5.00-6.00 sec 112 MBytes 937 Mbits/sec 0 508 KBytes
[ 5] 6.00-7.00 sec 112 MBytes 939 Mbits/sec 0 508 KBytes
[ 5] 7.00-8.00 sec 113 MBytes 944 Mbits/sec 0 508 KBytes
[ 5] 8.00-9.00 sec 112 MBytes 938 Mbits/sec 0 508 KBytes
[ 5] 9.00-10.00 sec 112 MBytes 939 Mbits/sec 0 508 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 1.09 GBytes 937 Mbits/sec 0 sender
[ 5] 0.00-10.04 sec 1.09 GBytes 932 Mbits/sec receiver
iperf Done.
CPU Utilisation during the test, start top
over an SSH connection and observe during bandwidth test:
# top
...
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4341 root 20 0 6484 3640 3192 R 6.0 0.2 0:00.40 iperf3
Ethernet Benchmark, SoM as Serverβ
Start server on SoM:
# iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 192.168.10.1, port 36318
[ 5] local 192.168.10.215 port 5201 connected to 192.168.10.1 port 36320
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 82.0 MBytes 688 Mbits/sec
[ 5] 1.00-2.00 sec 83.9 MBytes 704 Mbits/sec
[ 5] 2.00-3.00 sec 82.6 MBytes 693 Mbits/sec
[ 5] 3.00-4.00 sec 81.4 MBytes 683 Mbits/sec
[ 5] 4.00-5.00 sec 80.4 MBytes 674 Mbits/sec
[ 5] 5.00-6.00 sec 82.9 MBytes 696 Mbits/sec
[ 5] 6.00-7.00 sec 80.8 MBytes 678 Mbits/sec
[ 5] 7.00-8.00 sec 81.5 MBytes 684 Mbits/sec
[ 5] 8.00-9.00 sec 83.0 MBytes 696 Mbits/sec
[ 5] 9.00-10.00 sec 82.5 MBytes 692 Mbits/sec
[ 5] 10.00-10.00 sec 249 KBytes 536 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate
[ 5] 0.00-10.00 sec 821 MBytes 689 Mbits/sec receiver
Start client on host:
$ iperf3 -c 192.168.10.215
Connecting to host 192.168.10.215, port 5201
[ 5] local 192.168.10.1 port 36320 connected to 192.168.10.215 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 83.8 MBytes 703 Mbits/sec 0 379 KBytes
[ 5] 1.00-2.00 sec 84.0 MBytes 705 Mbits/sec 0 455 KBytes
[ 5] 2.00-3.00 sec 83.0 MBytes 696 Mbits/sec 0 455 KBytes
[ 5] 3.00-4.00 sec 81.5 MBytes 684 Mbits/sec 0 455 KBytes
[ 5] 4.00-5.00 sec 80.3 MBytes 674 Mbits/sec 0 455 KBytes
[ 5] 5.00-6.00 sec 82.5 MBytes 692 Mbits/sec 0 455 KBytes
[ 5] 6.00-7.00 sec 81.1 MBytes 680 Mbits/sec 0 455 KBytes
[ 5] 7.00-8.00 sec 81.8 MBytes 687 Mbits/sec 0 455 KBytes
[ 5] 8.00-9.00 sec 82.5 MBytes 692 Mbits/sec 0 455 KBytes
[ 5] 9.00-10.00 sec 83.0 MBytes 696 Mbits/sec 0 455 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 824 MBytes 691 Mbits/sec 0 sender
[ 5] 0.00-10.00 sec 821 MBytes 689 Mbits/sec receiver
CPU Utilisation during the test, start top
over an SSH connection and observe during bandwidth test:
# top
...
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4036 root 20 0 6484 3616 3160 S 10.3 0.2 0:00.45 iperf3
Raw Network Stack Bandwidthβ
Start server on SoM:
# iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from ::1, port 53888
[ 5] local ::1 port 5201 connected to ::1 port 53890
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 790 MBytes 6.63 Gbits/sec
[ 5] 1.00-2.00 sec 816 MBytes 6.84 Gbits/sec
[ 5] 2.00-3.00 sec 815 MBytes 6.84 Gbits/sec
[ 5] 3.00-4.00 sec 818 MBytes 6.87 Gbits/sec
[ 5] 4.00-5.00 sec 819 MBytes 6.87 Gbits/sec
[ 5] 5.00-6.00 sec 825 MBytes 6.92 Gbits/sec
[ 5] 6.00-7.00 sec 822 MBytes 6.89 Gbits/sec
[ 5] 7.00-8.00 sec 822 MBytes 6.90 Gbits/sec
[ 5] 8.00-9.00 sec 819 MBytes 6.87 Gbits/sec
[ 5] 9.00-10.00 sec 815 MBytes 6.83 Gbits/sec
[ 5] 10.00-10.04 sec 31.4 MBytes 6.87 Gbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate
[ 5] 0.00-10.04 sec 8.00 GBytes 6.85 Gbits/sec receiver
Start client on SoM, e.g. over ssh:
# iperf3 -c localhost
Connecting to host localhost, port 5201
[ 5] local ::1 port 53890 connected to ::1 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 830 MBytes 6.96 Gbits/sec 0 2.06 MBytes
[ 5] 1.00-2.00 sec 816 MBytes 6.84 Gbits/sec 0 2.06 MBytes
[ 5] 2.00-3.00 sec 815 MBytes 6.84 Gbits/sec 0 2.06 MBytes
[ 5] 3.00-4.00 sec 819 MBytes 6.87 Gbits/sec 0 2.06 MBytes
[ 5] 4.00-5.00 sec 819 MBytes 6.87 Gbits/sec 0 2.06 MBytes
[ 5] 5.00-6.00 sec 825 MBytes 6.92 Gbits/sec 0 2.06 MBytes
[ 5] 6.00-7.00 sec 822 MBytes 6.90 Gbits/sec 0 2.06 MBytes
[ 5] 7.00-8.00 sec 821 MBytes 6.89 Gbits/sec 0 2.06 MBytes
[ 5] 8.00-9.00 sec 819 MBytes 6.87 Gbits/sec 0 2.06 MBytes
[ 5] 9.00-10.00 sec 815 MBytes 6.84 Gbits/sec 0 2.06 MBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 8.01 GBytes 6.88 Gbits/sec 0 sender
[ 5] 0.00-10.04 sec 8.00 GBytes 6.85 Gbits/sec receiver
iperf Done.