netconf & yang

Download NETCONF & YANG

If you can't read please download the document

Upload: konrad-heimel

Post on 12-Apr-2017

120 views

Category:

Software


0 download

TRANSCRIPT

ZIMT_UniSiegen

NETCONF und YANG
Eine kurze Einfhrung

WTF is NETCONF or YANG?

Netconf ist ein Protokoll fr das installieren, manipulieren und lschen von Netzwerkgerten. [RFC 6241]

YANG ist eine Datenmodellierungssprache (data modelling language), benutzt um Konfigurations- und Status-informationen zu modellieren, die durch Netconf, Netconf remote procedure calls und Netconf notifications verndert werden.

Kurze Timeline

NETCONF2001 IETF Treffen mit Umfrage zur Benutzung von SNMP SET

Juni 2002 IAB Network Mgmt Workshop

May 2003 Grndung der NETCONF WG

Dezember 2006 NETCONF core RFCs wurden verffentlicht

YANG

2007 Vorschlag des YANG Design-teams

April 2008 NETMOD WG wird Gegrndet

Oct 2010 YANG RFC 6020 wird verffentlicht

SNMPNETCONFSOAPREST

StandardIETFIETFW3C-

ResourcesOIDsPathsURLs

Data modelsDefined in MIBsYANG CoreModelsData Modeling LanguageSMIYANG(WSDL, not data)Undefined, (WSDL), WADL, text

Management OperationsSNMPNETCONFIn the XML Schema, not standardizedHTTP operations

EncodingBERXMLXMLXML, JSON,

Transport StackUDPSSH
TCPSSL
HTTP
TCPSSL
HTTP
TCP

RESTConfAus tail-f Tutorial: NETCONF and YANG

Netconf

Features:Unterscheidet zwischen Konfiguration und momentanem Status

Unterscheidet zwischen running, startup und (optional) candidate Konfiguration

Bietet Tests, Validierung und roll-back on error

Streaming und playback von Benachrichtigungen

Netconf vs SNMP

Bietet aber auch einen SNMP Trap hnlichen Mechanismus namens Notifications

Circa eine Grenordnung schneller als SNMP

War nie als Ersatz fr SNMP gedacht

Netconf ist Session basiert

Es existiert ein unoffizieller Mechanismus zum konvertieren von SNMP MIBs zu YANG Modellen (habe ich noch nicht getestet)

NETCONF ersetzt auch nicht COBRA/SOAP/REST

Die wichtigsten NETCONF Operationen

Get configuration - Teile oder Komplette Datenstze

Get all information - komplette running configuration und Statusinformationen

Edit configuration

Copy configuration

Delete configuration

Lock and unlock , Kurzlebiger Sperrmechanismus

Close and kill session (sanft), (nicht so sanft)

Netconf Grundlegende Operationen und Speicherorte

Drei Standard Konfigurationsspeicherorterunning: obligatorische Represntation des Ist-Statusses

candidate: optional, wird zur running nach

startup: optional, Konfiguration die fr den nchsten Reboot verwendet wird

Vier wichtige Kombinationen zum Editieren je nach Kombination der Capabilitiesdirect (:writeable-running), direct + startup (:writeable-running + startup)

indirect (:candidate), indirect + startup (:candidate + :startup)

Direktes Editieren

:writeable-running

:writeable-running + :startup

Indirektes Editieren

:candidate

:candidate + startup

YANG Features und Designziele

Lesbar und leicht lernbar

Hierarchische (Baumartige) Datenmodelle

Wiederverwendbare Typen und Gruppen

Erweiterbarkeit durch die Mglichkeit der Anpassung existierender Objekte

Untersttzt die Definition von Operationen (RPCs)

Constraints fr das Validieren von Konfigurationen

Modularitt

Versionierung

YANG kann auch nicht XML Schema (xsd), WSDL oder RelaxNG ersetzen, denn es hat viele Merkmale, die spezifisch fr das Konfigurationsmanagement sind

Das YANG Datenmodell

module acme-system {
namespace "http://acme.example.com/system";
prefix "acme;
container system {
leaf host-name {
type string;
mandatory true;
config true;
description "Hostname for this system;
} list interface {
key "name";
description "List of interfaces in the system; leaf name {
type string;
} leaf type {
type string; }
leaf mtu {
type int32; } }
}}

organization "ACME Inc.;
contact "[email protected]";

