Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src add man for l2tp(4).



details:   https://anonhg.NetBSD.org/src/rev/cb38192c6145
branches:  trunk
changeset: 351498:cb38192c6145
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Thu Feb 16 08:32:21 2017 +0000

description:
add man for l2tp(4).

diffstat:

 distrib/sets/lists/man/mi |    5 +-
 sbin/ifconfig/ifconfig.8  |   24 +++++-
 share/man/man4/Makefile   |    4 +-
 share/man/man4/l2tp.4     |  178 ++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 206 insertions(+), 5 deletions(-)

diffs (278 lines):

diff -r 84df41eb6d65 -r cb38192c6145 distrib/sets/lists/man/mi
--- a/distrib/sets/lists/man/mi Thu Feb 16 08:28:03 2017 +0000
+++ b/distrib/sets/lists/man/mi Thu Feb 16 08:32:21 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1548 2017/02/06 16:06:38 christos Exp $
+# $NetBSD: mi,v 1.1549 2017/02/16 08:32:21 knakahara Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -1360,6 +1360,7 @@
 ./usr/share/man/cat4/ksyms.0                   man-sys-catman          .cat
 ./usr/share/man/cat4/kttcp.0                   man-sys-catman          .cat
 ./usr/share/man/cat4/kue.0                     man-sys-catman          .cat
+./usr/share/man/cat4/l2tp.0                    man-sys-catman          .cat
 ./usr/share/man/cat4/lc.0                      man-sys-catman          .cat
 ./usr/share/man/cat4/ld.0                      man-sys-catman          .cat
 ./usr/share/man/cat4/le.0                      man-sys-catman          .cat
@@ -4433,6 +4434,7 @@
 ./usr/share/man/html4/ksyms.html               man-sys-htmlman         html
 ./usr/share/man/html4/kttcp.html               man-sys-htmlman         html
 ./usr/share/man/html4/kue.html                 man-sys-htmlman         html
+./usr/share/man/html4/l2tp.html                        man-sys-htmlman         html
 ./usr/share/man/html4/lc.html                  man-sys-htmlman         html
 ./usr/share/man/html4/ld.html                  man-sys-htmlman         html
 ./usr/share/man/html4/le.html                  man-sys-htmlman         html
@@ -7346,6 +7348,7 @@
 ./usr/share/man/man4/ksyms.4                   man-sys-man             .man
 ./usr/share/man/man4/kttcp.4                   man-sys-man             .man
 ./usr/share/man/man4/kue.4                     man-sys-man             .man
+./usr/share/man/man4/l2tp.4                    man-sys-man             .man
 ./usr/share/man/man4/lc.4                      man-sys-man             .man
 ./usr/share/man/man4/ld.4                      man-sys-man             .man
 ./usr/share/man/man4/le.4                      man-sys-man             .man
