⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rfc3252.txt

📁 RFC 的详细文档!
💻 TXT
📖 第 1 页 / 共 2 页
字号:






Network Working Group                                         H. Kennedy
Request for Comments: 3252                                      Mimezine
Category: Informational                                     1 April 2002


                 Binary Lexical Octet Ad-hoc Transport

Status of this Memo

   This memo provides information for the Internet community.  It does
   not specify an Internet standard of any kind.  Distribution of this
   memo is unlimited.

Copyright Notice

   Copyright (C) The Internet Society (2002).  All Rights Reserved.

Abstract

   This document defines a reformulation of IP and two transport layer
   protocols (TCP and UDP) as XML applications.

1.   Introduction

1.1. Overview

   This document describes the Binary Lexical Octet Ad-hoc Transport
   (BLOAT): a reformulation of a widely-deployed network-layer protocol
   (IP [RFC791]), and two associated transport layer protocols (TCP
   [RFC793] and UDP [RFC768]) as XML [XML] applications.  It also
   describes methods for transporting BLOAT over Ethernet and IEEE 802
   networks as well as encapsulating BLOAT in IP for gatewaying BLOAT
   across the public Internet.

1.2. Motivation

   The wild popularity of XML as a basis for application-level protocols
   such as the Blocks Extensible Exchange Protocol [RFC3080], the Simple
   Object Access Protocol [SOAP], and Jabber [JABBER] prompted
   investigation into the possibility of extending the use of XML in the
   protocol stack.  Using XML at both the transport and network layer in
   addition to the application layer would provide for an amazing amount
   of power and flexibility while removing dependencies on proprietary
   and hard-to-understand binary protocols.  This protocol unification
   would also allow applications to use a single XML parser for all
   aspects of their operation, eliminating developer time spent figuring
   out the intricacies of each new protocol, and moving the hard work of




Kennedy                      Informational                      [Page 1]

RFC 3252         Binary Lexical Octet Ad-hoc Transport      1 April 2002


   parsing to the XML toolset.  The use of XML also mitigates concerns
   over "network vs. host" byte ordering which is at the root of many
   network application bugs.

1.3. Relation to Existing Protocols

   The reformulations specified in this RFC follow as closely as
   possible the spirit of the RFCs on which they are based, and so MAY
   contain elements or attributes that would not be needed in a pure
   reworking (e.g. length attributes, which are implicit in XML.)

   The layering of network and transport protocols are maintained in
   this RFC despite the optimizations that could be made if the line
   were somewhat blurred (i.e. merging TCP and IP into a single, larger
   element in the DTD) in order to foster future use of this protocol as
   a basis for reformulating other protocols (such as ICMP.)

   Other than the encoding, the behavioral aspects of each of the
   existing protocols remain unchanged.  Routing, address spaces, TCP
   congestion control, etc. behave as specified in the extant standards.
   Adapting to new standards and experimental algorithm heuristics for
   improving performance will become much easier once the move to BLOAT
   has been completed.

1.4. Requirement Levels

   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 BCP 14, RFC 2119
   [RFC2119].

2.   IPoXML

   This protocol MUST be implemented to be compliant with this RFC.
   IPoXML is the root protocol REQUIRED for effective use of TCPoXML
   (section 3.) and higher-level application protocols.

   The DTD for this document type can be found in section 7.1.

   The routing of IPoXML can be easily implemented on hosts with an XML
   parser, as the regular structure lends itself handily to parsing and
   validation of the document/datagram and then processing the
   destination address, TTL, and checksum before sending it on to its
   next-hop.

   The reformulation of IPv4 was chosen over IPv6 [RFC2460] due to the
   wider deployment of IPv4 and the fact that implementing IPv6 as XML
   would have exceeded the 1500 byte Ethernet MTU.



Kennedy                      Informational                      [Page 2]

RFC 3252         Binary Lexical Octet Ad-hoc Transport      1 April 2002


   All BLOAT implementations MUST use - and specify - the UTF-8 encoding
   of RFC 2279 [RFC2279].  All BLOAT document/datagrams MUST be well-
   formed and include the XMLDecl.