description
"The module for entities implementing the ACME
system.;
revision 2007-11-05 {
description "Initial revision.;
}Aus Karl Moberg, A 30-minute Introduction to NETCONF and YANG

Attribute eines Leafs

configWenn false, dann ist das Leaf read-only

defaultDefault Werte

mandatoryOptional oder Obligatorisch

mustXpath-Bedingung muss fr dieses Leaf erfllbar sein

typeDer Datentyp

whenBedingtes Leaf. Existiert nur, wenn Xpath-Bedingung wahr ist

descriptionBeschreibung (Lesbar)

referenceLesbarer Bezug auf andere Elemente oder Spezifikationen

unitsMaeinheit (z.B. cm, Hz, C)

statusOb das Lead 'current', 'deprecated' oder 'obsolete' ist

user

nameclass

full-name

uid

Default

list user { key name; leaf name { type string; } leaf uid { type uint32; }

leaf full-name { type string; } leaf class { type string; default viewer; }}Das List Statement

Aus Tail-F Tutorial: NETCONF AND YANG

Das Leafref Statement

Bezieht sich auf ein Element einer Liste, z.B.: ein Management Interface bezieht sich auf ein existierendes Element einer Liste von Interfaces

Das referenzierte Element kann nicht gelscht oder umbenannt werden

Kann nicht null oder empty sein, das Elternleaf kann aber optional sein

Das rip Routing subsystem referenziert existierende interfaces aus der Liste interfacse. interface

address

name

0 .. 64

container rip { list network-ifname { key ifname;

leaf ifname { type leafref { path /interface/name; } }

eth0.16eth0.19192.168.0.1

eth2.524.97.238.15

rip

network-ifname

ifname

eth0.19

Aus Tail-F Tutorial: NETCONF AND YANGRIP ist das Routing Information Protocol

'Schmakerl' das must Statement

container timeout { leaf access-timeout { description "Maximum time without server response"; units seconds; mandatory true; type uint32; } leaf retry-timer { description "Period to retry operation"; units seconds; type uint32; must current() < ../access-timeout" { error-app-tag retry-timer-invalid; error-message "The retry timer must be " + "less than the access timeout"; } }}

'Schmakerl' das must Statement (2)

leaf max-weight { type uint32 { range "0..1000"; } default 100;

must "sum(/sys:sys/interface[enabled = 'true']/weight) < current()" {

error-message "The total weight exceeds the configured max weight"; }}

'Schmakerl': Das augment Statement

augment /sys:system/sys:user { leaf expire { type yang:date-and-time; }}

user

nameclass

full-name

uid

expire

+DefaultAus Tail-F Tutorial: NETCONF AND YANG

augment /sys:system/sys:user { when sys:class = wheel"; leaf shell { type string; }}

user

nameclass

full-name

uid

expire

+Defaultshell

When'Schmakerl': Das when Statement

Aus Tail-F Tutorial: NETCONF AND YANG

Was NETCONF und YANG nicht ist

NETCONF ersetzt nicht COBRA/SOAP/REST, leistet jedoch eine vollstndige Darstellung des Konfigurationsmanagements

choice transfer-method { leaf transfer-interval { description "Frequency at which file transfer happens"; type uint16 { range "15 .. 2880"; } units minutes; } leaf transfer-on-commit { description "Transfer after each commit"; type empty; }}transfer-interval

transfer-on-commit

transfer-method

'Schmakerl': Das choice Statement

Aus Tail-F Tutorial: NETCONF AND YANG

Mein Verstndnis der Beziehung von NETCONF und Openflow

NETCONF betrifft Gertekonfigurationen, whrend Openflow die Forwarding Tables modifiziert. (Was auch, aber umstndlicher mit NETCONF mglich wre)

Aber es gibt OF-Config, welches Konfigurationen gemeinsam mit / parallel zu Openflow mittels NETCONF verwaltet, bzw. die Fhigkeiten von Openflow mittels NETCONF erweitert

Bitte mit einem Krnchen Salz nehmen

21.04.2016

Zentrum frInformations- undMedientechnologie

21.04.2016

Klicken Sie, um die Formate des Gliederungstextes zu bearbeitenZweite GliederungsebeneDritte GliederungsebeneVierte GliederungsebeneFnfte GliederungsebeneSechste GliederungsebeneSiebente Gliederungsebene

Zentrum frInformations- undMedientechnologie

[email protected]