-
Notifications
You must be signed in to change notification settings - Fork 0
/
rfc6241.xml
6381 lines (6113 loc) · 229 KB
/
rfc6241.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
<!ENTITY nbsp " ">
<!ENTITY zwsp "​">
<!ENTITY nbhy "‑">
<!ENTITY wj "⁠">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt"?>
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc rfcedstyle="yes"?>
<?rfc compact="yes"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" number="6241" ipr="pre5378Trust200902" category="std" obsoletes="4741" submissionType="IETF" updates="" xml:lang="en" tocInclude="true" symRefs="true" sortRefs="true" version="3">
<!-- xml2rfc v2v3 conversion 3.21.0 -->
<front>
<title abbrev="NETCONF Protocol">Network Configuration Protocol (NETCONF)</title>
<seriesInfo name="RFC" value="6241"/>
<author initials="R." surname="Enns" fullname="Rob Enns" role="editor">
<organization>Juniper Networks</organization>
<address>
<email>[email protected]</email>
</address>
</author>
<author initials="M." surname="Bjorklund" fullname="Martin Bjorklund" role="editor">
<organization>Tail-f Systems</organization>
<address>
<email>[email protected]</email>
</address>
</author>
<author initials="J." surname="Schoenwaelder" fullname="Juergen Schoenwaelder" role="editor">
<organization>Jacobs University</organization>
<address>
<email>[email protected]</email>
</address>
</author>
<author initials="A." surname="Bierman" fullname="Andy Bierman" role="editor">
<organization>Brocade</organization>
<address>
<email>[email protected]</email>
</address>
</author>
<date month="June" year="2011"/>
<area>Operations</area>
<keyword>XML</keyword>
<keyword>Configuration</keyword>
<keyword>Network Management</keyword>
<keyword>Extensible Markup Language</keyword>
<abstract>
<t>
The Network Configuration Protocol (NETCONF) defined in this document
provides mechanisms to install, manipulate, and delete the
configuration of network devices. It uses an Extensible Markup
Language (XML)-based data encoding for the configuration data as well
as the protocol messages. The NETCONF protocol operations are realized
as remote procedure calls (RPCs). This document obsoletes RFC 4741.
</t>
</abstract>
</front>
<middle>
<section numbered="true" toc="default">
<name>Introduction</name>
<t>The NETCONF protocol defines a simple mechanism through
which a network device can be managed, configuration data
information can be retrieved, and new configuration data can be
uploaded and manipulated. The protocol allows the device to expose a
full, formal application programming interface (API). Applications
can use this straightforward API to send and receive full and partial
configuration data sets.
</t>
<t>
The NETCONF protocol uses a remote procedure call (RPC) paradigm.
A client encodes an RPC in XML
<xref target="W3C.REC-xml-20001006" format="default"/> and
sends it to a server using a secure, connection-oriented
session. The server responds with a reply encoded in XML. The contents
of both the request and the response are fully described in XML DTDs
or XML schemas, or both, allowing both parties to recognize the
syntax constraints imposed on the exchange.
</t>
<t>
A key aspect of NETCONF is that it allows the functionality of the
management protocol to closely mirror the native functionality of
the device. This reduces implementation costs
and allows timely access to new features. In addition, applications
can access both the syntactic and semantic content of
the device's native user interface.
</t>
<t>
NETCONF allows a client to discover the set of protocol
extensions supported by a server. These "capabilities" permit the
client to adjust its behavior to take advantage of the features
exposed by the device. The capability definitions can be easily
extended in a noncentralized manner. Standard and non-standard
capabilities can be defined with semantic and syntactic rigor.
Capabilities are discussed in <xref target="capabilities" format="default"/>.
</t>
<t>
The NETCONF protocol is a building block in a system of automated
configuration. XML is the lingua franca of interchange, providing a
flexible but fully specified encoding mechanism for hierarchical
content. NETCONF can be used in concert with XML-based transformation
technologies, such as XSLT <xref target="W3C.REC-xslt-19991116" format="default"/>,
to provide a system for automated generation of
full and partial configurations.
The system can query one or more databases for data about networking
topologies, links, policies, customers, and services. This data can
be transformed using one or more XSLT
scripts from a task-oriented,
vendor-independent data schema into a form that
is specific to the vendor, product, operating system, and software
release. The resulting data can be passed to the device using the
NETCONF protocol.
</t>
<t>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in
<xref target="RFC2119" format="default">RFC 2119</xref>.
</t>
<section numbered="true" toc="default">
<name>Terminology</name>
<ul spacing="normal">
<li>
<t>
candidate configuration datastore: A configuration
datastore that can be manipulated without impacting the
device's current configuration and that can be committed
to the running configuration datastore. Not all devices
support a candidate configuration datastore.
</t>
</li>
<li>
<t>
capability: A functionality that supplements the base
NETCONF specification.
</t>
</li>
<li>
<t>
client: Invokes protocol operations on a
server. In addition, a client can subscribe to receive
notifications from a server.
</t>
</li>
<li>
<t>
configuration data: The set of
writable data that is required to transform a system
from its initial default state into its current state.
</t>
</li>
<li>
<t>
datastore: A conceptual place to store and access
information. A datastore might be implemented, for
example, using files, a database, flash memory locations,
or combinations thereof.
</t>
</li>
<li>
<t>
configuration datastore:
The datastore holding the complete set of
configuration data that is required to get a device from
its initial default state into a desired operational
state.
</t>
</li>
<li>
<t>
message: A protocol element sent over a session.
Messages are well-formed XML documents.
</t>
</li>
<li>
<t>
notification: A server-initiated message indicating that
a certain event has been recognized by the server.
</t>
</li>
<li>
<t>
protocol operation: A specific remote procedure call, as
used within the NETCONF protocol.
</t>
</li>
<li>
<t>
remote procedure call (RPC):
Realized by exchanging <rpc> and <rpc‑reply>
messages.
</t>
</li>
<li>
<t>
running configuration datastore: A configuration
datastore holding the complete configuration currently
active on the device. The running configuration
datastore always exists.
</t>
</li>
<li>
<t>
server: Executes protocol operations invoked by
a client. In addition, a server can send notifications
to a client.
</t>
</li>
<li>
<t>
session: Client and server exchange messages using a
secure, connection-oriented session.
</t>
</li>
<li>
<t>
startup configuration datastore: The configuration
datastore holding the configuration loaded by the device
when it boots. Only present on devices that separate the
startup configuration datastore from the running
configuration datastore.
</t>
</li>
<li>
<t>
state data: The additional data on a
system that is not configuration data such as read-only
status information and collected statistics.
</t>
</li>
<li>
<t>
user: The authenticated identity of the client. The
authenticated identity of a client is commonly referred
to as the NETCONF username.
</t>
</li>
</ul>
</section>
<section numbered="true" toc="default">
<name>Protocol Overview</name>
<t>
NETCONF uses a simple RPC-based mechanism to facilitate communication
between a client and a server. The client can be a script or
application typically running as part of a network manager. The
server is typically
a network device. The terms "device" and "server" are used
interchangeably in this document, as are "client" and "application".
</t>
<t>
A NETCONF session is the logical connection between a network administrator or
network configuration application and a network device.
A device MUST support at least one NETCONF session and
SHOULD support multiple sessions.
Global configuration attributes can be changed
during any authorized session, and the effects are visible in all sessions.
Session-specific attributes affect only the session in which
they are changed.
</t>
<t>
NETCONF can be conceptually partitioned into four layers as
shown in <xref target="layers" format="default"/>.
</t>
<figure anchor="layers">
<name>NETCONF Protocol Layers</name>
<artwork name="" type="" align="left" alt=""><![CDATA[
Layer Example
+-------------+ +-----------------+ +----------------+
(4) | Content | | Configuration | | Notification |
| | | data | | data |
+-------------+ +-----------------+ +----------------+
| | |
+-------------+ +-----------------+ |
(3) | Operations | | <edit-config> | |
| | | | |
+-------------+ +-----------------+ |
| | |
+-------------+ +-----------------+ +----------------+
(2) | Messages | | <rpc>, | | <notification> |
| | | <rpc-reply> | | |
+-------------+ +-----------------+ +----------------+
| | |
+-------------+ +-----------------------------------------+
(1) | Secure | | SSH, TLS, BEEP/TLS, SOAP/HTTP/TLS, ... |
| Transport | | |
+-------------+ +-----------------------------------------+
]]></artwork>
</figure>
<ol spacing="normal" type="(%d)"><li>
<t>
The Secure Transport layer provides a communication path
between the client and server. NETCONF can be layered
over any transport protocol that provides a set of basic
requirements. <xref target="transportRequirements" format="default"/>
discusses these requirements.
</t>
</li>
<li>
<t>
The Messages layer provides a simple,
transport-independent framing mechanism for encoding
RPCs and notifications. <xref target="rpcModel" format="default"/>
documents the RPC messages, and <xref target="RFC5717" format="default"/>
documents notifications.
</t>
</li>
<li>
<t>
The Operations layer defines a set of base protocol
operations invoked as RPC methods with XML-encoded
parameters. <xref target="protocolOperations" format="default"/> details
the list of base protocol operations.
</t>
</li>
<li>
<t>
The Content layer is outside the scope of this
document. It is expected that separate efforts to
standardize NETCONF data models will be undertaken.
</t>
</li>
</ol>
<t>
The YANG data modeling language
<xref target="RFC6020" format="default"/> has been developed for
specifying NETCONF data models and protocol operations,
covering the Operations and the Content layers of
<xref target="layers" format="default"/>.
</t>
</section>
<section numbered="true" toc="default">
<name>Capabilities</name>
<t>
A NETCONF capability is a set of functionality that
supplements the base NETCONF specification. The capability
is identified by a uniform resource identifier (URI) <xref target="RFC3986" format="default"/>.
</t>
<t>
Capabilities augment the base operations of the device, describing
both additional operations and the content allowed inside operations.
The client can discover the server's capabilities and use any
additional operations, parameters, and content defined by those
capabilities.
</t>
<t>
The capability definition might name one or more dependent capabilities.
To support a capability, the server
MUST support any capabilities upon which it depends.
</t>
<t>
<xref target="capabilities" format="default"/> defines the capabilities exchange that allows
the client to discover the server's capabilities.
<xref target="capabilities" format="default"/> also lists
the set of capabilities defined in this document.
</t>
<t>
Additional capabilities can be defined at any time in external
documents, allowing the set of capabilities to expand over
time. Standards bodies can define standardized capabilities, and
implementations
can define proprietary ones. A capability URI MUST sufficiently
distinguish the naming authority to avoid naming collisions.
</t>
</section>
<section anchor="state" numbered="true" toc="default">
<name>Separation of Configuration and State Data</name>
<t>
The information that can be retrieved from a running system is
separated into two classes, configuration data and state
data. Configuration data is the set of writable data that is required
to transform a system from its initial default state into its current
state. State data is the additional data on a system that is not
configuration data such as read-only status information and collected
statistics. When a device is performing configuration operations, a
number of problems would arise if state data were
included:
</t>
<ul spacing="normal">
<li>
<t>Comparisons of configuration data sets would be dominated by irrelevant
entries such as different statistics.</t>
</li>
<li>
<t>Incoming data could contain nonsensical
requests, such as attempts to write read-only data.</t>
</li>
<li>
<t>The data sets would be large.</t>
</li>
<li>
<t>Archived data could contain values for read-only data
items, complicating the processing required to restore
archived data.
</t>
</li>
</ul>
<t>
To account for these issues, the NETCONF protocol recognizes the difference
between configuration data and state data and provides
operations for
each. The <get‑config> operation
retrieves configuration data only, while the <get> operation
retrieves configuration and state data.
</t>
<t>
Note that the NETCONF protocol is focused on the information
required to get the device into its desired running state.
The inclusion of other important, persistent data is
implementation specific. For example, user files and
databases are not treated as configuration data by the NETCONF
protocol.
</t>
<t>
For example, if a local database of user authentication
data is stored on the device, it is an
implementation-dependent matter
whether it is included in configuration data.
</t>
</section>
</section>
<section anchor="transportRequirements" numbered="true" toc="default">
<name>Transport Protocol Requirements</name>
<t>NETCONF uses an RPC-based communication paradigm. A client
sends a series of one or more RPC request messages, which
cause the server to respond with a corresponding series of
RPC reply messages.
</t>
<t>The NETCONF protocol can be layered on any transport protocol that
provides the required set of functionality. It is not bound to
any particular transport protocol, but allows a mapping to define how it
can be implemented over any specific protocol.
</t>
<t>
The transport protocol MUST provide a mechanism to indicate the
session type (client or server) to the NETCONF protocol layer.
</t>
<t>
This section details the characteristics that NETCONF requires
from the underlying transport protocol.
</t>
<section numbered="true" toc="default">
<name>Connection-Oriented Operation</name>
<t>NETCONF is connection-oriented, requiring a persistent
connection between peers. This connection MUST provide
reliable, sequenced data delivery. NETCONF connections are
long-lived, persisting between protocol operations.
</t>
<t> In addition, resources requested from the server for a
particular connection MUST be automatically released when the
connection closes, making failure recovery simpler and more
robust. For example, when a lock is acquired by a client, the
lock persists until either it is explicitly released or the server
determines that the connection has been terminated. If a
connection is terminated while the client holds a lock, the
server can perform any appropriate recovery.
The <lock> operation is further discussed in <xref target="lock" format="default"/>.
</t>
</section>
<section numbered="true" toc="default">
<name>Authentication, Integrity, and Confidentiality</name>
<t>
NETCONF connections MUST provide authentication, data
integrity, confidentiality, and replay protection. NETCONF
depends on the transport protocol for this capability. A
NETCONF peer assumes that appropriate levels of security and
confidentiality are provided independently of this
document. For example, connections could be encrypted using
Transport Layer Security (TLS)
<xref target="RFC5246" format="default"/> or Secure Shell (SSH) <xref target="RFC4251" format="default"/>,
depending on the underlying protocol.
</t>
<t>
NETCONF connections MUST be authenticated. The transport
protocol is responsible for authentication of the server to
the client and authentication of the client to the server. A
NETCONF peer assumes that the connection's authentication
information has been validated by the underlying transport
protocol using sufficiently trustworthy mechanisms and that
the peer's identity has been sufficiently proven.
</t>
<t>
One goal of NETCONF is to provide a programmatic interface
to the device that closely follows the functionality of the
device's native interface. Therefore, it is expected that
the underlying protocol uses existing authentication
mechanisms available on the device. For example, a NETCONF
server on a device that supports RADIUS
<xref target="RFC2865" format="default"/> might allow the use of RADIUS to
authenticate NETCONF sessions.
</t>
<t>
The authentication process MUST result in an authenticated
client identity whose permissions are known to the server.
The authenticated identity of a client is commonly referred
to as the NETCONF username. The username is a string of
characters that match the "Char" production from Section 2.2
of <xref target="W3C.REC-xml-20001006" format="default"/>. The algorithm
used to derive the username is transport protocol specific
and in addition specific to the authentication mechanism
used by the transport protocol. The transport protocol MUST
provide a username to be used by the other NETCONF layers.
</t>
<t>
The access permissions of a given client, identified by its
NETCONF username, are part of the configuration of the
NETCONF server. These permissions MUST be enforced during
the remainder of the NETCONF session. The details of how access
control is configured is outside the scope of this document.
</t>
</section>
<section numbered="true" toc="default">
<name>Mandatory Transport Protocol</name>
<t>
A NETCONF implementation MUST support the SSH transport
protocol mapping <xref target="RFC6242" format="default"/>.
</t>
</section>
</section>
<!-- Transport Protocol Requirements -->
<section anchor="xmlConsiderations" numbered="true" toc="default">
<name>XML Considerations</name>
<t>
XML serves as the encoding format for NETCONF, allowing complex
hierarchical data to be expressed in a text format that can be
read, saved, and manipulated with both traditional text tools and
tools specific to XML.
</t>
<t>
All NETCONF messages MUST be well-formed XML, encoded in
UTF-8 <xref target="RFC3629" format="default"/>. If a peer receives an
<rpc> message that is not well-formed XML or not
encoded in UTF-8, it SHOULD reply with a "malformed-message"
error. If a reply cannot be sent for any reason, the server
MUST terminate the session.
</t>
<t>
A NETCONF message MAY begin with an XML declaration (see
Section 2.8 of <xref target="W3C.REC-xml-20001006" format="default"/>).
</t>
<t>
This section discusses a small number of XML-related considerations
pertaining to NETCONF.
</t>
<section anchor="namespace" numbered="true" toc="default">
<name>Namespace</name>
<t>
All NETCONF protocol elements are defined in the following namespace:
</t>
<ul empty="true" spacing="normal">
<li>
<t>urn:ietf:params:xml:ns:netconf:base:1.0</t>
</li>
</ul>
<t>
NETCONF capability names MUST be URIs <xref target="RFC3986" format="default"/>.
NETCONF capabilities are discussed in <xref target="capabilities" format="default"/>.
</t>
</section>
<section anchor="nodtd" numbered="true" toc="default">
<name>Document Type Declarations</name>
<t>
Document type declarations (see Section 2.8 of <xref target="W3C.REC-xml-20001006" format="default"/>) MUST NOT appear in NETCONF
content.
</t>
</section>
</section>
<!-- XML Considerations -->
<section anchor="rpcModel" numbered="true" toc="default">
<name>RPC Model</name>
<t>
The NETCONF protocol uses an RPC-based communication
model. NETCONF peers use <rpc> and <rpc‑reply>
elements to provide transport-protocol-independent framing of
NETCONF requests and responses.
</t>
<t>
The syntax and XML encoding of the Messages-layer RPCs are
formally defined in the XML schema in <xref target="xsdschema" format="default"/>.
</t>
<section numbered="true" toc="default">
<name><rpc> Element</name>
<t>
The <rpc> element is used to enclose a NETCONF request sent from
the client to the server.
</t>
<t>
The <rpc> element has a mandatory attribute
"message-id", which is a string chosen by the sender of the
RPC that will commonly encode a monotonically increasing
integer. The receiver of the RPC does not decode or
interpret this string but simply saves it to be used as a
"message-id" attribute in any resulting
<rpc‑reply> message. The sender MUST ensure that
the "message-id" value is normalized according to the XML
attribute value normalization rules defined in
<xref target="W3C.REC-xml-20001006" format="default"/> if the sender wants
the string to be returned unmodified. For example:
</t>
<artwork name="" type="" align="left" alt=""><![CDATA[
<rpc message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<some-method>
<!-- method parameters here... -->
</some-method>
</rpc>
]]></artwork>
<t>
If additional attributes are present in an <rpc>
element, a NETCONF peer MUST return them unmodified in the
<rpc‑reply> element. This includes any "xmlns"
attributes.
</t>
<t>
The name and parameters of an RPC are encoded as the contents
of the <rpc> element. The name of the RPC is an element
directly inside the <rpc> element, and any parameters are
encoded inside this element.
</t>
<t>
The following example invokes a method called <my‑own‑method>,
which has two
parameters, <my‑first‑parameter>, with a value of "14", and
<another‑parameter>, with a value of "fred":
</t>
<artwork name="" type="" align="left" alt=""><![CDATA[
<rpc message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<my-own-method xmlns="http://example.net/me/my-own/1.0">
<my-first-parameter>14</my-first-parameter>
<another-parameter>fred</another-parameter>
</my-own-method>
</rpc>
]]></artwork>
<t>
The following example invokes a <rock‑the‑house> method with a
<zip‑code> parameter of "27606‑0100":
</t>
<artwork name="" type="" align="left" alt=""><![CDATA[
<rpc message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<rock-the-house xmlns="http://example.net/rock/1.0">
<zip-code>27606-0100</zip-code>
</rock-the-house>
</rpc>
]]></artwork>
<t>
The following example invokes the NETCONF <get>
method with no parameters:
</t>
<artwork name="" type="" align="left" alt=""><![CDATA[
<rpc message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get/>
</rpc>
]]></artwork>
</section>
<section numbered="true" toc="default">
<name><rpc‑reply> Element</name>
<t>
The <rpc‑reply> message is sent in response to an <rpc> message.
</t>
<t>
The <rpc‑reply> element has a mandatory attribute "message‑id",
which is equal to the "message-id" attribute of the <rpc> for
which this is a response.
</t>
<t>
A NETCONF server MUST also return any additional attributes
included in the <rpc> element unmodified in the
<rpc‑reply> element.
</t>
<t>
The response data is encoded as one or more child elements to the
<rpc‑reply> element.</t>
<t>For example:</t>
<t>The following <rpc> element invokes the NETCONF <get>
method and includes an additional attribute called "user-id".
Note that the "user-id" attribute is not in the NETCONF namespace.
The returned <rpc‑reply> element returns the "user‑id"
attribute, as well as the requested content.</t>
<artwork name="" type="" align="left" alt=""><![CDATA[
<rpc message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:ex="http://example.net/content/1.0"
ex:user-id="fred">
<get/>
</rpc>
<rpc-reply message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:ex="http://example.net/content/1.0"
ex:user-id="fred">
<data>
<!-- contents here... -->
</data>
</rpc-reply>
]]></artwork>
</section>
<section anchor="rpcError" numbered="true" toc="default">
<name><rpc‑error> Element</name>
<t>
The <rpc‑error> element is sent in
<rpc‑reply> messages if an error occurs during
the processing of an <rpc> request.
</t>
<t>
If a server encounters multiple errors during the processing
of an <rpc> request, the <rpc‑reply> MAY
contain multiple <rpc‑error> elements. However,
a server is not required to detect or report more than one
<rpc‑error> element, if a request contains
multiple errors. A server is not required to check for
particular error conditions in a specific sequence. A
server MUST return an <rpc‑error> element if any
error conditions occur during processing.
</t>
<t>
A server MUST NOT return application-level- or data-model-specific
error information in an <rpc‑error> element for which the
client does not have sufficient access rights.
</t>
<t>
The <rpc‑error> element includes the following
information:
</t>
<dl newline="false" spacing="normal">
<dt>error-type:</dt>
<dd>
<t>
Defines the conceptual layer that the error occurred.
Enumeration. One of:
</t>
<ul spacing="normal">
<li>
<t>transport (layer: Secure Transport)</t>
</li>
<li>
<t>rpc (layer: Messages)</t>
</li>
<li>
<t>protocol (layer: Operations)</t>
</li>
<li>
<t>application (layer: Content)</t>
</li>
</ul>
</dd>
<dt>error-tag:</dt>
<dd>
Contains a string identifying the error condition.
See <xref target="errorList" format="default"/> for allowed values.
</dd>
<dt>error-severity:</dt>
<dd>
<t>
Contains a string identifying the error severity,
as determined by the device.
One of:
</t>
<ul spacing="normal">
<li>
<t>error</t>
</li>
<li>
<t>warning</t>
</li>
</ul>
<t>
Note that there are no <error-tag> values
defined in this document that utilize the
"warning" enumeration. This is reserved
for future use.
</t>
</dd>
<dt>error-app-tag:</dt>
<dd>
Contains a string identifying the data-model-specific
or implementation-specific error condition, if
one exists. This element will not be present if no
appropriate application error-tag
can be associated
with a particular error condition.
If a data-model-specific and an implementation-specific error-app-tag
both exist, then the data-model-specific value MUST
be used by the server.
</dd>
<dt>error-path:</dt>
<dd>
Contains the absolute XPath <xref target="W3C.REC-xpath-19991116" format="default"/> expression
identifying the element path to the node that is
associated with the error being reported in a particular
<rpc‑error> element. This element will not be
present if no appropriate payload element or datastore
node can be associated with a particular error
condition.</dd>
<dt/>
<dd>
<t>
The XPath expression is interpreted in the following context:
</t>
<ul spacing="normal">
<li>
<t>The set of namespace declarations are those in
scope on the <rpc‑error> element.</t>
</li>
<li>
<t>The set of variable bindings is empty.</t>
</li>
<li>
<t>The function library is the core function library.</t>
</li>
</ul>
<t>
The context node depends on the node associated with the
error being reported:
</t>
<ul spacing="normal">
<li>
<t>If a payload element can be associated with the
error, the context node is the rpc request's document
node (i.e., the <rpc> element).</t>
</li>
<li>
<t>Otherwise, the context node is the root of all data
models, i.e., the node that has the top-level nodes
from all data models as children.</t>
</li>
</ul>
</dd>
<dt>error-message:</dt>
<dd>
Contains a string suitable for human display that
describes the error condition. This
element will not be present if no appropriate message
is provided for a particular error condition.
This element SHOULD include an "xml:lang" attribute as
defined in <xref target="W3C.REC-xml-20001006" format="default"/> and
discussed in <xref target="RFC3470" format="default"/>.
</dd>
<dt>error-info:</dt>
<dd>
Contains protocol- or data-model-specific
error content. This element will not be present if no
such error content is provided for a particular error condition.
The list in <xref target="errorList" format="default"/>
defines any mandatory error‑info content
for each error. After any protocol-mandated content,
a data model definition MAY mandate that certain application-layer
error information be included in the error‑info container.
An implementation MAY include additional elements
to provide extended and/or
implementation-specific debugging information.
</dd>
</dl>
<t>
<xref target="errorList" format="default"/> enumerates the standard NETCONF errors.
</t>
<dl newline="false" spacing="normal">
<dt>Example:</dt>
<dd>
An error is returned if an <rpc> element is
received without a "message-id" attribute. Note that only
in this case is it acceptable for the NETCONF peer to
omit the "message-id" attribute in the
<rpc‑reply> element.
</dd>
</dl>
<artwork name="" type="" align="left" alt=""><![CDATA[
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-config>
<source>
<running/>
</source>
</get-config>
</rpc>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<rpc-error>
<error-type>rpc</error-type>
<error-tag>missing-attribute</error-tag>
<error-severity>error</error-severity>
<error-info>
<bad-attribute>message-id</bad-attribute>
<bad-element>rpc</bad-element>
</error-info>
</rpc-error>
</rpc-reply>
]]></artwork>
<t>
The following <rpc‑reply> illustrates the case
of returning multiple <rpc‑error> elements.
</t>
<t>Note that the data models used in the examples in this section use
the <name> element to distinguish between multiple instances of
the <interface> element.
</t>
<artwork name="" type="" align="left" alt=""><![CDATA[
<rpc-reply message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<rpc-error>
<error-type>application</error-type>
<error-tag>invalid-value</error-tag>
<error-severity>error</error-severity>
<error-path xmlns:t="http://example.com/schema/1.2/config">
/t:top/t:interface[t:name="Ethernet0/0"]/t:mtu
</error-path>
<error-message xml:lang="en">
MTU value 25000 is not within range 256..9192
</error-message>
</rpc-error>
<rpc-error>
<error-type>application</error-type>
<error-tag>invalid-value</error-tag>
<error-severity>error</error-severity>
<error-path xmlns:t="http://example.com/schema/1.2/config">
/t:top/t:interface[t:name="Ethernet1/0"]/t:address/t:name
</error-path>
<error-message xml:lang="en">
Invalid IP address for interface Ethernet1/0
</error-message>
</rpc-error>
</rpc-reply>
]]></artwork>
</section>
<section anchor="ok" numbered="true" toc="default">
<name><ok> Element</name>
<t>
The <ok> element is sent in <rpc‑reply> messages
if no errors or warnings occurred during the processing of an <rpc>
request, and no data was returned from the operation. For example:
</t>
<artwork name="" type="" align="left" alt=""><![CDATA[
<rpc-reply message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<ok/>
</rpc-reply>
]]></artwork>
</section>
<section numbered="true" toc="default">
<name>Pipelining</name>
<t>
NETCONF <rpc> requests MUST be processed serially by the managed device.
Additional <rpc> requests MAY be sent before previous ones
have been completed. The managed device MUST send responses only in
the order the requests were received.
</t>
</section>
</section>
<!-- RPC Model -->
<section numbered="true" toc="default">
<name>Configuration Model</name>
<t> NETCONF provides an initial set of
operations and a number of capabilities that can be used to
extend the base. NETCONF peers exchange device capabilities
when the session is initiated as described in
<xref target="capabilityExchange" format="default"/>.
</t>
<section numbered="true" toc="default">
<name>Configuration Datastores</name>
<t>NETCONF defines the existence of one or more configuration
datastores and allows configuration operations on them.
A configuration datastore is defined as
the complete set of configuration data that is required to get a
device from its initial default state into a desired operational state.
The configuration datastore does not include state data or executive
commands.
</t>
<t>
The running configuration datastore holds the complete
configuration currently active on the network device. Only
one configuration datastore of this type exists on the
device, and it is always present. NETCONF protocol
operations refer to this datastore using the <running>
element.
</t>
<t>
Only the <running> configuration datastore is present in the
base model. Additional configuration datastores MAY be
defined by capabilities. Such configuration datastores
are available only on devices that advertise the
capabilities.
</t>