module ietf-lisp {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-lisp";
prefix lisp;
import ietf-interfaces {
prefix if;
reference
"RFC 8343: A YANG Data Model for Interface Management";
}
// RFC Ed.: replace occurences of XXXX with actual RFC number
// and remove this note
import ietf-lisp-address-types {
prefix lcaf;
reference "RFC XXXX: LISP YANG model";
}
import ietf-yang-types {
prefix yang;
reference "RFC 6991: Common YANG Data Types";
}
import ietf-routing {
prefix "rt";
reference
"RFC 8349: A YANG Data Model for Routing Management
(NMDA version)";
}
import ietf-network-instance {
prefix "ni";
// RFC Ed.: replace occurences of YYYY with actual RFC number
// of draft-ietf-rtgwg-ni-model and remove this note
reference
"RFC YYYY: YANG Model for Network Instances";
}
organization
"IETF LISP (Locator/ID Separation Protocol) Working Group";
contact
"WG Web:
WG List:
Editor: Vina Ermagan
Editor: Alberto Rodriguez-Natal
Editor: Reshad Rahman
";
description
"This YANG module defines the generic parameters for LISP.
The module can be extended by vendors to define vendor-specific
LISP parameters and policies.
Copyright (c) 2018 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; see
the RFC itself for full legal notices.
";
reference "RFC XXXX";
revision 2018-11-04 {
description
"Initial revision.";
reference
"https://tools.ietf.org/html/rfc6830";
}
/*
* Identity definitions
*/
identity lisp {
base "rt:control-plane-protocol";
description "LISP protocol.";
reference
"RFC 6830: The Locator/ID Separation Protocol (LISP).";
}
identity lisp-role {
description
"LISP router role.";
}
identity itr {
base lisp-role;
description
"LISP ITR.";
}
identity pitr {
base lisp-role;
description
"LISP PITR.";
}
identity etr {
base lisp-role;
description
"LISP ETR.";
}
identity petr {
base lisp-role;
description
"LISP PETR.";
}
identity mapping-system {
description
"Mapping System interface";
}
identity single-node-mapping-system {
base mapping-system;
description
"logically singular Map Server";
}
typedef mapping-system-ref {
type identityref {
base mapping-system;
}
description
"Mapping System reference";
}
typedef lisp-role-ref {
type identityref {
base lisp-role;
}
description
"LISP role reference";
}
typedef map-reply-action {
type enumeration {
enum no-action {
value 0;
description
"Mapping is kept alive and no encapsulation occurs.";
}
enum natively-forward {
value 1;
description
"Matching packets are not encapsulated or dropped but
natively forwarded.";
}
enum send-map-request {
value 2;
description
"Matching packets invoke Map-Requests.";
}
enum drop {
value 3;
description
"Matching packets are dropped.";
}
}
description
"Defines the lisp map-cache ACT type";
reference "https://tools.ietf.org/html/rfc6830#section-6.1.4";
}
typedef eid-id {
type string;
description
"Type encoding of lisp-addresses to be generally used in EID
keyed lists.";
}
typedef auth-key-type {
type enumeration {
enum none {
value 0;
description
"No authentication.";
}
enum hmac-sha-1-96 {
value 1;
description
"HMAC-SHA-1-96 (RFC2404) authentication is used.";
}
enum hmac-sha-256-128 {
value 2;
description
"HMAC-SHA-256-128 (RFC4868) authentication is used.";
}
}
description
"Enumeration of the authentication mechanisms supported by
LISP.";
reference
"https://tools.ietf.org/html/rfc6830#section-6.1.6";
}
typedef xtr-id-type {
type binary {
length "16";
}
description
"128 bit xTR identifier.";
}
grouping locator-properties {
description
"Properties of a RLOC";
leaf priority {
type uint8;
description
"Locator priority.";
}
leaf weight {
type uint8;
description
"Locator weight.";
}
leaf multicast-priority {
type uint8;
description
"Locator's multicast priority";
}
leaf multicast-weight {
type uint8;
description
"Locator's multicast weight";
}
}
grouping locators-grouping {
description
"Group that defines a list of LISP locators.";
list locator {
key "id";
description
"List of routing locators";
leaf id {
type string {
length "1..64";
}
description
"Locator id";
}
container locator-address {
uses lcaf:lisp-address;
description
"The locator address provided in LISP canonincal
address format.";
}
uses locator-properties;
}
}
grouping local-locators-grouping {
description
"Group that defines a list of LISP locators.";
list interface {
key "interface-ref";
description
"The address type of the locator";
leaf interface-ref {
type if:interface-ref;
description
"The name of the interface supporting the locator.";
}
uses locator-properties;
}
}
grouping mapping {
description
"Group that defines a LISP mapping.";
container eid {
uses lcaf:lisp-address;
description
"End-host Identifier (EID) to be mapped to a list of
locators";
}
leaf time-to-live {
type uint32;
units minutes;
description
"Mapping validity period in minutes.";
}
leaf creation-time {
type yang:date-and-time;
config false;
description
"Time when the mapping was created.";
}
leaf authoritative {
type bits {
bit A {
description
"Authoritative bit.";
}
}
description
"Bit that indicates if mapping comes from an
authoritative source.";
}
leaf static {
type boolean;
default "false";
description
"This leaf should be true if the mapping is static.";
}
choice locator-list {
description
"list of locartors are either negative, or positive.";
case negative-mapping {
leaf map-reply-action {
type map-reply-action;
description
"Forwarding action for a negative mapping.";
}
}
case positive-mapping {
container rlocs {
uses locators-grouping;
description
"List of locators for a positive mapping.";
}
}
}
}
grouping mappings {
description
"Group that defines a list of LISP mappings.";
list virtual-network {
key "vni";
description
"Virtual network to which the mappings belong.";
leaf vni {
type leafref {
path "/rt:routing/rt:control-plane-protocols"
+ "/rt:control-plane-protocol/lisp:lisp"
+ "/lisp:virtual-networks/lisp:virtual-network"
+ "/lisp:vni";
}
description
"Virtual network identifier.";
}
container mappings {
description
"Mappings within the virtual network.";
list mapping {
key "id";
description
"List of EID to RLOCs mappings.";
leaf id {
type eid-id;
description
"Id that uniquely identifies a mapping.";
}
uses mapping;
}
}
}
}
augment "/rt:routing/rt:control-plane-protocols"
+ "/rt:control-plane-protocol" {
when "derived-from-or-self(rt:type, 'lisp:lisp')" {
description
"This augmentation is only valid for a control-plane protocol
instance of LISP.";
}
description "LISP protocol ietf-routing module
control-plane-protocol augmentation.";
container lisp {
description
"Parameters for the LISP subsystem.";
container locator-sets {
description
"Container that defines a named locator set which can be
referenced elsewhere.";
list locator-set {
key "locator-set-name";
description
"Multiple locator sets can be defined.";
leaf locator-set-name {
type string {
length "1..64";
}
description
"Locator set name";
}
choice locator-type {
description
"Locator sets can be based on local interfaces, or
general locators.";
case local-interface {
uses local-locators-grouping;
description
"List of locators in this set based on local
interfaces.";
}
case general-locator {
uses locators-grouping;
description
"List of locators in this set based on lisp-address.";
}
}
}
}
list lisp-role {
key lisp-role-type;
description
"List of lisp device roles such as MS, MR, ITR,
PITR, ETR or PETR.";
leaf lisp-role-type {
type lisp-role-ref;
description
"The type of LISP device - identity derived from the
'lisp-device' base identity.";
}
}
container lisp-router-id {
when "../lisp-role/lisp-role-type = 'itr' or
../lisp-role/lisp-role-type = 'pitr' or
../lisp-role/lisp-role-type = 'etr' or
../lisp-role/lisp-role-type = 'petr'" {
description "Only when ITR, PITR, ETR or PETR.";
}
description
"Site-ID and xTR-ID of the device.";
leaf site-id {
type uint64;
description "Site ID";
}
leaf xtr-id {
type lisp:xtr-id-type;
description "xTR ID";
}
}
container virtual-networks {
when "../lisp-role/lisp-role-type = 'itr' or
../lisp-role/lisp-role-type = 'pitr' or
../lisp-role/lisp-role-type = 'etr' or
../lisp-role/lisp-role-type = 'petr'" {
description "Only when ITR, PITR, ETR or PETR.";
}
description "Virtual networks";
list virtual-network {
key vni;
unique "ni-name";
description "List of virtual networks";
leaf vni {
type lcaf:instance-id-type;
description
"Virtual network identifier";
}
leaf ni-name {
type leafref {
path "/ni:network-instances/ni:network-instance/ni:name";
}
mandatory true;
description
"Name of Network Instance (e.g. VRF) to which a VNI is
bound. Each VNI is bound to a different Network
Instance";
}
}
}
}
}
}