<?xml version="1.0"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc comments="yes"?>
<?rfc compact="yes"?>
<?rfc inline="yes"?>
<?rfc sortrefs="yes"?>
<?rfc subcompact="yes"?>
<?rfc symrefs="yes"?>
<?rfc toc="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc tocompact="yes"?>

<rfc category="std"
    docName="draft-ietf-idr-shutdown-02"
    updates="4486"
    ipr="trust200902">
    <front>
        <title abbrev="BGP Shutdown">
            BGP Administrative Shutdown Communication
        </title>

        <author fullname="Job Snijders" initials="J." surname="Snijders">
            <organization abbrev="NTT">NTT Communications</organization>
            <address>
                <postal>
                    <street>Theodorus Majofskistraat 100</street>
                    <code>1065 SZ</code>
                    <city>Amsterdam</city>
                    <country>The Netherlands</country>
                </postal>
                <email>job@ntt.net</email>
            </address>
        </author>

        <author fullname="Jakob Heitz" initials="J." surname="Heitz">
            <organization>Cisco</organization>
            <address>
                <postal>
                    <street>170 West Tasman Drive</street>
                    <city>San Jose</city>
                    <region>CA</region>
                    <code>95054</code>
                    <country>USA</country>
                </postal>
                <email>jheitz@cisco.com</email>
            </address>
        </author>

        <author fullname="John Scudder" initials="J.S." surname="Scudder">
            <organization abbrev="Juniper">Juniper Networks</organization>
            <address>
                <postal>
                    <street>1194 N. Mathilda Ave</street>
                    <city>Sunnyvale</city>
                    <region>CA</region>
                    <code>94089</code>
                    <country>USA</country>
                </postal>
                <email>jgs@juniper.net</email>
            </address>
        </author>

        <date />

        <area>Routing</area>
        <workgroup>IDR</workgroup>
        <keyword>BGP</keyword>
        <keyword>cease</keyword>
        <keyword>shutdown</keyword>

        <abstract>
            <t>
                This document enhances the BGP Cease NOTIFICATION message
                "Administrative Shutdown" subcode for operators to transmit a
                short freeform message to describe why a BGP session was
                shutdown.
            </t>
        </abstract>

    <note title="Requirements Language">
        <t>
            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
            <xref target="RFC2119"/>.
        </t>
    </note>

    </front>

    <middle>
        <section anchor="intro" title="Introduction">
            <t>
                It can be troublesome for an operator to correlate a
                <xref target="RFC4271">BGP-4</xref>
                session teardown in the network with a notice that was
                transmitted via off-line methods such email or telephone calls.
                This document specifies a mechanism to transmit a short
                freeform <xref target="RFC3629">UTF-8</xref> message as part of
                a <xref target="RFC4486">Cease NOTIFICATION message</xref> to
                inform the peer why the BGP session is being shutdown.
            </t>
        </section>

        <section anchor="message" title="Shutdown Communication">
            <t>
                If a BGP speaker decides to terminate its session with a BGP
                neighbor, then the BGP speaker MAY send to the neighbor a
                NOTIFICATION message with the Error Code "Cease" and the Error
                Subcode "Administrative Shutdown" followed by a freeform UTF-8
                encoded string with a REQUIRED maximum length of 128 octets.
                The contents of the string are at the operator's discretion.
            </t>