2.1. IP Description

   A number of items have changed (for the better) from the original IP
   specification.  Bit-masks, where present have been converted into
   human-readable values.  IP addresses are listed in their dotted-
   decimal notation [RFC1123].  Length and checksum values are present
   as decimal integers.

   To calculate the length and checksum fields of the IP element, a
   canonicalized form of the element MUST be used.  The canonical form
   SHALL have no whitespace (including newline characters) between
   elements and only one space character between attributes.  There
   SHALL NOT be a space following the last attribute in an element.

   An iterative method SHOULD be used to calculate checksums, as the
   length field will vary based on the size of the checksum.

   The payload element bears special attention.  Due to the character
   set restrictions of XML, the payload of IP datagrams (which MAY
   contain arbitrary data) MUST be encoded for transport. This RFC
   REQUIRES the contents of the payload to be encoded in the base-64
   encoding of RFC 2045 [RFC2045], but removes the requirement that the
   encoded output MUST be wrapped on 76-character lines.
























Kennedy                      Informational                      [Page 3]

RFC 3252         Binary Lexical Octet Ad-hoc Transport      1 April 2002


2.2. Example Datagram

   The following is an example IPoXML datagram with an empty payload:

   <?xml version="1.0" encoding="UTF-8"?>
   <!DOCTYPE ip PUBLIC "-//IETF//DTD BLOAT 1.0 IP//EN" "bloat.dtd">
   <ip>
   <header length="474">
   <version value="4"/>
   <tos precedence="Routine" delay="Normal" throughput="Normal"
        relibility="Normal" reserved="0"/>
   <total.length value="461"/>
   <id value="1"/>
   <flags reserved="0" df="dont" mf="last"/>
   <offset value="0"/>
   <ttl value="255"/>
   <protocol value="6"/>
   <checksum value="8707"/>
   <source address="10.0.0.22"/>
   <destination address="10.0.0.1"/>
   <options>
   <end copied="0" class="0" number="0"/>
   </options>
   <padding pad="0"/>
   </header>
   <payload>
   </payload>
   </ip>

3.   TCPoXML

   This protocol MUST be implemented to be compliant with this RFC.  The
   DTD for this document type can be found in section 7.2.

3.1. TCP Description

   A number of items have changed from the original TCP specification.
   Bit-masks, where present have been converted into human-readable
   values.  Length and checksum and port values are present as decimal
   integers.

   To calculate the length and checksum fields of the TCP element, a
   canonicalized form of the element MUST be used as in section 2.1.

   An iterative method SHOULD be used to calculate checksums as in
   section 2.1.

   The payload element MUST be encoded as in section 2.1.



Kennedy                      Informational                      [Page 4]

RFC 3252         Binary Lexical Octet Ad-hoc Transport      1 April 2002


   The TCP offset element was expanded to a maximum of 255 from 16 to
   allow for the increased size of the header in XML.

   TCPoXML datagrams encapsulated by IPoXML MAY omit the <?xml?> header
   as well as the <!DOCTYPE> declaration.

3.2. Example Datagram

   The following is an example TCPoXML datagram with an empty payload:

   <?xml version="1.0" encoding="UTF-8"?>
   <!DOCTYPE tcp PUBLIC "-//IETF//DTD BLOAT 1.0 TCP//EN" "bloat.dtd">
   <tcp>
   <tcp.header>
   <src port="31415"/>
   <dest port="42424"/>
   <sequence number="322622954"/>
   <acknowledgement number="689715995"/>
   <offset number=""/>
   <reserved value="0"/>
   <control syn="1" ack="1"/>
   <window size="1"/>
   <urgent pointer="0"/>
   <checksum value="2988"/>
   <tcp.options>
   <tcp.end kind="0"/>
   </tcp.options>
   <padding pad="0"/>
   </tcp.header>
   <payload>
   </payload>
   </tcp>

4.   UDPoXML

   This protocol MUST be implemented to be compliant with this RFC.  The
   DTD for this document type can be found in section 7.3.

4.1. UDP Description

   A number of items have changed from the original UDP specification.
   Bit-masks, where present have been converted into human-readable
   values.  Length and checksum and port values are present as decimal
   integers.







Kennedy                      Informational                      [Page 5]

RFC 3252         Binary Lexical Octet Ad-hoc Transport      1 April 2002


   To calculate the length and checksum fields of the UDP element, a
   canonicalized form of the element MUST be used as in section 2.1.  An
   iterative method SHOULD be used to calculate checksums as in section
   2.1.

   The payload element MUST be encoded as in section 2.1.

   UDPoXML datagrams encapsulated by IPoXML MAY omit the <?xml?> header
   as well as the <!DOCTYPE> declaration.

4.2. Example Datagram

   The following is an example UDPoXML datagram with an empty payload:

   <?xml version="1.0" encoding="UTF-8"?>
   <!DOCTYPE udp PUBLIC "-//IETF//DTD BLOAT 1.0 UDP//EN" "bloat.dtd">
   <udp>
   <udp.header>
   <src port="31415"/>
   <dest port="42424"/>
   <udp.length value="143"/>
   <checksum value="2988"/>
   </udp.header>
   <payload>
   </payload>
   </udp>

