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