EPAIR(4)

πŸ’– EPAIR(4) πŸ’–

okay bestie, welcome to the epair page β€” straight outta the Kernel Interfaces Manual, and yes she's iconic πŸ’…


✨ NAME ✨

epair β€” a pair of virtual back-to-back connected Ethernet interfaces πŸ¦‹


🌸 SYNOPSIS 🌸

so like, if you wanna bake this driver right into your kernel, drop this line into your kernel configuration file:

device epair

or, if you'd rather load it as a module at boot time (honestly? valid), put this in loader.conf(5):

if_epair_load="YES"

πŸŽ€ DESCRIPTION πŸŽ€

okay so epair is a pair of Ethernet-like software interfaces that are connected back-to-back with a virtual cross-over cable. two ends, one cable, they're literally holding hands 🫢

every epair interface pair gets created at runtime using interface cloning. the easiest way is with the ifconfig(8) create command, or by using the cloned_interfaces variable in rc.conf(5). and here's the little detail that gets people β€” when you clone, you only give it either epair or epair<n>, and the pair itself will be named like epair<n>[ab]. so the first ones are literally epair0a and epair0b. twin names, twin energy πŸ‘‘

like any other Ethernet interface, an epair needs a network address. each epair gets assigned a locally administered address by default, and that one is only guaranteed to be unique within one network stack. so don't go assuming it's globally special, she's local only πŸ’€ if you wanna change the default addresses, use the SIOCSIFADDR ioctl(2) or the ifconfig(8) utility.

the whole basic intent here is providing connectivity between two virtual network stack instances. and when you connect it to an if_bridge(4), one end of the interface pair can also be part of another (virtual) LAN. and yeah, just like any other Ethernet interface, epair can have a vlan(4) configured on top of it. layers on layers, obsessed ✨


🌈 SEE ALSO 🌈


πŸ‘‘ HISTORY πŸ‘‘

the epair interface first appeared in FreeBSD 8.0. a legend from day one, fr fr ⭐


πŸ’œ AUTHORS πŸ’œ

the epair interface was written by Bjoern A. Zeeb, CK Software GmbH, under sponsorship from the FreeBSD Foundation. we stan πŸŽ€


and that's the whole page bestie, go forth and clone some interfaces πŸ’–

mwah πŸ’‹ β€” this one's from the Debian crew, dated March 18, 2015, EPAIR(4), and that's a wrap πŸ¦‹

πŸ“¦ where this page comes from