module ietf-lisp {
namespace "urn:ietf:params:xml:ns:yang:ietf-lisp";
prefix lisp;
import ietf-interfaces {
prefix if;
}
import ietf-lisp-address-types {
prefix lcaf;
}
import ietf-yang-types {
prefix yang;
}
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.
";
// RFC Ed.: replace XXXX with actual RFC number and remove
// this note
reference "RFC XXXX";
revision 2018-03-05 {
description
"Initial revision.";
reference
"https://tools.ietf.org/html/rfc6830";
}
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;
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 lcaf:instance-id-type;
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;
}
}
}
}
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.";
}
}
}
}
container lisp-router-instances {
description
"Different LISP routers instantiated in the device";
list lisp-router-instance {
key "lisp-router-instance-id";
description
"Each entry contains parameters for a LISP router.";
leaf lisp-router-instance-id {
type int32;
description
"Arbitrary lisp-router id.";
}
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";
}
}
}
}
}
}