Network Working Group                                         S. Bryant
Internet Draft                                               G. Swallow
Expiration Date: APR 2005                                 Cisco Systems
                                                           D. McPherson
                                                         Arbor Networks

                                                               Oct 2004


                PWE3 Control Word for use over an MPLS PSN


                         draft-ietf-pwe3-cw-00.txt





Status of this Memo


   By submitting this Internet-Draft, we certify that any applicable
   patent or other IPR claims of which we are aware have been
   disclosed, or will be disclosed, and any of which we become aware
   will be disclosed, in accordance with RFC 3668.


   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its areas, and its working groups.  Note that
   other groups may also distribute working documents as
   Internet-Drafts.


   Internet-Drafts are draft documents valid for a maximum of six
   months and may be updated, replaced, or obsoleted by other documents
   at any time.  It is inappropriate to use Internet-Drafts as
   reference material or to cite them other than a "work in progress."


   The list of current Internet-Drafts can be accessed at
   http://www.ietf.org/1id-abstracts.html


   The list of Internet-Draft Shadow Directories can be accessed at
   http://www.ietf.org/shadow.html


Abstract

   This document describes the preferred designs of the PWE3 Control
   Word, and the PW Associated Channel Header. The design of these
   fields is chosen so that an MPLS LSR performing deep packet
   inspection will not confuse a PWE3 payload with an IP payload.


Conventions used in this document









Bryant et al               Expires APR 2005                   [Page 1]


INTERNET DRAFT   PWE3 Control Word for use over an MPLS PSN   SEPT 2004


   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in RFC 2119 [RFC2119].



1.   Introduction


   Packets are carried in MPLS label stacks without any protocol
   identifier. In order for a pseudo wire (PW) [ARCH] to operate
   correctly over an MPLS packet switched network (PSN) that performs
   deep packet inspection, a PW packet must not appear to the LSR as if
   it were an IP packet [BCP]. An example of an LSR that performs deep
   packet inspection is one that is performing equal-cost multiple-path
   load-balancing (ECMP) [RFC2992]. If ECMP were performed on PWE3
   packets, the packets in the PW may not all follow the same path
   though the PSN. This may result in misordered packet deliver to the
   egress PE. The inability to ensure that all packets belonging to a
   PW follow the same path also prevents the PW OAM [VCCV] mechanism
   from correctly monitoring the PW.


   This draft specifies how a PW header distinguishes a PW payload from
   an IP payload carried over an MPLS PSN.


2.   PWE3 Packet Identification


   All IP packets [RFC791][RFC1883] start with a version number which
   is checked by LSRs performing deep packet inspection. To prevent the
   incorrect inspection of packets, PW packets carried over an MPLS PSN
   SHOULD NOT start with the value 4 or the value 6 in the first nibble
   [BCP].


   This document defines a PW header and two general formats of that
   header. These two formats are the PW Control Word (PW-CW) used for
   data passing across the PW, and a PW Associated Channel Header (PW-
   ACH) that can be used for functions such as OAM.


   If the first nibble of a PWE3 packet carried over an MPLS PSN has a
   value of 0, it starts with a PW-CW. If the first nibble of a packet
   carried over an MPLS PSN has a value of 1, it starts with a PW-ACH.
   The use of any other first nibble value for a PWE3 packet carried
   over an MPLS PSN is deprecated.


   A PW carried over an MPLS PSN that uses the contents of the MPLS
   payload to select the ECMP path SHOULD employ the PW Control Word
   described in Section 3 for data, and the PW Associated Channel
   Header described in Section Error! Reference source not found. for
   channel associated traffic. These fields MUST immediately follow the
   bottom of the MPLS label stack.







Bryant et al               Expires APR 2005                   [Page 2]


INTERNET DRAFT   PWE3 Control Word for use over an MPLS PSN   SEPT 2004


