Tech-invite  3GPPspecsRELsGlossariesSIPRFCs
8887868584838281807978777675747372717069686766656463626160595857565554535251504948474645444342414039383736353433323130292827262524232221201918171615141312111009080706050403020100

in Index   Prev   Next

RFC 8530

YANG Model for Logical Network Elements

Pages: 49
Proposed Standard
Part 2 of 3 – Pages 17 to 33
First   Prev   Next

Top   ToC   RFC8530 - Page 17   prevText

Appendix A. Examples

The following subsections provide example uses of LNEs.

A.1. Example: Host-Device-Managed LNE

This section describes an example of the LNE model using schema mount to achieve the parent management. An example device supports multiple instances of LNEs (logical routers), each of which supports features of Layer 2 and Layer 3 interfaces [RFC8343], a routing information base [RFC8349], and the OSPF protocol [OSPF-YANG]. Each of these features is specified by a YANG model, and they are combined using the YANG schema mount as shown below. Not all possible mounted modules are shown. For example, implementations could also mount the model defined in [RFC8348].
Top   ToC   RFC8530 - Page 18
   module: ietf-logical-network-element
     +--rw logical-network-elements
        +--rw logical-network-element* [name]
           +--rw name           string
           +--mp root
              +--ro yanglib:modules-state/
              |  +--ro module-set-id    string
              |  +--ro module* [name revision]
              |     +--ro name                yang:yang-identifier
              +--rw sys:system/
              |  +--rw contact?          string
              |  +--rw hostname?         inet:domain-name
              |  +--rw authentication {authentication}?
              |     +--rw user-authentication-order*   identityref
              |     +--rw user* [name] {local-users}?
              |        +--rw name              string
              |        +--rw password?         ianach:crypt-hash
              |        +--rw authorized-key* [name]
              |           +--rw name         string
              |           +--rw algorithm    string
              |           +--rw key-data     binary
              +--ro sys:system-state/
              |     ...
              +--rw rt:routing/
              |  +--rw router-id?                 yang:dotted-quad
              |  +--rw control-plane-protocols
              |     +--rw control-plane-protocol* [type name]
              |        +--rw ospf:ospf/
              |          +--rw areas
              |             +--rw area* [area-id]
              |                +--rw interfaces
              |                   +--rw interface* [name]
              |                      +--rw name if:interface-ref
              |                      +--rw cost?   uint16
              +--rw if:interfaces/
                 +--rw interface* [name]
                    +--rw name            string
                    +--rw ip:ipv4!/
                    |  +--rw address* [ip]
                    |  ...
Top   ToC   RFC8530 - Page 19
   module: ietf-interfaces
     +--rw interfaces
        +--rw interface* [name]
           +--rw name                        string
           +--rw lne:bind-lne-name?          string
           +--ro oper-status        enumeration

   module: ietf-yang-library
     +--ro modules-state
        +--ro module-set-id    string
        +--ro module* [name revision]
           +--ro name                yang:yang-identifier

   module: ietf-system
     +--rw system
     |  +--rw contact?          string
     |  +--rw hostname?         inet:domain-name
     |  +--rw authentication {authentication}?
     |     +--rw user-authentication-order*   identityref
     |     +--rw user* [name] {local-users}?
     |        +--rw name              string
     |        +--rw password?         ianach:crypt-hash
     |        +--rw authorized-key* [name]
     |           +--rw name         string
     |           +--rw algorithm    string
     |           +--rw key-data     binary
     +--ro system-state
        +--ro platform
        |  +--ro os-name?      string
        |  +--ro os-release?   string

   To realize the above schema, the example device implements the
   following schema mount instance:

   "ietf-yang-schema-mount:schema-mounts": {
     "mount-point": [
       {
         "module": "ietf-logical-network-element",
         "label": "root",
         "shared-schema":  {}
       }
     ]
   }
