Re: bpe(4): 802.1Q Provider Backbone Bridge edge

2018-12-19 Thread Daniel Gracia
Loving it!

A nit: s/Etherent/Ethernet

El mié., 19 dic. 2018 a las 5:25, David Gwynne () escribió:
>
> 802.1ah-2008 developed Provider Backbone Bridges, aka, mac-in-mac
> support. This was adopted as part of 802.1Q-2011.
>
> It basically provides Ethernet over Ethernet overlay networking. Unlike
> vlan and svlan, the entire ethernet packet is encapsulated in another.
> The motivation for this is to avoid the need for intermediate switches
> to learn all the "customer" mac addresses, they just need to know about
> the PBB endpoints.
>
> However, like vlan it does have a concept of a vnetid, and has the
> ability to store the packet priority. the vnetid is 24 bits and doesn't
> appear to have any reserved values.
>
> Thoughts?
>
> Index: share/man/man4/Makefile
> ===
> RCS file: /cvs/src/share/man/man4/Makefile,v
> retrieving revision 1.697
> diff -u -p -r1.697 Makefile
> --- share/man/man4/Makefile 23 Nov 2018 12:38:44 -  1.697
> +++ share/man/man4/Makefile 19 Dec 2018 04:16:07 -
> @@ -15,7 +15,7 @@ MAN=  aac.4 ac97.4 acphy.4 acrtc.4 \
> auacer.4 audio.4 aue.4 auglx.4 auich.4 auixp.4 autri.4 auvia.4 \
> axe.4 axen.4 axppmic.4 azalia.4 \
> bce.4 bcmaux.4 bcmdog.4  bcmrng.4 bcmtemp.4 berkwdt.4 bge.4 \
> -   bgw.4 bio.4 bktr.4 bmtphy.4 bnx.4 bnxt.4 \
> +   bgw.4 bio.4 bpe.4 bktr.4 bmtphy.4 bnx.4 bnxt.4 \
> boca.4 bpf.4 brgphy.4 bridge.4 brswphy.4 bwfm.4 bwi.4 bytgpio.4 \
> cac.4 cas.4 cardbus.4 carp.4 ccp.4 ccpmic.4 cd.4 cdce.4 cfxga.4 \
> ch.4 chvgpio.4 ciphy.4 ciss.4 clcs.4 clct.4 cmpci.4 \
> Index: share/man/man4/bpe.4
> ===
> RCS file: share/man/man4/bpe.4
> diff -N share/man/man4/bpe.4
> --- /dev/null   1 Jan 1970 00:00:00 -
> +++ share/man/man4/bpe.419 Dec 2018 04:16:07 -
> @@ -0,0 +1,159 @@
> +.\" $OpenBSD$
> +.\"
> +.\" Copyright (c) 2018 David Gwynne 
> +.\"
> +.\" 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: November 16 2018 $
> +.Dt BPE 4
> +.Os
> +.Sh NAME
> +.Nm bpe
> +.Nd Backbone Provider Edge pseudo-device
> +.Sh SYNOPSIS
> +.Cd "pseudo-device bpe"
> +.Sh DESCRIPTION
> +The
> +.Nm bpe
> +driver allows construction of IEEE 802.1Q Provider Backbone Bridge
> +(PBB) networks by acting as a Backbone Edge Bridge (BEB).
> +PBB, also known as mac-in-mac, was originally specified in
> +IEEE 802.1ah-2008 and became part of IEEE 802.1Q-2011.
> +.Pp
> +A Provider Backbone Bridge Network (PBBN) consists of BEBs
> +interconnected by Backbone Core Bridges (BCBs) to form an Ethernet
> +network for the transport of encapsulated Ethernet packets.
> +Where VLAN and SVLAN protocols add a shim to differentiate Ethernet
> +packets for different networks but retain the Ethernet addresses
> +of encapsulated traffic, PBB completely encapsulates Ethernet packets
> +for transmission between BEBs on a PBBN.
> +This removes the need for intermediate BCB devices on the backbone
> +network  to learn the Ethernet addresses of devices on the encapsulated
> +network, but requires each BEB to maintain a mapping of addresses
> +on the encapsulated network to peer BEBs.
> +.Pp
> +A PBB packet consists of another Ethernet frame containing Ethernet
> +addresses for BEBs and the PBB Ethernet protocol type (0x88e7), a
> +32-bit Backbone Service Instance Tag (I-TAG), followed by the
> +encapsulated Ethernet frame.
> +The I-TAG contains a 24-bit Backbone Service Instance Identifiier
> +(I-SID) to differentiate different PBBNs on the same backbone network
> +.Pp
> +IEEE 802.1Q describes Customer VLANs being encapsulated by PBB,
> +which in turn uses an S-VLAN service.
> +This can be implemented with
> +.Xr vlan 4
> +using a
> +.Nm bpe
> +interface as the parent,
> +and with the
> +.Nm bpe
> +interface using
> +.Xr svlan 4
> +as the parent.
> +.Nm bpe
> +itself does not require this topology, therefore allowing flexible
> +deployment and network topologies.
> +.Pp
> +The
> +Nm. bpe
> +driver implements a learning bridge on each interface.
> +The driver will learn the mapping of BEPs to encapsulated Ethernet
> +address based on traffic received from other devices on the backbone
> +network.
> 

