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