OpenBSD manual page server

Manual Page Search Parameters

MPW(4) Device Drivers Manual MPW(4)

mpwMPLS pseudowire

pseudo-device mpw


#include <sys/types.h>
#include <netmpls/mpls.h>

The mpw interface is used to create an MPLS layer 2 tunnel between two points.

A mpw interface can be created at runtime using the mpwN create command or by setting up a hostname.if(5) configuration file for netstart(8). The interface itself can be configured with ifconfig(8).

The supported pseudowire operation modes are ‘ethernet’ and ‘ethernet-tagged’. The ‘ethernet’ operating mode passes all Ethernet packets transparently through the interface, meanwhile the ‘ethernet-tagged’ requires that the client uses at least one VLAN to pass the traffic. The mpw interface labels, neighbor, encapsulation and administrative state are normally configured by ldpd(8), but it is also possible to configure them manually. The configuration information that will be used by the ioctl are defined below:

#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;
};

mpw interfaces support the following unique ioctls:

Configure mpw using the supplied configuration.
Report the mpw configuration.

Create a pseudowire to neighbor 10.254.0.1 using Ethernet encapsulation with local label 20 and encapsulate MPLS packets with label 21:

# ifconfig mpw5 neighbor 10.254.0.1 encap ethernet mpwlabel 20 21 up

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:

# ifconfig mpw5 neighbor 10.254.0.3 encap ethernet mpwlabel 30 31 controlword

hostname.if(5), ifconfig(8), ldpd(8), netstart(8)

The mpw kernel interface first appeared in OpenBSD 5.8.

The mpw driver was written by Rafael Zalamena <rzalamena@openbsd.org>.

July 21, 2015 OpenBSD-5.9