3.   Generic PW Control Word


   The PW MPLS Control Word is shown in Figure 1.



    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |0 0 0 0|          Specified by PW Encapsulation                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

         Figure 1: PW Control Word


   The PW set-up protocol or configuration mechanism determines whether
   a PW uses a PW Control Word (PW-CW). Bits 0..3 differ from the first
   four bits of an IP packet [BCP] and hence provide the necessary MPLS
   payload discrimination.


   When a PW-CW is used, it SHOULD have the following preferred form:



    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |0 0 0 0| Flags |FRG|  Length   | Sequence Number               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


        Figure 2: PW Preferred Control Word


   The meaning of the fields of the PWE3 Preferred Control Word (Figure
   2) are as follows:


   Flags (bits 4 to 7):


          These bits are available for per payload signalling.  Their
          definition is encapsulation specific.


   FRG (bits 8 and 9):


          These bits are used when fragmenting a PW payload. Their use
          is defined in [FRAG] which is currently work in progress.
          When the PW is of a type that will never need payload
          fragmentation, these bits may be used as general purpose
          flags.


   Length (bits 10 to 15):


          The length field is used to determine the size of a PW
          payload that might have been padded to the minimum Ethernet
          MAC frame size during its transit across the PSN. If the




Bryant et al               Expires APR 2005                   [Page 3]


INTERNET DRAFT   PWE3 Control Word for use over an MPLS PSN   SEPT 2004


          MPLS payload (defined as the PW-CW + the PW payload + any
          additional PW headers) is less than 46 bytes, the length MUST
          be set to the length of the MPLS payload.  If the MPLS
          payload is between 46 bytes and 63 bytes the implementation
          MAY either set to the length of the MPLS payload, or it MAY
          set it to 0.  If the length of the MPLS payload is greater
          than 63 bytes the length MUST be set to 0.


          Note to the reader: In the definition above, both the MUSTs
          are needed to make the mechanism work, the MAY provides
          backwards compatibility with deployed systems.


   Sequence number (Bit 16 to 31):


          If the sequence number is not used, it is set to zero by the
          sender and ignored by the receiver.  Otherwise it specifies
          the sequence number of a packet.  A circular list of sequence
          numbers is used.  A sequence number takes a value from 1 to
          65535 (2**16-1). The sequence number window size for packet
          acceptance is dependent on the parameters of the PSN, and
          SHOULD be configurable. The mechanism used by the
          decapsulating PE to (re)acquire the correct sequence number
          is implementation dependent.


4.   PW Associated Channel


   For some features of PWs, such as OAM, an associated channel is
   required. When MPLS is used as the PSN, the PW Assocated Channel is
   identified by the following header:


   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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |0 0 0 1| FmtID |   Reserved    |         Channel Type          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


       Figure 3: PW Associated Channel Header


   The meaning of the fields in the PW Associated Channel Header
   (Figure 3) are as follows:


   FmtID:


          Format ID for the remaining 3 octets of the header. A FmtID
          of 0 indicates that the 3 octets are as depicted above.


   Reserved:


          Must be sent as 0, and ignored on receive.






Bryant et al               Expires APR 2005                   [Page 4]


INTERNET DRAFT   PWE3 Control Word for use over an MPLS PSN   SEPT 2004


   Channel Type:


          The PW Associated Channel Type is defined in the IANA PW
          Associated Channel Type registry [IANA].


   Bits 0..3 MUST be 0x01, and hence differ from the first four bits of
   an IP packet [BCP]. This provides the necessary MPLS payload
   discrimination.


   Note that L2TPv3 has its own mechanisms for providing this
   associated channel.


5.   IANA considerations


   IANA needs to set up a registry of "PW Associated Channel Type".
   These are 16-bit values.  PW Associated Channel Type values 1
   through 127 are to be assigned by IANA using the "IETF Consensus"
   policy defined in RFC2434. PW Associated Channel Type values 128
   through 256 are to be assigned by IANA, using the "First Come First
   Served" policy defined in RFC2434. PW Associated Channel Type values
   1 through 65535 are vendor-specific, and values in this range are
   not to be assigned by IANA. A PW Associated Channel Type of up to 65
   characters is required for any assignment from this registry. The
   value 0 is reserved.


   Initial PW Associated Channel Type value allocations are specified
   in "IANA Allocations for pseudo Wire Edge to Edge Emulation (PWE3)"
   [IANA], and should be incorporated by IANA into the registry.


6.   Security Considerations


   An application using this mechanism to provide an OAM [VCCV] or
   other message channel MUST be aware that this can potentially be
   misused. Any application using the Associated Channel must therefore
   fully consider the resultant security issues, and provide mechanisms
   to prevent an attacker using this as a mechanism to disrupt the
   operation of the PW or the PE, and to stop this channel being used
   as a conduit to deliver packets elsewhere.


   If a PW has been configured to operate without a CW, the PW
   Associated Channel Type mechanism described in the document MUST NOT
   be used. This is to prevent user payloads being fabricated in such a
   way that they mimic the PW Associated Channel header, and thereby
   provide a method of attacking the application that is using the
   Associated Channel.











