<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
  <!ENTITY rfc2622 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2622.xml'>
  <!ENTITY rfc4012 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4012.xml'>
]>

<rfc ipr='full3978' docName='draft-michaelson-4byte-as-representation-04'>
 <?rfc symrefs="yes" ?>
 <?rfc sortrefs="yes"?>
 <?rfc compact="yes"?>
 <front>
  <title abbrev="Canonical Textual Form of Four-octet ASN">
    Canonical Textual Representation of Four-octet AS Numbers
  </title>

  <author initials="G.G."
          surname="Michaelson"
          fullname="George Michaelson">
   <organization abbrev="APNIC">
  	Asia Pacific Network Information Centre
   </organization>

   <address>
    <postal>
     <street>Level 1, 33 Park Road</street>
     <city>Milton</city>
     <region>Queensland</region>
     <code>4064</code>
     <country>AU</country>
    </postal>

    <phone>+61 7 3858 3100</phone>
    <email>ggm@apnic.net</email>
   </address>
  </author>

  <author initials="G.I."
          surname="Huston"
          fullname="Geoff Huston">
   <organization abbrev="APNIC">
  	Asia Pacific Network Information Centre
   </organization>

   <address>
    <postal>
     <street>Level 1, 33 Park Road</street>
     <city>Milton</city>
     <region>Queensland</region>
     <code>4064</code>
     <country>AU</country>
    </postal>

    <phone>+61 7 3858 3100</phone>
    <email>gih@apnic.net</email>
   </address>
  </author>


  <date month='May' year='2007' />

  <keyword>I-D</keyword>

  <abstract>

     <t>A single textual representation for four-octet Autonomous
     System (AS) numbers is defined. The syntax chosen avoids
     ambiguity with Border Gateway Protocol (BGP) community string
     representation of AS numbers.  It is recommended that this textual
     representation be used by all documents, systems and user
     interfaces referring to four-octet AS numbers.</t>

  </abstract>
 </front>

 <middle>

  <section title="Introduction">

     <t>A single textual representation for four-octet Autonomous
     System (AS) numbers is defined. The syntax chosen avoids
     ambiguity with Border Gateway Protocol (BGP) community string
     representation of AS numbers.</t>

     <t>A number of forms of representation have been discussed in
     various routing forums, and this document provides a taxonomy of
     the various representations that have been considered, and
     recommends the adoption of a textual representation scheme termed
     "asdot" notation.</t>

     <t>It is recommended that only this "asdot" textual
     representation be used by all documents, systems and user
     interfaces referring to four-octet AS numbers.</t>

  </section>

  <section title="Terminology">
  <t><list style="hanging">

     <t hangText="asplain"><vspace blankLines="0" /> refers to a
     syntax scheme of representing all AS numbers using decimal
     integer notation. Using asplain notation an AS number of value
     65526 would be represented as the string "65526" and as AS number
     of value 65546 would be represented as the string "65546".<vspace
     blankLines="1" /></t>

     <t hangText="asdot+"><vspace blankLines="0" /> refers to a syntax
     scheme of representing all AS numbers using a notation of two
     integer values joined by a period character: &lt;high order
     16-bit value in decimal&gt;.&lt;low order 16-bit value in
     decimal&gt;.  Using asdot+ notation, an AS number of value 65526
     would be represented as the string "0.65526" and an AS number of
     value 65546 would be represented as the string "1.10".<vspace
     blankLines="1" /></t>

     <t hangText="asdot"><vspace blankLines="0" /> refers to a syntax
     scheme of representing AS number values less than 65536 using
     asplain notation and representing AS number values equal to or
     greater than 65536 using asdot+ notation.  Using asdot notation,
     an AS number of value 65526 would be represented as the string
     "65526" and as AS number of value 65546 would be represented as
     the string "1.10".  <vspace blankLines="1" /></t>

     <t hangText="four-octet AS numbers"><vspace blankLines="0" />
     refers to AS numbers in the range 0.0 - 65535.65535 (using asdot+
     notation), or 0 - 4294967295 (using asplain notation).
     Four-octet AS numbers are defined in <xref
     target='RFC4893'/><vspace blankLines="1" /></t>

     <t hangText="four-octet only AS numbers"><vspace blankLines="0"
     /> refers to AS numbers in the range 1.0 - 65535.65535 (using
     asdot+ notation) or 65536 - 4294967295 (using asplain
     notation)<vspace blankLines="1" /></t>

     <t hangText="two-octet only AS numbers"><vspace blankLines="0" />
     refers to AS numbers in the range 0.0 - 0.65535 (using asdot+
     notation), or 0 - 65535 (using asplain notation).</t>
     </list></t>

  </section>

  <section title="Representation of AS Number Values">

     <t>To avoid confusion, a single textual notation is useful for
     documentation, configuration systems, reports, and external tools
     and information repositories, but it is also necessary to observe
     that any recommendation regarding notation that changes existing
     use would represent an unwarranted imposition.</t>

     <t>The asdot representation represents a reasonable compromise, in
     that it preserves the current convention of using an asplain
     representation for two-octet only AS number values, and proposes
     using the asdot+ notation for four-octet only AS numbers.</t>

     <t>All systems that generate reports containing AS numbers MUST
     use this asdot notation to represent the AS number value.</t>

     <t>Interfaces that accept AS number values MUST accept asdot
     notation by default, and SHOULD also be capable of correctly
     interpreting values expressed in asplain and asdot+ notation.</t>

  </section>

  <section title="Consideration of Approaches to AS number representation">

     <t>Initially, the ":" was proposed to separate the two-octet
     components for the four-octet AS number value.</t>

     <t>It was noted that this representation clashes with use of the
     ":" character in community attribute syntax in BGP, and the
     representation of AS numbers in BGP community attributes would be
     ambiguous as a result of this choice of notation.</t>

     <t>It has also been pointed out that Routing Protocol
     Specification Language (RPSL) <xref target='RFC2622'/> <xref
     target='RFC4012'/> AS-Set objects use the ":" character to denote
     sequences of AS objects forming a chain. Since the AS object
     would have had the ":" character embedded in the instance name,
     this would have required double-parsing to find four-octet AS
     number in AS-Set chains. This also is not acceptable.</t>

     <t>It was also noted that AS numbers are used by network
     operations staff, and the larger values in the four-octet AS
     number set when using asplain notation introduces the increased
     risk of transcription error with these numbers.</t>

  </section>

  <section title="IANA Considerations">

    <t>[Note: not for publication. No changes are proposed for the
    IANA, as the IANA AS number registry,
    http://www.iana.org/assignments/as-numbers, already uses asdot
    notation.]</t>


  </section>
  <section title="Acknowledgments">

     <t>The text of the definition of a four-octet AS is taken from
     <xref target='RIPE2005-12'/>.</t>

     <t>The terminology of "asplain", "asdot" and "asdot+" was
     originally devised and described by Juergen Kammer in January
     2007 <xref target='KAMMER2007'/>.</t>

     <t>The authors thank Rudiger Volk, Joao Damas, Joe Abley, Peter
     Koch and Henk Uijterwaal for feedback and extensive comments on
     this document.</t>

  </section>

  <section title="Implementation Notes">

     <t>Many programming languages treat xxx.yyy numeric strings as
     real number values on input, and convert the value internally to
     a canonical floating point representation.  Since the precision
     cannot be guaranteed to be preserved, this risks changing the
     value of the four-octet quantity on output, or by mis-placed
     arithmetical calculation.</t>

     <t>Care must be taken that asdot notation strings are treated as
     'special-purpose strings' on input and output, and parsed
     correctly to a four-octet quantity. It would be sensible to draft
     suitable function definitions to define the transform from
     presentation to internal value, as was done for IPv4 and IPv6
     addresses with the inet_pton() and inet_ntop() functions.</t>

     <t>The <xref target='RFC2622'/> and <xref target='RFC4012'/>
     specifications, and systems which manipulate AS numbers need to
     be reviewed for conformance with asdot textual representation,
     and for the syntactic implications of this representation.</t>

  </section>

  <section title="Changes">

  <t>[Note: This section is not for publication.]</t>

  <section title="Changes since the -01 draft">

     <t>An IANA Considerations section has been added to amend an
     existing registry.</t>

     <t>The document now clarifies that it refers to a textual
     representation, the binary representation used on-the-wire is
     unaffected by this draft.</t>

  </section>

  <section title="Changes since the -02 draft">

      <t>The terms "asplain", "asdot" and "asdot+" have been used,
      reflecting current discussion on this topic.</t>

     <t>An IANA Considerations section has been removed, as the AS
     number registry uses asdot notation and no further changes would
     be required of the IANA registry according to the recommendation
     made here.

     </t>
  </section>

  <section title="Changes since the -03 draft">

     <t>Grammatical errors were corrected.</t>

     <t>A spellcheck was run.</t>
  </section>

  </section>

 </middle>

 <back>

  <references title="Normative References">

    <reference anchor='RFC4893'>
      <front>
      <title>BGP Support for Four-Octet AS Number Space</title>
      <author initials="Q."  surname="Vohra" fullname="Quaizar Vohra">
      <organization /></author>
      <author initials="E."  surname="Chen" fullname="Enke Chen">
      <organization /></author>
      <date year='2007' month='May' /></front>

      <seriesInfo name='RFC' value='4893' />
      <format type='TXT' target='ftp://ftp.isi.edu/in-notes/rfc4893.txt' />
      </reference>
  </references>
  <references title="Informative References">

   <reference anchor='RIPE2005-12' target=' http://www.ripe.net/ripe/policies/proposals/2005-12.html'>
    <front>
      <title>four-octet AS Number Policy</title>
      <author initials="G.I."
          surname="Huston"
          fullname="Geoff Huston">
      <organization>APNIC</organization></author>
      <date month='Dec' year='2005' />
    </front>
   </reference>

   <reference anchor='KAMMER2007' target='http://quagga.ncc.eurodata.de/asnumformat.html'>
    <front>
      <title>AS Number Formats</title>
      <author initials="J."
          surname="Kammer"
          fullname="Juergen Kammer">
      <organization /></author>
      <date month='Jan' year='2007' />
    </front>
   </reference>

   &rfc2622;

   &rfc4012;

  </references>
 </back>
</rfc>
