Network Working Group A. Minaburo
Internet-Draft Acklio
Intended status: Informational L. Toutain
Expires: January 2, 2017 Institut MINES TELECOM ; TELECOM Bretagne
July 1, 2016

YANG module for LPWAN Static Context Header Compression (SCHC)
draft-toutain-lpwan-yang-static-context-hc-00

Abstract

This document describes a yang model for Static Context Header Compression. A generic module is defined, that can be applied for any headers. A specific model for the IPv6 UDP protocol stack is also proposed.

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 http://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 January 2, 2017.

Copyright Notice

Copyright (c) 2016 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 (http://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.

1. Introduction

            
            
            +---------------------------------------------------------------------+
            |                      Rule N                                         |
       +---------------------------------------------------------------------+    |
       |                    Rule i                                           |    |
+---------------------------------------------------------------------+      |    |
|                    Rule 1                                           |      |    |
|   +---------+-------+------------+--------------+-----------------+ |      |    |
|   | Field 1 | Value |match. comp.| match decomp | Action function | |      |    | 
|   +---------+-------+------------+--------------+-----------------+ |      |    |
|   | Field 2 | Value |match. comp.| match decomp | Action function | |      |    | 
|   +---------+-------+------------+--------------+-----------------+ |      |    |
|   | ...     | ...   |...         | ...          | ...             | |      |    | 
|   +---------+-------+------------+--------------+-----------------+ |      |----+
|   | Field N | Value |match. comp.| match decomp | Action function | |      |   
|   +---------+-------+------------+--------------+-----------------+ |------+
|                                                                     |
+---------------------------------------------------------------------+
               

Figure 1: Context in LC

[I-D.toutain-6lpwa-ipv6-static-context-hc] defines a compression technique for LPWA network based on static context. The context is known by both ends. A context contains an ordered list of rules (cf. Figure 1). Each rule is a vector of entries. Each entry is composed of a field descriptor, a prescribed matching value, a matching rule for the compression side, a matching rule for the decompression side and a compression/decompression action function.

2. YANG types

2.1. Value field

            
	typedef LPWA-types {
		type union {
			type uint8;
			type uint16;
			type uint32;
			type uint64;
			type inet:ipv6-prefix; // better use int64, more comptact ?
			type string; 
		}
	}
 
               

Figure 2: Value types

A value may be associated for each field in a rule. The value's type depends of the field. It can be an integer, a prefix, a string, or any other type carried by the field. The LPWA-types regroups all the possibles values. Figure 2 gives its definition. [I-D.toutain-6lpwa-ipv6-static-context-hc], ESprefix and LCprefix can be of inet:ipv6-prefix type, but this type derives from ASCII characters, a binary representation such as uint64 will be more compact.

2.2. Matching operator

            
	grouping matching-operator {
		leaf operator {
			type enumeration {
			enum operator-equal;
			enum operator-lsb;
			enum operator-ignore;
			}
		}
		choice operator-lsb {
			leaf lsb-length {
				type LPWA-types;
			}
		}
		
               

Figure 3: Matching operators

A matching operator is used to check the field value stored in the rule against the value contained in the header field. If there is no matching the rule is not selected. Two instances of matching operator are defined to allow the rule selection from informations contained either the compressed or uncompressed header. [I-D.toutain-6lpwa-ipv6-static-context-hc] defines three operators: Figure 3 represents the matching operator type definition.

  • equal: the rule's value must be equal to the packet header value for a specific field.
  • lsb(L): this operator compare the most significant bits. The operator takes one argument representing the length of least significant bit part, which will be ignored during the matching but sent if the rule matches.
  • ignore: there is no check for this field.

2.3. action function

            
    typedef LPWA-action-functions {
       type enumeration {
             enum elided;   
             enum send-value;
             enum compute-IPv6-length;
             enum compute-UDP-length;
             enum compute-UDP-checksum;
             enum ESiid-DID;
             enum LAiid-DID;
       }
    }

Figure 4: Action functions

[I-D.toutain-6lpwa-ipv6-static-context-hc] defines some actions functions. Action functions tell how to compress and inversely how to decompress the field. They are defined in Figure 4

3. Generic rule definition

            
	grouping field-context {
		leaf field-name {
			type string;
		}
		leaf field-pos {
			type int8;
		}
		leaf field-value {
			type LPWA-types; 
		}	
		container field-compression-match {
			uses matching-operator;
		}
		container field-decompression-match {
			uses matching-operator;
		}
		leaf action-function {
			type LPWA-action-functions;
		}	
	}	


Figure 5: Action functions

Each rule's row is defined by several leaves, composed of: Figure 5 defines the format.

  • a field name that can be used for debugging purpose,
  • a field position which will be used as a key,
  • a field value containing the value that will be compared,
  • two matching operators for rule selection: one for compression and the other for decompression,
  • an action function to compress/uncompress the field.

4. Yang static context model

            
   +--rw generic-rules
   |  +--rw context-name?    string
   |  +--rw context-rules* [rule-id]
   |     +--rw rule-name?     string
   |     +--rw rule-id        int8
   |     +--rw rule-fields* [field-pos]
   |        +--rw field-name?                  string
   |        +--rw field-pos                    int8
   |        +--rw field-value?                 LPWA-types
   |        +--rw field-compression-match
   |        |  +--rw operator?     enumeration
   |        |  +--rw (operator-lsb)?
   |        |     +--:(lsb-length)
   |        |        +--rw lsb-length?   LPWA-types
   |        +--rw field-decompression-match
   |        |  +--rw operator?     enumeration
   |        |  +--rw (operator-lsb)?
   |        |     +--:(lsb-length)
   |        |        +--rw lsb-length?   LPWA-types
   |        +--rw action-function?             LPWA-action-functions


Figure 6: Generic module tree

            
 	container generic-rules {
		leaf context-name {
			type string;
		}
		list context-rules {
		    key rule-id;
		    
			leaf rule-name {
				type string;
			}
			leaf rule-id {
				type int8;
			}
			list rule-fields {
			    key field-pos;
				uses field-context;
			}
		}
	
	}
	

Figure 7: Yang definition of the generic module

            
	container IPv6-UDP-rules {
		leaf context-name {
			type string;
		}
		list context-rules {
		    key rule-id;
		    
			leaf rule-name {
				type string;
			}
			leaf rule-id {
				type int8;
			}
			container shim-id {
				uses field-context {
					refine field-name {
						default "shim identifier";
					}
					refine field-pos {
						default 0;
					}
					refine field-value {
						default 0;
					}
				}	
			}
			container ES-device-id {
				uses field-context {
					refine field-name {
						default "End System device identifier";
					}
					refine field-pos {
						default 1;
					}
					refine field-value {
						default 0;
					}
				}	
			}
			container ipv6-version {
				uses field-context {
					refine field-name {
						default "IPv6 Version";
					}
					refine field-pos {
						default 2;
					}
					refine field-value {
						default 6;
					}
				}	
			}
			container ipv6-diffserv {
				uses field-context {
					refine field-name {
						default "IPv6 Diffserv";
					}
					refine field-pos {
						default 3;
					}
					refine field-value {
						default 0;
					}
				}	
			}
			container ipv6-flow-label {
				uses field-context {
					refine field-name {
						default "IPv6 Flow Label";
					}
					refine field-pos {
						default 4;
					}
					refine field-value {
						default 0;
					}
				}	
			}
			container ipv6-length {
				uses field-context {
					refine field-name {
						default "IPv6 length";
					}
					refine field-pos {
						default 5;
					}
				}	
			}
			container ipv6-next-header {
				uses field-context {
					refine field-name {
						default "IPv6 next header";
					}
					refine field-pos {
						default 6;
					}
					refine field-value {
						default 17;
					}
				}
			}
			container ipv6-hop-limit {
				uses field-context {
					refine field-name {
						default "IPv6 Hop Limit";
					}
					refine field-pos {
						default 7;
					}
					refine field-value {
						default 17;
					}
				}
			}
			container ipv6-ES-prefix {
				uses field-context {
					refine field-name {
						default "IPv6 ES Prefix";
					}
					refine field-pos {
						default 8;
					}
				}
			}
			container ipv6-ES-iid {
				uses field-context {
					refine field-name {
						default "IPv6 ES Interface ID";
					}
					refine field-pos {
						default 9;
					}
				}
			}
			container ipv6-LC-prefix {
				uses field-context {
					refine field-name {
						default "IPv6 LC Prefix";
					}
					refine field-pos {
						default 10;
					}
				}
			}
			container ipv6-LC-iid {
				uses field-context {
					refine field-name {
						default "IPv6 LC Interface ID";
					}
					refine field-pos {
						default 11;
					}
				}
			}			
			
			container udp-ES-port {
				uses field-context {
					refine field-name {
						default "UDP ES port";
					}
					refine field-pos {
						default 12;
					}
				}
			}			
			container udp-LC-port {
				uses field-context {
					refine field-name {
						default "UDP LC port";
					}
					refine field-pos {
						default 13;
					}
				}
			}				
			
		}
	
	}
	

Figure 8: Yang definition of the IPv6 UDP compression

This lead to the generic rule definition, represented Figure 6. Figure 7 gives the yang definition of this module. Figure 8 represents the module defined in [I-D.toutain-6lpwa-ipv6-static-context-hc].

5. Use of COMI/CoOL

          
iPATCH /c Content-Format(application/cool-value-pairs+cbor)
[
  [field-SID, rule-id, field-pos], value
]  

Figure 9: Yang definition of the IPv6 UDP compression

COMI/CoOL [I-D.veillette-core-cool] defines a management function set adapted to constrained networks. In the generic format, the keys to access a field (referenced as field-SID) are the rule-id and the field-pos. Therefore to modify one value for a specific rule and a specific field, a iPATCH will be used as defined in Figure 9

6. Acknowledgement

The authors would like to thank Michel Veillette, Alexander Pelov, Antoni Markovski for their help on COMI/CoOL and Yang.

7. Normative References

[I-D.toutain-6lpwa-ipv6-static-context-hc] Minaburo, A. and L. Toutain, "6LPWA Static Context Header Compression (SCHC) for IPV6 and UDP", Internet-Draft draft-toutain-6lpwa-ipv6-static-context-hc-00, June 2016.
[I-D.veillette-core-cool] Veillette, M., Pelov, A., Somaraju, A., Turner, R. and A. Minaburo, "Constrained Objects Language", Internet-Draft draft-veillette-core-cool-01, March 2016.

Appendix A. Yang Model

          
     
 module LPWA-compression {

	namespace "http://ackl.io/compression";

	
	prefix "lpwa";

	import ietf-inet-types {
			prefix inet;
	}
	
	description 
		"Data model to compress headers on 6LPWA";
		
	revision 2016-06-01 {
		description "This module describes the context store in End-System (LC) and LPWA Compressor (LC). ";
	}

	typedef LPWA-types {
		type union {
			type uint8;
			type uint16;
			type uint32;
			type uint64;
			type inet:ipv6-prefix; // better use int64, more comptact ?
			type string; 
		}
	}
	
	typedef LPWA-action-functions {
		type enumeration {
         enum elided;   
         enum send-value;
         enum compute-IPv6-length;
         enum compute-UDP-length;
         enum compute-UDP-checksum;
         enum ESiid-DID;
         enum LAiid-DID;
		}
	}
	
	grouping matching-operator {
		leaf operator {
			type enumeration {
			enum operator-equal;
			enum operator-lsb;
			enum operator-ignore;
			}
		}
		choice operator-lsb {
			leaf lsb-length {
				type LPWA-types;
			}
		}
		
	}

	grouping field-context {
		leaf field-name {
			type string;
		}
		leaf field-pos {
			type int8;
		}
		leaf field-value {
			type LPWA-types; 
		}	
		container field-compression-match {
			uses matching-operator;
		}
		container field-decompression-match {
			uses matching-operator;
		}
		leaf action-function {
			type LPWA-action-functions;
		}	
	}	

	container generic-rules {
		leaf context-name {
			type string;
		}
		list context-rules {
		    key rule-id;
		    
			leaf rule-name {
				type string;
			}
			leaf rule-id {
				type int8;
			}
			list rule-fields {
			    key field-pos;
				uses field-context;
			}
		}
	
	}

	container IPv6-UDP-rules {
		leaf context-name {
			type string;
		}
		list context-rules {
		    key rule-id;
		    
			leaf rule-name {
				type string;
			}
			leaf rule-id {
				type int8;
			}
			container shim-id {
				uses field-context {
					refine field-name {
						default "shim identifier";
					}
					refine field-pos {
						default 0;
					}
					refine field-value {
						default 0;
					}
				}	
			}
			container ES-device-id {
				uses field-context {
					refine field-name {
						default "End System device identifier";
					}
					refine field-pos {
						default 1;
					}
					refine field-value {
						default 0;
					}
				}	
			}
			container ipv6-version {
				uses field-context {
					refine field-name {
						default "IPv6 Version";
					}
					refine field-pos {
						default 2;
					}
					refine field-value {
						default 6;
					}
				}	
			}
			container ipv6-diffserv {
				uses field-context {
					refine field-name {
						default "IPv6 Diffserv";
					}
					refine field-pos {
						default 3;
					}
					refine field-value {
						default 0;
					}
				}	
			}
			container ipv6-flow-label {
				uses field-context {
					refine field-name {
						default "IPv6 Flow Label";
					}
					refine field-pos {
						default 4;
					}
					refine field-value {
						default 0;
					}
				}	
			}
			container ipv6-length {
				uses field-context {
					refine field-name {
						default "IPv6 length";
					}
					refine field-pos {
						default 5;
					}
				}	
			}
			container ipv6-next-header {
				uses field-context {
					refine field-name {
						default "IPv6 next header";
					}
					refine field-pos {
						default 6;
					}
					refine field-value {
						default 17;
					}
				}
			}
			container ipv6-hop-limit {
				uses field-context {
					refine field-name {
						default "IPv6 Hop Limit";
					}
					refine field-pos {
						default 7;
					}
					refine field-value {
						default 17;
					}
				}
			}
			container ipv6-ES-prefix {
				uses field-context {
					refine field-name {
						default "IPv6 ES Prefix";
					}
					refine field-pos {
						default 8;
					}
				}
			}
			container ipv6-ES-iid {
				uses field-context {
					refine field-name {
						default "IPv6 ES Interface ID";
					}
					refine field-pos {
						default 9;
					}
				}
			}
			container ipv6-LC-prefix {
				uses field-context {
					refine field-name {
						default "IPv6 LC Prefix";
					}
					refine field-pos {
						default 10;
					}
				}
			}
			container ipv6-LC-iid {
				uses field-context {
					refine field-name {
						default "IPv6 LC Interface ID";
					}
					refine field-pos {
						default 11;
					}
				}
			}			
			
			container udp-ES-port {
				uses field-context {
					refine field-name {
						default "UDP ES port";
					}
					refine field-pos {
						default 12;
					}
				}
			}			
			container udp-LC-port {
				uses field-context {
					refine field-name {
						default "UDP LC port";
					}
					refine field-pos {
						default 13;
					}
				}
			}				
			
		}
	
	}
}    

Figure 10: Yang definition of the IPv6 UDP compression

Authors' Addresses

Ana Minaburo Acklio 2bis rue de la Chataigneraie 35510 Cesson-Sevigne Cedex, France EMail: ana@ackl.io
Laurent Toutain Institut MINES TELECOM ; TELECOM Bretagne 2 rue de la Chataigneraie CS 17607 35576 Cesson-Sevigne Cedex, France EMail: Laurent.Toutain@telecom-bretagne.eu

Table of Contents