Bryant et al               Expires APR 2005                   [Page 5]


INTERNET DRAFT   PWE3 Control Word for use over an MPLS PSN   SEPT 2004


7.   Intellectual Property Statement



   The IETF takes no position regarding the validity or scope of any
   Intellectual Property Rights or other rights that might be claimed
   to pertain to the implementation or use of the technology described
   in this document or the extent to which any license under such
   rights might or might not be available; nor does it represent that
   it has made any independent effort to identify any such rights.
   Information on the procedures with respect to rights in RFC
   documents can be found in BCP 78 and BCP 79.


   Copies of IPR disclosures made to the IETF Secretariat and any
   assurances of licenses to be made available, or the result of an
   attempt made to obtain a general license or permission for the use
   of such proprietary rights by implementers or users of this
   specification can be obtained from the IETF on-line IPR repository
   at http://www.ietf.org/ipr.


   The IETF invites any interested party to bring to its attention any
   copyrights, patents or patent applications, or other proprietary
   rights that may cover technology that may be required to implement
   this standard.  Please address the information to the IETF at ietf-
   ipr@ietf.org.



8.    Full copyright statement


   Copyright (C) The Internet Society (2004). This document is subject
   to the rights, licenses and restrictions contained in BCP 78, and
   except as set forth therein, the authors retain all their rights.


   This document and the information contained herein are provided on
   an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE
   REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE
   INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR
   IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
   THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
   WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.





9.   Normative References


   Internet-drafts are works in progress available from
   http://www.ietf.org/internet-drafts/


   [RFC791]   RFC-791: DARPA Internet Program, Protocol
               Specification, ISI, September 1981.






Bryant et al               Expires APR 2005                   [Page 6]


INTERNET DRAFT   PWE3 Control Word for use over an MPLS PSN   SEPT 2004


   [RFC1883]  RFC-1883: Internet Protocol, Version 6 (IPv6), S.
               Deering, et al, December 1995


   [RFC2992]  RFC-2992:  Analysis of an Equal-Cost Multi-Path
               Algorithm, C. Hopps, November 2000


   [RFC2424]  RFC-2424: Guidelines for Writing an IANA
               Considerations Section in RFCs, Alvestrand and
               Narten, October 1998.





10.    Informative References



   Internet-drafts are works in progress available from
   <http://www.ietf.org/internet-drafts/>


   [ARCH] Bryant, S., Pate, P., "PWE3 Architecture", Internet
          Draft, < draft-ietf-pwe3-arch-07.txt>, October 2003,
          Work in Progress.


   [BCP] Swallow, G. et al, "Avoiding Equal Cost Multipath
         Treatment in MPLS Networks", Internet Draft
         <draft-ietf-mpls-ecmp-bcp-00.txt>, September 2004,
         Work in Progress.


   [FRAG] Malis, A., Townsley, M., "PWE3 Fragmentation and
          Reassembly", Internet Draft, <draft-ietf-pwe3-
          fragmentation-05.txt>, February 2004, Work in
          Progress.


   [IANA] Martini, L., Townsley M., "IANA Allocations for
          pseudo Wire Edge to Edge Emulation (PWE3)", Internet
          Draft, <draft-ietf-pwe3-iana-allocation-05.txt>,
          June 2004, Work in Progress.

   [VCCV] Nadeau, T., Aggarwal, T., "Pseudo Wire (PW) Virtual
          Circuit Connection Verification (VCCV)", Internet
          Draft, <draft-ietf-pwe3-vccv-02.txt>, February 2004,
          Work in Progress.















Bryant et al               Expires APR 2005                   [Page 7]


INTERNET DRAFT   PWE3 Control Word for use over an MPLS PSN   SEPT 2004


11.    Authors' Addresses



   Stewart Bryant
   Cisco Systems,
   250, Longwater,
   Green Park,
   Reading, RG2 6GB,
   United Kingdom.             Email: stbryant@cisco.com

   Danny McPherson
   Arbor Networks              Email: danny@arbor.net

   George Swallow
   Cisco Systems, Inc.
   1414 Massachusetts Ave
   Boxborough, MA 01719        Email:  swallow@cisco.com







































Bryant et al               Expires APR 2005                   [Page 8]