diff options
author | Rafael Zalamena <rzalamena@cvs.openbsd.org> | 2015-07-21 05:25:25 +0000 |
---|---|---|
committer | Rafael Zalamena <rzalamena@cvs.openbsd.org> | 2015-07-21 05:25:25 +0000 |
commit | c2080d70f00c5ef84d04195f8960b5cc7d39ca3b (patch) | |
tree | 9656b0b1038ee3cefe5af73765b6a08cab52c465 /share/man | |
parent | 12eff34e961c2802f8428ce0b4da973e4e7ada89 (diff) |
Added mpw(4) man page.
Diffstat (limited to 'share/man')
-rw-r--r-- | share/man/man4/Makefile | 4 | ||||
-rw-r--r-- | share/man/man4/mpw.4 | 118 |
2 files changed, 120 insertions, 2 deletions
diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index d69c138bbd9..f6cd64b5c83 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.596 2015/07/21 03:40:01 reyk Exp $ +# $OpenBSD: Makefile,v 1.597 2015/07/21 05:25:24 rzalamena Exp $ MAN= aac.4 ac97.4 acphy.4 \ acpi.4 acpiac.4 acpiasus.4 acpibat.4 acpibtn.4 acpicpu.4 acpidock.4 \ @@ -35,7 +35,7 @@ MAN= aac.4 ac97.4 acphy.4 \ lmenv.4 lmn.4 lmtemp.4 lo.4 lpt.4 lxtphy.4 luphy.4 \ maestro.4 mainbus.4 malo.4 maxds.4 maxtmp.4 mbg.4 midi.4 mii.4 mfi.4 \ mfii.4 mlphy.4 moscom.4 mos.4 mpe.4 mpath.4 mpi.4 mpii.4 mpu.4 msk.4 \ - msts.4 mtd.4 mtdphy.4 multicast.4 mtio.4 myx.4 \ + mpw.4 msts.4 mtd.4 mtdphy.4 multicast.4 mtio.4 myx.4 \ ne.4 neo.4 nep.4 netintro.4 nfe.4 nge.4 nmea.4 \ nsclpcsio.4 nsgphy.4 nsphy.4 nsphyter.4 null.4 nviic.4 nvt.4 \ oce.4 ohci.4 options.4 onewire.4 oosiop.4 osiop.4 otus.4 \ diff --git a/share/man/man4/mpw.4 b/share/man/man4/mpw.4 new file mode 100644 index 00000000000..46877799ede --- /dev/null +++ b/share/man/man4/mpw.4 @@ -0,0 +1,118 @@ +.\" $OpenBSD: mpw.4,v 1.1 2015/07/21 05:25:24 rzalamena Exp $ +.\" +.\" Copyright (C) 2015 Rafael Zalamena <rzalamena@openbsd.org> +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: July 21 2015 $ +.Dt MPW 4 +.Os +.Sh NAME +.Nm mpw +.Nd MPLS Pseudowire +.Sh SYNOPSIS +.Cd "pseudo-device mpw" +.Pp +.Fd #include <sys/types.h> +.Fd #include <netmpls/mpls.h> +.Sh DESCRIPTION +The +.Nm +interface is used to create a MPLS layer 2 tunnel between two points. +.Pp +A +.Nm +interface can be created at runtime using the +.Ic ifconfig mpw Ns Ar N Ic create +command or by setting up a +.Xr hostname.if 5 +configuration file for +.Xr netstart 8 . +The interface itself can be configured with +.Xr ifconfig 8 +see its man page for more information. +.Pp +The supported pseudowire operation modes are +.Ql ethernet +and +.Ql ethernet-tagged . +The +.Ql ethernet +operating mode passes all ethernet packets transparently through the +interface, meanwhile the +.Ql ethernet-tagged +requires that the client uses at least one VLAN to pass the traffic. +The +.Nm +interface labels, neighbor, encapsulation and administrative state is normally +configured by +.Xr ldpd 8 , +but it is also possible to configure it manually. +The configuration information that will be used by the ioctl are +defined below: +.Bd -literal +#define IMR_TYPE_NONE 0 +#define IMR_TYPE_ETHERNET 1 +#define IMR_TYPE_ETHERNET_TAGGED 2 + +#define IMR_FLAG_CONTROLWORD 0x1 + +struct ifmpwreq { + uint32_t imr_flags; + uint32_t imr_type; /* pseudowire type */ + struct shim_hdr imr_lshim; /* local label */ + struct shim_hdr imr_rshim; /* remote label */ + struct sockaddr_storage imr_nexthop; +}; +.Ed +.Pp +.Nm +interfaces support the following unique ioctls: +.Bl -tag -width "SIOCSETMPWCFG" -offset 3n +.It SIOCSETMPWCFG +Configure mpw using the supplied configuration. +.It SIOCGETMPWCFG +Report the mpw configuration. +.El +.\" +.Sh EXAMPLES +Create a pseudowire to neighbor 10.254.0.1 using ethernet encapsulation +with local label 20 and encapsulate MPLS packets with label 21: +.Bd -literal -offset indent +# ifconfig mpw5 neighbor 10.254.0.1 encap ethernet mpwlabel 20 21 up +.Ed +.Pp +Create a pseudowire to neighbor 10.254.0.3 using ethernet encapsulation +with local label 30 and encapsulate MPLS packets with label 31 and +control-word: +.Bd -literal -offset indent +# ifconfig mpw5 neighbor 10.254.0.3 encap ethernet mpwlabel 30 31 controlword +.Ed +.Pp +.Sh SEE ALSO +.Xr hostname.if 5 , +.Xr ifconfig 8 , +.Xr ldpd 8 , +.Xr netstart 8 +.\" +.Sh HISTORY +The +.Nm +kernel interface first appeared in +.Ox 5.8 . +.\" +.Sh AUTHORS +The +.Nm +driver was written by +.An Rafael Zalamena Aq Mt rzalamena@openbsd.org . |