5.   Network Transport

   This document provides for the transmission of BLOAT datagrams over
   two common families of physical layer transport.  Future RFCs will
   address additional transports as routing vendors catch up to the
   specification, and we begin to see BLOAT routed across the Internet
   backbone.

5.1. Ethernet

   BLOAT is encapsulated in Ethernet datagrams as in [RFC894] with the
   exception that the type field of the Ethernet frame MUST contain the
   value 0xBEEF.  The first 5 octets of the Ethernet frame payload will
   be 0x3c 3f 78 6d 6c ("<?xml".)

5.2. IEEE 802

   BLOAT is encapsulated in IEEE 802 Networks as in [RFC1042] except
   that the protocol type code for IPoXML is 0xBEEF.





Kennedy                      Informational                      [Page 6]

RFC 3252         Binary Lexical Octet Ad-hoc Transport      1 April 2002


6. Gatewaying over IP

   In order to facilitate the gradual introduction of BLOAT into the
   public Internet, BLOAT MAY be encapsulated in IP as in [RFC2003] to
   gateway between networks that run BLOAT natively on their LANs.

7. DTDs

   The Transport DTDs (7.2. and 7.3.) build on the definitions in the
   Network DTD (7.1.)

   The DTDs are referenced by their PubidLiteral and SystemLiteral (from
   [XML]) although it is understood that most IPoXML implementations
   will not need to pull down the DTD, as it will normally be embedded
   in the implementation, and presents something of a catch-22 if you
   need to load part of your network protocol over the network.

7.1.  IPoXML DTD

   <!--
    DTD for IP over XML.
    Refer to this DTD as:

    <!DOCTYPE ip PUBLIC "-//IETF//DTD BLOAT 1.0 IP//EN" "bloat.dtd">
   -->
   <!--
    DTD data types:

      Digits      [0..9]+

      Precedence  "NetworkControl | InternetworkControl |
                   CRITIC | FlashOverride | Flash | Immediate |
                   Priority | Routine"

      IP4Addr     "dotted-decimal" notation of [RFC1123]

      Class       [0..3]

      Sec          "Unclassified | Confidential | EFTO | MMMM | PROG |
                    Restricted | Secret | Top Secret | Reserved"

      Compartments [0..65535]

      Handling     [0..65535]

      TCC          [0..16777216]

   -->



Kennedy                      Informational                      [Page 7]

RFC 3252         Binary Lexical Octet Ad-hoc Transport      1 April 2002


   <!ENTITY % Digits "CDATA">
   <!ENTITY % Precedence "CDATA">
   <!ENTITY % IP4Addr "CDATA">
   <!ENTITY % Class "CDATA">
   <!ENTITY % Sec "CDATA">
   <!ENTITY % Compartments "CDATA">
   <!ENTITY % Handling "CDATA">
   <!ENTITY % TCC "CDATA">

   <!ELEMENT ip (header, payload)>

   <!ELEMENT header (version, tos, total.length, id, flags, offset, ttl,
                    protocol, checksum, source, destination, options,
                    padding)>
   <!-- length of header in 32-bit words -->
   <!ATTLIST header
             length %Digits; #REQUIRED>

   <!ELEMENT version EMPTY>
   <!-- ip version. SHOULD be "4" -->
   <!ATTLIST version
             value   %Digits;  #REQUIRED>

   <!ELEMENT tos EMPTY>
   <!ATTLIST tos
             precedence   %Precedence;    #REQUIRED
             delay    (normal | low)  #REQUIRED
             throughput   (normal | high) #REQUIRED
             relibility   (normal | high) #REQUIRED
             reserved     CDATA #FIXED "0">

   <!ELEMENT total.length EMPTY>
   <!--
    total length of datagram (header and payload) in octets, MUST be
    less than 65,535 (and SHOULD be less than 1024 for IPoXML on local
    ethernets).
   -->
   <!ATTLIST total.length
             value %Digits; #REQUIRED>

   <!ELEMENT id EMPTY>
   <!-- 0 <= id <= 65,535  -->
   <!ATTLIST id
             value %Digits; #REQUIRED>

   <!ELEMENT flags EMPTY>
   <!-- df = don't fragment, mf = more fragments  -->
   <!ATTLIST flags



Kennedy                      Informational                      [Page 8]

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -