1.\" $OpenBSD: bpe.4,v 1.6 2022/09/12 09:15:29 jsg Exp $ 2.\" 3.\" Copyright (c) 2018 David Gwynne <dlg@openbsd.org> 4.\" 5.\" Permission to use, copy, modify, and distribute this software for any 6.\" purpose with or without fee is hereby granted, provided that the above 7.\" copyright notice and this permission notice appear in all copies. 8.\" 9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16.\" 17.Dd $Mdocdate: September 12 2022 $ 18.Dt BPE 4 19.Os 20.Sh NAME 21.Nm bpe 22.Nd Backbone Provider Edge pseudo-device 23.Sh SYNOPSIS 24.Cd "pseudo-device bpe" 25.Sh DESCRIPTION 26The 27.Nm bpe 28driver creates IEEE 802.1Q Provider Backbone Bridge (PBB) networks 29by acting as a Backbone Edge Bridge (BEB). 30PBB, also known as mac-in-mac, was originally specified in 31IEEE 802.1ah-2008 and became part of IEEE 802.1Q-2011. 32.Pp 33A Provider Backbone Bridge Network (PBBN) consists of BEBs 34interconnected by Backbone Core Bridges (BCBs) to form an Ethernet 35network for the transport of encapsulated Ethernet packets. 36Where VLAN and SVLAN protocols add a shim to differentiate Ethernet 37packets for different networks but retain the Ethernet addresses 38of encapsulated traffic, PBB completely encapsulates Ethernet packets 39for transmission between BEBs on a PBBN. 40This removes the need for intermediate BCB devices on the backbone 41network to learn the Ethernet addresses of devices on the encapsulated 42network, but requires each BEB to maintain a mapping of addresses 43on the encapsulated network to peer BEBs. 44.Pp 45A PBB packet consists of another Ethernet frame containing Ethernet 46addresses for BEBs and the PBB Ethernet protocol type (0x88e7), a 4732-bit Backbone Service Instance Tag (I-TAG), followed by the 48encapsulated Ethernet frame. 49The I-TAG contains a 24-bit Backbone Service Instance Identifier 50(I-SID) to differentiate different PBBNs on the same backbone network 51.Pp 52IEEE 802.1Q describes customer VLANs being encapsulated by PBB, 53which in turn uses an S-VLAN service. 54This can be implemented with 55.Xr vlan 4 56using a 57.Nm bpe 58interface as the parent, 59and with the 60.Nm bpe 61interface using 62.Xr svlan 4 63as the parent. 64.Nm bpe 65itself does not require this topology, therefore allowing flexible 66deployment and network topologies. 67.Pp 68The 69.Nm bpe 70driver implements a learning bridge on each interface. 71The driver will learn the mapping of BEPs to encapsulated Ethernet 72address based on traffic received from other devices on the backbone 73network. 74Traffic sent to broadcast, multicast, or unknown unicast Ethernet 75addresses will be flooded to a multicast address on the backbone network. 76The multicast address used for each PBB Service Instance 77will begin with 01:1e:83 as the first three octets, with the I-SID 78as the last three octets. 79For example, a 80.Nm bpe 81interface with a vnetid of 1024 (0x400 in hex) will have a multicast 82group address of 01:1e:83:00:04:00. 83The address learning in 84.Nm bpe 85only uses the Ethernet addresses of encapsulated traffic for its 86forwarding decisions; it does not use VLAN or S-VLAN tags to 87differentiate services. 88.Pp 89.Nm bpe 90interfaces can be created at runtime using the 91.Ic ifconfig bpe Ns Ar N Ic create 92command or by setting up a 93.Xr hostname.if 5 94configuration file for 95.Xr netstart 8 . 96The interface itself can be configured with 97.Xr ifconfig 8 ; 98see its manual page for more information. 99.Pp 100.Nm bpe 101interfaces must be configured with a parent Ethernet interface to 102operate, and a virtual network identifier for use as the I-SID. 103.Pp 104The I-TAG includes a priority field. 105By default, the value of the priority field in a transmitted packet 106is based on the priority of packets sent over the interface, which 107may be altered via 108.Xr pf.conf 5 ; 109see the 110.Cm prio 111option for more information. 112Alternatively, 113.Cm txprio 114can set a specific priority for transmitted packets. 115.Pp 116.Nm bpe 117interfaces support the following 118.Xr ioctl 2 Ns s : 119.Bl -tag -width indent -offset 3n 120.It Dv SIOCSIFPARENT Fa "struct if_parent *" 121Set the parent interface. 122The parent may only be configured while the virtual interface is 123administratively down. 124.It Dv SIOCGIFPARENT Fa "struct if_parent *" 125Get the currently configured parent interface. 126.It Dv SIOCDIFPARENT Fa "struct ifreq *" 127Delete the parent interface configuration. 128The parent may only be removed while the virtual interface is 129administratively down. 130.It Dv SIOCSVNETID Fa "struct ifreq *" 131Set the virtual network identifier. 132Valid identifiers are 24-bit values in the range 0 to 16777215. 133.It Dv SIOCGVNETID Fa "struct ifreq *" 134Get the currently configured virtual network identifier. 135.El 136.Sh SEE ALSO 137.Xr bridge 4 , 138.Xr inet 4 , 139.Xr ip 4 , 140.Xr netintro 4 , 141.Xr vlan 4 , 142.Xr hostname.if 5 , 143.Xr pf.conf 5 , 144.Xr ifconfig 8 , 145.Xr netstart 8 146.Rs 147.%T IEEE 802.1Q standard 148.%U https://standards.ieee.org/standard/802_1Q-2018.html 149.Re 150.Rs 151.%Q Provider Backbone Bridges 152.%T IEEE 802.1ah standard 153.Re 154.Sh HISTORY 155The 156.Nm 157driver first appeared in 158.Ox 6.5 . 159.Sh AUTHORS 160.An David Gwynne Aq Mt dlg@openbsd.org . 161