summaryrefslogtreecommitdiff
path: root/share/man
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2010-08-26 14:04:47 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2010-08-26 14:04:47 +0000
commitaf2f6d264a9a669bc30ff22b0b741e9c1e7e68a0 (patch)
treecf70787f9d3dadf71e2458675c1c8e13d21dc594 /share/man
parent46270a414d92e76b7894c1e50982889de32df998 (diff)
Try to be a bit more specific about what happens when link0 is used.
link0 will reset the interface and all configuration is lost (e.g. -inet6 or rdomain settings) so use link0 as first command without any other arguments to get a deterministic behaviour. With a lot of help by jmc@ (actually commiting his version because it is much nicer, as ususal).
Diffstat (limited to 'share/man')
-rw-r--r--share/man/man4/tun.422
1 files changed, 15 insertions, 7 deletions
diff --git a/share/man/man4/tun.4 b/share/man/man4/tun.4
index 7f534cce6e9..ebbd1a90713 100644
--- a/share/man/man4/tun.4
+++ b/share/man/man4/tun.4
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tun.4,v 1.36 2007/05/31 19:19:52 jmc Exp $
+.\" $OpenBSD: tun.4,v 1.37 2010/08/26 14:04:46 claudio Exp $
.\"
.\" Copyright (c) 2003 Marcus D. Watts All rights reserved.
.\"
@@ -26,7 +26,7 @@
.\" TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
.\" USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: May 31 2007 $
+.Dd $Mdocdate: August 26 2010 $
.Dt TUN 4
.Os
.Sh NAME
@@ -53,18 +53,26 @@ interface can be created at runtime using the
command or by opening the character special device
.Pa /dev/tunN .
.Pp
-Both layer 3 and layer 2 tunneling is supported.
-Layer 3 tunneling is the default mode; to enable layer 2 tunneling mode the
+Both layer 3 and layer 2 tunneling is supported;
+layer 3 tunneling is the default mode.
+To enable layer 2 tunneling mode,
+where the
+.Nm
+interface simulates an Ethernet network interface,
+the
.Ar link0
flag needs to be set with
-.Xr ifconfig 8 ,
+.Xr ifconfig 8
or by setting up a
.Xr hostname.if 5
configuration file for
.Xr netstart 8 .
-In layer 2 mode the
+Note that setting or unsetting the
+.Ar link0
+flag causes
.Nm
-interface is simulating an Ethernet network interface.
+to lose any configuration settings,
+and that it is not advisable to use the flag with any other parameters.
.Pp
Each device has the exclusive open property; it cannot be opened
if it is already open and in use by another process.