Skip to contentSkip to conversation

ppp: Bridge Control Protocol

RFC In review Stephen Hemminger 3 participants 5 messages Mar 1, 2010 – Mar 3, 2010

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

RFC 1/1 ppp: Bridge Control Protocol

This is a port of an old patch to provide BCP support. BCP allows bridging PPP tunnels, it useful to do bridging between virtualized environments. Original patch was done by Dan Eble but was for 2.4.21.

Note: still needs testing. Does anyone have hardware to make sure this interoperates with other implementations?

---
 drivers/net/Kconfig       |    7 
 drivers/net/ppp_generic.c |  359 ++++++++++++++++++++++++++++++++++++++++++++--
 include/linux/ppp_defs.h  |   31 +++
 3 files changed, 385 insertions(+), 12 deletions(-)
include/linux/ppp_defs.h +31 -0
@@ -70,15 +70,18 @@
 #define PPP_IPX		0x2b	/* IPX protocol */
 #define	PPP_VJC_COMP	0x2d	/* VJ compressed TCP */
 #define	PPP_VJC_UNCOMP	0x2f	/* VJ uncompressed TCP */
+#define PPP_BRIDGE	0x31	/* Bridged LAN traffic or BPDU */
 #define PPP_MP		0x3d	/* Multilink protocol */
 #define PPP_IPV6	0x57	/* Internet Protocol Version 6 */
 #define PPP_COMPFRAG	0xfb	/* fragment compressed below bundle */
 #define PPP_COMP	0xfd	/* compressed packet */
+#define PPP_BPDU_IEEE	0x0201	/* IEEE 802.1 (D or G) bridge PDU */
 #define PPP_MPLS_UC	0x0281	/* Multi Protocol Label Switching - Unicast */
 #define PPP_MPLS_MC	0x0283	/* Multi Protocol Label Switching - Multicast */
 #define PPP_IPCP	0x8021	/* IP Control Protocol */
 #define PPP_ATCP	0x8029	/* AppleTalk Control Protocol */
 #define PPP_IPXCP	0x802b	/* IPX Control Protocol */
+#define PPP_BCP		0x8031	/* Bridging Control Protocol */
 #define PPP_IPV6CP	0x8057	/* IPv6 Control Protocol */
 #define PPP_CCPFRAG	0x80fb	/* CCP at link level (below MP bundle) */
 #define PPP_CCP		0x80fd	/* Compression Control Protocol */
@@ -181,4 +184,32 @@ struct ppp_idle {
     __kernel_time_t recv_idle;	/* time since last NP packet received */
 };
 
+/*
+ * Bridging Control Protocol (BCP)
+ */
+struct bcp_hdr {
+	u8	flags;
+	u8	mactype;
+	u8	padbyte;	/* not used (present when "control" is also) */
+	u8	control;	/* 802.4, 802.5, and FDDI only */
+};
+#define BCP_802_3_HDRLEN	2
+
+/*
+ * Fields in bcp_hdr flags.
+ */
+#define BCP_LAN_FCS		0x80	/* set when LAN FCS is present */
+#define BCP_ZERO_PAD		0x20	/* set to pad 802.3 to min size */
+#define BCP_PADS_MASK		0x0F	/* 0-15 bytes padding before PPP FCS */
+
+/*
+ * Values for bcp_hdr mactype.
+ */
+#define BCP_MAC_802_3		0x01	/* 802.3 / Ethernet */
+#define BCP_MAC_802_4		0x02
+#define BCP_MAC_802_5_NC	0x03	/* with non-canonical address */
+#define BCP_MAC_FDDI_NC		0x04	/* with non-canonical address */
+#define BCP_MAC_802_5		0x0B	/* with canonical address */
+#define BCP_MAC_FDDI		0x0C	/* with canonical address */
+
 #endif /* _PPP_DEFS_H_ */
drivers/net/ppp_generic.c +347 -12

448 lines not on this page · raw message

drivers/net/Kconfig +7 -0
@@ -3166,6 +3166,13 @@ config PPPOL2TP
 	  and session setup). One such daemon is OpenL2TP
 	  (http://openl2tp.sourceforge.net/).
 
+config PPP_BCP
+        tristate "PPP over Bridge"
+	depends on EXPERIMENTAL && PPP && BRIDGE
+	help
+	  Support for PPP over Ethernet Bridge by using the
+	  Bridge Control Protocol (BCP) as defined in RFC 3185.
+
 config SLIP
 	tristate "SLIP (serial line) support"
 	---help---
#1 lore raw
Quoted 7 lines · Stephen Hemminger

This is a port of an old patch to provide BCP support. BCP allows bridging PPP tunnels, it useful to do bridging between virtualized environments. Original patch was done by Dan Eble but was for 2.4.21.

Note: still needs testing. Does anyone have hardware to make sure this interoperates with other implementations?

Is there a corresponding pppd patch to handle the control protocol?

Paul.

#2 lore raw
Quoted 7 lines · On Tue, 2 Mar 2010 14:39:44 +1100 Paul Mackerras <[email protected]> wrote:
Quoted 5 lines · Stephen Hemminger

This is a port of an old patch to provide BCP support. BCP allows bridging PPP tunnels, it useful to do bridging between virtualized environments. Original patch was done by Dan Eble but was for 2.4.21.

Quoted 6 lines
Quoted 2 lines

Note: still needs testing. Does anyone have hardware to make sure this interoperates with other implementations?

Is there a corresponding pppd patch to handle the control protocol?

Paul.

Yes, I am working on that

#3 lore raw
In reply to Paul Mackerras
Quoted 7 lines · On Tue, 2 Mar 2010 14:39:44 +1100 Paul Mackerras <[email protected]> wrote:
Quoted 5 lines · Stephen Hemminger

This is a port of an old patch to provide BCP support. BCP allows bridging PPP tunnels, it useful to do bridging between virtualized environments. Original patch was done by Dan Eble but was for 2.4.21.

Quoted 6 lines
Quoted 2 lines

Note: still needs testing. Does anyone have hardware to make sure this interoperates with other implementations?

Is there a corresponding pppd patch to handle the control protocol?

Paul.

Old starting point

https://lists.linux-foundation.org/pipermail/bridge/2005-May/004523.html

#4 lore raw
In reply to Stephen Hemminger
Quoted 4 lines · On Tuesday 02 March 2010 00:59:15 Stephen Hemminger wrote:

This is a port of an old patch to provide BCP support. BCP allows bridging PPP tunnels, it useful to do bridging between virtualized environments. Original patch was done by Dan Eble but was for 2.4.21.

Mikrotik has, when pppd patch will be ready - i can try to test.

P.S. They are also based on Linux, but i guess they have their own version of patch.