The Control Message Authentication Nonce AVP, Attribute Type 73,
MUST contain a cryptographically random value [RFC1750]. This
value is used for Control Message Authentication.
The Attribute Value field for this AVP has the following format:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Nonce ... (arbitrary number of octets)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The Nonce is of arbitrary length, though at least 16 octets is
recommended. The Nonce contains the random value for use in the
Control Message Authentication hash calculation (see Message
Digest AVP definition in this section).
If Control Message Authentication is enabled, this AVP MUST be
present in the SCCRQ and SCCRP messages.
This AVP MUST NOT be hidden (the H bit MUST be 0). The M bit for
this AVP SHOULD be set to 1, but MAY vary (see Section 5.2). The
Length of this AVP is 6 plus the length of the Nonce.
Random Vector (All Messages)
The Random Vector AVP, Attribute Type 36, MUST contain a
cryptographically random value [RFC1750]. This value is used for
AVP Hiding.
The Attribute Value field for this AVP has the following format:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Random Octet String ... (arbitrary number of octets)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The Random Octet String is of arbitrary length, though at least 16
octets is recommended. The string contains the random vector for
use in computing the MD5 hash to retrieve or hide the Attribute
Value of a hidden AVP (see Section 5.3).
More than one Random Vector AVP may appear in a message, in which
case a hidden AVP uses the Random Vector AVP most closely
preceding it. As such, at least one Random Vector AVP MUST
precede the first AVP with the H bit set.
This AVP MUST NOT be hidden (the H bit MUST be 0). The M bit for
this AVP SHOULD be set to 1, but MAY vary (see Section 5.2). The
Length of this AVP is 6 plus the length of the Random Octet
String.
5.4.2. Result and Error Codes
Result Code (StopCCN, CDN)
The Result Code AVP, Attribute Type 1, indicates the reason for
terminating the control connection or session.
The Attribute Value field for this AVP has the following format:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Result Code | Error Code (optional) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Error Message ... (optional, arbitrary number of octets) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The Result Code is a 2-octet unsigned integer. The optional Error
Code is a 2-octet unsigned integer. An optional Error Message can
follow the Error Code field. Presence of the Error Code and
Message is indicated by the AVP Length field. The Error Message
contains an arbitrary string providing further (human-readable)
text associated with the condition. Human-readable text in all
error messages MUST be provided in the UTF-8 charset [RFC3629]
using the Default Language [RFC2277].
This AVP MUST NOT be hidden (the H bit MUST be 0). The M bit for
this AVP SHOULD be set to 1, but MAY vary (see Section 5.2). The
Length is 8 if there is no Error Code or Message, 10 if there is
an Error Code and no Error Message, or 10 plus the length of the
Error Message if there is an Error Code and Message.
Defined Result Code values for the StopCCN message are as follows:
0 - Reserved.
1 - General request to clear control connection.
2 - General error, Error Code indicates the problem.
3 - Control connection already exists.
4 - Requester is not authorized to establish a control
connection.
5 - The protocol version of the requester is not supported,
Error Code indicates highest version supported.
6 - Requester is being shut down.
7 - Finite state machine error or timeout
General Result Code values for the CDN message are as follows:
0 - Reserved.
1 - Session disconnected due to loss of carrier or
circuit disconnect.
2 - Session disconnected for the reason indicated in Error
Code.
3 - Session disconnected for administrative reasons.
4 - Session establishment failed due to lack of appropriate
facilities being available (temporary condition).
5 - Session establishment failed due to lack of appropriate
facilities being available (permanent condition).
13 - Session not established due to losing tie breaker.
14 - Session not established due to unsupported PW type.
15 - Session not established, sequencing required without
valid L2-Specific Sublayer.
16 - Finite state machine error or timeout.
Additional service-specific Result Codes are defined outside this
document.
The Error Codes defined below pertain to types of errors that are
not specific to any particular L2TP request, but rather to
protocol or message format errors. If an L2TP reply indicates in
its Result Code that a General Error occurred, the General Error
value should be examined to determine what the error was. The
currently defined General Error codes and their meanings are as
follows:
0 - No General Error.
1 - No control connection exists yet for this pair of LCCEs.
2 - Length is wrong.
3 - One of the field values was out of range.
4 - Insufficient resources to handle this operation now.
5 - Invalid Session ID.
6 - A generic vendor-specific error occurred.
7 - Try another. If initiator is aware of other possible
responder destinations, it should try one of them. This can
be used to guide an LAC or LNS based on policy.
8 - The session or control connection was shut down due to receipt
of an unknown AVP with the M bit set (see Section 5.2). The
Error Message SHOULD contain the attribute of the offending
AVP in (human-readable) text form.
9 - Try another directed. If an LAC or LNS is aware of other
possible destinations, it should inform the initiator of the
control connection or session. The Error Message MUST contain
a comma-separated list of addresses from which the initiator
may choose. If the L2TP data channel runs over IPv4, then
this would be a comma-separated list of IP addresses in the
canonical dotted-decimal format (e.g., "192.0.2.1, 192.0.2.2,
192.0.2.3") in the UTF-8 charset [RFC3629] using the Default
Language [RFC2277]. If there are no servers for the LAC or
LNS to suggest, then Error Code 7 should be used. For IPv4,
the delimiter between addresses MUST be precisely a single
comma and a single space. For IPv6, each literal address MUST
be enclosed in "[" and "]" characters, following the encoding
described in [RFC2732].
When a General Error Code of 6 is used, additional information
about the error SHOULD be included in the Error Message field. A
vendor-specific AVP MAY be sent to more precisely detail a
vendor-specific problem.
5.4.3. Control Connection Management AVPs
Control Connection Tie Breaker (SCCRQ)
The Control Connection Tie Breaker AVP, Attribute Type 5,
indicates that the sender desires a single control connection to
exist between a given pair of LCCEs.
The Attribute Value field for this AVP has the following format:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Control Connection Tie Breaker Value ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
... (64 bits) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The Control Connection Tie Breaker Value is an 8-octet random
value that is used to choose a single control connection when two
LCCEs request a control connection concurrently. The recipient of
a SCCRQ must check to see if a SCCRQ has been sent to the peer; if
so, a tie has been detected. In this case, the LCCE must compare
its Control Connection Tie Breaker value with the one received in
the SCCRQ. The lower value "wins", and the "loser" MUST discard
its control connection. A StopCCN SHOULD be sent by the winner as
an explicit rejection for the losing SCCRQ. In the case in which
a tie breaker is present on both sides and the value is equal,
both sides MUST discard their control connections and restart
control connection negotiation with a new, random tie breaker
value.
If a tie breaker is received and an outstanding SCCRQ has no tie
breaker value, the initiator that included the Control Connection
Tie Breaker AVP "wins". If neither side issues a tie breaker,
then two separate control connections are opened.
Applications that employ a distinct and well-known initiator have
no need for tie breaking, and MAY omit this AVP or disable tie
breaking functionality. Applications that require tie breaking
also require that an LCCE be uniquely identifiable upon receipt of
an SCCRQ. For L2TP over IP, this MUST be accomplished via the
Router ID AVP.
Note that in [RFC2661], this AVP is referred to as the "Tie
Breaker AVP" and is applicable only to a control connection. In
L2TPv3, the AVP serves the same purpose of tie breaking, but is
applicable to a control connection or a session. The Control
Connection Tie Breaker AVP (present only in Control Connection
messages) and Session Tie Breaker AVP (present only in Session
messages), are described separately in this document, but share
the same Attribute type of 5.
This AVP MUST NOT be hidden (the H bit MUST be 0). The M bit for
this AVP SHOULD be set to 1, but MAY vary (see Section 5.2). The
length of this AVP is 14.
Host Name (SCCRQ, SCCRP)
The Host Name AVP, Attribute Type 7, indicates the name of the
issuing LAC or LNS, encoded in the US-ASCII charset.
The Attribute Value field for this AVP has the following format:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Host Name ... (arbitrary number of octets)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The Host Name is of arbitrary length, but MUST be at least 1
octet.
This name should be as broadly unique as possible; for hosts
participating in DNS [RFC1034], a host name with fully qualified
domain would be appropriate. The Host Name AVP and/or Router ID
AVP MUST be used to identify an LCCE as described in Section 3.3.
This AVP MUST NOT be hidden (the H bit MUST be 0). The M bit for
this AVP SHOULD be set to 1, but MAY vary (see Section 5.2). The
Length of this AVP is 6 plus the length of the Host Name.
Router ID (SCCRQ, SCCRP)
The Router ID AVP, Attribute Type 60, is an identifier used to
identify an LCCE for control connection setup, tie breaking,
and/or tunnel authentication.
The Attribute Value field for this AVP has the following format:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Router Identifier |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The Router Identifier is a 4-octet unsigned integer. Its value is
unique for a given LCCE, per Section 8.1 of [RFC2072]. The Host
Name AVP and/or Router ID AVP MUST be used to identify an LCCE as
described in Section 3.3.
Implementations MUST NOT assume that Router Identifier is a valid
IP address. The Router Identifier for L2TP over IPv6 can be
obtained from an IPv4 address (if available) or via unspecified
implementation-specific means.
This AVP MUST NOT be hidden (the H bit MUST be 0). The M bit for
this AVP SHOULD be set to 1, but MAY vary (see Section 5.2). The
Length of this AVP is 10.
Vendor Name (SCCRQ, SCCRP)
The Vendor Name AVP, Attribute Type 8, contains a vendor-specific
(possibly human-readable) string describing the type of LAC or LNS
being used.
The Attribute Value field for this AVP has the following format:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Vendor Name ... (arbitrary number of octets)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The Vendor Name is the indicated number of octets representing the
vendor string. Human-readable text for this AVP MUST be provided
in the US-ASCII charset [RFC1958, RFC2277].
This AVP MAY be hidden (the H bit MAY be 0 or 1). The M bit for
this AVP SHOULD be set to 0, but MAY vary (see Section 5.2). The
Length (before hiding) of this AVP is 6 plus the length of the
Vendor Name.
Assigned Control Connection ID (SCCRQ, SCCRP, StopCCN)
The Assigned Control Connection ID AVP, Attribute Type 61,
contains the ID being assigned to this control connection by the
sender.
The Attribute Value field for this AVP has the following format:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Assigned Control Connection ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The Assigned Control Connection ID is a 4-octet non-zero unsigned
integer.
The Assigned Control Connection ID AVP establishes the identifier
used to multiplex and demultiplex multiple control connections
between a pair of LCCEs. Once the Assigned Control Connection ID
AVP has been received by an LCCE, the Control Connection ID
specified in the AVP MUST be included in the Control Connection ID
field of all control packets sent to the peer for the lifetime of
the control connection. Before the Assigned Control Connection ID
AVP is received from a peer, all control messages MUST be sent to
that peer with a Control Connection ID value of 0 in the header.
Because a Control Connection ID value of 0 is used in this special
manner, the zero value MUST NOT be sent as an Assigned Control
Connection ID value.
Under certain circumstances, an LCCE may need to send a StopCCN to
a peer without having yet received an Assigned Control Connection
ID AVP from the peer (i.e., SCCRQ sent, no SCCRP received yet).
In this case, the Assigned Control Connection ID AVP that had been
sent to the peer earlier (i.e., in the SCCRQ) MUST be sent as the
Assigned Control Connection ID AVP in the StopCCN. This policy
allows the peer to try to identify the appropriate control
connection via a reverse lookup.
This AVP MAY be hidden (the H bit MAY be 0 or 1). The M bit for
this AVP SHOULD be set to 1, but MAY vary (see Section 5.2). The
Length (before hiding) of this AVP is 10.
Receive Window Size (SCCRQ, SCCRP)
The Receive Window Size AVP, Attribute Type 10, specifies the
receive window size being offered to the remote peer.
The Attribute Value field for this AVP has the following format:
0 1
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Window Size |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The Window Size is a 2-octet unsigned integer.
If absent, the peer must assume a Window Size of 4 for its
transmit window.
The remote peer may send the specified number of control messages
before it must wait for an acknowledgment. See Section 4.2 for
more information on reliable control message delivery.
This AVP MUST NOT be hidden (the H bit MUST be 0). The M bit for
this AVP SHOULD be set to 1, but MAY vary (see Section 5.2). The
Length of this AVP is 8.
Pseudowire Capabilities List (SCCRQ, SCCRP)
The Pseudowire Capabilities List (PW Capabilities List) AVP,
Attribute Type 62, indicates the L2 payload types the sender can
support. The specific payload type of a given session is
identified by the Pseudowire Type AVP.
The Attribute Value field for this AVP has the following format:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| PW Type 0 | ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... | PW Type N |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Defined PW types that may appear in this list are managed by IANA
and will appear in associated pseudowire-specific documents for
each PW type.
If a sender includes a given PW type in the PW Capabilities List
AVP, the sender assumes full responsibility for supporting that
particular payload, such as any payload-specific AVPs, L2-Specific
Sublayer, or control messages that may be defined in the
appropriate companion document.
This AVP MAY be hidden (the H bit MAY be 0 or 1). The M bit for
this AVP SHOULD be set to 1, but MAY vary (see Section 5.2). The
Length (before hiding) of this AVP is 8 octets with one PW type
specified, plus 2 octets for each additional PW type.
Preferred Language (SCCRQ, SCCRP)
The Preferred Language AVP, Attribute Type 72, provides a method
for an LCCE to indicate to the peer the language in which human-
readable messages it sends SHOULD be composed. This AVP contains
a single language tag or language range [RFC3066].
The Attribute Value field for this AVP has the following format:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Preferred Language... (arbitrary number of octets)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The Preferred Language is the indicated number of octets
representing the language tag or language range, encoded in the
US-ASCII charset.
It is not required to send a Preferred Language AVP. If (1) an
LCCE does not signify a language preference by the inclusion of
this AVP in the SCCRQ or SCCRP, (2) the Preferred Language AVP is
unrecognized, or (3) the requested language is not supported by
the peer LCCE, the default language [RFC2277] MUST be used for all
internationalized strings sent by the peer.