diff -r 84df41eb6d65 -r cb38192c6145 sbin/ifconfig/ifconfig.8
--- a/sbin/ifconfig/ifconfig.8  Thu Feb 16 08:28:03 2017 +0000
+++ b/sbin/ifconfig/ifconfig.8  Thu Feb 16 08:32:21 2017 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: ifconfig.8,v 1.112 2017/01/18 22:07:25 abhinav Exp $
+.\"    $NetBSD: ifconfig.8,v 1.113 2017/02/16 08:32:21 knakahara Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"     @(#)ifconfig.8 8.4 (Berkeley) 6/1/94
 .\"
-.Dd January 7, 2016
+.Dd January 19, 2017
 .Dt IFCONFIG 8
 .Os
 .Sh NAME
@@ -534,6 +534,26 @@
 Unconfigure the physical source and destination address for IP tunnel
 interfaces previously configured with
 .Cm tunnel .
+.It Cm session Ar local_session Ar remote_session
+.Oc
+.Pq L2TPv3 devices only
+Configure local session id and remote session id for L2TPv3
+interface. The length of session id is 4 bytes.
+.It Cm deletesession
+Unconfigure the local session id and remote session id for
+L2TPv3 interface previously configured with
+.Cm session .
+.It Cm cookie Ar local_cookie_length Ar local_cookie  Ar remote_cookie_length Ar remote_cookie
+.Oc
+.Pq L2TPv3 devices only
+Configure local cookie and remote cookie for L2TPv3 interface.
+The cookie length must be 4 or 8 bytes.
+Generally, cookies are mangaed by daemon. So, this command would
+be used for test or debug only.
+.It Cm deletecookie
+Unconfigure the local cookie and remote cookie for L2TPv3
+interface previously configured with
+.Cm cookie .
 .It Cm create
 Create the specified network pseudo-device.
 .It Cm destroy
diff -r 84df41eb6d65 -r cb38192c6145 share/man/man4/Makefile
--- a/share/man/man4/Makefile   Thu Feb 16 08:28:03 2017 +0000
+++ b/share/man/man4/Makefile   Thu Feb 16 08:32:21 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.632 2017/01/21 20:21:57 jdolecek Exp $
+#      $NetBSD: Makefile,v 1.633 2017/02/16 08:32:21 knakahara Exp $
 #      @(#)Makefile    8.1 (Berkeley) 6/18/93
 
 MAN=   aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \
@@ -38,7 +38,7 @@
        ixpide.4 \
        jme.4 jmide.4 joy.4 \
        kloader.4 kse.4 ksyms.4 kttcp.4 \
-       lc.4 ld.4 lii.4 lo.4 lua.4 lxtphy.4 \
+       l2tp.4 lc.4 ld.4 lii.4 lo.4 lua.4 lxtphy.4 \
        mainbus.4 makphy.4 malo.4 mbe.4 mca.4 mcclock.4 md.4 mfb.4 \
        mfi.4 mhzc.4 \
        micphy.4 midi.4 mii.4 mk48txx.4 mlx.4 mly.4 mpls.4 mpii.4 mpt.4 mpu.4 mtd.4 \
diff -r 84df41eb6d65 -r cb38192c6145 share/man/man4/l2tp.4
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/share/man/man4/l2tp.4     Thu Feb 16 08:32:21 2017 +0000
@@ -0,0 +1,178 @@
+.\"    $NetBSD: l2tp.4,v 1.1 2017/02/16 08:32:21 knakahara Exp $
+.\"
+.\" Copyright (C) 2017 Internet Initiative Japan Inc.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the project nor the names of its contributors
+.\"    may be used to endorse or promote products derived from this software
+.\"    without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR 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 January 19, 2017
+.Dt L2TP 4
+.Os
+.Sh NAME
+.Nm l2tp
+.Nd layer two tunneling protocol version 3
+.Sh SYNOPSIS
+.Cd "pseudo-device l2tp"
+.Sh DESCRIPTION
+The
+.Nm
+interface is a version 3 of the Layer Two Tunneling Protocol(L2TPv3)
+pseudo device. It can tunnel layer 2 protocol traffic over IPv4 or IPv6,
+as specified in
+.Li RFC3931 .
+.Pp
+L2TPv3 protocol is comprised of two types of messages, control messages
+and data messages. Control messages are used in the establishment,
+maintenace, and clearing of control connections and sessions.
+.Xr l2tp 4
+interface can send control messages and data messages, furthermore
+the management of control messages is entrusted to userland daemon.
+Without management daemon,
+.Xr l2tp 4
+interface can send data messages by using
+.Xr ifconfig 8
+.Cm tunnel
+and
+.Cm session
+subcommands, or
+.Dv SIOCSIFPHYADDR
+and
+.Dv SIOCSL2TPSESSION
+ioctls. Additionally, it can use cookie specified in
+.Li RFC3931
+by using
+.Xr ifconfig 8
+.Cm cookie
+subcommand, or
+.Dv SIOCSL2TPCOOKIE
+ioctl.
+.Ss Packet format
+Layer 2 frames are prepended with a L2TPv3 header as described by
+RFC 3931.
+The resulting L2TPv3 packets will be encapsulated in an outer packet,
+which may be either an IPv4 or IPv6 packet, with IP protocol number 115.
+.Sh EXAMPLES
+Configuration example:
+.Bd -literal
+Host X--NetBSD A  ----------------tunnel---------- NetBSD B------Host E
+           \\                                          |
+            \\                                        /
+             +-----Router B--------Router C---------+
+
+.Ed
+configuration example without cookies,
+.Pp
+On
+.Nx
+system A
+.Bd -literal
+# ifconfig wm0 inet 192.168.0.1/24
+# ifconfig l2tp0 create
+# ifconfig l2tp0 tunnel 192.168.0.1 192.168.0.2
+# ifconfig l2tp0 session 1234 4321
+# ifconfig bridge0 create
+# brconfig bridge0 add wm1
+# brconfig bridge0 add l2tp0
+# ifconfig l2tp0 up
+# ifconfig wm1 up
+# ifconfig bridge0 up
+.Ed
+.Pp
+.Ed
+On
+.Nx
+system B
+.Bd -literal
+# ifconfig wm0 inet 192.168.0.2/24
+# ifconfig l2tp0 create
+# ifconfig l2tp0 tunnel 192.168.0.2 192.168.0.1
+# ifconfig l2tp0 session 4321 1234
+# ifconfig bridge0 create
+# brconfig bridge0 add wm1
+# brconfig bridge0 add l2tp0
+# ifconfig l2tp0 up
+# ifconfig wm1 up
+# ifconfig bridge0 up
+.Ed
+.Pp
+configuration example with cookies,
+.Pp
+On
+.Nx
+system A
+.Bd -literal
+# ifconfig wm0 inet 192.168.0.1/24
+# ifconfig l2tp0 create
+# ifconfig l2tp0 tunnel 192.168.0.1 192.168.0.2
+# ifconfig l2tp0 session 1234 4321
+# ifconfig l2tp0 cookie 4 12345 4 54321
+# ifconfig bridge0 create
+# brconfig bridge0 add wm1
+# brconfig bridge0 add l2tp0
+# ifconfig l2tp0 up
+# ifconfig wm1 up
+# ifconfig bridge0 up
+.Ed
+.Pp
+.Ed
+On
+.Nx
+system B
+.Bd -literal
+# ifconfig wm0 inet 192.168.0.2/24
+# ifconfig l2tp0 create
+# ifconfig l2tp0 tunnel 192.168.0.2 192.168.0.1
+# ifconfig l2tp0 session 4321 1234
+# ifconfig l2tp0 cookie 4 54321 4 12345
+# ifconfig bridge0 create
+# brconfig bridge0 add wm1
+# brconfig bridge0 add l2tp0
+# ifconfig l2tp0 up
+# ifconfig wm1 up
+# ifconfig bridge0 up
+.Ed
+
+.Sh SEE ALSO
+.Xr inet 4 ,
+.Xr inet6 4 ,
+.Xr ifconfig 8
+.Rs
+.%A J. Lau, Ed.
+.%A M. Townsley, Ed.
+.%A I. Goyret, Ed.
+.%B RFC 3931
+.%T Layer Two Tunneling Protocol - Version 3 (L2TPv3)
+.%D March 2005
+.%U ftp://ftp.ietf.org/rfc/rfc3931.txt
+.Re
+.Sh HISTORY
+The
+.Nm
+device first appeared in
+.Nx 8.0 .
+.Sh BUGS
+Currently,
+.Nm
+interface support ethernet frame over IPv4 or IPv6 only.



Home | Main Index | Thread Index | Old Index