Changeset View
Changeset View
Standalone View
Standalone View
head/share/man/man4/tap.4
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" Based on PR#2411 | .\" Based on PR#2411 | ||||
.\" | .\" | ||||
.Dd November 29, 2017 | .Dd April 29, 2019 | ||||
.Dt TAP 4 | .Dt TAP 4 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm tap | .Nm tap | ||||
.Nd Ethernet tunnel software network interface | .Nd Ethernet tunnel software network interface | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.Cd device tap | .Cd device tuntap | ||||
.Sh DESCRIPTION | .Sh DESCRIPTION | ||||
The | The | ||||
.Nm | .Nm | ||||
interface is a software loopback mechanism that can be loosely | interface is a software loopback mechanism that can be loosely | ||||
described as the network interface analog of the | described as the network interface analog of the | ||||
.Xr pty 4 , | .Xr pty 4 , | ||||
that is, | that is, | ||||
.Nm | .Nm | ||||
Show All 26 Lines | |||||
.Dq control | .Dq control | ||||
interface. | interface. | ||||
.Pp | .Pp | ||||
The network interfaces are named | The network interfaces are named | ||||
.Dq Li tap0 , | .Dq Li tap0 , | ||||
.Dq Li tap1 , | .Dq Li tap1 , | ||||
etc., one for each control device that has been opened. | etc., one for each control device that has been opened. | ||||
These Ethernet network interfaces persist until | These Ethernet network interfaces persist until | ||||
.Pa if_tap.ko | .Pa if_tuntap.ko | ||||
module is unloaded, or until removed with "ifconfig destroy" (see below). | module is unloaded, or until removed with "ifconfig destroy" (see below). | ||||
.Pp | .Pp | ||||
.Nm | .Nm | ||||
devices are created using interface cloning. | devices are created using interface cloning. | ||||
This is done using the | This is done using the | ||||
.Dq ifconfig tap Ns Sy N No create | .Dq ifconfig tap Ns Sy N No create | ||||
command. | command. | ||||
This is the preferred method of creating | This is the preferred method of creating | ||||
Show All 28 Lines | |||||
such as | such as | ||||
.Tn VMware | .Tn VMware | ||||
and | and | ||||
.Xr ssh 1 . | .Xr ssh 1 . | ||||
It therefore defaults to being enabled until further notice. | It therefore defaults to being enabled until further notice. | ||||
.Ef | .Ef | ||||
.Pp | .Pp | ||||
Control devices (once successfully opened) persist until | Control devices (once successfully opened) persist until | ||||
.Pa if_tap.ko | .Pa if_tuntap.ko | ||||
is unloaded or the interface is destroyed. | is unloaded or the interface is destroyed. | ||||
.Pp | .Pp | ||||
Each interface supports the usual Ethernet network interface | Each interface supports the usual Ethernet network interface | ||||
.Xr ioctl 2 Ns s | .Xr ioctl 2 Ns s | ||||
and thus can be used with | and thus can be used with | ||||
.Xr ifconfig 8 | .Xr ifconfig 8 | ||||
like any other Ethernet interface. | like any other Ethernet interface. | ||||
When the system chooses to transmit | When the system chooses to transmit | ||||
▲ Show 20 Lines • Show All 183 Lines • ▼ Show 20 Lines | |||||
letting them pile up. | letting them pile up. | ||||
.Pp | .Pp | ||||
The | The | ||||
.Nm | .Nm | ||||
device can also be used with the VMware port as a replacement | device can also be used with the VMware port as a replacement | ||||
for the old | for the old | ||||
.Em VMnet | .Em VMnet | ||||
device driver. | device driver. | ||||
The driver uses the minor number | |||||
to select between | |||||
.Nm | |||||
and | |||||
.Nm vmnet | |||||
devices. | |||||
.Em VMnet | |||||
minor numbers begin at | |||||
.Va 0x800000 | |||||
+ | |||||
.Va N ; | |||||
where | |||||
.Va N | |||||
is a | |||||
.Em VMnet | |||||
unit number. | |||||
In this case the control device is expected to be | |||||
.Pa /dev/vmnet Ns Sy N , | |||||
and the network interface will be | |||||
.Sy vmnet Ns Ar N . | |||||
Additionally, | |||||
.Em VMnet | .Em VMnet | ||||
devices do not | devices do not | ||||
.Xr ifconfig 8 | .Xr ifconfig 8 | ||||
themselves down when the | themselves down when the | ||||
control device is closed. | control device is closed. | ||||
Everything else is the same. | Everything else is the same. | ||||
.Pp | .Pp | ||||
In addition to the above mentioned | In addition to the above mentioned | ||||
Show All 11 Lines |