Top   ToC   RFC8530 - Page 20
   By using the implementation of the YANG schema mount, an operator can
   create instances of logical routers.  An interface can be assigned to
   a logical router, so that the logical router has the permission to
   access this interface.  The OSPF protocol can then be enabled on this
   assigned interface.

   For this implementation, a parent management session has access to
   the schemas of both the parent hosting system and the child logical
   routers.  In addition, each child logical router can grant its own
   management sessions, which have the following schema:

   module: ietf-yang-library
     +--ro modules-state
        +--ro module-set-id    string
        +--ro module* [name revision]
           +--ro name                yang:yang-identifier

   module: ietf-system
     +--rw system
     |  +--rw contact?          string
     |  +--rw hostname?         inet:domain-name
     |  +--rw authentication {authentication}?
     |     +--rw user-authentication-order*   identityref
     |     +--rw user* [name] {local-users}?
     |        +--rw name              string
     |        +--rw password?         ianach:crypt-hash
     |        +--rw authorized-key* [name]
     |           +--rw name         string
     |           +--rw algorithm    string
     |           +--rw key-data     binary
     +--ro system-state
        +--ro platform
           +--ro os-name?      string
           +--ro os-release?   string

   module: ietf-routing
     rw-- routing
        +--rw router-id?                 yang:dotted-quad
        +--rw control-plane-protocols
           +--rw control-plane-protocol* [type name]
              +--rw ospf:ospf/
                +--rw areas
                   +--rw area* [area-id]
                      +--rw interfaces
                         +--rw interface* [name]
                            +--rw name    if:interface-ref
                            +--rw cost?   uint16
Top   ToC   RFC8530 - Page 21
   module: ietf-interfaces
     +--rw interfaces
        +--rw interface* [name]
           +--rw name                        string
           +--ro oper-status        enumeration

A.1.1. Configuration Data

The following shows an example where two customer-specific LNEs are configured: { "ietf-logical-network-element:logical-network-elements": { "logical-network-element": [ { "name": "cust1", "root": { "ietf-system:system": { "authentication": { "user": [ { "name": "john", "password": "$0$password" } ] } }, "ietf-routing:routing": { "router-id": "192.0.2.1", "control-plane-protocols": { "control-plane-protocol": [ { "type": "ietf-routing:ospf", "name": "1", "ietf-ospf:ospf": { "af": "ipv4", "areas": { "area": [ { "area-id": "203.0.113.1", "interfaces": { "interface": [ { "name": "eth1", "cost": 10 } ] }
Top   ToC   RFC8530 - Page 22
                           }
                         ]
                       }
                     }
                   }
                 ]
               }
             },
             "ietf-interfaces:interfaces": {
               "interface": [
                 {
                   "name": "eth1",
                   "type": "iana-if-type:ethernetCsmacd",
                   "ietf-ip:ipv4": {
                     "address": [
                       {
                         "ip": "192.0.2.11",
                         "prefix-length": 24
                       }
                     ]
                   },
                   "ietf-ip:ipv6": {
                     "address": [
                       {
                         "ip": "2001:db8:0:2::11",
                         "prefix-length": 64
                       }
                     ]
                   }
                 }
               ]
             }
           }
         },
         {
           "name": "cust2",
           "root": {
             "ietf-system:system": {
               "authentication": {
                 "user": [
                   {
                     "name": "john",
                     "password": "$0$password"
                   }
                 ]
               }
             },
             "ietf-routing:routing": {
Top   ToC   RFC8530 - Page 23
               "router-id": "192.0.2.2",
               "control-plane-protocols": {
                 "control-plane-protocol": [
                   {
                     "type": "ietf-routing:ospf",
                     "name": "1",
                     "ietf-ospf:ospf": {
                       "af": "ipv4",
                       "areas": {
                         "area": [
                           {
                             "area-id": "203.0.113.1",
                             "interfaces": {
                               "interface": [
                                 {
                                   "name": "eth1",
                                   "cost": 10
                                 }
                               ]
                             }
                           }
                         ]
                       }
                     }
                   }
                 ]
               }
             },
             "ietf-interfaces:interfaces": {
               "interface": [
                 {
                   "name": "eth1",
                   "type": "iana-if-type:ethernetCsmacd",
                   "ietf-ip:ipv4": {
                     "address": [
                       {
                         "ip": "192.0.2.11",
                         "prefix-length": 24
                       }
                     ]
                   }
                 }
               ]
             }
           }
         }
       ]
     },
Top   ToC   RFC8530 - Page 24
     "ietf-interfaces:interfaces": {
       "interface": [
         {
           "name": "eth0",
           "type": "iana-if-type:ethernetCsmacd",
           "ietf-ip:ipv4": {
             "address": [
               {
                 "ip": "192.0.2.10",
                 "prefix-length": 24
               }
             ]
           },
           "ietf-ip:ipv6": {
             "address": [
               {
                 "ip": "2001:db8:0:2::10",
                 "prefix-length": 64
               }
             ]
           }
         },
         {
           "name": "cust1:eth1",
           "type": "iana-if-type:ethernetCsmacd",
           "ietf-logical-network-element:bind-lne-name": "cust1"
         },
         {
           "name": "cust2:eth1",
           "type": "iana-if-type:ethernetCsmacd",
           "ietf-logical-network-element:bind-lne-name": "cust2"
         }
       ]
     },

     "ietf-system:system": {
       "authentication": {
         "user": [
           {
             "name": "root",
             "password": "$0$password"
           }
         ]
       }
     }
   }
