CBOR tags for IPv4 and IPv6 addresses and prefixes
draft-ietf-cbor-network-addresses-03

Document Type Active Internet-Draft (cbor WG)
Author Michael Richardson 
Last updated 2021-03-25
Replaces draft-richardson-cbor-network-addresses
Stream Internet Engineering Task Force (IETF)
Intended RFC status (None)
Formats plain text html xml pdf htmlized (tools) htmlized bibtex
Stream WG state WG Document
Document shepherd Barry Leiba
IESG IESG state I-D Exists
Consensus Boilerplate Unknown
Telechat date
Responsible AD (None)
Send notices to barryleiba@computer.org
CBOR Working Group                                         M. Richardson
Internet-Draft                                  Sandelman Software Works
Intended status: Standards Track                           25 March 2021
Expires: 26 September 2021

           CBOR tags for IPv4 and IPv6 addresses and prefixes
                  draft-ietf-cbor-network-addresses-03

Abstract

   This document describes two CBOR Tags to be used with IPv4 and IPv6
   addresses and prefixes.

   RFC-EDITOR-please remove: This work is tracked at
   https://github.com/mcr/cbor-network-address.git

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at https://datatracker.ietf.org/drafts/current/.

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

   This Internet-Draft will expire on 26 September 2021.

Copyright Notice

   Copyright (c) 2021 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents (https://trustee.ietf.org/
   license-info) in effect on the date of publication of this document.
   Please review these documents carefully, as they describe your rights
   and restrictions with respect to this document.  Code Components
   extracted from this document must include Simplified BSD License text
   as described in Section 4.e of the Trust Legal Provisions and are
   provided without warranty as described in the Simplified BSD License.

Richardson              Expires 26 September 2021               [Page 1]
Internet-Draft                   CBOR-IP                      March 2021

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Terminology . . . . . . . . . . . . . . . . . . . . . . . . .   2
   3.  Protocol  . . . . . . . . . . . . . . . . . . . . . . . . . .   2
     3.1.  IPv6  . . . . . . . . . . . . . . . . . . . . . . . . . .   2
     3.2.  IPv4  . . . . . . . . . . . . . . . . . . . . . . . . . .   3
   4.  Encoder Consideration for prefixes  . . . . . . . . . . . . .   3
   5.  Decoder Considerations for prefixes . . . . . . . . . . . . .   4
   6.  Security Considerations . . . . . . . . . . . . . . . . . . .   4
   7.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   5
     7.1.  Tag 54 - IPv6 . . . . . . . . . . . . . . . . . . . . . .   5
     7.2.  Tag 52 - IPv4 . . . . . . . . . . . . . . . . . . . . . .   5
   8.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .   5
   9.  Changelog . . . . . . . . . . . . . . . . . . . . . . . . . .   5
   10. Normative References  . . . . . . . . . . . . . . . . . . . .   5
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .   6

1.  Introduction

   [RFC8949] defines a number of CBOR Tags for common items.

   Not included are ones to indicate if the item is an IPv4 or IPv6
   address, or if it is an address plus prefix length.  This document
   defines them.

2.  Terminology

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
   "OPTIONAL" in this document are to be interpreted as described in
   BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all
   capitals, as shown here.

3.  Protocol

   These tags can applied to byte strings to represent a single address.

   When applied to an array, the represent a CIDR-style prefix.  When a
   byte string (without prefix) appears in a context where a prefix is
   expected, then it is to be assumed that all bits are relevant.  That
   is, for IPv4, a /32 is implied, and for IPv6, a /128 is implied.

3.1.  IPv6

   IANA has allocated tag 54 for IPv6 uses.  (Note that this is the
   ASCII code for '6')

Richardson              Expires 26 September 2021               [Page 2]
Internet-Draft                   CBOR-IP                      March 2021

   An IPv6 address is to be encoded as a sixteen-byte byte string
   ([RFC8949] section, 3.1, major type 2), prefixed with Tag(54).

   An IPv6 prefix, such as 2001:db8:1234::/48 is to be encoded as a two
   element array, with the length of the prefix first.  Trailing zero
   octets MUST be omitted.

   For example:

   54([ 48, h'20010db81234'])

3.2.  IPv4

   IANA has allocated tag 54 for IPv4 uses.  (Note that this is the
   ASCII code for '4')

   An IPv4 address is to be encoded as a four-byte byte string
   ([RFC8949] section, 3.1, major type 2), prefixed with Tag(52).
Show full document text