Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc] BFD/SCION protocol specification #3873

Merged
merged 1 commit into from
Sep 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions doc/protocols/bfd.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
*******************
BFD on top of SCION
*******************

BFD (Bidirectional Forwarding Detection) is a network protocol that is used to
detect faults between two forwarding engines connected by a link. (See `rfc5880
<https://tools.ietf.org/html/rfc5880>`__ and `rfc5881
<https://tools.ietf.org/html/rfc5881>`__.)

BFD can be layered on top of different transport protocols. This document
describes how BFD should be layered on top of SCION.

The Protocol
============

BFD packets, as they are described in the relevant RFCs, should be placed
directly into SCION payload, with no additional intermediate protocol::

+----------------------+
| SCION common header |
+----------------------+
| SCION address header |
+----------------------+
| SCION path header |
+----------------------+
| BFD |
+----------------------+

The `NextHdr` field in the SCION common header must be set to type `BFD` (17).

BFD in SCION Router
===================

Discriminators
--------------

SCION router should choose its discriminators for BFD sessions at random.

Bootstrapping
-------------

BFD bootstrapping process (that is, how incoming BFD packet with `Your Discriminator`
field equal to zero is mapped to a BFD session) is to be defined by each
particular application.

SCION router, in particular, does bootstrapping in the following way.

It creates one "external" BFD session for each SCION
interface that it owns. Its BFD peer is the SCION router in the neighbouring
AS. The associated BFD packets must use SCION `OneHopPath
<https://scion.docs.anapaya.net/en/latest/protocols/scion-header.html#path-type-onehoppath>`__
type.

This kind of BFD session in unambiguously identified by the ID of the SCION interface the
packet was received on.

Furthermore, SCION router creates one "internal" BFD session for every
other SCION router instance within the same AS. The associated BFD packets must use SCION
`Empty
<https://scion.docs.anapaya.net/en/latest/protocols/scion-header.html#path-type-empty>`__
path type.

These BFD sessions are uniquely identified by the source address, as it appears
in the SCION address header.

Any other BFD packets (e.g. packets with standard SCION path) are invalid and
must be dropped by the SCION router.

Caveats
=======

Note that there is no UDP header, and therefore no ports in BFD/SCION protocol.

The consequence is that there can't be two SCION/BFD-enabled applications (e.g.
two SCION router instances) sharing the same IP address.
1 change: 1 addition & 0 deletions doc/protocols/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ This page contains SCION control and data plane protocols and specifications.
extension-header
scmp
sig
bfd
11 changes: 9 additions & 2 deletions doc/protocols/scion-header.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ PayloadLen
PathType
The PathType specifies the SCION path type with up to 256 different types.
The format of each path type is independent of each other. The initially
proposed SCION path types are SCION (0), OneHopPath (1), EPIC (2) and
COLIBRI (3). Here, we only specify the SCION and OneHopPath path types.
proposed SCION path types are Empty (0), SCION (1), OneHopPath (2), EPIC (3)
and COLIBRI (4). Here, we only specify the Empty, SCION and OneHopPath path
types.
DT/DL/ST/SL
DT/ST and DL/SL encode host-address type and host-address length,
respectively, for destination/ source. The possible host address length
Expand Down Expand Up @@ -404,6 +405,12 @@ In construction direction (down):
#. Check that the MAC in the hop field matches :math:`{\sigma^P_i}'`.
#. Do not update `SegID` as it already contains :math:`\beta_{i+1}`.

Path Type: EmptyPath
====================

Empty path is used to send traffic within the AS. It has no additional fields,
i.e., it consumes 0 bytes on the wire.

Path Type: OneHopPath
=====================

Expand Down