Top   ToC   RFC8530 - Page 25

A.1.2. State Data

The following shows possible state data associated with the above configuration data: { "ietf-logical-network-element:logical-network-elements": { "logical-network-element": [ { "name": "cust1", "root": { "ietf-yang-library:modules-state": { "module-set-id": "123e4567-e89b-12d3-a456-426655440000", "module": [ { "name": "iana-if-type", "revision": "2014-05-08", "namespace": "urn:ietf:params:xml:ns:yang:iana-if-type", "conformance-type": "import" }, { "name": "ietf-inet-types", "revision": "2013-07-15", "namespace": "urn:ietf:params:xml:ns:yang:ietf-inet-types", "conformance-type": "import" }, { "name": "ietf-interfaces", "revision": "2014-05-08", "feature": [ "arbitrary-names", "pre-provisioning" ], "namespace": "urn:ietf:params:xml:ns:yang:ietf-interfaces", "conformance-type": "implement" }, { "name": "ietf-ip", "revision": "2014-06-16", "namespace": "urn:ietf:params:xml:ns:yang:ietf-ip", "conformance-type": "implement" }, { "name": "ietf-ospf", "revision": "2018-03-03", "namespace": "urn:ietf:params:xml:ns:yang:ietf-ospf",
Top   ToC   RFC8530 - Page 26
                "conformance-type": "implement"
              },
              {
                "name": "ietf-routing",
                "revision": "2018-03-13",
                "namespace": "urn:ietf:params:xml:ns:yang:ietf-routing",
                "conformance-type": "implement"
              },
              {
                "name": "ietf-system",
                "revision": "2014-08-06",
                "namespace": "urn:ietf:params:xml:ns:yang:ietf-system",
                "conformance-type": "implement"
              },
              {
                "name": "ietf-yang-library",
                "revision": "2016-06-21",
                "namespace":
                  "urn:ietf:params:xml:ns:yang:ietf-yang-library",
                "conformance-type": "implement"
              },
              {
                "name": "ietf-yang-types",
                "revision": "2013-07-15",
                "namespace":
                  "urn:ietf:params:xml:ns:yang:ietf-yang-types",
                "conformance-type": "import"
              }
            ]
          },
          "ietf-system:system-state": {
            "platform": {
              "os-name": "NetworkOS"
            }
          },
          "ietf-routing:routing": {
            "router-id": "192.0.2.1",
            "control-plane-protocols": {
              "control-plane-protocol": [
                {
                  "type": "ietf-routing:ospf",
                  "name": "1",
                  "ietf-ospf:ospf": {
                    "af": "ipv4",
                    "areas": {
                      "area": [
                        {
                          "area-id": "203.0.113.1",
Top   ToC   RFC8530 - Page 27
                          "interfaces": {
                            "interface": [
                              {
                                "name": "eth1",
                                "cost": 10
                              }
                            ]
                          }
                        }
                      ]
                    }
                  }
                }
              ]
            }
          },
          "ietf-interfaces:interfaces": {
            "interface": [
              {
                "name": "eth1",
                "type": "iana-if-type:ethernetCsmacd",
                "oper-status": "up",
                "phys-address": "00:01:02:A1:B1:C1",
                "statistics": {
                  "discontinuity-time": "2017-06-26T12:34:56-05:00"
                },
                "ietf-ip:ipv4": {
                  "address": [
                    {
                      "ip": "192.0.2.11",
                      "prefix-length": 24
                    }
                  ]
                },
                "ietf-ip:ipv6": {
                  "address": [
                    {
                      "ip": "2001:db8:0:2::11",
                      "prefix-length": 64
                    }
                  ]
                }
              }
            ]
          }
        }
      },
      {
Top   ToC   RFC8530 - Page 28
        "name": "cust2",
        "root": {
          "ietf-yang-library:modules-state": {
            "module-set-id": "123e4567-e89b-12d3-a456-426655440000",
            "module": [
              {
                "name": "iana-if-type",
                "revision": "2014-05-08",
                "namespace": "urn:ietf:params:xml:ns:yang:iana-if-type",
                "conformance-type": "import"
              },
              {
                "name": "ietf-inet-types",
                "revision": "2013-07-15",
                "namespace":
                  "urn:ietf:params:xml:ns:yang:ietf-inet-types",
                "conformance-type": "import"
              },
              {
                "name": "ietf-interfaces",
                "revision": "2014-05-08",
                "feature": [
                  "arbitrary-names",
                  "pre-provisioning"
                ],
                "namespace":
                  "urn:ietf:params:xml:ns:yang:ietf-interfaces",
                "conformance-type": "implement"
              },
              {
                "name": "ietf-ip",
                "revision": "2014-06-16",
                "namespace": "urn:ietf:params:xml:ns:yang:ietf-ip",
                "conformance-type": "implement"
              },
              {
                "name": "ietf-ospf",
                "revision": "2018-03-03",
                "namespace": "urn:ietf:params:xml:ns:yang:ietf-ospf",
                "conformance-type": "implement"
              },
              {
                "name": "ietf-routing",
                "revision": "2018-03-13",
                "namespace": "urn:ietf:params:xml:ns:yang:ietf-routing",
                "conformance-type": "implement"
              },
              {
Top   ToC   RFC8530 - Page 29
                "name": "ietf-system",
                "revision": "2014-08-06",
                "namespace": "urn:ietf:params:xml:ns:yang:ietf-system",
                "conformance-type": "implement"
              },
              {
                "name": "ietf-yang-library",
                "revision": "2016-06-21",
                "namespace":
                  "urn:ietf:params:xml:ns:yang:ietf-yang-library",
                "conformance-type": "implement"
              },
              {
                "name": "ietf-yang-types",
                "revision": "2013-07-15",
                "namespace":
                  "urn:ietf:params:xml:ns:yang:ietf-yang-types",
                "conformance-type": "import"
              }
            ]
          },
          "ietf-system:system-state": {
            "platform": {
              "os-name": "NetworkOS"
            }
          },
          "ietf-routing:routing": {
            "router-id": "192.0.2.2",
            "control-plane-protocols": {
              "control-plane-protocol": [
                {
                  "type": "ietf-routing:ospf",
                  "name": "1",
                  "ietf-ospf:ospf": {
                    "af": "ipv4",
                    "areas": {
                      "area": [
                        {
                          "area-id": "203.0.113.1",
                          "interfaces": {
                            "interface": [
                              {
                                "name": "eth1",
                                "cost": 10
                              }
                            ]
                          }
                        }
Top   ToC   RFC8530 - Page 30
                      ]
                    }
                  }
                }
              ]
            }
          },
          "ietf-interfaces:interfaces": {
            "interface": [
              {
                "name": "eth1",
                "type": "iana-if-type:ethernetCsmacd",
                "oper-status": "up",
                "phys-address": "00:01:02:A1:B1:C2",
                "statistics": {
                  "discontinuity-time": "2017-06-26T12:34:56-05:00"
                },
                "ietf-ip:ipv4": {
                  "address": [
                    {
                      "ip": "192.0.2.11",
                      "prefix-length": 24
                    }
                  ]
                }
              }
            ]
          }
        }
      }
    ]
  },

  "ietf-interfaces:interfaces": {
    "interface": [
      {
        "name": "eth0",
        "type": "iana-if-type:ethernetCsmacd",
        "oper-status": "up",
        "phys-address": "00:01:02:A1:B1:C0",
        "statistics": {
          "discontinuity-time": "2017-06-26T12:34:56-05:00"
        },
        "ietf-ip:ipv4": {
          "address": [
            {
              "ip": "192.0.2.10",
              "prefix-length": 24
Top   ToC   RFC8530 - Page 31
            }
          ]
        },
        "ietf-ip:ipv6": {
          "address": [
            {
              "ip": "2001:db8:0:2::10",
              "prefix-length": 64
            }
          ]
        }
      },
      {
        "name": "cust1:eth1",
        "type": "iana-if-type:ethernetCsmacd",
        "oper-status": "up",
        "phys-address": "00:01:02:A1:B1:C1",
        "statistics": {
          "discontinuity-time": "2017-06-26T12:34:56-05:00"
        },
        "ietf-logical-network-element:bind-lne-name": "cust1"
      },
      {
        "name": "cust2:eth1",
        "type": "iana-if-type:ethernetCsmacd",
        "oper-status": "up",
        "phys-address": "00:01:02:A1:B1:C2",
        "statistics": {
          "discontinuity-time": "2017-06-26T12:34:56-05:00"
        },
        "ietf-logical-network-element:bind-lne-name": "cust2"
      }
    ]
  },

  "ietf-system:system-state": {
    "platform": {
      "os-name": "NetworkOS"
    }
  },

  "ietf-yang-library:modules-state": {
    "module-set-id": "123e4567-e89b-12d3-a456-426655440000",
    "module": [
      {
        "name": "iana-if-type",
        "revision": "2014-05-08",
        "namespace": "urn:ietf:params:xml:ns:yang:iana-if-type",
Top   ToC   RFC8530 - Page 32
        "conformance-type": "import"
      },
      {
        "name": "ietf-inet-types",
        "revision": "2013-07-15",
        "namespace": "urn:ietf:params:xml:ns:yang:ietf-inet-types",
        "conformance-type": "import"
      },
      {
        "name": "ietf-interfaces",
        "revision": "2014-05-08",
        "feature": [
          "arbitrary-names",
          "pre-provisioning"
        ],
        "namespace": "urn:ietf:params:xml:ns:yang:ietf-interfaces",
        "conformance-type": "implement"
      },
      {
        "name": "ietf-ip",
        "revision": "2014-06-16",
        "namespace": "urn:ietf:params:xml:ns:yang:ietf-ip",
        "conformance-type": "implement"
      },
      {
        "name": "ietf-logical-network-element",
        "revision": "2017-03-13",
        "feature": [
          "bind-lne-name"
        ],
        "namespace":
          "urn:ietf:params:xml:ns:yang:ietf-logical-network-element",
        "conformance-type": "implement"
      },
      {
        "name": "ietf-ospf",
        "revision": "2018-03-03",
        "namespace": "urn:ietf:params:xml:ns:yang:ietf-ospf",
        "conformance-type": "implement"
      },
      {
        "name": "ietf-routing",
        "revision": "2018-03-13",
        "namespace": "urn:ietf:params:xml:ns:yang:ietf-routing",
        "conformance-type": "implement"
      },
      {
        "name": "ietf-system",
Top   ToC   RFC8530 - Page 33
        "revision": "2014-08-06",
        "namespace": "urn:ietf:params:xml:ns:yang:ietf-system",
        "conformance-type": "implement"
      },
      {
        "name": "ietf-yang-library",
        "revision": "2016-06-21",
        "namespace": "urn:ietf:params:xml:ns:yang:ietf-yang-library",
        "conformance-type": "implement"
      },
      {
        "name": "ietf-yang-schema-mount",
        "revision": "2017-05-16",
        "namespace":
          "urn:ietf:params:xml:ns:yang:ietf-yang-schema-mount",
        "conformance-type": "implement"
      },
      {
        "name": "ietf-yang-types",
        "revision": "2013-07-15",
        "namespace": "urn:ietf:params:xml:ns:yang:ietf-yang-types",
        "conformance-type": "import"
      }
    ]
  },

  "ietf-yang-schema-mount:schema-mounts": {
    "mount-point": [
      {
        "module": "ietf-logical-network-element",
        "label": "root",
        "shared-schema": {}
      }
    ]
  }
}



(page 33 continued on part 3)

Next Section