bpe(4): 802.1Q Provider Backbone Bridge edge

2018-12-18 Thread David Gwynne
802.1ah-2008 developed Provider Backbone Bridges, aka, mac-in-mac
support. This was adopted as part of 802.1Q-2011.

It basically provides Ethernet over Ethernet overlay networking. Unlike
vlan and svlan, the entire ethernet packet is encapsulated in another.
The motivation for this is to avoid the need for intermediate switches
to learn all the "customer" mac addresses, they just need to know about
the PBB endpoints.

However, like vlan it does have a concept of a vnetid, and has the
ability to store the packet priority. the vnetid is 24 bits and doesn't
appear to have any reserved values.

Thoughts?

Index: share/man/man4/Makefile
===
RCS file: /cvs/src/share/man/man4/Makefile,v
retrieving revision 1.697
diff -u -p -r1.697 Makefile
--- share/man/man4/Makefile 23 Nov 2018 12:38:44 -  1.697
+++ share/man/man4/Makefile 19 Dec 2018 04:16:07 -
@@ -15,7 +15,7 @@ MAN=  aac.4 ac97.4 acphy.4 acrtc.4 \
auacer.4 audio.4 aue.4 auglx.4 auich.4 auixp.4 autri.4 auvia.4 \
axe.4 axen.4 axppmic.4 azalia.4 \
bce.4 bcmaux.4 bcmdog.4  bcmrng.4 bcmtemp.4 berkwdt.4 bge.4 \
-   bgw.4 bio.4 bktr.4 bmtphy.4 bnx.4 bnxt.4 \
+   bgw.4 bio.4 bpe.4 bktr.4 bmtphy.4 bnx.4 bnxt.4 \
boca.4 bpf.4 brgphy.4 bridge.4 brswphy.4 bwfm.4 bwi.4 bytgpio.4 \
cac.4 cas.4 cardbus.4 carp.4 ccp.4 ccpmic.4 cd.4 cdce.4 cfxga.4 \
ch.4 chvgpio.4 ciphy.4 ciss.4 clcs.4 clct.4 cmpci.4 \
Index: share/man/man4/bpe.4
===
RCS file: share/man/man4/bpe.4
diff -N share/man/man4/bpe.4
--- /dev/null   1 Jan 1970 00:00:00 -
+++ share/man/man4/bpe.419 Dec 2018 04:16:07 -
@@ -0,0 +1,159 @@
+.\" $OpenBSD$
+.\"
+.\" Copyright (c) 2018 David Gwynne 
+.\"
+.\" 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: November 16 2018 $
+.Dt BPE 4
+.Os
+.Sh NAME
+.Nm bpe
+.Nd Backbone Provider Edge pseudo-device
+.Sh SYNOPSIS
+.Cd "pseudo-device bpe"
+.Sh DESCRIPTION
+The
+.Nm bpe
+driver allows construction of IEEE 802.1Q Provider Backbone Bridge
+(PBB) networks by acting as a Backbone Edge Bridge (BEB).
+PBB, also known as mac-in-mac, was originally specified in
+IEEE 802.1ah-2008 and became part of IEEE 802.1Q-2011.
+.Pp
+A Provider Backbone Bridge Network (PBBN) consists of BEBs
+interconnected by Backbone Core Bridges (BCBs) to form an Ethernet
+network for the transport of encapsulated Ethernet packets.
+Where VLAN and SVLAN protocols add a shim to differentiate Ethernet
+packets for different networks but retain the Ethernet addresses
+of encapsulated traffic, PBB completely encapsulates Ethernet packets
+for transmission between BEBs on a PBBN.
+This removes the need for intermediate BCB devices on the backbone
+network  to learn the Ethernet addresses of devices on the encapsulated
+network, but requires each BEB to maintain a mapping of addresses
+on the encapsulated network to peer BEBs.
+.Pp
+A PBB packet consists of another Ethernet frame containing Ethernet
+addresses for BEBs and the PBB Ethernet protocol type (0x88e7), a
+32-bit Backbone Service Instance Tag (I-TAG), followed by the
+encapsulated Ethernet frame.
+The I-TAG contains a 24-bit Backbone Service Instance Identifiier
+(I-SID) to differentiate different PBBNs on the same backbone network
+.Pp
+IEEE 802.1Q describes Customer VLANs being encapsulated by PBB,
+which in turn uses an S-VLAN service.
+This can be implemented with
+.Xr vlan 4
+using a
+.Nm bpe
+interface as the parent,
+and with the
+.Nm bpe
+interface using
+.Xr svlan 4
+as the parent.
+.Nm bpe
+itself does not require this topology, therefore allowing flexible
+deployment and network topologies.
+.Pp
+The
+Nm. bpe
+driver implements a learning bridge on each interface.
+The driver will learn the mapping of BEPs to encapsulated Ethernet
+address based on traffic received from other devices on the backbone
+network.
+Traffic sent to broadcast, multicast, or unknown unicast Etherent
+addresses will be flooded to a multicast address on the backbone network.
+The multicast address used for each PBB Service Instance
+will begin with 01:1e:83 as the first three octets, with the I-SID
+as the last three octets, e.g., a
+.Nm bpe
+interface