xref: /freebsd/share/man/man4/epair.4 (revision 1ea7a21e36ef16dbf5eb9cb71f63c6e698794cb6)
198c230c8SBjoern A. Zeeb.\"-
298c230c8SBjoern A. Zeeb.\" Copyright (c) 2008 The FreeBSD Foundation
398c230c8SBjoern A. Zeeb.\" All rights reserved.
498c230c8SBjoern A. Zeeb.\"
598c230c8SBjoern A. Zeeb.\" This software was developed by CK Software GmbH under sponsorship
698c230c8SBjoern A. Zeeb.\" from the FreeBSD Foundation.
798c230c8SBjoern A. Zeeb.\"
898c230c8SBjoern A. Zeeb.\" Redistribution and use in source and binary forms, with or without
998c230c8SBjoern A. Zeeb.\" modification, are permitted provided that the following conditions
1098c230c8SBjoern A. Zeeb.\" are met:
1198c230c8SBjoern A. Zeeb.\" 1. Redistributions of source code must retain the above copyright
1298c230c8SBjoern A. Zeeb.\" notice, this list of conditions and the following disclaimer.
1398c230c8SBjoern A. Zeeb.\" 2. Redistributions in binary form must reproduce the above copyright
1498c230c8SBjoern A. Zeeb.\" notice, this list of conditions and the following disclaimer in the
1598c230c8SBjoern A. Zeeb.\" documentation and/or other materials provided with the distribution.
1698c230c8SBjoern A. Zeeb.\"
1798c230c8SBjoern A. Zeeb.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1898c230c8SBjoern A. Zeeb.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1998c230c8SBjoern A. Zeeb.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2098c230c8SBjoern A. Zeeb.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2198c230c8SBjoern A. Zeeb.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2298c230c8SBjoern A. Zeeb.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2398c230c8SBjoern A. Zeeb.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2498c230c8SBjoern A. Zeeb.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2598c230c8SBjoern A. Zeeb.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2698c230c8SBjoern A. Zeeb.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2798c230c8SBjoern A. Zeeb.\" SUCH DAMAGE.
2898c230c8SBjoern A. Zeeb.\"
2998c230c8SBjoern A. Zeeb.\" $FreeBSD$
3098c230c8SBjoern A. Zeeb.\"
31*1ea7a21eSAllan Jude.Dd March 18, 2015
3298c230c8SBjoern A. Zeeb.Dt EPAIR 4
3398c230c8SBjoern A. Zeeb.Os
3498c230c8SBjoern A. Zeeb.Sh NAME
3598c230c8SBjoern A. Zeeb.Nm epair
3650d922a0SGlen Barber.Nd A pair of virtual back-to-back connected Ethernet interfaces
3798c230c8SBjoern A. Zeeb.Sh SYNOPSIS
3898c230c8SBjoern A. ZeebTo compile this driver into the kernel,
3998c230c8SBjoern A. Zeebplace the following line in your
4098c230c8SBjoern A. Zeebkernel configuration file:
4198c230c8SBjoern A. Zeeb.Bd -ragged -offset indent
4298c230c8SBjoern A. Zeeb.Cd "device epair"
4398c230c8SBjoern A. Zeeb.Ed
4498c230c8SBjoern A. Zeeb.Pp
4598c230c8SBjoern A. ZeebAlternatively, to load the driver as a
4698c230c8SBjoern A. Zeebmodule at boot time, place the following line in
4798c230c8SBjoern A. Zeeb.Xr loader.conf 5 :
4898c230c8SBjoern A. Zeeb.Bd -literal -offset indent
4998c230c8SBjoern A. Zeebif_epair_load="YES"
5098c230c8SBjoern A. Zeeb.Ed
5198c230c8SBjoern A. Zeeb.Sh DESCRIPTION
5298c230c8SBjoern A. ZeebThe
5398c230c8SBjoern A. Zeeb.Nm
5498c230c8SBjoern A. Zeebis a pair of Ethernet-like software interfaces,
55d0ea4743SBjoern A. Zeebwhich are connected back-to-back with a virtual cross-over cable.
5698c230c8SBjoern A. Zeeb.Pp
5798c230c8SBjoern A. ZeebEach
5898c230c8SBjoern A. Zeeb.Nm
5998c230c8SBjoern A. Zeebinterface pair is created at runtime using interface cloning.
6098c230c8SBjoern A. ZeebThis is most easily done with the
6198c230c8SBjoern A. Zeeb.Xr ifconfig 8
6298c230c8SBjoern A. Zeeb.Cm create
6398c230c8SBjoern A. Zeebcommand or using the
6498c230c8SBjoern A. Zeeb.Va cloned_interfaces
6598c230c8SBjoern A. Zeebvariable in
6698c230c8SBjoern A. Zeeb.Xr rc.conf 5 .
6798c230c8SBjoern A. ZeebWhile for cloning you only give either
6898c230c8SBjoern A. Zeeb.Pa epair
6998c230c8SBjoern A. Zeebor
7098c230c8SBjoern A. Zeeb.Pa epair<n>
7198c230c8SBjoern A. Zeebthe
7298c230c8SBjoern A. Zeeb.Nm
7398c230c8SBjoern A. Zeebpair will be named like
7498c230c8SBjoern A. Zeeb.Pa epair<n>[ab] .
7598c230c8SBjoern A. ZeebThis means the names of the first
7698c230c8SBjoern A. Zeeb.Nm
7798c230c8SBjoern A. Zeebinterfaces will be
7898c230c8SBjoern A. Zeeb.Pa epair0a
7998c230c8SBjoern A. Zeeband
8098c230c8SBjoern A. Zeeb.Pa epair0b .
8198c230c8SBjoern A. Zeeb.Pp
8298c230c8SBjoern A. ZeebLike any other Ethernet interface, an
8398c230c8SBjoern A. Zeeb.Nm
8498c230c8SBjoern A. Zeebneeds to have a network address.
8598c230c8SBjoern A. ZeebEach
8698c230c8SBjoern A. Zeeb.Nm
8798c230c8SBjoern A. Zeebwill be assigned a locally administered address by default,
8898c230c8SBjoern A. Zeebthat is only guaranteed to be unique within one network stack.
8998c230c8SBjoern A. ZeebTo change the default addresses one may use the SIOCSIFADDR ioctl(2) or
9098c230c8SBjoern A. Zeebifconfig(8) utility.
9198c230c8SBjoern A. Zeeb.Pp
92*1ea7a21eSAllan JudeThe basic intent is to provide connectivity between two virtual
9398c230c8SBjoern A. Zeebnetwork stack instances.
94*1ea7a21eSAllan JudeWhen connected to an
95*1ea7a21eSAllan Jude.Xr if_bridge 4 ,
9698c230c8SBjoern A. Zeebone end of the interface pair can also be part of another (virtual) LAN.
97*1ea7a21eSAllan JudeAs with any other Ethernet interface,
98*1ea7a21eSAllan Jude.Nm epair
99*1ea7a21eSAllan Judecan have a
10098c230c8SBjoern A. Zeeb.Xr vlan 4
101*1ea7a21eSAllan Judeconfigured on top of it.
10298c230c8SBjoern A. Zeeb.Sh SEE ALSO
10398c230c8SBjoern A. Zeeb.Xr ioctl 2 ,
10498c230c8SBjoern A. Zeeb.Xr altq 4 ,
10598c230c8SBjoern A. Zeeb.Xr bpf 4 ,
10698c230c8SBjoern A. Zeeb.Xr if_bridge 4 ,
10798c230c8SBjoern A. Zeeb.Xr vlan 4 ,
10898c230c8SBjoern A. Zeeb.Xr loader.conf 5 ,
10998c230c8SBjoern A. Zeeb.Xr rc.conf 5 ,
11098c230c8SBjoern A. Zeeb.Xr ifconfig 8
11198c230c8SBjoern A. Zeeb.Sh HISTORY
11298c230c8SBjoern A. ZeebThe
11398c230c8SBjoern A. Zeeb.Nm
11498c230c8SBjoern A. Zeebinterface first appeared in
11598c230c8SBjoern A. Zeeb.Fx 8.0 .
11698c230c8SBjoern A. Zeeb.Sh AUTHORS
11798c230c8SBjoern A. ZeebThe
11898c230c8SBjoern A. Zeeb.Nm
11998c230c8SBjoern A. Zeebinterface was written by
12098c230c8SBjoern A. Zeeb.An Bjoern A. Zeeb, CK Software GmbH,
12198c230c8SBjoern A. Zeebunder sponsorship from the FreeBSD Foundation.
122