<t>
The Shutdown Communication Cease NOTIFICATION message is encoded as below:
<figure align="center"><artwork><![CDATA[
 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Error code 6  |   subcode 2   |    Length     |     ...       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                   ... Shutdown Communication ...              | 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |  
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork></figure>
</t>
            <t>
                The Length value can range from 0 to 128 and indicates how many
                octets of Shutdown Communication follow.
            </t>
            <t>
                To support international characters, the Shutdown Communication
                field MUST be encoded using UTF-8. A receiving BGP speaker MUST
                NOT interpret invalid UTF-8 sequences.
            </t>
            <t>
                Mechanisms concerning the reporting of information contained in
                the Shutdown Communication are implementation specific but
                SHOULD include methods such as <xref target="RFC5424">SYSLOG</xref>.
            </t>
<!--
            <t>
                XXX TBD: incorporate feedback from
                https://mailarchive.ietf.org/arch/msg/idr/RJGTGqzH2lTHfJzISuptKvmi1kU
            </t>
-->
        </section>

        <section anchor="ops" title="Operational Considerations">
            <t>
                Operators are encouraged to use the Shutdown Communication to
                inform their peers of the reason for the shutdown of the BGP
                session and include out-of-band reference materials.  An
                example of a useful Shutdown Communication would be:
            </t>
            <t>"[TICKET-1-1438367390] software upgrade, back in 2 hours"</t>
            <t>
                "[TICKET-1-1438367390]" is a ticket reference with significance
                to both the sender and receiver, followed by a brief human
                readable message regarding the reason for the BGP session
                shutdown followed by an indication about the length of the
                maintenance. The receiver can now use the string
                'TICKET-1-1438367390' to search in their email archive to find
                more details.
            </t>
        </section>

        <section anchor="error" title="Error Handling">
            <t>
                Any erroneous or malformed Shutdown Communication received
                SHOULD be logged for the attention of the operator and then MAY
                be discarded.
            </t>
        </section>

        <section anchor="iana" title="IANA Considerations">
            <t>
                Per this document, IANA is requested to reference this document
                at subcode "Administrative Shutdown" in the "Cease NOTIFICATION
                message subcodes" registry under the "Border Gateway Protocol
                (BGP) Parameters" group.
            </t>
        </section>

        <section anchor="security" title="Security Considerations">
            <t>
                This document uses UTF-8 encoding for the Shutdown
                Communication. There are a number of security issues with
                UNICODE. Implementers and operator are advised to review
                <xref target="UTR36">UNICODE TR36</xref> to learn about these
                issues. This document guards against the technical issues
                outlined in UTR36 by REQUIRING "shortest form" encoding.
                However, the visual spoofing due to character confusion still
                persists. This specification minimizes the effects of visual
                spoofing by limiting the length of the Shutdown
                Communication.
            </t>
            <t>
                Users of this mechanism should be aware that unless a
                transport that provides integrity (such as <xref
                target="RFC5925">TCP-AO</xref>) is used for the BGP
                session in question, a Shutdown Communication message
                could be forged. Unless a transport that provides
                confidentiality (such as <xref
                target="RFC4303">IPSec</xref>) is used, a Shutdown
                Communication message could be snooped by an attacker.
                These issues are common to any BGP message but may be of
                greater interest in the context of this proposal since
                the information carried in the message is generally
                expected to be used for human-to-human communication.
            </t>                
        </section>

  <section title="Implementation status - RFC EDITOR: REMOVE BEFORE PUBLICATION">
       <t>
           This section records the status of known implementations of the
           protocol defined by this specification at the time of posting of
           this Internet-Draft, and is based on a proposal described in
           RFC7942. The description of implementations in this
           section is intended to assist the IETF in its decision processes in
           progressing drafts to RFCs.  Please note that the listing of any
           individual implementation here does not imply endorsement by the
           IETF. Furthermore, no effort has been spent to verify the
           information presented here that was supplied by IETF contributors.
           This is not intended as, and must not be construed to be, a catalog
           of available implementations or their features. Readers are advised
           to note that other implementations may exist.
       </t>
       <t>
           As of today these vendors have produced an implementation of the
           Shutdown Communication:
           <list style="symbols">
               <t><eref target="https://github.com/Exa-Networks/exabgp/blob/d8b7cd24e835b9dabfddc87d74e0161921165a50/lib/exabgp/bgp/message/notification.py#L112-L144">ExaBGP</eref></t>
               <t><eref target="https://github.com/pmacct/pmacct/compare/ed8df5820c9f0b8847a7b0873ade3af8ab262113...9fd97a77d144b15bf42d4e55a4d861c499bb0cfc">pmacct</eref></t>
               <t><eref target="https://github.com/openbsd/src/commit/0561b344da393d4a962339c507c2e78057100ae1">OpenBGPD</eref></t>
               <t><eref target="https://www.wireshark.org/lists/wireshark-commits/201612/msg00238.html">Wireshark</eref> (packet analyser)</t>
               <t><eref target="https://github.com/the-tcpdump-group/tcpdump/pull/578">tcpdump</eref>, <eref target="http://marc.info/?l=openbsd-tech&amp;m=148379081203084&amp;w=2">(alt)</eref> (packet analyser)</t>
           </list>
       </t>
   </section>
 
    </middle>

    <back>

        <references title="Normative References">
            <?rfc include="reference.RFC.2119"?>
            <?rfc include="reference.RFC.3629"?>
            <?rfc include="reference.RFC.4271"?>
            <?rfc include="reference.RFC.4486"?>
        </references>
        <references title="Informative References">
            <?rfc include="reference.RFC.4303"?>
            <?rfc include="reference.RFC.5424"?>
            <?rfc include="reference.RFC.5925"?>
            <reference anchor="UTR36" target="http://unicode.org/reports/tr36/">
                <front>
                    <title>Unicode Security Considerations</title>
                    <author initials="M." surname="Davis" fullname="Mark Davis"><organization/></author>
                    <author initials="M." surname="Suignard" fullname="Michel Suignard"><organization/></author>
                    <date year="2010" month="August" day="4"/>
                </front>
                <seriesInfo name="Unicode Technical Report" value="#36"/>
            </reference>
        </references>

        <section anchor="acknowledgements" title="Acknowledgements">
            <t>
                The authors would like to gratefully acknowledge Tom Scholl,
                David Freedman, Jared Mauch, Jeff Haas, Peter Hessler, Bruno
                Decraene, John Heasley, Peter van Dijk, and Arjen Zonneveld.
            </t>
        </section>
    </back>

</rfc>
