| < draft-ietf-6lo-6lobac-01.txt | draft-ietf-6lo-6lobac-02.txt > | |||
|---|---|---|---|---|
| 6Lo Working Group K. Lynn, Ed. | 6Lo Working Group K. Lynn, Ed. | |||
| Internet-Draft Verizon | Internet-Draft Verizon Labs | |||
| Intended status: Standards Track J. Martocci | Intended status: Standards Track J. Martocci | |||
| Expires: September 10, 2015 Johnson Controls | Expires: January 7, 2016 Johnson Controls | |||
| C. Neilson | C. Neilson | |||
| Delta Controls | Delta Controls | |||
| S. Donaldson | S. Donaldson | |||
| Honeywell | Honeywell | |||
| March 9, 2015 | July 6, 2015 | |||
| Transmission of IPv6 over MS/TP Networks | Transmission of IPv6 over MS/TP Networks | |||
| draft-ietf-6lo-6lobac-01 | draft-ietf-6lo-6lobac-02 | |||
| Abstract | Abstract | |||
| Master-Slave/Token-Passing (MS/TP) is a contention-free access method | Master-Slave/Token-Passing (MS/TP) is a medium access control method | |||
| for the RS-485 physical layer, which is used extensively in building | for the RS-485 physical layer, which is used extensively in building | |||
| automation networks. This specification defines the frame format for | automation networks. This specification defines the frame format for | |||
| transmission of IPv6 packets and the method of forming link-local and | transmission of IPv6 packets and the method of forming link-local and | |||
| statelessly autoconfigured IPv6 addresses on MS/TP networks. | statelessly autoconfigured IPv6 addresses on MS/TP networks. | |||
| Status of This Memo | Status of This Memo | |||
| This Internet-Draft is submitted in full conformance with the | This Internet-Draft is submitted in full conformance with the | |||
| provisions of BCP 78 and BCP 79. | provisions of BCP 78 and BCP 79. | |||
| Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
| Task Force (IETF). Note that other groups may also distribute | Task Force (IETF). Note that other groups may also distribute | |||
| working documents as Internet-Drafts. The list of current Internet- | working documents as Internet-Drafts. The list of current Internet- | |||
| Drafts is at http://datatracker.ietf.org/drafts/current/. | Drafts is at http://datatracker.ietf.org/drafts/current/. | |||
| Internet-Drafts are draft documents valid for a maximum of six months | Internet-Drafts are draft documents valid for a maximum of six months | |||
| and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
| time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
| material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
| This Internet-Draft will expire on September 10, 2015. | This Internet-Draft will expire on January 7, 2016. | |||
| Copyright Notice | Copyright Notice | |||
| Copyright (c) 2015 IETF Trust and the persons identified as the | Copyright (c) 2015 IETF Trust and the persons identified as the | |||
| document authors. All rights reserved. | document authors. All rights reserved. | |||
| This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
| Provisions Relating to IETF Documents | Provisions Relating to IETF Documents | |||
| (http://trustee.ietf.org/license-info) in effect on the date of | (http://trustee.ietf.org/license-info) in effect on the date of | |||
| publication of this document. Please review these documents | publication of this document. Please review these documents | |||
| skipping to change at page 2, line 17 ¶ | skipping to change at page 2, line 17 ¶ | |||
| the Trust Legal Provisions and are provided without warranty as | the Trust Legal Provisions and are provided without warranty as | |||
| described in the Simplified BSD License. | described in the Simplified BSD License. | |||
| Table of Contents | Table of Contents | |||
| 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 | |||
| 2. MS/TP Mode for IPv6 . . . . . . . . . . . . . . . . . . . . . 5 | 2. MS/TP Mode for IPv6 . . . . . . . . . . . . . . . . . . . . . 5 | |||
| 3. Addressing Modes . . . . . . . . . . . . . . . . . . . . . . 6 | 3. Addressing Modes . . . . . . . . . . . . . . . . . . . . . . 6 | |||
| 4. Maximum Transmission Unit (MTU) . . . . . . . . . . . . . . . 6 | 4. Maximum Transmission Unit (MTU) . . . . . . . . . . . . . . . 6 | |||
| 5. LoBAC Adaptation Layer . . . . . . . . . . . . . . . . . . . 6 | 5. LoBAC Adaptation Layer . . . . . . . . . . . . . . . . . . . 6 | |||
| 6. Stateless Address Autoconfiguration . . . . . . . . . . . . . 9 | 6. Stateless Address Autoconfiguration . . . . . . . . . . . . . 7 | |||
| 7. IPv6 Link Local Address . . . . . . . . . . . . . . . . . . . 10 | 7. IPv6 Link Local Address . . . . . . . . . . . . . . . . . . . 8 | |||
| 8. Unicast Address Mapping . . . . . . . . . . . . . . . . . . . 10 | 8. Unicast Address Mapping . . . . . . . . . . . . . . . . . . . 8 | |||
| 9. Multicast Address Mapping . . . . . . . . . . . . . . . . . . 11 | 9. Multicast Address Mapping . . . . . . . . . . . . . . . . . . 9 | |||
| 10. Header Compression . . . . . . . . . . . . . . . . . . . . . 11 | 10. Header Compression . . . . . . . . . . . . . . . . . . . . . 9 | |||
| 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 | 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 | |||
| 12. Security Considerations . . . . . . . . . . . . . . . . . . . 12 | 12. Security Considerations . . . . . . . . . . . . . . . . . . . 10 | |||
| 13. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 12 | 13. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 10 | |||
| 14. References . . . . . . . . . . . . . . . . . . . . . . . . . 12 | 14. References . . . . . . . . . . . . . . . . . . . . . . . . . 10 | |||
| Appendix A. Abstract MAC Interface . . . . . . . . . . . . . . . 14 | Appendix A. Abstract MAC Interface . . . . . . . . . . . . . . . 13 | |||
| Appendix B. Consistent Overhead Byte Stuffing [COBS] . . . . . . 16 | Appendix B. Consistent Overhead Byte Stuffing [COBS] . . . . . . 15 | |||
| Appendix C. Encoded CRC-32K [CRC32K] . . . . . . . . . . . . . . 20 | Appendix C. Encoded CRC-32K [CRC32K] . . . . . . . . . . . . . . 19 | |||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 22 | Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 21 | |||
| 1. Introduction | 1. Introduction | |||
| Master-Slave/Token-Passing (MS/TP) is a contention-free access method | Master-Slave/Token-Passing (MS/TP) is a medium access control (MAC) | |||
| for the RS-485 [TIA-485-A] physical layer, which is used extensively | protocol for the RS-485 [TIA-485-A] physical layer, which is used | |||
| in building automation networks. This specification defines the | extensively in building automation networks. This specification | |||
| frame format for transmission of IPv6 [RFC2460] packets and the | defines the frame format for transmission of IPv6 [RFC2460] packets | |||
| method of forming link-local and statelessly autoconfigured IPv6 | and the method of forming link-local and statelessly autoconfigured | |||
| addresses on MS/TP networks. The general approach is to adapt | IPv6 addresses on MS/TP networks. The general approach is to adapt | |||
| elements of the 6LoWPAN [RFC4944] specification to constrained wired | elements of the 6LoWPAN specifications [RFC4944], [RFC6282], and | |||
| networks. | [RFC6775] to constrained wired networks. | |||
| An MS/TP device is typically based on a low-cost microcontroller with | An MS/TP device is typically based on a low-cost microcontroller with | |||
| limited processing power and memory. Together with low data rates | limited processing power and memory. Together with low data rates | |||
| and a small address space, these constraints are similar to those | and a small MAC address space, these constraints are similar to those | |||
| faced in 6LoWPAN networks and suggest some elements of that solution | faced in 6LoWPAN networks and suggest some elements of that solution | |||
| might be leveraged. MS/TP differs significantly from 6LoWPAN in at | might be leveraged. MS/TP differs significantly from 6LoWPAN in at | |||
| least three respects: a) MS/TP devices typically have a continuous | least three respects: a) MS/TP devices typically have a continuous | |||
| source of power, b) all MS/TP devices on a segment can communicate | source of power, b) all MS/TP devices on a segment can communicate | |||
| directly so there are no hidden node or mesh routing issues, and c) | directly so there are no hidden node or mesh routing issues, and c) | |||
| recent changes to MS/TP provide support for large payloads, | recent changes to MS/TP provide support for large payloads, | |||
| eliminating the need for link-layer fragmentation and reassembly. | eliminating the need for fragmentation and reassembly below IPv6. | |||
| The following sections provide a brief overview of MS/TP, then | The following sections provide a brief overview of MS/TP, then | |||
| describe how to form IPv6 addresses and encapsulate IPv6 packets in | describe how to form IPv6 addresses and encapsulate IPv6 packets in | |||
| MS/TP frames. This document also specifies a header compression | MS/TP frames. This document also specifies a header compression | |||
| mechanism, based on [RFC6282], that is RECOMMENDED in order to make | mechanism, based on [RFC6282], that is REQUIRED in order to reduce | |||
| IPv6 practical on low speed MS/TP networks. | latency and make IPv6 practical on MS/TP networks. | |||
| 1.1. Requirements Language | 1.1. Requirements Language | |||
| The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | |||
| "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this | "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this | |||
| document are to be interpreted as described in [RFC2119]. | document are to be interpreted as described in [RFC2119]. | |||
| 1.2. Abbreviations Used | 1.2. Abbreviations Used | |||
| ASHRAE: American Society of Heating, Refrigerating, and Air- | ASHRAE: American Society of Heating, Refrigerating, and Air- | |||
| skipping to change at page 4, line 8 ¶ | skipping to change at page 4, line 8 ¶ | |||
| resolution timer. These features make MS/TP a cost-effective field | resolution timer. These features make MS/TP a cost-effective field | |||
| bus for the most numerous and least expensive devices in a building | bus for the most numerous and least expensive devices in a building | |||
| automation network. | automation network. | |||
| The differential signaling used by [TIA-485-A] requires a contention- | The differential signaling used by [TIA-485-A] requires a contention- | |||
| free MAC. MS/TP uses a token to control access to a multidrop bus. | free MAC. MS/TP uses a token to control access to a multidrop bus. | |||
| A master node may initiate the transmission of a data frame when it | A master node may initiate the transmission of a data frame when it | |||
| holds the token. After sending at most a configured maximum number | holds the token. After sending at most a configured maximum number | |||
| of data frames, a master node passes the token to the next master | of data frames, a master node passes the token to the next master | |||
| node (as determined by node address). Slave nodes transmit only when | node (as determined by MAC address). Slave nodes do not support the | |||
| polled and SHALL NOT be considered part of this specification. | frame format required to convey IPv6 over MS/TP and therefore SHALL | |||
| NOT be considered part of this specification. | ||||
| MS/TP COBS-encoded* frames have the following format: | MS/TP COBS-encoded* frames have the following format: | |||
| 0 1 2 3 | 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 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 | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | 0x55 | 0xFF | Frame Type* | DA | | | 0x55 | 0xFF | Frame Type* | DA | | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | SA | Length (MS octet first) | Header CRC | | | SA | Length (MS octet first) | Header CRC | | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| . . | . . | |||
| . Encoded Data* (2 - 1507 octets) . | . Encoded Data* (2 - 1506 octets) . | |||
| . . | . . | |||
| + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | | Encoded CRC-32K* (5 octets) | | | | Encoded CRC-32K* (5 octets) | | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ | |||
| | | optional 0xFF | | | | optional 0xFF | | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Figure 1: MS/TP COBS-Encoded Frame Format | Figure 1: MS/TP COBS-Encoded Frame Format | |||
| *Note: BACnet Addendum 135-2012an [Addendum_an] defines a range of | *NOTE: BACnet Addendum 135-2012an [Addendum_an] defines a range of | |||
| Frame Type values to designate frames that contain data and data CRC | Frame Type values to designate frames that contain data and data CRC | |||
| fields encoded using Consistent Overhead Byte Stuffing [COBS] (see | fields encoded using Consistent Overhead Byte Stuffing [COBS] (see | |||
| Appendix B). The purpose of COBS encoding is to eliminate preamble | Appendix B). The purpose of COBS encoding is to eliminate preamble | |||
| sequences from the Encoded Data and Encoded CRC-32K fields. The | sequences from the Encoded Data and Encoded CRC-32K fields. The | |||
| maximum length of an MSDU as defined by this specification is 1501 | maximum length of an MSDU as defined by this specification is 1500 | |||
| octets (before encoding). The Encoded Data is covered by a 32-bit | octets (before encoding). The Encoded Data is covered by a 32-bit | |||
| CRC [CRC32K] (see Appendix C), which is then itself COBS encoded. | CRC [CRC32K] (see Appendix C), which is itself then COBS encoded. | |||
| MS/TP COBS-encoded frame fields have the following descriptions: | MS/TP COBS-encoded frame fields have the following descriptions: | |||
| Preamble two octet preamble: 0x55, 0xFF | Preamble two octet preamble: 0x55, 0xFF | |||
| Frame Type one octet | Frame Type one octet | |||
| Destination Address one octet address | Destination Address one octet address | |||
| Source Address one octet address | Source Address one octet address | |||
| Length two octets, most significant octet first | Length two octets, most significant octet first | |||
| Header CRC one octet | Header CRC one octet | |||
| Encoded Data 2 - 1512 octets (see Appendix B) | Encoded Data 2 - 1506 octets (see Appendix B) | |||
| Encoded CRC-32K five octets (see Appendix C) | Encoded CRC-32K five octets (see Appendix C) | |||
| (pad) (optional) at most one octet of trailer: 0xFF | (pad) (optional) at most one octet of trailer: 0xFF | |||
| The Frame Type is used to distinguish between different types of MAC | The Frame Type is used to distinguish between different types of MAC | |||
| frames. The types relevant to this specification (in decimal) are: | frames. The types relevant to this specification (in decimal) are: | |||
| 0 Token | 0 Token | |||
| 1 Poll For Master | 1 Poll For Master | |||
| 2 Reply To Poll For Master | 2 Reply To Poll For Master | |||
| ... | ... | |||
| 34 IPv6 over MS/TP (LoBAC) Encapsulation | 34 IPv6 over MS/TP (LoBAC) Encapsulation | |||
| Frame Types 8 through 127 are reserved for assignment by ASHRAE. | Frame Types 8 - 31 and 35 - 127 are reserved for assignment by | |||
| Frame Types 32 through 127 designate COBS-encoded frames and MUST | ASHRAE. Frame Types 32 - 127 designate COBS-encoded frames and MUST | |||
| convey Encoded Data and Encoded CRC-32K fields. All master nodes | convey Encoded Data and Encoded CRC-32K fields. All master nodes | |||
| MUST understand Token, Poll For Master, and Reply to Poll For Master | MUST understand Token, Poll For Master, and Reply to Poll For Master | |||
| control frames. See Section 2 for additional details. | control frames. See Section 2 for additional details. | |||
| The Destination and Source Addresses are each one octet in length. | The Destination and Source Addresses are each one octet in length. | |||
| See Section 3 for additional details. | See Section 3 for additional details. | |||
| For COBS-encoded frames, the Length field specifies the combined | For COBS-encoded frames, the Length field specifies the combined | |||
| length of the [COBS] Encoded Data and Encoded CRC-32K fields in | length of the [COBS] Encoded Data and Encoded CRC-32K fields in | |||
| octets, minus two. (This adjustment is required for backward | octets, minus two. (This adjustment is required for backward | |||
| compatibility with legacy MS/TP devices.) See Section 4 and | compatibility with legacy MS/TP devices.) See Section 4 and | |||
| Appendices for additional details. | Appendices for additional details. | |||
| The Header CRC field covers the Frame Type, Destination Address, | The Header CRC field covers the Frame Type, Destination Address, | |||
| Source Address, and Length fields. The Header CRC generation and | Source Address, and Length fields. The Header CRC generation and | |||
| check procedures are specified in BACnet [Clause9]. | check procedures are specified in BACnet [Clause9]. | |||
| 1.4. Goals and Non-goals | 1.4. Goals and Constraints | |||
| The primary goal of this specification is to enable IPv6 directly on | The primary goal of this specification is to enable IPv6 directly on | |||
| wired end devices in building automation and control networks by | wired end devices in building automation and control networks by | |||
| leveraging existing standards to the greatest extent possible. A | leveraging existing standards to the greatest extent possible. A | |||
| secondary goal is to co-exist with legacy MS/TP implementations. | secondary goal is to co-exist with legacy MS/TP implementations. | |||
| Only the minimum changes necessary to support IPv6 over MS/TP are | Only the minimum changes necessary to support IPv6 over MS/TP were | |||
| specified in BACnet [Addendum_an] (see Note in Section 1.3). | specified in BACnet [Addendum_an] (see Note in Section 1.3). | |||
| Non-goals include making changes to the MS/TP frame header format, | In order to co-exist with legacy devices, no changes are permitted to | |||
| control frames, Master Node state machine, or addressing modes. | the MS/TP addressing modes, frame header format, control frames, or | |||
| Also, while the techniques described here may be applicable to other | Master Node state machine as specified in BACnet [Clause9]. | |||
| data links, no attempt is made to define a general design pattern. | ||||
| 2. MS/TP Mode for IPv6 | 2. MS/TP Mode for IPv6 | |||
| ASHRAE must assign a new MS/TP Frame Type to indicate IPv6 over MS/TP | ASHRAE has assigned an MS/TP Frame Type value of 34 to indicate IPv6 | |||
| Encapsulation from the range reserved for designating COBS-encoded | over MS/TP (LoBAC) Encapsulation. This falls within the range of | |||
| frames. The Frame Type requested for IPv6 over MS/TP Encapsulation | values that designate COBS-encoded data frames. | |||
| is 34 (0x22). | ||||
| All MS/TP master nodes (including those that support IPv6) must | All MS/TP master nodes (including those that support IPv6) must | |||
| understand Token, Poll For Master, and Reply to Poll For Master | understand Token, Poll For Master, and Reply to Poll For Master | |||
| control frames and support the Master Node state machine as specified | control frames and support the Master Node state machine as specified | |||
| in BACnet [Clause9]. MS/TP master nodes that support IPv6 must also | in BACnet [Clause9]. MS/TP master nodes that support IPv6 must also | |||
| support the Receive Frame state machine as specified in [Clause9] and | support the Receive Frame state machine as specified in [Clause9] and | |||
| extended by BACnet [Addendum_an]. | extended by BACnet [Addendum_an]. | |||
| 3. Addressing Modes | 3. Addressing Modes | |||
| MS/TP link-layer (node) addresses are one octet in length. The | MS/TP node (MAC) addresses are one octet in length. The method of | |||
| method of assigning a node address is outside the scope of this | assigning MAC addresses is outside the scope of this specification. | |||
| document. However, each MS/TP node on the link MUST have a unique | However, each MS/TP node on the link MUST have a unique address in | |||
| address or a mis-configuration condition exists. | order to ensure correct MAC operation. | |||
| BACnet [Clause9] specifies that addresses 0 through 127 are valid for | BACnet [Clause9] specifies that addresses 0 through 127 are valid for | |||
| master nodes. The method specified in Section 6 for creating the | master nodes. The method specified in Section 6 for creating a MAC- | |||
| Interface Identifier (IID) ensures that an IID of all zeros can never | layer-derived Interface Identifier (IID) ensures that an IID of all | |||
| result. | zeros can never result. | |||
| A Destination Address of 255 (0xFF) denotes a link-level broadcast | A Destination Address of 255 (all nodes) indicates a MAC-layer | |||
| (all nodes). A Source Address of 255 MUST NOT be used. MS/TP does | broadcast. MS/TP does not support multicast, therefore all IPv6 | |||
| not support multicast, therefore all IPv6 multicast packets MUST be | multicast packets SHOULD be broadcast at the MAC layer and filtered | |||
| sent as link-level broadcasts and filtered at the IPv6 layer. | at the IPv6 layer. A Source Address of 255 MUST NOT be used. | |||
| This specification assumes that a unique IPv6 subnet prefix is | This specification assumes that at most one unique local and/or | |||
| assigned to each MS/TP segment. Hosts learn IPv6 prefixes via router | global IPv6 prefix is assigned to each MS/TP segment. Hosts learn | |||
| advertisements according to [RFC4861]. | IPv6 prefixes via router advertisements according to [RFC4861]. | |||
| 4. Maximum Transmission Unit (MTU) | 4. Maximum Transmission Unit (MTU) | |||
| BACnet [Addendum_an] supports MSDUs up to 2032 octets in length. | BACnet [Addendum_an] supports MSDUs up to 2032 octets in length. | |||
| This specification defines an MSDU length of at least 1281 octets and | This specification defines an MSDU length of at least 1280 octets and | |||
| at most 1501 octets. This is sufficient to convey the minimum MTU | at most 1500 octets (before encoding). This is sufficient to convey | |||
| required by IPv6 [RFC2460] without the need for link-layer | the minimum MTU required by IPv6 [RFC2460] without the need for link- | |||
| fragmentation and reassembly. | layer fragmentation and reassembly. | |||
| The relatively low data rates of MS/TP, however, still make a | ||||
| compelling case for header compression. An adaptation layer to | ||||
| indicate compressed or uncompressed IPv6 headers is specified in | ||||
| Section 5 and the compression scheme is specified in Section 10. | ||||
| 5. LoBAC Adaptation Layer | 5. LoBAC Adaptation Layer | |||
| The encapsulation formats defined in this section (subsequently | The relatively low data rates of MS/TP indicate header compression as | |||
| referred to as the "LoBAC" encapsulation) comprise the MSDU (payload) | a means to reduce latency. This section specifies an adaptation | |||
| of an MS/TP frame. The LoBAC payload (i.e., an IPv6 packet) follows | layer to support compressed IPv6 headers and the compression format | |||
| an encapsulation header stack. LoBAC is a subset of the LoWPAN | is specified in Section 10. | |||
| encapsulation defined in [RFC4944], therefore the use of "LOWPAN" in | ||||
| literals below is intentional. The primary differences between LoBAC | ||||
| and LoWPAN are: a) omission of the Fragmentation, Mesh, and Broadcast | ||||
| headers, and b) use of LOWPAN_IPHC [RFC6282] in place of LOWPAN_HC1 | ||||
| header compression (which is deprecated by [RFC6282]). | ||||
| All LoBAC encapsulated datagrams transmitted over MS/TP are prefixed | ||||
| by an encapsulation header stack. Each header in the stack consists | ||||
| of a header type followed by zero or more header fields. Whereas in | ||||
| an IPv6 header the stack would contain, in the following order, | ||||
| addressing, hop-by-hop options, routing, fragmentation, destination | ||||
| options, and finally payload [RFC2460]; in a LoBAC encapsulation the | ||||
| analogous sequence is (optional) header compression and payload. The | ||||
| header stacks that are valid in a LoBAC network are shown below. | ||||
| A LoBAC encapsulated IPv6 datagram: | ||||
| +---------------+-------------+---------+ | ||||
| | IPv6 Dispatch | IPv6 Header | Payload | | ||||
| +---------------+-------------+---------+ | ||||
| A LoBAC encapsulated LOWPAN_IPHC compressed IPv6 datagram: | ||||
| +---------------+-------------+---------+ | ||||
| | IPHC Dispatch | IPHC Header | Payload | | ||||
| +---------------+-------------+---------+ | ||||
| All protocol datagrams (i.e., IPv6 or compressed IPv6 headers) SHALL | ||||
| be preceded by one of the valid LoBAC encapsulation headers. This | ||||
| permits uniform software treatment of datagrams without regard to | ||||
| their mode of transmission. | ||||
| The definition of LoBAC headers consists of the dispatch value, the | ||||
| definition of the header fields that follow, and their ordering | ||||
| constraints relative to all other headers. Although the header stack | ||||
| structure provides a mechanism to address future demands on the LoBAC | ||||
| (LoWPAN) adaptation layer, it is not intended to provided general | ||||
| purpose extensibility. This format document specifies a small set of | ||||
| header types using the header stack for clarity, compactness, and | ||||
| orthogonality. | ||||
| 5.1. Dispatch Value and Header | ||||
| The LoBAC Dispatch value begins with a "0" bit followed by a "1" bit. | Implementations MAY also support Generic Header Compression (GHC) | |||
| The Dispatch value and header are shown here: | [RFC7400] for transport layer headers. A node implementing [RFC7400] | |||
| MUST probe its peers for GHC support before applying GHC. | ||||
| 0 1 2 3 | The encapsulation format defined in this section (subsequently | |||
| 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 | referred to as the "LoBAC" encapsulation) comprises the MSDU of an | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IPv6 over MS/TP frame. The LoBAC payload (i.e., an IPv6 packet) | |||
| |0|1| Dispatch | Type-specific header | follows an encapsulation header stack. LoBAC is a subset of the | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LoWPAN encapsulation defined in [RFC4944] and extended by [RFC6282], | |||
| therefore the use of "LOWPAN" in literals below is intentional. The | ||||
| primary difference between LoWPAN and LoBAC is omission of the Mesh, | ||||
| Broadcast, Fragmentation, and LOWPAN_HC1 headers. | ||||
| Dispatch 6-bit selector. Identifies the type of header | All LoBAC encapsulated datagrams transmitted over MS/TP are prefixed | |||
| immediately following the Dispatch value. | by an encapsulation header stack consisting of a Dispatch value | |||
| followed by zero or more header fields. The only sequence currently | ||||
| defined for LoBAC is the LOWPAN_IPHC header followed by payload, as | ||||
| shown below: | ||||
| Type-specific header A header determined by the Dispatch value. | +---------------+---------------+------...-----+ | |||
| | IPHC Dispatch | IPHC Header | Payload | | ||||
| +---------------+---------------+------...-----+ | ||||
| Figure 2: Dispatch Value and Header | Figure 2: A LoBAC Encapsulated LOWPAN_IPHC Compressed IPv6 Datagram | |||
| The Dispatch value may be treated as an unstructured namespace. Only | The Dispatch value may be treated as an unstructured namespace. Only | |||
| a few symbols are required to represent current LoBAC functionality. | a single pattern is used to represent current LoBAC functionality. | |||
| Although some additional savings could be achieved by encoding | ||||
| additional functionality into the dispatch value, these measures | ||||
| would tend to constrain the ability to address future alternatives. | ||||
| Pattern Header Type | ||||
| +------------+-----------------------------------------------------+ | ||||
| | 00 xxxxxx | NALP - Not a LoWPAN (LoBAC) frame | | ||||
| | 01 000000 | ESC - Additional Dispatch octet follows | | ||||
| | 01 000001 | IPv6 - Uncompressed IPv6 Addresses | | ||||
| | ... | reserved - Defined or reserved by [RFC4944] | | ||||
| | 01 1xxxxx | LOWPAN_IPHC - LOWPAN_IPHC compressed IPv6 [RFC6282] | | ||||
| | 1x xxxxxx | reserved - Defined or reserved by [RFC4944] | | ||||
| +------------+-----------------------------------------------------+ | ||||
| Figure 3: Dispatch Value Bit Patterns | ||||
| NALP: Specifies that the following bits are not a part of the LoBAC | ||||
| encapsulation, and any LoBAC node that encounters a Dispatch | ||||
| value of 00xxxxxx shall discard the packet. Non-LoBAC protocols | ||||
| that wish to coexist with LoBAC nodes should include an octet | ||||
| matching this pattern immediately following the MS/TP header. | ||||
| ESC: Specifies that the following header is a single 8-bit field for | ||||
| the Dispatch value. It allows support for Dispatch values larger | ||||
| than 127 (see Section 5 of [RFC6282]). | ||||
| IPv6: Specifies that the following header is an uncompressed IPv6 | Pattern Header Type | |||
| header [RFC2460]. | +------------+-----------------------------------------------------+ | |||
| | 01 1xxxxx | LOWPAN_IPHC - LOWPAN_IPHC compressed IPv6 [RFC6282] | | ||||
| +------------+-----------------------------------------------------+ | ||||
| LOWPAN_IPHC: A value of 011xxxxx specifies a LOWPAN_IPHC compression | Figure 3: LoBAC Dispatch Value Bit Pattern | |||
| header (see Section 10.) | ||||
| Reserved: A LoBAC node that encounters a Dispatch value in the range | Other IANA-assigned 6LoWPAN Dispatch values do not apply to this | |||
| 01000010 through 01011111 or 1xxxxxxx SHALL discard the packet. | specification. | |||
| 6. Stateless Address Autoconfiguration | 6. Stateless Address Autoconfiguration | |||
| This section defines how to obtain an IPv6 Interface Identifier. The | This section defines how to obtain an IPv6 Interface Identifier. The | |||
| general procedure is described in Appendix A of [RFC4291], "Creating | general procedure for creating a MAC-address-derived IID is described | |||
| Modified EUI-64 Format Interface Identifiers", as updated by | in [RFC4291] Appendix A, "Creating Modified EUI-64 Format Interface | |||
| [RFC7136]. | Identifiers", as updated by [RFC7136]. | |||
| The Interface Identifier MAY be based on an [EUI-64] identifier | The IID SHOULD NOT embed an [EUI-64] or any other globally unique | |||
| assigned to the device but this is not typical for MS/TP. In this | hardware identifier assigned to a device (see Section 12). | |||
| case, the EUI-64 to IID transformation defined in the IPv6 addressing | ||||
| architecture [RFC4291] MUST be used. This will result in a globally | ||||
| unique Interface Identifier. | ||||
| If the device does not have an EUI-64, then the Interface Identifier | The Interface Identifier for link-local addresses SHOULD be formed by | |||
| SHOULD be formed by concatenating its 8-bit MS/TP node address to the | concatenating its 8-bit MS/TP MAC address to the seven octets 0x00, | |||
| seven octets 0x00, 0x00, 0x00, 0xFF, 0xFE, 0x00, 0x00. For example, | 0x00, 0x00, 0xFF, 0xFE, 0x00, 0x00. For example, an MS/TP MAC | |||
| an MS/TP node address of hexadecimal value 0x4F results in the | address of hexadecimal value 0x4F results in the following IID: | |||
| following Interface Identifier: | ||||
| |0 1|1 3|3 4|4 6| | |0 1|1 3|3 4|4 6| | |||
| |0 5|6 1|2 7|8 3| | |0 5|6 1|2 7|8 3| | |||
| +----------------+----------------+----------------+----------------+ | +----------------+----------------+----------------+----------------+ | |||
| |0000000000000000|0000000011111111|1111111000000000|0000000001001111| | |0000000000000000|0000000011111111|1111111000000000|0000000001001111| | |||
| +----------------+----------------+----------------+----------------+ | +----------------+----------------+----------------+----------------+ | |||
| This is the RECOMMENDED method of forming an IID, as it supports the | This is the RECOMMENDED method of forming an IID for use in link- | |||
| most efficient header compression provided by the LOWPAN_IPHC | local addresses, as it affords the most efficient header compression | |||
| [RFC6282] scheme specified in Section 10. | provided by the LOWPAN_IPHC [RFC6282] format specified in Section 10. | |||
| Optionally, an opaque 64-bit IID (for non-link-local addresses) MAY | A 64-bit privacy IID is RECOMMENDED for routable addresses and SHOULD | |||
| be formed by the technique discussed in [I-D.ietf-6man-default-iids] | be locally generated according to [I-D.ietf-6man-default-iids]. A | |||
| or alternate method. A node that generates a non-link-local address | node that generates a 64-bit privacy IID MUST register it with its | |||
| IID MUST register it with its local router(s) by sending a Neighbor | local router(s) by sending a Neighbor Solicitation (NS) message with | |||
| Solicitation (NS) message with the Address Registration Option (ARO) | the Address Registration Option (ARO) and process Neighbor | |||
| and process Neighbor Advertisements (NA) according to [RFC6775]. | Advertisements (NA) according to [RFC6775]. | |||
| An IPv6 address prefix used for stateless autoconfiguration [RFC4862] | An IPv6 address prefix used for stateless autoconfiguration [RFC4862] | |||
| of an MS/TP interface MUST have a length of 64 bits. | of an MS/TP interface MUST have a length of 64 bits. | |||
| 7. IPv6 Link Local Address | 7. IPv6 Link Local Address | |||
| The IPv6 link-local address [RFC4291] for an MS/TP interface is | The IPv6 link-local address [RFC4291] for an MS/TP interface is | |||
| formed by appending the Interface Identifier, as defined above, to | formed by appending the Interface Identifier, as defined above, to | |||
| the prefix FE80::/64. | the prefix FE80::/64. | |||
| 10 bits 54 bits 64 bits | 10 bits 54 bits 64 bits | |||
| +----------+-----------------------+----------------------------+ | +----------+-----------------------+----------------------------+ | |||
| |1111111010| (zeros) | Interface Identifier | | |1111111010| (zeros) | Interface Identifier | | |||
| +----------+-----------------------+----------------------------+ | +----------+-----------------------+----------------------------+ | |||
| 8. Unicast Address Mapping | 8. Unicast Address Mapping | |||
| The address resolution procedure for mapping IPv6 non-multicast | The address resolution procedure for mapping IPv6 non-multicast | |||
| addresses into MS/TP link-layer addresses follows the general | addresses into MS/TP MAC-layer addresses follows the general | |||
| description in Section 7.2 of [RFC4861], unless otherwise specified. | description in Section 7.2 of [RFC4861], unless otherwise specified. | |||
| The Source/Target Link-layer Address option has the following form | The Source/Target Link-layer Address option has the following form | |||
| when the addresses are 8-bit MS/TP link-layer (node) addresses. | when the addresses are 8-bit MS/TP MAC-layer (node) addresses. | |||
| 0 1 | 0 1 | |||
| 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 | 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Type | Length=1 | | | Type | Length=1 | | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | | | | | | |||
| + Padding (all zeros) + | + Padding (all zeros) + | |||
| | | | | | | |||
| + +-+-+-+-+-+-+-+-+ | + +-+-+-+-+-+-+-+-+ | |||
| skipping to change at page 10, line 47 ¶ | skipping to change at page 9, line 27 ¶ | |||
| Option fields: | Option fields: | |||
| Type: | Type: | |||
| 1: for Source Link-layer address. | 1: for Source Link-layer address. | |||
| 2: for Target Link-layer address. | 2: for Target Link-layer address. | |||
| Length: This is the length of this option (including the type and | Length: This is the length of this option (including the type and | |||
| length fields) in units of 8 octets. The value of this field is 1 | length fields) in units of 8 octets. The value of this field is 1 | |||
| for 8-bit MS/TP node addresses. | for 8-bit MS/TP MAC addresses. | |||
| MS/TP Address: The 8-bit address in canonical bit order [RFC2469]. | MS/TP Address: The 8-bit address in canonical bit order [RFC2469]. | |||
| This is the unicast address the interface currently responds to. | This is the unicast address the interface currently responds to. | |||
| 9. Multicast Address Mapping | 9. Multicast Address Mapping | |||
| All IPv6 multicast packets MUST be sent to MS/TP Destination Address | All IPv6 multicast packets SHOULD be sent to MS/TP Destination | |||
| 255 (broadcast) and filtered at the IPv6 layer. When represented as | Address 255 (broadcast) and filtered at the IPv6 layer. When | |||
| a 16-bit address in a compressed header (see Section 10), it MUST be | represented as a 16-bit address in a compressed header (see | |||
| formed by padding on the left with a zero: | Section 10), it MUST be formed by padding on the left with a zero: | |||
| 0 1 | 0 1 | |||
| 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 | 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | 0x00 | 0xFF | | | 0x00 | 0xFF | | |||
| +-+-+-+-+-+-+-+-+---------------+ | +-+-+-+-+-+-+-+-+---------------+ | |||
| 10. Header Compression | 10. Header Compression | |||
| LoBAC uses LOWPAN_IPHC IPv6 compression, which is specified in | LoBAC uses LOWPAN_IPHC IPv6 compression, which is specified in | |||
| skipping to change at page 11, line 43 ¶ | skipping to change at page 10, line 21 ¶ | |||
| with a zero: | with a zero: | |||
| 0 1 | 0 1 | |||
| 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 | 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | 0x00 | MS/TP address | | | 0x00 | MS/TP address | | |||
| +-+-+-+-+-+-+-+-+---------------+ | +-+-+-+-+-+-+-+-+---------------+ | |||
| If LOWPAN_IPHC compression [RFC6282] is used with context, the border | If LOWPAN_IPHC compression [RFC6282] is used with context, the border | |||
| router(s) directly attached to the MS/TP segment MUST disseminate the | router(s) directly attached to the MS/TP segment MUST disseminate the | |||
| 6LoWPAN Context Option (6CO) as specified in [RFC6775]. | 6LoWPAN Context Option (6CO) according to [RFC6775], Section 7.2. | |||
| 11. IANA Considerations | 11. IANA Considerations | |||
| This document uses values previously reserved by [RFC4944] and | This document uses values previously reserved by [RFC4944] and | |||
| [RFC6282] and makes no further requests of IANA. | [RFC6282] and makes no further requests of IANA. | |||
| Note to RFC Editor: this section may be removed upon publication. | Note to RFC Editor: this section may be removed upon publication. | |||
| 12. Security Considerations | 12. Security Considerations | |||
| The method of deriving Interface Identifiers from MAC addresses is | The security and privacy implications of embedding a link-layer | |||
| intended to preserve global uniqueness when possible. However, there | address in an IPv6 IID are discussed in | |||
| is no protection from duplication through accident or forgery. | [I-D.ietf-6man-ipv6-address-generation-privacy]. The issue most | |||
| relevant to MS/TP networks is address scanning. This is mainly an | ||||
| issue for routable addresses and probably only for those hosted on | ||||
| the global Internet. This specification RECOMMENDS mitigating this | ||||
| threat according to [I-D.ietf-6man-default-iids]. | ||||
| 13. Acknowledgments | 13. Acknowledgments | |||
| We are grateful to the authors of [RFC4944] and members of the IETF | We are grateful to the authors of [RFC4944] and members of the IETF | |||
| 6LoWPAN working group; this document borrows liberally from their | 6LoWPAN working group; this document borrows liberally from their | |||
| work. | work. | |||
| 14. References | 14. References | |||
| 14.1. Normative References | 14.1. Normative References | |||
| [Addendum_an] | [Addendum_an] | |||
| ASHRAE, "ANSI/ASHRAE Addenda an, at, au, av, aw, ax, and | ASHRAE, "ANSI/ASHRAE Addenda an, at, au, av, aw, ax, and | |||
| az to ANSI/ASHRAE Standard 135-2012, BACnet - A Data | az to ANSI/ASHRAE Standard 135-2012, BACnet - A Data | |||
| Communication Protocol for Building Automation and Control | Communication Protocol for Building Automation and Control | |||
| Networks", July 2014, | Networks", July 2014, | |||
| <https://www.ashrae.org/File%20Library/docLib/ | <https://www.ashrae.org/File%20Library/docLib/StdsAddenda/ | |||
| StdsAddenda/135_2012_an_at_au_av_aw_ax_az_Final.pdf>. | 07-31-2014_135_2012_an_at_au_av_aw_ax_az_Final.pdf>. | |||
| [Clause9] American Society of Heating, Refrigerating, and Air- | [Clause9] American Society of Heating, Refrigerating, and Air- | |||
| Conditioning Engineers, "BACnet - A Data Communication | Conditioning Engineers, "BACnet - A Data Communication | |||
| Protocol for Building Automation and Control Networks", | Protocol for Building Automation and Control Networks", | |||
| ANSI/ASHRAE 135-2012 (Clause 9), March 2013. | ANSI/ASHRAE 135-2012 (Clause 9), March 2013. | |||
| [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | |||
| Requirement Levels", BCP 14, RFC 2119, March 1997. | Requirement Levels", BCP 14, RFC 2119, March 1997. | |||
| [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 | [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 | |||
| skipping to change at page 13, line 17 ¶ | skipping to change at page 11, line 50 ¶ | |||
| September 2011. | September 2011. | |||
| [RFC6775] Shelby, Z., Chakrabarti, S., Nordmark, E., and C. Bormann, | [RFC6775] Shelby, Z., Chakrabarti, S., Nordmark, E., and C. Bormann, | |||
| "Neighbor Discovery Optimization for IPv6 over Low-Power | "Neighbor Discovery Optimization for IPv6 over Low-Power | |||
| Wireless Personal Area Networks (6LoWPANs)", RFC 6775, | Wireless Personal Area Networks (6LoWPANs)", RFC 6775, | |||
| November 2012. | November 2012. | |||
| [RFC7136] Carpenter, B. and S. Jiang, "Significance of IPv6 | [RFC7136] Carpenter, B. and S. Jiang, "Significance of IPv6 | |||
| Interface Identifiers", RFC 7136, February 2014. | Interface Identifiers", RFC 7136, February 2014. | |||
| [RFC7400] Bormann, C., "6LoWPAN-GHC: Generic Header Compression for | ||||
| IPv6 over Low-Power Wireless Personal Area Networks | ||||
| (6LoWPANs)", RFC 7400, November 2014. | ||||
| 14.2. Informative References | 14.2. Informative References | |||
| [COBS] Cheshire, S. and M. Baker, "Consistent Overhead Byte | [COBS] Cheshire, S. and M. Baker, "Consistent Overhead Byte | |||
| Stuffing", IEEE/ACM TRANSACTIONS ON NETWORKING, VOL.7, | Stuffing", IEEE/ACM TRANSACTIONS ON NETWORKING, VOL.7, | |||
| NO.2 , April 1999, | NO.2 , April 1999, | |||
| <http://www.stuartcheshire.org/papers/COBSforToN.pdf>. | <http://www.stuartcheshire.org/papers/COBSforToN.pdf>. | |||
| [CRC32K] Koopman, P., "32-Bit Cyclic Redundancy Codes for Internet | [CRC32K] Koopman, P., "32-Bit Cyclic Redundancy Codes for Internet | |||
| Applications", IEEE/IFIP International Conference on | Applications", IEEE/IFIP International Conference on | |||
| Dependable Systems and Networks (DSN 2002) , June 2002, | Dependable Systems and Networks (DSN 2002) , June 2002, | |||
| <http://www.ece.cmu.edu/~koopman/networks/dsn02/ | <http://www.ece.cmu.edu/~koopman/networks/dsn02/ | |||
| dsn02_koopman.pdf>. | dsn02_koopman.pdf>. | |||
| [EUI-64] IEEE, "Guidelines for 64-bit Global Identifier (EUI-64) | [EUI-64] IEEE, "Guidelines for 64-bit Global Identifier (EUI-64) | |||
| Registration Authority", March 1997, | Registration Authority", March 1997, | |||
| <http://standards.ieee.org/regauth/oui/tutorials/ | <http://standards.ieee.org/regauth/oui/tutorials/ | |||
| EUI64.html>. | EUI64.html>. | |||
| [I-D.ietf-6man-default-iids] | [I-D.ietf-6man-default-iids] | |||
| Gont, F., Cooper, A., Thaler, D., and W. Will, | Gont, F., Cooper, A., Thaler, D., and S. LIU, | |||
| "Recommendation on Stable IPv6 Interface Identifiers", | "Recommendation on Stable IPv6 Interface Identifiers", | |||
| draft-ietf-6man-default-iids-02 (work in progress), | draft-ietf-6man-default-iids-04 (work in progress), June | |||
| January 2015. | 2015. | |||
| [I-D.ietf-6man-ipv6-address-generation-privacy] | ||||
| Cooper, A., Gont, F., and D. Thaler, "Privacy | ||||
| Considerations for IPv6 Address Generation Mechanisms", | ||||
| draft-ietf-6man-ipv6-address-generation-privacy-07 (work | ||||
| in progress), June 2015. | ||||
| [IEEE.802.3] | [IEEE.802.3] | |||
| "Information technology - Telecommunications and | "Information technology - Telecommunications and | |||
| information exchange between systems - Local and | information exchange between systems - Local and | |||
| metropolitan area networks - Specific requirements - Part | metropolitan area networks - Specific requirements - Part | |||
| 3: Carrier Sense Multiple Access with Collision Detection | 3: Carrier Sense Multiple Access with Collision Detection | |||
| (CMSA/CD) Access Method and Physical Layer | (CMSA/CD) Access Method and Physical Layer | |||
| Specifications", IEEE Std 802.3-2008, December 2008, | Specifications", IEEE Std 802.3-2012, December 2012, | |||
| <http://standards.ieee.org/getieee802/802.3.html>. | <http://standards.ieee.org/getieee802/802.3.html>. | |||
| [RFC2469] Narten, T. and C. Burton, "A Caution On The Canonical | [RFC2469] Narten, T. and C. Burton, "A Caution On The Canonical | |||
| Ordering Of Link-Layer Addresses", RFC 2469, December | Ordering Of Link-Layer Addresses", RFC 2469, December | |||
| 1998. | 1998. | |||
| [TIA-485-A] | [TIA-485-A] | |||
| Telecommunications Industry Association, "TIA-485-A, | Telecommunications Industry Association, "TIA-485-A, | |||
| Electrical Characteristics of Generators and Receivers for | Electrical Characteristics of Generators and Receivers for | |||
| Use in Balanced Digital Multipoint Systems (ANSI/TIA/EIA- | Use in Balanced Digital Multipoint Systems (ANSI/TIA/EIA- | |||
| 485-A-98) (R2003)", March 2003. | 485-A-98) (R2003)", March 2003. | |||
| Appendix A. Abstract MAC Interface | Appendix A. Abstract MAC Interface | |||
| This Appendix is informative and not part of the standard. | This Appendix is informative and not part of the standard. | |||
| BACnet [Clause9] defines support for MAC-layer clients through its | BACnet [Clause9] defines support for MAC-layer clients through its | |||
| SendFrame and ReceivedDataNoReply procedures. However, it does not | SendFrame and ReceivedDataNoReply procedures. However, it does not | |||
| define a protocol independent abstract interface for the data link. | define a network-protocol independent abstract interface for the MAC. | |||
| This is provided below as an aid to implementation. | This is provided below as an aid to implementation. | |||
| A.1. MA-DATA.request | A.1. MA-DATA.request | |||
| A.1.1. Function | A.1.1. Function | |||
| This primitive defines the transfer of data from a MAC client entity | This primitive defines the transfer of data from a MAC client entity | |||
| to a single peer entity or multiple peer entities in the case of a | to a single peer entity or multiple peer entities in the case of a | |||
| broadcast address. | broadcast address. | |||
| skipping to change at page 16, line 49 ¶ | skipping to change at page 15, line 41 ¶ | |||
| synchronization. The solution is to encode the Data and 32-bit Data | synchronization. The solution is to encode the Data and 32-bit Data | |||
| CRC fields before transmission using Consistent Overhead Byte | CRC fields before transmission using Consistent Overhead Byte | |||
| Stuffing [COBS] and decode these fields upon reception. | Stuffing [COBS] and decode these fields upon reception. | |||
| COBS is a run-length encoding method that nominally removes '0x00' | COBS is a run-length encoding method that nominally removes '0x00' | |||
| octets from its input. Any selected octet value may be removed by | octets from its input. Any selected octet value may be removed by | |||
| XOR'ing that value with each octet of the COBS output. BACnet | XOR'ing that value with each octet of the COBS output. BACnet | |||
| [Addendum_an] specifies the preamble octet '0x55' for removal. | [Addendum_an] specifies the preamble octet '0x55' for removal. | |||
| The minimum overhead of COBS is one ectet per encoded field. The | The minimum overhead of COBS is one ectet per encoded field. The | |||
| worst-case overhead is bounded to one octet in 254, or less than | worst-case overhead in long fields is bounded to one octet in 254, or | |||
| 0.5%, as described in [COBS]. | less than 0.4%, as described in [COBS]. | |||
| Frame encoding proceeds logically in two passes. The Encoded Data | Frame encoding proceeds logically in two passes. The Encoded Data | |||
| field is prepared by passing the MSDU through the COBS encoder and | field is prepared by passing the MSDU through the COBS encoder and | |||
| XOR'ing the preamble octet '0x055' with each octet of the output. | XOR'ing the preamble octet '0x55' with each octet of the output. The | |||
| The Encoded CRC-32K field is then prepared by calculating a CRC-32K | Encoded CRC-32K field is then prepared by calculating a CRC-32K over | |||
| over the Encoded Data field and formatting it for transmission as | the Encoded Data field and formatting it for transmission as | |||
| described in Appendix C. The combined length of these fields, minus | described in Appendix C. The combined length of these fields, minus | |||
| two octets for compatibility with existing MS/TP devices, is placed | two octets for compatibility with existing MS/TP devices, is placed | |||
| in the MS/TP header Length field before transmission. | in the MS/TP header Length field before transmission. | |||
| Example COBS encoder and decoder functions are shown below for | Example COBS encoder and decoder functions are shown below for | |||
| illustration. Complete examples of use and test vectors are provided | illustration. Complete examples of use and test vectors are provided | |||
| in BACnet [Addendum_an]. | in BACnet [Addendum_an]. | |||
| #include <stddef.h> | #include <stddef.h> | |||
| #include <stdint.h> | #include <stdint.h> | |||
| skipping to change at page 20, line 9 ¶ | skipping to change at page 19, line 9 ¶ | |||
| if ((last_code != 255) && (read_index < length)) | if ((last_code != 255) && (read_index < length)) | |||
| to[write_index++] = 0; | to[write_index++] = 0; | |||
| } | } | |||
| return write_index; | return write_index; | |||
| } | } | |||
| Appendix C. Encoded CRC-32K [CRC32K] | Appendix C. Encoded CRC-32K [CRC32K] | |||
| This Appendix is informative and not part of the standard. | This Appendix is informative and not part of the standard. | |||
| Extending the payload of MS/TP to 1501 octets required upgrading the | Extending the payload of MS/TP to 1500 octets required upgrading the | |||
| Data CRC from 16 bits to 32 bits. P.Koopman has authored several | Data CRC from 16 bits to 32 bits. P.Koopman has authored several | |||
| papers on evaluating CRC polynomials for network applications. In | papers on evaluating CRC polynomials for network applications. In | |||
| [CRC32K], he surveyed the entire 32-bit polynomial space and noted | [CRC32K], he surveyed the entire 32-bit polynomial space and noted | |||
| some that exceed the [IEEE.802.3] polynomial in performance. BACnet | some that exceed the [IEEE.802.3] polynomial in performance. BACnet | |||
| [Addendum_an] specifies the CRC-32K (Koopman) polynomial. | [Addendum_an] specifies the CRC-32K (Koopman) polynomial. | |||
| The specified use of the calc_crc32K() function is as follows. | The specified use of the calc_crc32K() function is as follows. | |||
| Before a frame is transmitted, 'crc_value' is initialized to all | Before a frame is transmitted, 'crc_value' is initialized to all | |||
| ones. After passing each octet of the [COBS] Encoded Data through | ones. After passing each octet of the [COBS] Encoded Data through | |||
| the function, the ones complement of the resulting 'crc_value' is | the function, the ones complement of the resulting 'crc_value' is | |||
| skipping to change at page 21, line 26 ¶ | skipping to change at page 20, line 26 ¶ | |||
| * Return updated CRC. | * Return updated CRC. | |||
| * | * | |||
| * Note: crcValue must be set to CRC32K_INITIAL_VALUE | * Note: crcValue must be set to CRC32K_INITIAL_VALUE | |||
| * before initial call. | * before initial call. | |||
| */ | */ | |||
| uint32_t | uint32_t | |||
| calc_crc32K (uint8_t data_value, uint32_t crc_value) | calc_crc32K (uint8_t data_value, uint32_t crc_value) | |||
| { | { | |||
| int b; | int b; | |||
| for (b = 0; b < sizeof(uint8_t); b++) { | for (b = 0; b < 8; b++) { | |||
| if ((data_value & 1) ^ (crc_value & 1)) { | if ((data_value & 1) ^ (crc_value & 1)) { | |||
| crc_value >>= 1; | crc_value >>= 1; | |||
| crc_value ^= CRC32K_POLY; | crc_value ^= CRC32K_POLY; | |||
| } else { | } else { | |||
| crc_value >>= 1; | crc_value >>= 1; | |||
| } | } | |||
| data_value >>= 1; | data_value >>= 1; | |||
| } | } | |||
| return crc_value; | return crc_value; | |||
| } | } | |||
| Authors' Addresses | Authors' Addresses | |||
| Kerry Lynn (editor) | Kerry Lynn (editor) | |||
| Verizon | Verizon Labs | |||
| 50 Sylvan Rd | 50 Sylvan Rd | |||
| Waltham , MA 02451 | Waltham , MA 02451 | |||
| USA | USA | |||
| Phone: +1 781 296 9722 | Phone: +1 781 296 9722 | |||
| Email: kerlyn@ieee.org | Email: kerlyn@ieee.org | |||
| Jerry Martocci | Jerry Martocci | |||
| Johnson Controls, Inc. | Johnson Controls, Inc. | |||
| 507 E. Michigan St | 507 E. Michigan St | |||
| End of changes. 59 change blocks. | ||||
| 210 lines changed or deleted | 157 lines changed or added | |||
This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||