Ethernet over EtherCAT (EoE)

The EtherCAT Master supports the EoE protocol, which allows tunneling Ethernet frames over EtherCAT. EtherCAT devices which are configured to use EoE can communicate with each other and (if enabled) also with the host. Some engineering tools use EoE to communicate with the EtherCAT devices.

Architecture

The EtherCAT Master contains a virtual switch that connects the devices which support EoE. An optional TAP device can also be attached to the same virtual switch.

EoE architecture

The TAP acts like a normal Ethernet interface on the host. If an IP is assigned to it, the host can communicate with the EoE devices and vice versa.

The TAP device can either be created by the EtherCAT Master itself or it can be pre-created and configured before starting the EtherCAT Master.

For configuration details, see EoE TAP Enabled.

Accessing EoE device from a physical Ethernet interface

It is possible to bridge the tap interface with another physical Ethernet interface to integrate the EoE devices into an existing network.

How this can be done depends on how networking is configured on the host. In general you can either start the EtherCAT Master first and bridge the tap manually or you can use your distributions network configuration interface to create the TAP and bridge it with the physical interface on startup.

See Debian Wiki for more details about bridging network interfaces on Debian.

If /etc/network/interfaces is used, you can use the following example:

auto br0
iface br0 inet static
    address 10.0.0.1/24
    bridge_ports eth0
    bridge_stp off
    bridge_fd 0
    bridge_maxwait 0

    # create TAP only if missing
    pre-up ip link show eoe0 >/dev/null 2>&1 || ip tuntap add dev eoe0 mode tap user root
    pre-up ip link set dev eoe0 up || true

    # attach after br0 exists
    up ip link set dev eoe0 master br0 || true

This setup creates a bridge br0 that connects the physical interface eth0 with the TAP device eoe0. An IP address is assigned to br0, which allows the host to communicate with EoE devices through the bridge. As a result, the host is also reachable at that same IP address.

Because the TAP device is managed by the networking service, the EtherCAT Master should be configured not to assign an IP address to the TAP device.