PAIR(4)
Hey bestie π β this is PAIR(4), the pair virtual Ethernet interface pair page from the Kernel Interfaces Manual. Buckle up, it's giving network magic. β¨
π¦ NAME π¦
pair β virtual Ethernet interface pair π
β¨ SYNOPSIS β¨
pseudo-device pair
πΈ DESCRIPTION πΈ
Okay so 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. Literally matching set energy. π«Ά
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. No cap, that's the whole vibe. π
π EXAMPLES π
Set up a pair of interfaces where each of them is a member of a different rdomain(4):
# 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) 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 π
π HISTORY π
The pair interface first appeared in OpenBSD 5.9. Periodt. π
π«Ά AUTHORS π«Ά
The pair driver is based on vether(4) by Theo de Raadt <deraadt@openbsd.org>. It has been extended and turned into pair by Reyk Floeter <reyk@openbsd.org>. Icons only. π
β οΈ CAVEATS β οΈ
Unlike vether(4), the pair interface cannot be used as a stand-alone member in a bridge(4): 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) as a bridge endpoint for routing purposes instead. This is important, bestie β don't skip it. π¨
π BUGS π
Like tun(4), the Ethernet address chosen will be partially random, and may occasionally collide with another address. So yeah, address collision drama is possible. π
mwah π β this page is from the Debian source/version, dated October 30, 2015, and it's the PAIR(4) page. Byeee! π«Ά
π¦ where this page comes from
- nixpkgs unstable: cvs-export
- Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org>
- Copyright (c) 2009 Theo de Raadt <deraadt@openbsd.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms