---
name: "pair"
section: "4"
platform: "openbsd"
package: "man"
version: "8.0-current-20261101"
release: "OpenBSD 8.0-current (2026-11-01)"
platforms: ["openbsd"]
url: "https://new.carta.tech/pair"
---

# pair(4)

virtual Ethernet interface pair

## NAME

**pair** – virtual Ethernet interface pair

## SYNOPSIS

**pseudo-device pair**

## DESCRIPTION

The **pair** interface simulates a normal Ethernet interface by encapsulating standard network frames with an Ethernet header, specifically for use in a pair of interfaces that are interconnected with each other.

To use it, the administrator needs to create two **pair** interfaces and connect them; the interfaces are ‘patched’, as would be done with physical network ports. All packets that are sent on the first interface are received on the second interface.

## EXAMPLES

Set up a pair of interfaces where each of them is a member of a different [rdomain(4)](/rdomain/4.md):

```
# ifconfig pair1 rdomain 1 10.1.1.1/24 up
# ifconfig pair2 rdomain 2 10.1.1.2/24 up
# ifconfig pair1 patch pair2
# route -T 1 exec ping 10.1.1.2
```

When adding multiple **pair** to multiple [bridge(4)](/bridge/4.md) interfaces, it is possible to create a loop; the system load will go up while it is busy sending packets from one bridge to another and back. By design, the driver does not prevent such loops by itself, but it is possible to use the Spanning Tree Protocol (STP) to detect and remove loops in the virtual network topology:

```
# ifconfig pair0 up
# ifconfig pair1 rdomain 1 patch pair0 up
# ifconfig pair2 up
# ifconfig pair3 rdomain 1 patch pair2 up
# ifconfig bridge0 add pair0 add pair2 stp pair0 stp pair2 up
# ifconfig bridge1 add pair1 add pair3 stp pair1 stp pair3 up
```

## SEE ALSO

[bridge(4)](/bridge/4.md), [inet(4)](/inet/4.md), [inet6(4)](/inet6/4.md), [rdomain(4)](/rdomain/4.md), [vether(4)](/vether/4.md), [hostname.if(5)](/hostname.if/5.md), [ifconfig(8)](/ifconfig/8.md), [netstart(8)](/netstart/8.md)

## HISTORY

The **pair** interface first appeared in OpenBSD 5.9.

## AUTHORS

The **pair** driver is based on [vether(4)](/vether/4.md) by Theo de Raadt ⟨*deraadt@openbsd.org*⟩. It has been extended and turned into **pair** by Reyk Floeter ⟨*reyk@openbsd.org*⟩.

## CAVEATS

Unlike [vether(4)](/vether/4.md), the **pair** interface cannot be used as a stand-alone member in a [bridge(4)](/bridge/4.md): the link state remains down until it is connected to the second interface. Any associated routes will be marked down until it is patched. Use [vether(4)](/vether/4.md) as a bridge endpoint for routing purposes instead.

## BUGS

Like [tun(4)](/tun/4.md), the Ethernet address chosen will be partially random, and may occasionally collide with another address.
