OpenBSD manual page server

Manual Page Search Parameters

TPMR(4) Device Drivers Manual TPMR(4)

tpmrIEEE 802.1Q Two-Port MAC Relay interface

pseudo-device tpmr

The tpmr driver implements an 802.1Q (originally 802.1aj) Two-Port MAC Relay (TPMR). A TPMR is a simplified Ethernet bridge that provides a subset of the functionality as found in bridge(4). A TPMR has exactly two ports, and unconditionally relays Ethernet packets between the two ports.

tpmr interfaces can be created at runtime using the ifconfig tpmrN create command or by setting up a hostname.if(5) configuration file for netstart(8). The interface itself can be configured with ifconfig(8); see its manual page for more information.

tpmr interfaces may be configured with ifconfig(8) and netstart(8) using the following options:

child-iface
Add child-iface as a port.
child-iface
Remove the port child-iface.
Disable the filtering of Ethernet frames destined for the TPMR component reserved addresses, as specified by IEEE 802.1Q.
Enable the filtering of Ethernet frames destined for the TPMR component reserved addresses, as specified by IEEE 802.1Q. This is the default.
Disable the filtering of IPv4 and IPv6 packets with pf(4).
Enable the filtering of IPv4 and IPv6 packets with pf(4). Packets will appear to enter or leave the member port interfaces. This is the default.

Other forms of Ethernet bridging are available using the bridge(4) driver. Other forms of aggregation of Ethernet interfaces are available using the aggr(4) and trunk(4) drivers.

tpmr can be used to cross-connect Ethernet devices that support different physical media. For example, a device that supports a 100baseTX half-duplex connection can be connected to a switch with 1000baseSX optical ports by using tpmr with a pair of physical network interfaces, each of which supports the required media types. If fxp(4) is used to connect to the 100baseTX device, and em(4) is used to connect to the 1000baseSX switch, the following configuration can be used:

# ifconfig tpmr0 create
# ifconfig tpmr0 trunkport fxp0 trunkport em0
# ifconfig fxp0 up
# ifconfig em0 up
# ifconfig tpmr0 up

Multiple TPMRs can be chained to transport Ethernet traffic for a pair of devices over another network. Given two physically separate Ethernet switches, TPMRs can be used as follows to provide a point-to-point Ethernet link between them. tpmr with the link0 flag set allows the use of the Link Aggregation Control Protocol (LACP) or Spanning Tree Protocol (STP) by the switches to detect communication failures or connectivity loops respectively, which is not possible using bridge(4) as it filters those protocols.

If Host A connected to Router B has the external IP address 192.0.2.10 on em0, Host D connected to Router C has the external IP address 198.51.100.14 on em0, and both hosts have em1 connected to the switches, the following configuration can be used to connect the switches together. etherip(4) is used to transport the Ethernet packets over the IP network.

Switch X ---- Host A ---------- tunnel ----------- Host D ---- Switch E
               \                                    /
                \                                  /
                 +---- Router B ---- Router C ----+

Create the tpmr and etherip(4) interfaces:

# ifconfig etherip0 create
# ifconfig tpmr0 create link0

Configure the etherip interface:

(on Host A) # ifconfig etherip0 tunnel 192.0.2.10 198.51.100.14 up
(on Host D) # ifconfig etherip0 tunnel 198.51.100.14 192.0.2.10 up

Add the etherip interface and physical interface to the TPMR:

# ifconfig tpmr0 trunkport em1 trunkport etherip0 up

An equivalent setup using MPLS pseudowires instead of IP as the transport can be built using mpw(4) interfaces.

aggr(4), bridge(4), pf(4), trunk(4), hostname.if(5), ifconfig(8), netstart(8)

The tpmr driver first appeared in OpenBSD 6.6.

August 20, 2019 OpenBSD-current