xref: /freebsd/share/man/man4/epair.4 (revision f7c32ed617858bcd22f8d1b03199099d50125721)
1.\"-
2.\" Copyright (c) 2008 The FreeBSD Foundation
3.\"
4.\" This software was developed by CK Software GmbH under sponsorship
5.\" from the FreeBSD Foundation.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code must retain the above copyright
11.\" notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\" notice, this list of conditions and the following disclaimer in the
14.\" documentation and/or other materials provided with the distribution.
15.\"
16.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.\" $FreeBSD$
29.\"
30.Dd March 18, 2015
31.Dt EPAIR 4
32.Os
33.Sh NAME
34.Nm epair
35.Nd A pair of virtual back-to-back connected Ethernet interfaces
36.Sh SYNOPSIS
37To compile this driver into the kernel,
38place the following line in your
39kernel configuration file:
40.Bd -ragged -offset indent
41.Cd "device epair"
42.Ed
43.Pp
44Alternatively, to load the driver as a
45module at boot time, place the following line in
46.Xr loader.conf 5 :
47.Bd -literal -offset indent
48if_epair_load="YES"
49.Ed
50.Sh DESCRIPTION
51The
52.Nm
53is a pair of Ethernet-like software interfaces,
54which are connected back-to-back with a virtual cross-over cable.
55.Pp
56Each
57.Nm
58interface pair is created at runtime using interface cloning.
59This is most easily done with the
60.Xr ifconfig 8
61.Cm create
62command or using the
63.Va cloned_interfaces
64variable in
65.Xr rc.conf 5 .
66While for cloning you only give either
67.Pa epair
68or
69.Pa epair<n>
70the
71.Nm
72pair will be named like
73.Pa epair<n>[ab] .
74This means the names of the first
75.Nm
76interfaces will be
77.Pa epair0a
78and
79.Pa epair0b .
80.Pp
81Like any other Ethernet interface, an
82.Nm
83needs to have a network address.
84Each
85.Nm
86will be assigned a locally administered address by default,
87that is only guaranteed to be unique within one network stack.
88To change the default addresses one may use the SIOCSIFADDR ioctl(2) or
89ifconfig(8) utility.
90.Pp
91The basic intent is to provide connectivity between two virtual
92network stack instances.
93When connected to an
94.Xr if_bridge 4 ,
95one end of the interface pair can also be part of another (virtual) LAN.
96As with any other Ethernet interface,
97.Nm epair
98can have a
99.Xr vlan 4
100configured on top of it.
101.Sh SEE ALSO
102.Xr ioctl 2 ,
103.Xr altq 4 ,
104.Xr bpf 4 ,
105.Xr if_bridge 4 ,
106.Xr vlan 4 ,
107.Xr loader.conf 5 ,
108.Xr rc.conf 5 ,
109.Xr ifconfig 8
110.Sh HISTORY
111The
112.Nm
113interface first appeared in
114.Fx 8.0 .
115.Sh AUTHORS
116The
117.Nm
118interface was written by
119.An Bjoern A. Zeeb, CK Software GmbH,
120under sponsorship from the FreeBSD Foundation.
121