summaryrefslogtreecommitdiffstats
path: root/src/plugins/yang/openconfig/openconfig-bgp-errors.yang
blob: f53a932954f09cd7621443996ae77b4ba3477044 (plain)
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
submodule openconfig-bgp-errors {

  belongs-to openconfig-bgp-types {
    prefix "oc-bgp-types";
  }

  import openconfig-extensions { prefix "oc-ext"; }

  // meta
  organization
    "OpenConfig working group";

  contact
    "OpenConfig working group
    netopenconfig@googlegroups.com";

  description
    "This module defines BGP NOTIFICATION message error codes
    and subcodes";

  oc-ext:openconfig-version "5.0.1";

  revision "2018-08-20" {
    description
      "Correct description of AFI-SAFI enabled leaf.";
    reference "5.0.1";
  }

  revision "2018-04-11" {
    description
      "Correct naming of BGP maximum prefix warning percentage leaf.";
    reference "5.0.0";
  }

  revision "2018-03-20" {
    description
      "Added SR-TE policy SAFI";
    reference "4.1.0";
  }

  revision "2017-07-30" {
    description
      "Clarification of add-paths send-max leaf";
    reference "4.0.1";
  }

  revision "2017-07-10" {
    description
      "Add error notifications; moved add-paths config; add AS
      prepend policy features; removed unneeded config leaves";
    reference "4.0.0";
  }

  identity BGP_ERROR_CODE {
    description
      "Indicates the error type in a BGP NOTIFICATION message";
    reference
      "RFC 4271 - A Border Gateway Protocol 4 (BGP-4)";
  }

  identity BGP_ERROR_SUBCODE {
    description
      "Provides more specific information about the nature of the
      error reported in a NOTIFICATION message. Each Error
      Code may have one or more Error Subcodes associated with it.";
    reference
      "RFC 4271 - A Border Gateway Protocol 4 (BGP-4)";
  }


  identity UNSPECIFIC {
    base  BGP_ERROR_SUBCODE;
    description
      "The error subcode field is unspecific when the NOTIFICATION
      message does not include any specific error subcode (i.e..,
      value 0).";
  }

  identity MESSAGE_HEADER_ERROR {
    base BGP_ERROR_CODE;
    description
      "Errors detected while processing the Message Header";
  }

  identity OPEN_MESSAGE_ERROR {
    base BGP_ERROR_CODE;
    description
      "Errors detected while processing the OPEN message";
  }

  identity UPDATE_MESSAGE_ERROR {
    base BGP_ERROR_CODE;
    description
      "Errors detected while processing the UPDATE message";
  }

  identity HOLD_TIMER_EXPIRED {
    base BGP_ERROR_CODE;
    description
      "Indicates that the system did not receive successive
      KEEPALIVE, UPDATE, and/or NOTIFICATION messages within the
      period specified in the Hold Time field of the OPEN message";
  }

  identity FINITE_STATE_MACHINE_ERROR {
    base BGP_ERROR_CODE;
    description
      "Error detected by the BGP Finite State Machine
      (e.g., receipt of an unexpected event)";
  }

  identity CEASE {
    base BGP_ERROR_CODE;
    description
      "Sent by a BGP peer to close its BGP connection in absence of
      any fatal errors.  If the BGP speaker terminates its
      connection with a neihbor because the number of prefixes
      received exceeds the configured upper bound, the speaker must
      send the neighbor a NOTIFICATION message with the Cease
      error code.";
  }

  identity ROUTE_REFRESH_MESSAGE_ERROR {
    base BGP_ERROR_CODE;
    description
      "The length, excluding the fixed-size message header, of the
      received ROUTE-REFRESH message with Message Subtype 1 and 2 is
      not 4.  Applicable only when a BGP speaker has received the
      'Enhanced Route Refresh Capability' from a peer";
    reference
      "RFC 7313 - Enhanced Route Refresh Capability for BGP-4";
  }

  identity MESSAGE_HEADER_SUBCODE {
    base BGP_ERROR_SUBCODE;
    description
      "Error subcode definitions for Message Header error
      notifications";
  }

  identity CONNECTION_NOT_SYNCHRONIZED {
    base MESSAGE_HEADER_SUBCODE;
    description
      "Marker field of the message header is not all ones as
      expected";
  }

  identity BAD_MESSAGE_LENGTH {
    base MESSAGE_HEADER_SUBCODE;
    description
      "Indicates the message has an erroneous length with one
      or more of the following:

      - the Length field of the message header is less than 19 or
        greater than 4096

      - the Length field of an OPEN message is less than the minimum
        length of the OPEN message

      - the Length field of an UPDATE message is less than the
        minimum length of the UPDATE message

      - the Length field of a KEEPALIVE message is not equal to 19

      - the Length field of a NOTIFICATION message is less than the
        minimum length of the NOTIFICATION message

      The erroneous Length field must be reported in the
      NOTIFICATION data.";
  }

  identity BAD_MESSAGE_TYPE {
    base MESSAGE_HEADER_SUBCODE;
    description
      "Type field of the message header is not recognized.  The
      erroneous type field must be reported in the NOTIFICATION
      data";
  }

  identity OPEN_MESSAGE_SUBCODE {
    base BGP_ERROR_SUBCODE;
    description
      "Error subcode definitions for OPEN message error
      notifications";
  }

  identity UNSUPPORTED_VERSION_NUMBER {
    base OPEN_MESSAGE_SUBCODE;
    description
      "Version number in the Version field of the received OPEN
      message is not supported";
  }

  identity BAD_PEER_AS {
    base  OPEN_MESSAGE_SUBCODE;
    description
      "Autonomous System field of the OPEN message is unacceptable";
  }

  identity BAD_BGP_IDENTIFIER {
    base OPEN_MESSAGE_SUBCODE;
    description
      "BGP Identifier field of the OPEN message is syntactically
      incorrect";
  }

  identity UNSUPPORTED_OPTIONAL_PARAMETER {
    base OPEN_MESSAGE_SUBCODE;
    description
      "One of the Optional Parameters in the OPEN message is not
      recognized";
  }

  identity UNACCEPTABLE_HOLD_TIME {
    base OPEN_MESSAGE_SUBCODE;
    description
      "Hold Time field of the OPEN message is unacceptable";
  }

  identity UNSUPPORTED_CAPABILITY {
    base OPEN_MESSAGE_SUBCODE;
    description
      "Inidicates that the peer does not support capabilities
      advertisement -- the peer may send this subcode in response to
      an OPEN message that carries the Capabilities Optional
      Parameter";
    reference
      "RFC 5492 - Capabilities Advertisement with BGP-4";
  }

  identity UPDATE_MESSAGE_SUBCODE {
    base BGP_ERROR_SUBCODE;
    description
      "Error subcode definitions for UPDATE message error
      notifications";
  }

  identity MALFORMED_ATTRIBUTE_LIST {
    base UPDATE_MESSAGE_SUBCODE;
    description
      "Inidicates Withdrawn Routes Length or Total Attribute Length
      is too large, or

      An attribute appears more than once in the UPDATE message";
  }

  identity UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE {
    base UPDATE_MESSAGE_SUBCODE;
    description
      "One or more of the well-known mandatory attributes are not
      recognized";
  }

  identity MISSING_WELL_KNOWN_ATTRIBUTE {
    base UPDATE_MESSAGE_SUBCODE;
    description
      "One or more of the well-known mandatory attributes are not
      present";
  }

  identity ATTRIBUTE_FLAGS_ERROR {
    base UPDATE_MESSAGE_SUBCODE;
    description
      "Attribute has Attribute Flags that conflict with the
      Attribute Type Code";
  }

  identity ATTRIBUTE_LENGTH_ERROR {
    base UPDATE_MESSAGE_SUBCODE;
    description
      "Attribute has an Attribute Length that conflicts with the
      expected length (based on the attribute type code)";
  }

  identity INVALID_ORIGIN_ATTRIBUTE {
    base UPDATE_MESSAGE_SUBCODE;
    description
      "ORIGIN attribute has an undefined value";
  }

  identity INVALID_NEXT_HOP_ATTRIBUTE {
    base UPDATE_MESSAGE_SUBCODE;
    description
      "The NEXT_HOP attribute field is syntactically incorrect";
  }

  identity OPTIONAL_ATTRIBUTE_ERROR {
    base UPDATE_MESSAGE_SUBCODE;
    description
      "An error is detected in the value of a recognized optional
      attribute (such an attribute must be discarded)";
  }

  identity INVALID_NETWORK_FIELD {
    base UPDATE_MESSAGE_SUBCODE;
    description
      "The NLRI field in the UPDATE message is syntactically
      incorrect";
  }

  identity MALFORMED_AS_PATH {
    base UPDATE_MESSAGE_SUBCODE;
    description
      "The AS_PATH attribute is syntactically incorrect";
  }

  identity FINITE_STATE_MACHINE_SUBCODE {
    base BGP_ERROR_SUBCODE;
    description
      "Error subcode definitions for BGP finite state machine
      errors.";
    reference
      "RFC 6608 - Subcodes for BGP Finite State Machine Error";
  }

  identity RECEIVE_UNEXPECTED_MESSAGE_OPENSENT {
    base FINITE_STATE_MACHINE_SUBCODE;
    description
      "The peer BGP speaker received an unexpected message from
      the local system while the peer speaker session was in the
      OpenSent state";
  }

  identity RECEIVE_UNEXPECTED_MESSAGE_OPENCONFIRM {
    base FINITE_STATE_MACHINE_SUBCODE;
    description
      "The peer BGP speaker received an unexpected message from
      the local system while the peer speaker session was in the
      OpenConfirm state";
  }

  identity RECEIVE_UNEXPECTED_MESSAGE_ESTABLISHED {
    base FINITE_STATE_MACHINE_SUBCODE;
    description
      "The peer BGP speaker received an unexpected message from
      the local system while the peer speaker session was in the
      Established state";
  }

  identity CEASE_SUBCODE {
    base BGP_ERROR_SUBCODE;
    description
      "Error subcode definitions for Cease notification messages";
    reference
      "RFC 4486 - Subcodes for BGP Cease Notification Message";
  }

  identity MAX_NUM_PREFIXES_REACHED {
    base CEASE_SUBCODE;
    description
      "The peer BGP speaker terminated its peering with the local
      system because the number of address prefixes received
      exceeds a locally configured upper bound";
  }

  identity ADMINISTRATIVE_SHUTDOWN {
    base CEASE_SUBCODE;
    description
      "The peer BGP speaker administratively shut down its peering
      with the local system";
  }

  identity PEER_DE_CONFIGURED {
    base CEASE_SUBCODE;
    description
      "The peer BGP speaker de-configure the peering with the local
      system";
  }

  identity ADMINISTRATIVE_RESET {
    base CEASE_SUBCODE;
    description
      "The peer BGP speaker administratively reset the peering with
      the local system";
  }

  identity CONNECTION_REJECTED {
    base CEASE_SUBCODE;
    description
      "The peer BGP speaker disallowed the BGP connection to the
      local system after the peer speaker accepted a transport
      protocol connection";
  }

  identity OTHER_CONFIG_CHANGE {
    base CEASE_SUBCODE;
    description
      "The peer BGP speaker administratively reset the peering with
      the local sytem due to a configuration change that is not
      covered by another subcode.";
  }

  identity CONN_COLLISION_RESOLUTION {
    base CEASE_SUBCODE;
    description
      "The peer BGP speaker sent a CEASE NOTIFICATION as a result of
      the collision resolution procedure described in RFC 4271";
  }

  identity OUT_OF_RESOURCES {
    base CEASE_SUBCODE;
    description
      "The peer BGP speaker ran out of resources (e.g., memory) and
      reset the session with the local system";
  }

  identity ROUTE_REFRESH_SUBCODE {
    base BGP_ERROR_SUBCODE;
    description
      "Error subcode definitions for the ROUTE-REFRESH message
      error";
  }

  identity INVALID_MESSAGE_LENGTH {
    base ROUTE_REFRESH_SUBCODE;
    description
      "The length, excluding the fixed-size message header, of the
      received ROUTE-REFRESH message with Message Subtype 1 and 2
      is not 4";
  }
}