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