xref: /freebsd/share/man/man4/epair.4 (revision e716630d4cf89e69ec3f675ebfceee09f1a85e05)
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.Dd March 18, 2015
29.Dt EPAIR 4
30.Os
31.Sh NAME
32.Nm epair
33.Nd A pair of virtual back-to-back connected Ethernet interfaces
34.Sh SYNOPSIS
35To compile this driver into the kernel,
36place the following line in your
37kernel configuration file:
38.Bd -ragged -offset indent
39.Cd "device epair"
40.Ed
41.Pp
42Alternatively, to load the driver as a
43module at boot time, place the following line in
44.Xr loader.conf 5 :
45.Bd -literal -offset indent
46if_epair_load="YES"
47.Ed
48.Sh DESCRIPTION
49The
50.Nm
51is a pair of Ethernet-like software interfaces,
52which are connected back-to-back with a virtual cross-over cable.
53.Pp
54Each
55.Nm
56interface pair is created at runtime using interface cloning.
57This is most easily done with the
58.Xr ifconfig 8
59.Cm create
60command or using the
61.Va cloned_interfaces
62variable in
63.Xr rc.conf 5 .
64While for cloning you only give either
65.Pa epair
66or
67.Pa epair<n>
68the
69.Nm
70pair will be named like
71.Pa epair<n>[ab] .
72This means the names of the first
73.Nm
74interfaces will be
75.Pa epair0a
76and
77.Pa epair0b .
78.Pp
79Like any other Ethernet interface, an
80.Nm
81needs to have a network address.
82Each
83.Nm
84will be assigned a locally administered address by default,
85that is only guaranteed to be unique within one network stack.
86To change the default addresses one may use the SIOCSIFADDR ioctl(2) or
87ifconfig(8) utility.
88.Pp
89The basic intent is to provide connectivity between two virtual
90network stack instances.
91When connected to an
92.Xr if_bridge 4 ,
93one end of the interface pair can also be part of another (virtual) LAN.
94As with any other Ethernet interface,
95.Nm epair
96can have a
97.Xr vlan 4
98configured on top of it.
99.Sh SEE ALSO
100.Xr ioctl 2 ,
101.Xr altq 4 ,
102.Xr bpf 4 ,
103.Xr if_bridge 4 ,
104.Xr vlan 4 ,
105.Xr loader.conf 5 ,
106.Xr rc.conf 5 ,
107.Xr ifconfig 8
108.Sh HISTORY
109The
110.Nm
111interface first appeared in
112.Fx 8.0 .
113.Sh AUTHORS
114The
115.Nm
116interface was written by
117.An Bjoern A. Zeeb, CK Software GmbH,
118under sponsorship from the FreeBSD Foundation.
119