From cacd4323ce422eb26e839c2a82727ba700a087a4 Mon Sep 17 00:00:00 2001 From: Randy Bush Date: Mon, 3 Jun 2019 14:00:26 -0700 Subject: [PATCH] serial number stiched in --- draft-ietf-lsvr-l3dl.xml | 131 +++++++++++++++++++++------------------ 1 file changed, 72 insertions(+), 59 deletions(-) diff --git a/draft-ietf-lsvr-l3dl.xml b/draft-ietf-lsvr-l3dl.xml index fd5fcf6..0cae67e 100644 --- a/draft-ietf-lsvr-l3dl.xml +++ b/draft-ietf-lsvr-l3dl.xml @@ -405,7 +405,9 @@ Seven-bit Version number of the protocol, - currently 0. Values other than 0 are treated as errors. + currently 0. Values other than 0 are treated as errors. The + protocol version nees to be in one and only one place, so it is in + the datagram as opposed to, for example, the PDU. A bit that set to one if this Datagram is the last Datagram of the PDU. For a PDU which fits in only one @@ -534,8 +536,9 @@ uint32_t sbox_checksum_32(const uint8_t *b, const size_t n) The application layer content of the L3DL PDU. - The type of the Signature. Type 0, a null - signature, is defined in this document. + The type of the Signature, see . Type 0, a null signature, is defined in + this document. Sig Type 0 indicates a null Signature. For a trivial PDU such as KEEPALIVE, the underlying Datagram checksum may be sufficient @@ -660,7 +663,7 @@ uint32_t sbox_checksum_32(const uint8_t *b, const size_t n) If the configured destination address is one that is propagated by switches, the HELLO SHOULD be repeated at a configured interval, with a default of 60 seconds. This allows discovery by new devices - which come up on the layer two mesh. + which come up on the layer-2 mesh. + protocol "PDU Type = 1:8,Payload Length:32,Nonce:32,LLEI Length:8,My LLEI:32,AttrCount:8,Attribute List ...:24,Auth Type:8,Key Length:16,Key ...:24,Serial Number:32,Sig Type:8,Signature Length:16,Signature ...:8" +q-->
@@ -722,6 +725,8 @@ uint32_t sbox_checksum_32(const uint8_t *b, const size_t n) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ | Key ... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +| Serial Number | ++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sig Type | Signature Length | Signature ... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ @@ -759,6 +764,12 @@ uint32_t sbox_checksum_32(const uint8_t *b, const size_t n) authenticate is a failure to start the L3DL session, an ERROR PDU is sent (Error Code 2), and HELLOs MUST be restarted. + The Serial Number is that of the last received and processed + Encapsulation PDU. This allows a receiver sending an OPEN to tell + the sender that it only needs to send data more recent than the + Serial Number. If this OPEN is not trying to restart a lost + session, the Serial Number MUST be set to zero. + The Signature fields are described in and in an asymmetric key environment serve as a proof of possession of the signing auth data by the sender. @@ -829,18 +840,10 @@ uint32_t sbox_checksum_32(const uint8_t *b, const size_t n) error. The decimal value of EType gives a strong hint how the receiver - sending the ACK believes things should proceed: - - - 0 - No Error, Error Code and Error Hint MUST be zero - 1 - Warning, something not too serious happened, continue - 2 - Session should not be continued, try to restart - 3 - Restart is hopeless, call the operator - 4-15 - Reserved - - - Someone stuck in the 1990s might think of the error codes as 0x1zzz, - 0x2zzz, etc. They might be right. Or not. + sending the ACK believes things should proceed. The ETypes are + listed in . Someone stuck in the 1990s + might think of the error codes as 0x1zzz, 0x2zzz, etc. They might + be right. Or not. The Error Code indicates the type of error. @@ -905,7 +908,7 @@ uint32_t sbox_checksum_32(const uint8_t *b, const size_t n) The header for all encapsulation PDUs is as follows:
@@ -917,6 +920,8 @@ uint32_t sbox_checksum_32(const uint8_t *b, const size_t n) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ | Count | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +| Serial Number | ++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Encapsulation List... | Sig Type | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Signature Length | Signature ... | @@ -930,25 +935,11 @@ uint32_t sbox_checksum_32(const uint8_t *b, const size_t n) An Encapsulation PDU describes zero or more addresses of the encapsulation type. - An Encapsulation PDU of Type T replaces all previous - encapsulations of Type T. - - To remove all encapsulations of Type T, the sender uses a Count - of zero. - - If an LLEI has multiple addresses for an encapsulation type, - one and only one address SHOULD be configured to be marked as - primary, see . - - Loopback addresses are generally not seen directly on an - external interface. One or more loopback addresses MAY be exposed - by configuration on one or more L3DL speaking external interfaces, - e.g. for iBGP peering. They SHOULD be marked as such, see . - - If there is exactly one non-loopback address for an - encapsulation type on an interface, it SHOULD be marked as - primary. + The Serial Number is a monotonically increasing 32-bit value + representing the sender's state in time. It may be an integer, a + timestamp, etc. On session restart (new OPEN), a receiver MAY + send the last received Session Number to tell the sender to only + send newer data. If a sender has multiple links on the same interface, separate data, ACKs, etc. must be kept for each peer. @@ -989,27 +980,39 @@ uint32_t sbox_checksum_32(const uint8_t *b, const size_t n)
+ An Encapsulation PDU of Type T may announce new and/or withdraw + old encapsulations of Type T. It indicates this with the Add/With + Encapsulation Flag, Announce == 1, Withdraw == 0. + Each Encapsulation interface address in an Encapsulation PDU is - either a new encapsulation be announced (Ann/With set to 1) (yes, - a la BGP) or requests one be withdrawn (Ann/With set to 0). - Adding an encapsulation which already exists SHOULD raise an - Announce/Withdraw Error (see ); the EType + either a new encapsulation be announced (Ann/With == 1) (yes, a la + BGP) or requests one be withdrawn (Ann/With == 0). Adding an + encapsulation which already exists SHOULD raise an + Announce/Withdraw Error (see ); the EType SHOULD be 2, suggesting a session restart (see so all encapsulations will be resent. - An Encapsulation interface address in an Encapsulation PDU MAY - be marked as a primary address. Only one address on an interface - MAY be marked as primary for each encapsulation type. + If an LLEI has multiple addresses for an encapsulation type, + one and only one address SHOULD be configured to be marked as + primary (Primary Flag == 1). Only one address on an interface MAY + be marked as primary for each encapsulation type. - Each Encapsulation interface address in an Encapsulation PDU is - that of the direct 'overlay' interface (flag set to 1), or an - 'underlay' address (flag set to 0), likely that of a VM or - container guest bridged on to the primary interface. - An Encapsulation interface address in an Encapsulation PDU MAY be marked as a loopback, in which case the respective bit is set. + Loopback addresses are generally not seen directly on an + external interface. One or more loopback addresses MAY be exposed + by configuration on one or more L3DL speaking external interfaces, + e.g. for iBGP peering. They SHOULD be marked as such, Loopback + Flag == 1. + + Each Encapsulation interface address in an Encapsulation PDU is + that of the direct 'underlay interface (Under/Over == 1), or an + 'overlay' address (Under/Over == 0), likely that of a VM or + container guest bridged on to an underlay address on the + interface. +
@@ -1019,7 +1022,7 @@ uint32_t sbox_checksum_32(const uint8_t *b, const size_t n) interface's addresses and the corresponding prefix lengths.
@@ -1031,6 +1034,8 @@ uint32_t sbox_checksum_32(const uint8_t *b, const size_t n) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ | Count | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +| Serial Number | ++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Encaps Flags | IPv4 Address ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ | PrefixLen | more ... | Sig Type | @@ -1052,7 +1057,7 @@ uint32_t sbox_checksum_32(const uint8_t *b, const size_t n) lengths.
@@ -1064,6 +1069,8 @@ uint32_t sbox_checksum_32(const uint8_t *b, const size_t n) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ | Count | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +| Serial Number | ++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Encaps Flags | | +-+-+-+-+-+-+-+-+ + | | @@ -1117,7 +1124,7 @@ uint32_t sbox_checksum_32(const uint8_t *b, const size_t n) lengths, and the corresponding labels.
@@ -1129,6 +1136,8 @@ uint32_t sbox_checksum_32(const uint8_t *b, const size_t n) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ | Count | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +| Serial Number | ++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Encaps Flags | MPLS Label List ... | ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ IPv4 Address | PrefixLen | @@ -1151,7 +1160,7 @@ uint32_t sbox_checksum_32(const uint8_t *b, const size_t n) so by stating the interface's addresses, the corresponding prefix lengths, and the corresponding labels.
@@ -1163,6 +1172,8 @@ uint32_t sbox_checksum_32(const uint8_t *b, const size_t n) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ | Count | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +| Serial Number | ++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Encaps Flags | MPLS Label List ... | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | | @@ -1193,7 +1204,7 @@ uint32_t sbox_checksum_32(const uint8_t *b, const size_t n)
@@ -1203,13 +1214,15 @@ uint32_t sbox_checksum_32(const uint8_t *b, const size_t n) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | PDU Type = 255| Payload Length ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -~ | ... | Enterprise Number ~ +~ | Serial Number ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -~ | Ent Type | Enterprise Data ... ~ +~ | Enterprise Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -~ | Sig Type |Signature Leng.| +| Ent Type | Enterprise Data ... ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -| | Signature ... | +~ | Sig Type | Signature Length | ++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +| Signature ... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+