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