-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdraft-ietf-dnssd-push.html
1480 lines (1422 loc) · 114 KB
/
draft-ietf-dnssd-push.html
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head profile="http://www.w3.org/2006/03/hcard http://dublincore.org/documents/2008/08/04/dc-html/">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
<title>DNS Push Notifications</title>
<style type="text/css" title="Xml2Rfc (sans serif)">
/*<![CDATA[*/
a {
text-decoration: none;
}
/* info code from SantaKlauss at http://www.madaboutstyle.com/tooltip2.html */
a.info {
/* This is the key. */
position: relative;
z-index: 24;
text-decoration: none;
}
a.info:hover {
z-index: 25;
color: #FFF; background-color: #900;
}
a.info span { display: none; }
a.info:hover span.info {
/* The span will display just on :hover state. */
display: block;
position: absolute;
font-size: smaller;
top: 2em; left: -5em; width: 15em;
padding: 2px; border: 1px solid #333;
color: #900; background-color: #EEE;
text-align: left;
}
a.smpl {
color: black;
}
a:hover {
text-decoration: underline;
}
a:active {
text-decoration: underline;
}
address {
margin-top: 1em;
margin-left: 2em;
font-style: normal;
}
body {
color: black;
font-family: verdana, helvetica, arial, sans-serif;
font-size: 10pt;
max-width: 55em;
}
cite {
font-style: normal;
}
dd {
margin-right: 2em;
}
dl {
margin-left: 2em;
}
ul.empty {
list-style-type: none;
}
ul.empty li {
margin-top: .5em;
}
dl p {
margin-left: 0em;
}
dt {
margin-top: .5em;
}
h1 {
font-size: 14pt;
line-height: 21pt;
page-break-after: avoid;
}
h1.np {
page-break-before: always;
}
h1 a {
color: #333333;
}
h2 {
font-size: 12pt;
line-height: 15pt;
page-break-after: avoid;
}
h3, h4, h5, h6 {
font-size: 10pt;
page-break-after: avoid;
}
h2 a, h3 a, h4 a, h5 a, h6 a {
color: black;
}
img {
margin-left: 3em;
}
li {
margin-left: 2em;
margin-right: 2em;
}
ol {
margin-left: 2em;
margin-right: 2em;
}
ol p {
margin-left: 0em;
}
p {
margin-left: 2em;
margin-right: 2em;
}
pre {
margin-left: 3em;
background-color: lightyellow;
padding: .25em;
}
pre.text2 {
border-style: dotted;
border-width: 1px;
background-color: #f0f0f0;
width: 69em;
}
pre.inline {
background-color: white;
padding: 0em;
}
pre.text {
border-style: dotted;
border-width: 1px;
background-color: #f8f8f8;
width: 69em;
}
pre.drawing {
border-style: solid;
border-width: 1px;
background-color: #f8f8f8;
padding: 2em;
}
table {
margin-left: 2em;
}
table.tt {
vertical-align: top;
}
table.full {
border-style: outset;
border-width: 1px;
}
table.headers {
border-style: outset;
border-width: 1px;
}
table.tt td {
vertical-align: top;
}
table.full td {
border-style: inset;
border-width: 1px;
}
table.tt th {
vertical-align: top;
}
table.full th {
border-style: inset;
border-width: 1px;
}
table.headers th {
border-style: none none inset none;
border-width: 1px;
}
table.left {
margin-right: auto;
}
table.right {
margin-left: auto;
}
table.center {
margin-left: auto;
margin-right: auto;
}
caption {
caption-side: bottom;
font-weight: bold;
font-size: 9pt;
margin-top: .5em;
}
table.header {
border-spacing: 1px;
width: 95%;
font-size: 10pt;
color: white;
}
td.top {
vertical-align: top;
}
td.topnowrap {
vertical-align: top;
white-space: nowrap;
}
table.header td {
background-color: gray;
width: 50%;
}
table.header a {
color: white;
}
td.reference {
vertical-align: top;
white-space: nowrap;
padding-right: 1em;
}
thead {
display:table-header-group;
}
ul.toc, ul.toc ul {
list-style: none;
margin-left: 1.5em;
margin-right: 0em;
padding-left: 0em;
}
ul.toc li {
line-height: 150%;
font-weight: bold;
font-size: 10pt;
margin-left: 0em;
margin-right: 0em;
}
ul.toc li li {
line-height: normal;
font-weight: normal;
font-size: 9pt;
margin-left: 0em;
margin-right: 0em;
}
li.excluded {
font-size: 0pt;
}
ul p {
margin-left: 0em;
}
.comment {
background-color: yellow;
}
.center {
text-align: center;
}
.error {
color: red;
font-style: italic;
font-weight: bold;
}
.figure {
font-weight: bold;
text-align: center;
font-size: 9pt;
}
.filename {
color: #333333;
font-weight: bold;
font-size: 12pt;
line-height: 21pt;
text-align: center;
}
.fn {
font-weight: bold;
}
.hidden {
display: none;
}
.left {
text-align: left;
}
.right {
text-align: right;
}
.title {
color: #990000;
font-size: 18pt;
line-height: 18pt;
font-weight: bold;
text-align: center;
margin-top: 36pt;
}
.vcardline {
display: block;
}
.warning {
font-size: 14pt;
background-color: yellow;
}
@media print {
.noprint {
display: none;
}
a {
color: black;
text-decoration: none;
}
table.header {
width: 90%;
}
td.header {
width: 50%;
color: black;
background-color: white;
vertical-align: top;
font-size: 12pt;
}
ul.toc a::after {
content: leader('.') target-counter(attr(href), page);
}
ul.ind li li a {
content: target-counter(attr(href), page);
}
.print2col {
column-count: 2;
-moz-column-count: 2;
column-fill: auto;
}
}
@page {
@top-left {
content: "Internet-Draft";
}
@top-right {
content: "December 2010";
}
@top-center {
content: "Abbreviated Title";
}
@bottom-left {
content: "Doe";
}
@bottom-center {
content: "Expires June 2011";
}
@bottom-right {
content: "[Page " counter(page) "]";
}
}
@page:first {
@top-left {
content: normal;
}
@top-right {
content: normal;
}
@top-center {
content: normal;
}
}
/*]]>*/
</style>
<link href="#rfc.toc" rel="Contents">
<link href="#rfc.section.1" rel="Chapter" title="1 Introduction">
<link href="#rfc.section.1.1" rel="Chapter" title="1.1 Requirements Language">
<link href="#rfc.section.1.2" rel="Chapter" title="1.2 Fatal Errors">
<link href="#rfc.section.2" rel="Chapter" title="2 Motivation">
<link href="#rfc.section.3" rel="Chapter" title="3 Overview">
<link href="#rfc.section.4" rel="Chapter" title="4 State Considerations">
<link href="#rfc.section.5" rel="Chapter" title="5 Transport">
<link href="#rfc.section.6" rel="Chapter" title="6 Protocol Operation">
<link href="#rfc.section.6.1" rel="Chapter" title="6.1 Discovery">
<link href="#rfc.section.6.2" rel="Chapter" title="6.2 DNS Push Notification SUBSCRIBE">
<link href="#rfc.section.6.2.1" rel="Chapter" title="6.2.1 SUBSCRIBE Request">
<link href="#rfc.section.6.2.2" rel="Chapter" title="6.2.2 SUBSCRIBE Response">
<link href="#rfc.section.6.3" rel="Chapter" title="6.3 DNS Push Notification Updates">
<link href="#rfc.section.6.3.1" rel="Chapter" title="6.3.1 PUSH Message">
<link href="#rfc.section.6.4" rel="Chapter" title="6.4 DNS Push Notification UNSUBSCRIBE">
<link href="#rfc.section.6.4.1" rel="Chapter" title="6.4.1 UNSUBSCRIBE Message">
<link href="#rfc.section.6.5" rel="Chapter" title="6.5 DNS Push Notification RECONFIRM">
<link href="#rfc.section.6.5.1" rel="Chapter" title="6.5.1 RECONFIRM Message">
<link href="#rfc.section.6.6" rel="Chapter" title="6.6 DNS Stateful Operations TLV Context Summary">
<link href="#rfc.section.6.7" rel="Chapter" title="6.7 Client-Initiated Termination">
<link href="#rfc.section.6.8" rel="Chapter" title="6.8 Client Fallback to Polling">
<link href="#rfc.section.7" rel="Chapter" title="7 Security Considerations">
<link href="#rfc.section.7.1" rel="Chapter" title="7.1 Security Services">
<link href="#rfc.section.7.2" rel="Chapter" title="7.2 TLS Name Authentication">
<link href="#rfc.section.7.3" rel="Chapter" title="7.3 TLS Early Data">
<link href="#rfc.section.7.4" rel="Chapter" title="7.4 TLS Session Resumption">
<link href="#rfc.section.8" rel="Chapter" title="8 IANA Considerations">
<link href="#rfc.section.9" rel="Chapter" title="9 Acknowledgements">
<link href="#rfc.references" rel="Chapter" title="10 References">
<link href="#rfc.references.1" rel="Chapter" title="10.1 Normative References">
<link href="#rfc.references.2" rel="Chapter" title="10.2 Informative References">
<link href="#rfc.authors" rel="Chapter">
<meta name="generator" content="xml2rfc version 2.32.0 - https://tools.ietf.org/tools/xml2rfc" />
<link rel="schema.dct" href="http://purl.org/dc/terms/" />
<meta name="dct.creator" content="Pusateri, T. and S. Cheshire" />
<meta name="dct.identifier" content="urn:ietf:id:draft-ietf-dnssd-push-25" />
<meta name="dct.issued" scheme="ISO8601" content="2019-10-13" />
<meta name="dct.abstract" content="The Domain Name System (DNS) was designed to return matching records efficiently for queries for data that are relatively static. When those records change frequently, DNS is still efficient at returning the updated results when polled, as long as the polling rate is not too high. But there exists no mechanism for a client to be asynchronously notified when these changes occur. This document defines a mechanism for a client to be notified of such changes to DNS records, called DNS Push Notifications." />
<meta name="description" content="The Domain Name System (DNS) was designed to return matching records efficiently for queries for data that are relatively static. When those records change frequently, DNS is still efficient at returning the updated results when polled, as long as the polling rate is not too high. But there exists no mechanism for a client to be asynchronously notified when these changes occur. This document defines a mechanism for a client to be notified of such changes to DNS records, called DNS Push Notifications." />
</head>
<body>
<table class="header">
<tbody>
<tr>
<td class="left">Internet Engineering Task Force</td>
<td class="right">T. Pusateri</td>
</tr>
<tr>
<td class="left">Internet-Draft</td>
<td class="right">Unaffiliated</td>
</tr>
<tr>
<td class="left">Intended status: Standards Track</td>
<td class="right">S. Cheshire</td>
</tr>
<tr>
<td class="left">Expires: April 15, 2020</td>
<td class="right">Apple Inc.</td>
</tr>
<tr>
<td class="left"></td>
<td class="right">October 13, 2019</td>
</tr>
</tbody>
</table>
<p class="title">DNS Push Notifications<br />
<span class="filename">draft-ietf-dnssd-push-25</span></p>
<h1 id="rfc.abstract"><a href="#rfc.abstract">Abstract</a></h1>
<p>The Domain Name System (DNS) was designed to return matching records efficiently for queries for data that are relatively static. When those records change frequently, DNS is still efficient at returning the updated results when polled, as long as the polling rate is not too high. But there exists no mechanism for a client to be asynchronously notified when these changes occur. This document defines a mechanism for a client to be notified of such changes to DNS records, called DNS Push Notifications.</p>
<h1 id="rfc.status"><a href="#rfc.status">Status of This Memo</a></h1>
<p>This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.</p>
<p>Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.</p>
<p>Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."</p>
<p>This Internet-Draft will expire on April 15, 2020.</p>
<h1 id="rfc.copyrightnotice"><a href="#rfc.copyrightnotice">Copyright Notice</a></h1>
<p>Copyright (c) 2019 IETF Trust and the persons identified as the document authors. All rights reserved.</p>
<p>This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.</p>
<hr class="noprint" />
<h1 class="np" id="rfc.toc"><a href="#rfc.toc">Table of Contents</a></h1>
<ul class="toc">
<li>1. <a href="#rfc.section.1">Introduction</a>
</li>
<ul><li>1.1. <a href="#rfc.section.1.1">Requirements Language</a>
</li>
<li>1.2. <a href="#rfc.section.1.2">Fatal Errors</a>
</li>
</ul><li>2. <a href="#rfc.section.2">Motivation</a>
</li>
<li>3. <a href="#rfc.section.3">Overview</a>
</li>
<li>4. <a href="#rfc.section.4">State Considerations</a>
</li>
<li>5. <a href="#rfc.section.5">Transport</a>
</li>
<li>6. <a href="#rfc.section.6">Protocol Operation</a>
</li>
<ul><li>6.1. <a href="#rfc.section.6.1">Discovery</a>
</li>
<li>6.2. <a href="#rfc.section.6.2">DNS Push Notification SUBSCRIBE</a>
</li>
<ul><li>6.2.1. <a href="#rfc.section.6.2.1">SUBSCRIBE Request</a>
</li>
<li>6.2.2. <a href="#rfc.section.6.2.2">SUBSCRIBE Response</a>
</li>
</ul><li>6.3. <a href="#rfc.section.6.3">DNS Push Notification Updates</a>
</li>
<ul><li>6.3.1. <a href="#rfc.section.6.3.1">PUSH Message</a>
</li>
</ul><li>6.4. <a href="#rfc.section.6.4">DNS Push Notification UNSUBSCRIBE</a>
</li>
<ul><li>6.4.1. <a href="#rfc.section.6.4.1">UNSUBSCRIBE Message</a>
</li>
</ul><li>6.5. <a href="#rfc.section.6.5">DNS Push Notification RECONFIRM</a>
</li>
<ul><li>6.5.1. <a href="#rfc.section.6.5.1">RECONFIRM Message</a>
</li>
</ul><li>6.6. <a href="#rfc.section.6.6">DNS Stateful Operations TLV Context Summary</a>
</li>
<li>6.7. <a href="#rfc.section.6.7">Client-Initiated Termination</a>
</li>
<li>6.8. <a href="#rfc.section.6.8">Client Fallback to Polling</a>
</li>
</ul><li>7. <a href="#rfc.section.7">Security Considerations</a>
</li>
<ul><li>7.1. <a href="#rfc.section.7.1">Security Services</a>
</li>
<li>7.2. <a href="#rfc.section.7.2">TLS Name Authentication</a>
</li>
<li>7.3. <a href="#rfc.section.7.3">TLS Early Data</a>
</li>
<li>7.4. <a href="#rfc.section.7.4">TLS Session Resumption</a>
</li>
</ul><li>8. <a href="#rfc.section.8">IANA Considerations</a>
</li>
<li>9. <a href="#rfc.section.9">Acknowledgements</a>
</li>
<li>10. <a href="#rfc.references">References</a>
</li>
<ul><li>10.1. <a href="#rfc.references.1">Normative References</a>
</li>
<li>10.2. <a href="#rfc.references.2">Informative References</a>
</li>
</ul><li><a href="#rfc.authors">Authors' Addresses</a>
</li>
</ul>
<h1 id="rfc.section.1">
<a href="#rfc.section.1">1.</a> Introduction</h1>
<p id="rfc.section.1.p.1">Domain Name System (DNS) records may be updated using <a href="#RFC2136" class="xref">DNS Update</a>. Other mechanisms such as a <a href="#DisProx" class="xref">Discovery Proxy</a> can also generate changes to a DNS zone. This document specifies a protocol for DNS clients to subscribe to receive asynchronous notifications of changes to RRsets of interest. It is immediately relevant in the case of <a href="#RFC6763" class="xref">DNS Service Discovery</a> but is not limited to that use case, and provides a general DNS mechanism for DNS record change notifications. Familiarity with the DNS protocol and DNS packet formats is assumed <a href="#RFC1034" class="xref">[RFC1034]</a> <a href="#RFC1035" class="xref">[RFC1035]</a> <a href="#RFC6895" class="xref">[RFC6895]</a>.</p>
<h1 id="rfc.section.1.1">
<a href="#rfc.section.1.1">1.1.</a> Requirements Language</h1>
<p id="rfc.section.1.1.p.1">The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 <a href="#RFC2119" class="xref">[RFC2119]</a> <a href="#RFC8174" class="xref">[RFC8174]</a> when, and only when, they appear in all capitals, as shown here. These words may also appear in this document in lower case as plain English words, absent their normative meanings.</p>
<h1 id="rfc.section.1.2">
<a href="#rfc.section.1.2">1.2.</a> Fatal Errors</h1>
<p id="rfc.section.1.2.p.1">Certain invalid situations are described in this specification, like a server sending a Push Notification subscription request to a client, or a client sending a Push Notification response to a server. These should never occur with a correctly implemented client and server, and if they do occur then they indicate a serious implementation error. In these extreme cases there is no reasonable expectation of a graceful recovery, and the recipient detecting the error should respond by unilaterally aborting the session without regard for data loss. Such cases are addressed by having an engineer investigate the cause of the failure and fixing the problem in the software.</p>
<p id="rfc.section.1.2.p.2">Where this specification says "forcibly abort", it means sending a TCP RST to terminate the TCP connection, and the TLS session running over that TCP connection. In the BSD Sockets API, this is achieved by setting the SO_LINGER option to zero before closing the socket.</p>
<h1 id="rfc.section.2">
<a href="#rfc.section.2">2.</a> Motivation</h1>
<p id="rfc.section.2.p.1">As the domain name system continues to adapt to new uses and changes in deployment, polling has the potential to burden DNS servers at many levels throughout the network. Other network protocols have successfully deployed a publish/subscribe model following the <a href="#obs" class="xref">Observer design pattern</a>. <a href="#XEP0060" class="xref">XMPP Publish-Subscribe</a> and <a href="#RFC4287" class="xref">Atom</a> are examples. While DNS servers are generally highly tuned and capable of a high rate of query/response traffic, adding a publish/subscribe model for tracking changes to DNS records can deliver more timely notification of changes with reduced CPU usage and lower network traffic.</p>
<p><a href="#RFC6762" class="xref">Multicast DNS</a> implementations always listen on a well known link-local IP multicast group address, and changes are sent to that multicast group address for all group members to receive. Therefore, Multicast DNS already has asynchronous change notification capability. When <a href="#RFC6763" class="xref">DNS Service Discovery</a> is used across a wide area network using Unicast DNS (possibly facilitated via a <a href="#DisProx" class="xref">Discovery Proxy</a>) it would be beneficial to have an equivalent capability for Unicast DNS, to allow clients to learn about DNS record changes in a timely manner without polling.</p>
<p id="rfc.section.2.p.3">The <a href="#LLQ" class="xref">DNS Long-Lived Queries (LLQ) mechanism</a> is an existing deployed solution to provide asynchronous change notifications, used by Apple's <a href="#RFC6281" class="xref">Back to My Mac</a> service introduced in Mac OS X 10.5 Leopard in 2007. Back to My Mac was designed in an era when the data center operations staff asserted that it was impossible for a server to handle large numbers of mostly-idle TCP connections, so LLQ was defined as a UDP-based protocol, effectively replicating much of TCP's connection state management logic in user space, and creating its own imitation of existing TCP features like the three-way handshake, flow control, and reliability.</p>
<p id="rfc.section.2.p.4">This document builds on experience gained with the LLQ protocol, with an improved design. Instead of using UDP, this specification uses <a href="#RFC8490" class="xref">DNS Stateful Operations (DSO)</a> running over TLS over TCP, and therefore doesn't need to reinvent existing TCP functionality. Using TCP also gives long-lived low-traffic connections better longevity through NAT gateways without depending on the gateway to support <a href="#RFC6886" class="xref">NAT Port Mapping Protocol (NAT-PMP)</a> or <a href="#RFC6887" class="xref">Port Control Protocol (PCP)</a>, or resorting to excessive keepalive traffic.</p>
<h1 id="rfc.section.3">
<a href="#rfc.section.3">3.</a> Overview</h1>
<p id="rfc.section.3.p.1">A DNS Push Notification client subscribes for Push Notifications for a particular RRset by connecting to the appropriate Push Notification server for that RRset, and sending DSO message(s) indicating the RRset(s) of interest. When the client loses interest in receiving further updates to these records, it unsubscribes.</p>
<p id="rfc.section.3.p.2">The DNS Push Notification server for a DNS zone is any server capable of generating the correct change notifications for a name. It may be a primary, secondary, or stealth name server <a href="#RFC7719" class="xref">[RFC7719]</a>.</p>
<p id="rfc.section.3.p.3">The <samp>_dns‑push‑tls._tcp.<zone></samp> SRV record for a zone MAY reference the same target host and port as that zone's <samp>_dns‑update‑tls._tcp.<zone></samp> SRV record. When the same target host and port is offered for both DNS Updates and DNS Push Notifications, a client MAY use a single DSO session to that server for both DNS Updates and DNS Push Notification Subscriptions. DNS Updates and DNS Push Notifications may be handled on different ports on the same target host, in which case they are not considered to be the "same server" for the purposes of this specification, and communications with these two ports are handled independently. Supporting DNS Updates and DNS Push Notifications on the same server is OPTIONAL. A DNS Push Notification server is not required to support DNS Update.</p>
<p id="rfc.section.3.p.4">Standard DNS Queries MAY be sent over a DNS Push Notification (i.e., DSO) session. For any zone for which the server is authoritative, it MUST respond authoritatively for queries for names falling within that zone (e.g., the <samp>_dns‑push‑tls._tcp.<zone></samp> SRV record) both for normal DNS queries and for DNS Push Notification subscriptions. For names for which the server is acting as a recursive resolver (e.g., when the server is the local recursive resolver) for any query for which it supports DNS Push Notification subscriptions, it MUST also support standard queries.</p>
<p id="rfc.section.3.p.5">DNS Push Notifications impose less load on the responding server than rapid polling would, but Push Notifications do still have a cost, so DNS Push Notification clients MUST NOT recklessly create an excessive number of Push Notification subscriptions. Specifically:</p>
<p id="rfc.section.3.p.6">(a) A subscription should only be active when there is a valid reason to need live data (for example, an on-screen display is currently showing the results to the user) and the subscription SHOULD be cancelled as soon as the need for that data ends (for example, when the user dismisses that display). In the case of a device like a smartphone which, after some period of inactivity, goes to sleep or otherwise darkens its screen, it should cancel its subscriptions when darkening the screen (since the user cannot see any changes on the display anyway) and reinstate its subscriptions when re-awakening from display sleep.</p>
<p id="rfc.section.3.p.7">(b) A DNS Push Notification client SHOULD NOT routinely keep a DNS Push Notification subscription active 24 hours a day, 7 days a week, just to keep a list in memory up to date so that if the user does choose to bring up an on-screen display of that data, it can be displayed really fast. DNS Push Notifications are designed to be fast enough that there is no need to pre-load a "warm" list in memory just in case it might be needed later.</p>
<p id="rfc.section.3.p.8">Generally, as described in the <a href="#RFC8490" class="xref">DNS Stateful Operations specification</a>, a client must not keep a DSO session to a server open indefinitely if it has no subscriptions (or other operations) active on that session. A client may close a DSO session immediately it becomes idle, and then if needed in the future, open a new session when required. Alternatively, a client may speculatively keep an idle DSO session open for some time, subject to the constraint that it must not keep a session open that has been idle for more than the session's idle timeout (15 seconds by default) <a href="#RFC8490" class="xref">[RFC8490]</a>.</p>
<p id="rfc.section.3.p.9">Note that a DSO session that has an active DNS Push Notification subscription is not considered idle, even if there is no traffic flowing for an extended period of time. In this case the DSO inactivity timeout does not apply, because the session is not inactive, but the keepalive interval does still apply, to ensure generation of sufficient messages to maintain state in middleboxes (such at NAT gateways or firewalls) and for the client and server to periodically verify that they still have connectivity to each other. This is described in Section 6.2 of the <a href="#RFC8490" class="xref">DSO specification</a>.</p>
<h1 id="rfc.section.4">
<a href="#rfc.section.4">4.</a> State Considerations</h1>
<p id="rfc.section.4.p.1">Each DNS Push Notification server is capable of handling some finite number of Push Notification subscriptions. This number will vary from server to server and is based on physical machine characteristics, network bandwidth, and operating system resource allocation. After a client establishes a session to a DNS server, each subscription is individually accepted or rejected. Servers may employ various techniques to limit subscriptions to a manageable level. Correspondingly, the client is free to establish simultaneous sessions to alternate DNS servers that support DNS Push Notifications for the zone and distribute subscriptions at the client's discretion. In this way, both clients and servers can react to resource constraints.</p>
<h1 id="rfc.section.5">
<a href="#rfc.section.5">5.</a> Transport</h1>
<p id="rfc.section.5.p.1">Other DNS operations like <a href="#RFC2136" class="xref">DNS Update</a> MAY use either User Datagram Protocol <a href="#RFC0768" class="xref">(UDP)</a> or Transmission Control Protocol <a href="#RFC0793" class="xref">(TCP)</a> as the transport protocol, in keeping with the historical precedent that DNS queries must first be sent over UDP <a href="#RFC1123" class="xref">[RFC1123]</a>. This requirement to use UDP has subsequently been relaxed <a href="#RFC7766" class="xref">[RFC7766]</a>.</p>
<p id="rfc.section.5.p.2">In keeping with the more recent precedent, DNS Push Notification is defined only for TCP. DNS Push Notification clients MUST use <a href="#RFC8490" class="xref">DNS Stateful Operations</a> running over TLS over TCP <a href="#RFC7858" class="xref">[RFC7858]</a>.</p>
<p id="rfc.section.5.p.3">Connection setup over TCP ensures return reachability and alleviates concerns of state overload at the server, which is a potential problem with connectionless protocols, which can be more vulnerable to being exploited by attackers using spoofed source addresses. All subscribers are guaranteed to be reachable by the server by virtue of the TCP three-way handshake. Flooding attacks are possible with any protocol, and a benefit of TCP is that there are already established industry best practices to guard against SYN flooding and similar attacks <a href="#SYN" class="xref">[SYN]</a> <a href="#RFC4953" class="xref">[RFC4953]</a>.</p>
<p id="rfc.section.5.p.4">Use of TCP also allows DNS Push Notifications to take advantage of current and future developments in TCP, such as <a href="#RFC6824" class="xref">Multipath TCP (MPTCP)</a>, <a href="#RFC7413" class="xref">TCP Fast Open (TFO)</a>, <a href="#I-D.ietf-tcpm-rack" class="xref">the TCP RACK fast loss detection algorithm</a>, and so on.</p>
<p id="rfc.section.5.p.5">Transport Layer Security <a href="#RFC8446" class="xref">(TLS)</a> is well understood, and used by many application-layer protocols running over TCP. TLS is designed to prevent eavesdropping, tampering, and message forgery. TLS is REQUIRED for every connection between a client subscriber and server in this protocol specification. Additional security measures such as client authentication during TLS negotiation may also be employed to increase the trust relationship between client and server.</p>
<h1 id="rfc.section.6">
<a href="#rfc.section.6">6.</a> Protocol Operation</h1>
<p id="rfc.section.6.p.1">The DNS Push Notification protocol is a session-oriented protocol, and makes use of <a href="#RFC8490" class="xref">DNS Stateful Operations (DSO)</a>.</p>
<p id="rfc.section.6.p.2">For details of the DSO message format refer to the <a href="#RFC8490" class="xref">DNS Stateful Oper-ations specification</a>. Those details are not repeated here.</p>
<p id="rfc.section.6.p.3">DNS Push Notification clients and servers MUST support DSO. A single server can support DNS Queries, DNS Updates, and DNS Push Notifications (using DSO) on the same TCP port.</p>
<p id="rfc.section.6.p.4">A DNS Push Notification exchange begins with the client discovering the appropriate server, using the procedure described in <a href="#discovery" class="xref">Section 6.1</a>, and then making a TLS/TCP connection to it.</p>
<p id="rfc.section.6.p.5">A typical DNS Push Notification client will immediately issue a DSO Keepalive operation to request a session timeout and/or keepalive interval longer than the 15-second default values, but this is not required. A DNS Push Notification client MAY issue other requests on the session first, and only issue a DSO Keepalive operation later if it determines that to be necessary. Sending either a DSO Keepalive operation or a Push Notification subscription request over the TLS/TCP connection to the server signals the client's support of DSO and serves to establish a DSO session.</p>
<p id="rfc.section.6.p.6">In accordance with the current set of active subscriptions, the server sends relevant asynchronous Push Notifications to the client. Note that a client MUST be prepared to receive (and silently ignore) Push Notifications for subscriptions it has previously removed, since there is no way to prevent the situation where a Push Notification is in flight from server to client while the client's UNSUBSCRIBE message cancelling that subscription is simultaneously in flight from client to server.</p>
<h1 id="rfc.section.6.1">
<a href="#rfc.section.6.1">6.1.</a> <a href="#discovery" id="discovery">Discovery</a>
</h1>
<p id="rfc.section.6.1.p.1">The first step in establishing a DNS Push Notification subscription is to discover an appropriate DNS server that supports DNS Push Notifications for the desired zone.</p>
<p id="rfc.section.6.1.p.2">The client begins by opening a DSO Session to its normal configured DNS recursive resolver and requesting a Push Notification subscription. This connection is made to TCP port 853, the default port for <a href="#RFC7858" class="xref">DNS-over-TLS</a>. If the request for a Push Notification subscription is successful, and the recursive resolver doesn't already have an active subscription for that name, type, and class, then the recursive resolver will make a corresponding Push Notification subscription on the client's behalf. Results received are relayed to the client. This is closely analogous to how a client sends a normal DNS query to its configured DNS recursive resolver which, if it doesn't already have appropriate answer(s) in its cache, issues an upstream query to satisfy the request.</p>
<p id="rfc.section.6.1.p.3">In many contexts, the recursive resolver will be able to handle Push Notifications for all names that the client may need to follow. Use of VPN tunnels and Private DNS <a href="#RFC8499" class="xref">[RFC8499]</a> can create some additional complexity in the client software here; the techniques to handle VPN tunnels and Private DNS for DNS Push Notifications are the same as those already used to handle this for normal DNS queries.</p>
<p id="rfc.section.6.1.p.4">If the recursive resolver does not support DNS over TLS, or supports DNS over TLS but is not listening on TCP port 853, or supports DNS over TLS on TCP port 853 but does not support DSO on that port, then the DSO Session session establishment will fail <a href="#RFC8490" class="xref">[RFC8490]</a>.</p>
<p id="rfc.section.6.1.p.5">If the recursive resolver does support DSO but not Push Notification subscriptions, then it will return the DSO error code DSOTYPENI (11).</p>
<p id="rfc.section.6.1.p.6">In some cases, the recursive resolver may support DSO and Push Notification subscriptions, but may not be able to subscribe for Push Notifications for a particular name. In this case, the recursive resolver should return SERVFAIL to the client. This includes being unable to establish a connection to the zone's DNS Push Notification server or establishing a connection but receiving a non success response code. In some cases, where the client has a pre-established trust relationship with the owner of the zone (that is not handled via the usual mechanisms for VPN software) the client may handle these failures by contacting the zone's DNS Push server directly.</p>
<p id="rfc.section.6.1.p.7">In any of the cases described above where the client fails to establish a DNS Push Notification subscription via its configured recursive resolver, the client should proceed to discover the appropriate server for direct communication. The client MUST also determine which TCP port on the server is listening for connections, which need not be (and often is not) the typical TCP port 53 used for conventional DNS, or TCP port 853 used for DNS over TLS.</p>
<p id="rfc.section.6.1.p.8">The discovery algorithm described here is an iterative algorithm, which starts with the full name of the record to which the client wishes to subscribe. Successive SOA queries are then issued, trimming one label each time, until the closest enclosing authoritative server is discovered. There is also an optimization to enable the client to take a "short cut" directly to the SOA record of the closest enclosing authoritative server in many cases.</p>
<p></p>
<ol>
<li>The client begins the discovery by sending a DNS query to its local resolver, with record type <a href="#RFC1035" class="xref">SOA</a> for the record name to which it wishes to subscribe. As an example, suppose the client wishes to subscribe to PTR records with the name _ipp._tcp.headoffice.example.com (to discover Internet Printing Protocol (IPP) printers <a href="#RFC8010" class="xref">[RFC8010]</a> <a href="#RFC8011" class="xref">[RFC8011]</a> being advertised in the head office of Example Company.). The client begins by sending an SOA query for _ipp._tcp.headoffice.example.com to the local recursive resolver. The goal is to determine the server authoritative for the name _ipp._tcp.headoffice.example.com. The closest enclosing DNS zone containing the name _ipp._tcp.headoffice.example.com could be example.com, or headoffice.example.com, or _tcp.headoffice.example.com, or even _ipp._tcp.headoffice.example.com. The client does not know in advance where the closest enclosing zone cut occurs, which is why it uses the iterative procedure described here to discover this information.</li>
<li>If the requested SOA record exists, it will be returned in the Answer section with a NOERROR response code, and the client has succeeded in discovering the information it needs. <br> (This language is not placing any new requirements on DNS recursive resolvers. This text merely describes the existing operation of the DNS protocol <a href="#RFC1034" class="xref">[RFC1034]</a> <a href="#RFC1035" class="xref">[RFC1035]</a>.)</li>
<li>If the requested SOA record does not exist, the client will get back a NOERROR/NODATA response or an NXDOMAIN/Name Error response. In either case, the local resolver would normally include the SOA record for the closest enclosing zone of the requested name in the Authority Section. If the SOA record is received in the Authority Section, then the client has succeeded in discovering the information it needs. <br> (This language is not placing any new requirements on DNS recursive resolvers. This text merely describes the existing operation of the DNS protocol regarding negative responses <a href="#RFC2308" class="xref">[RFC2308]</a>.)</li>
<li>If the client receives a response containing no SOA record, then it proceeds with the iterative approach. The client strips the leading label from the current query name, and if the resulting name has at least two labels in it, the client sends an SOA query for that new name, and processing continues at step 2 above, repeating the iterative search until either an SOA is received, or the query name consists of a single label, i.e., a Top Level Domain (TLD). In the case of a single-label name (TLD), this is a network configuration error, which should not happen, and the client gives up. The client may retry the operation at a later time, of the client's choosing, such after a change in network attachment.</li>
<li>Once the SOA is known (either by virtue of being seen in the Answer Section, or in the Authority Section), the client sends a DNS query with type <a href="#RFC2782" class="xref">SRV</a> for the record name <samp>_dns‑push‑tls._tcp.<zone></samp>, where <zone> is the owner name of the discovered SOA record.</li>
<li>If the zone in question is set up to offer DNS Push Notifications then this SRV record MUST exist. (If this SRV record does not exist then the zone is not correctly configured for DNS Push Notifications as specified in this document.) The SRV <samp>target</samp> contains the name of the server providing DNS Push Notifications for the zone. The port number on which to contact the server is in the SRV record <samp>port</samp> field. The address(es) of the target host MAY be included in the Additional Section, however, the address records SHOULD be authenticated before use as described below in <a href="#tls_name_auth" class="xref">Section 7.2</a> and in <a href="#RFC7673" class="xref">the specification for using DANE TLSA Records with SRV Records</a>, if applicable.</li>
<li>
<a name="SRV"></a>More than one SRV record may be returned. In this case, the <samp>priority</samp> and <samp>weight</samp> values in the returned SRV records are used to determine the order in which to contact the servers for subscription requests. As described in <a href="#RFC2782" class="xref">the SRV specification</a>, the server with the lowest <samp>priority</samp> is first contacted. If more than one server has the same <samp>priority</samp>, the <samp>weight</samp> indicates the weighted probability that the client should contact that server. Higher weights have higher probabilities of being selected. If a server is not willing to accept a subscription request, or is not reachable within a reasonable time, as determined by the client, then a subsequent server is to be contacted.</li>
</ol>
<p> </p>
<p id="rfc.section.6.1.p.10">Each time a client makes a new DNS Push Notification subscription, it SHOULD repeat the discovery process in order to determine the preferred DNS server for that subscription at that time. If a client already has a DSO session with that DNS server the client SHOULD reuse that existing DSO session for the new subscription, otherwise, a new DSO session is established. The client MUST respect the DNS TTL values on records it receives while performing the discovery process and store them in its local cache with this lifetime (as it will generally be do anyway for all DNS queries it performs). This means that, as long as the DNS TTL values on the authoritative records are set to reasonable values, repeated application of the discovery process can be completed nearly instantaneously by the client, using only locally-stored cached data.</p>
<h1 id="rfc.section.6.2">
<a href="#rfc.section.6.2">6.2.</a> <a href="#subscribe" id="subscribe">DNS Push Notification SUBSCRIBE</a>
</h1>
<p id="rfc.section.6.2.p.1">After connecting, and requesting a longer idle timeout and/or keepalive interval if necessary, a DNS Push Notification client<br> then indicates its desire to receive DNS Push Notifications for<br> a given domain name by sending a SUBSCRIBE request to the server.<br> A SUBSCRIBE request is encoded in a DSO message <a href="#RFC8490" class="xref">[RFC8490]</a>.<br> This specification defines a primary DSO TLV for DNS Push Notification SUBSCRIBE Requests (tentatively DSO Type Code 0x40).</p>
<p id="rfc.section.6.2.p.2">DSO messages with the SUBSCRIBE TLV as the Primary TLV are permitted in TLS early data, provided that the precautions described in <a href="#early_data" class="xref">Section 7.3</a> are followed.</p>
<p id="rfc.section.6.2.p.3">The entity that initiates a SUBSCRIBE request is by definition the client. A server MUST NOT send a SUBSCRIBE request over an existing session from a client. If a server does send a SUBSCRIBE request over a DSO session initiated by a client, this is a fatal error and the client MUST forcibly abort the connection immediately.</p>
<p id="rfc.section.6.2.p.4">Each SUBSCRIBE request generates exactly one SUBSCRIBE response from the server. The entity that initiates a SUBSCRIBE response is by definition the server. A client MUST NOT send a SUBSCRIBE response. If a client does send a SUBSCRIBE response, this is a fatal error and the server MUST forcibly abort the connection immediately.</p>
<h1 id="rfc.section.6.2.1">
<a href="#rfc.section.6.2.1">6.2.1.</a> SUBSCRIBE Request</h1>
<p id="rfc.section.6.2.1.p.1">A SUBSCRIBE request begins with the standard <a href="#RFC8490" class="xref">DSO 12-byte header</a>, followed by the SUBSCRIBE primary TLV. A SUBSCRIBE request is illustrated in <a href="#subscribe_req" class="xref">Figure 1</a>.</p>
<p id="rfc.section.6.2.1.p.2">The MESSAGE ID field MUST be set to a unique value, that the client is not using for any other active operation on this DSO session. For the purposes here, a MESSAGE ID is in use on this session if the client has used it in a request for which it has not yet received a response, or if the client has used it for a subscription which it has not yet cancelled using UNSUBSCRIBE. In the SUBSCRIBE response the server MUST echo back the MESSAGE ID value unchanged.</p>
<p id="rfc.section.6.2.1.p.3">The other header fields MUST be set as described in the <a href="#RFC8490" class="xref">DSO spec-ification</a>. The DNS OPCODE field contains the OPCODE value for DNS Stateful Operations (6). The four count fields must be zero, and the corresponding four sections must be empty (i.e., absent).</p>
<p id="rfc.section.6.2.1.p.4">The DSO-TYPE is SUBSCRIBE (tentatively 0x40).</p>
<p id="rfc.section.6.2.1.p.5">The DSO-LENGTH is the length of the DSO-DATA that follows, which specifies the name, type, and class of the record(s) being sought.</p>
<div id="rfc.figure.1"></div>
<div id="subscribe_req"></div>
<pre>
1 1 1 1 1 1
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \
| MESSAGE ID | \
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
|QR| OPCODE(6) | Z | RCODE | |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
| QDCOUNT (MUST BE ZERO) | |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ > HEADER
| ANCOUNT (MUST BE ZERO) | |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
| NSCOUNT (MUST BE ZERO) | |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
| ARCOUNT (MUST BE ZERO) | /
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ /
| DSO-TYPE = SUBSCRIBE (tentatively 0x40) |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| DSO-LENGTH (number of octets in DSO-DATA) |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \
\ NAME \ \
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
| TYPE | > DSO-DATA
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
| CLASS | /
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ /</pre>
<p class="figure">Figure 1: SUBSCRIBE Request</p>
<p id="rfc.section.6.2.1.p.6">The DSO-DATA for a SUBSCRIBE request MUST contain exactly one NAME, TYPE, and CLASS. Since SUBSCRIBE requests are sent over TCP, multiple SUBSCRIBE DSO request messages can be concatenated in a single TCP stream and packed efficiently into TCP segments.</p>
<p id="rfc.section.6.2.1.p.7">If accepted, the subscription will stay in effect until the client cancels the subscription using UNSUBSCRIBE or until the DSO session between the client and the server is closed.</p>
<p id="rfc.section.6.2.1.p.8">SUBSCRIBE requests on a given session MUST be unique. A client MUST NOT send a SUBSCRIBE message that duplicates the NAME, TYPE and CLASS of an existing active subscription on that DSO session. For the purpose of this matching, the established DNS case-insensitivity for US-ASCII letters <a href="#RFC0020" class="xref">[RFC0020]</a> applies (e.g., "example.com" and "Example.com" are the same). If a server receives such a duplicate SUBSCRIBE message, this is a fatal error and the server MUST forcibly abort the connection immediately.</p>
<p id="rfc.section.6.2.1.p.9">DNS wildcarding is not supported. That is, a wildcard ("*") in a SUBSCRIBE message matches only a literal wildcard character ("*") in the zone, and nothing else.</p>
<p id="rfc.section.6.2.1.p.10">Aliasing is not supported. That is, a CNAME in a SUBSCRIBE message matches only a literal CNAME record in the zone, and no other records with the same owner name.</p>
<p id="rfc.section.6.2.1.p.11">A client may SUBSCRIBE to records that are unknown to the server at the time of the request (providing that the name falls within one of the zone(s) the server is responsible for) and this is not an error. The server MUST NOT return NXDOMAIN in this case. The server MUST accept these requests and send Push Notifications if and when matching records are found in the future.</p>
<p id="rfc.section.6.2.1.p.12">If neither TYPE nor CLASS are ANY (255) then this is a specific subscription to changes for the given NAME, TYPE and CLASS. If one or both of TYPE or CLASS are ANY (255) then this subscription matches any type and/or any class, as appropriate.</p>
<p id="rfc.section.6.2.1.p.13">NOTE: A little-known quirk of DNS is that in DNS QUERY requests, QTYPE and QCLASS 255 mean "ANY" not "ALL". They indicate that the server should respond with ANY matching records of its choosing, not necessarily ALL matching records. This can lead to some surprising and unexpected results, where a query returns some valid answers but not all of them, and makes QTYPE = 255 (ANY) queries less useful than people sometimes imagine.</p>
<p id="rfc.section.6.2.1.p.14">When used in conjunction with SUBSCRIBE, TYPE and CLASS 255 should be interpreted to mean "ALL", not "ANY". After accepting a subscription where one or both of TYPE or CLASS are 255, the server MUST send Push Notification Updates for ALL record changes that match the subscription, not just some of them.</p>
<h1 id="rfc.section.6.2.2">
<a href="#rfc.section.6.2.2">6.2.2.</a> <a href="#subresp" id="subresp">SUBSCRIBE Response</a>
</h1>
<p id="rfc.section.6.2.2.p.1">A SUBSCRIBE response begins with the standard <a href="#RFC8490" class="xref">DSO 12-byte header</a>. The QR bit in the header is set indicating it is a response. The header MAY be followed by one or more optional TLVs, such as a Retry Delay TLV. A SUBSCRIBE response is illustrated in <a href="#subscribe_resp" class="xref">Figure 2</a>.</p>
<p id="rfc.section.6.2.2.p.2">The MESSAGE ID field MUST echo the value given in the MESSAGE ID field of the SUBSCRIBE request. This is how the client knows which request is being responded to.</p>
<p id="rfc.section.6.2.2.p.3">The other header fields MUST be set as described in the <a href="#RFC8490" class="xref">DSO spec-ification</a>. The DNS OPCODE field contains the OPCODE value for DNS Stateful Operations (6). The four count fields must be zero, and the corresponding four sections must be empty (i.e., absent).</p>
<p id="rfc.section.6.2.2.p.4">A SUBSCRIBE response message MUST NOT include a SUBSCRIBE TLV. If a client receives a SUBSCRIBE response message containing a SUBSCRIBE TLV then the response message is processed but the SUBSCRIBE TLV MUST be silently ignored.</p>
<div id="rfc.figure.2"></div>
<div id="subscribe_resp"></div>
<pre>
1 1 1 1 1 1
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \
| MESSAGE ID | \
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
|QR| OPCODE(6) | Z | RCODE | |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
| QDCOUNT (MUST BE ZERO) | |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ > HEADER
| ANCOUNT (MUST BE ZERO) | |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
| NSCOUNT (MUST BE ZERO) | |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
| ARCOUNT (MUST BE ZERO) | /
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ /
</pre>
<p class="figure">Figure 2: SUBSCRIBE Response</p>
<p id="rfc.section.6.2.2.p.5">In the SUBSCRIBE response the RCODE indicates whether or not the subscription was accepted. Supported RCODEs are as follows:</p>
<div id="rfc.table.1"></div>
<div id="subscribe_rcodes"></div>
<table cellpadding="3" cellspacing="0" class="tt full center">
<caption>SUBSCRIBE Response codes</caption>
<thead><tr>
<th class="left">Mnemonic</th>
<th class="center">Value</th>
<th class="left">Description</th>
</tr></thead>
<tbody>
<tr>
<td class="left">NOERROR</td>
<td class="center">0</td>
<td class="left">SUBSCRIBE successful.</td>
</tr>
<tr>
<td class="left">FORMERR</td>
<td class="center">1</td>
<td class="left">Server failed to process request due to a malformed request.</td>
</tr>
<tr>
<td class="left">SERVFAIL</td>
<td class="center">2</td>
<td class="left">Server failed to process request due to a problem with the server.</td>
</tr>
<tr>
<td class="left">NOTIMP</td>
<td class="center">4</td>
<td class="left">Server does not implement DSO.</td>
</tr>
<tr>
<td class="left">REFUSED</td>
<td class="center">5</td>
<td class="left">Server refuses to process request for policy or security reasons.</td>
</tr>
<tr>
<td class="left">NOTAUTH</td>
<td class="center">9</td>
<td class="left">Server is not authoritative for the requested name.</td>
</tr>
<tr>
<td class="left">DSOTYPENI</td>
<td class="center">11</td>
<td class="left">SUBSCRIBE operation not supported.</td>
</tr>
</tbody>
</table>
<p id="rfc.section.6.2.2.p.6">This document specifies only these RCODE values for SUBSCRIBE Responses. Servers sending SUBSCRIBE Responses SHOULD use one of these values. Note that NXDOMAIN is not a valid RCODE in response to a SUBSCRIBE Request. However, future circumstances may create situations where other RCODE values are appropriate in SUBSCRIBE Responses, so clients MUST be prepared to accept SUBSCRIBE Responses with any other RCODE value.</p>
<p id="rfc.section.6.2.2.p.7">If the server sends a nonzero RCODE in the SUBSCRIBE response, that means: <a href="#discovery" class="xref">Section 6.1</a>, <a href="#SRV" class="xref">Paragraph 7</a>, a subsequent server MAY be tried immediately.</p>
<ol style="list-style-type: lower-alpha">
<li>the client is (at least partially) misconfigured, or</li>
<li>the server resources are exhausted, or</li>
<li>there is some other unknown failure on the server.</li>
</ol>
<p> </p>
<p id="rfc.section.6.2.2.p.8">If the client has other successful subscriptions to this server, these subscriptions remain even though additional subscriptions may be refused. Neither the client nor the server are required to close the connection, although, either end may choose to do so.</p>
<p id="rfc.section.6.2.2.p.9">If the server sends a nonzero RCODE then it SHOULD append a Retry Delay TLV <a href="#RFC8490" class="xref">[RFC8490]</a> to the response specifying a delay before the client attempts this operation again. Recommended values for the delay for different RCODE values are given below. These recommended values apply both to the default values a server should place in the Retry Delay TLV, and the default values a client should assume if the server provides no Retry Delay TLV. </p>
<ul class="empty">
<li>For RCODE = 1 (FORMERR) the delay may be any value selected by the implementer. A value of five minutes is RECOMMENDED, to reduce the risk of high load from defective clients.</li>
<li>For RCODE = 2 (SERVFAIL) the delay should be chosen according to the level of server overload and the anticipated duration of that overload. By default, a value of one minute is RECOMMENDED. If a more serious server failure occurs, the delay may be longer in accordance with the specific problem encountered.</li>
<li>For RCODE = 4 (NOTIMP), which occurs on a server that doesn't implement <a href="#RFC8490" class="xref">DNS Stateful Operations</a>, it is unlikely that the server will begin supporting DSO in the next few minutes, so the retry delay SHOULD be one hour. Note that in such a case, a server that doesn't implement DSO is unlikely to place a Retry Delay TLV in its response, so this recommended value in particular applies to what a client should assume by default.</li>
<li>For RCODE = 5 (REFUSED), which occurs on a server that implements DNS Push Notifications, but is currently configured to disallow DNS Push Notifications, the retry delay may be any value selected by the implementer and/or configured by the operator.</li>
<li>If the server being queried is listed in a <samp>_dns‑push‑tls._tcp.<zone></samp> SRV record for the zone, then this is a misconfiguration, since this server is being advertised as supporting DNS Push Notifications for this zone, but the server itself is not currently configured to perform that task. Since it is possible that the misconfiguration may be repaired at any time, the retry delay should not be set too high. By default, a value of 5 minutes is RECOMMENDED.</li>
<li>For RCODE = 9 (NOTAUTH), which occurs on a server that implements DNS Push Notifications, but is not configured to be authoritative for the requested name, the retry delay may be any value selected by the implementer and/or configured by the operator.</li>
<li>If the server being queried is listed in a <samp>_dns‑push‑tls._tcp.<zone></samp> SRV record for the zone, then this is a misconfiguration, since this server is being advertised as supporting DNS Push Notifications for this zone, but the server itself is not currently configured to perform that task. Since it is possible that the misconfiguration may be repaired at any time, the retry delay should not be set too high. By default, a value of 5 minutes is RECOMMENDED.</li>
<li>For RCODE = 11 (DSOTYPENI), which occurs on a server that implements DSO but doesn't implement DNS Push Notifications, it is unlikely that the server will begin supporting DNS Push Notifications in the next few minutes, so the retry delay SHOULD be one hour.</li>
<li>For other RCODE values, the retry delay should be set by the server as appropriate for that error condition. By default, a value of 5 minutes is RECOMMENDED.</li>
</ul>
<p> </p>
<p id="rfc.section.6.2.2.p.10">For RCODE = 9 (NOTAUTH), the time delay applies to requests for other names falling within the same zone. Requests for names falling within other zones are not subject to the delay. For all other RCODEs the time delay applies to all subsequent requests to this server.</p>
<p id="rfc.section.6.2.2.p.11">After sending an error response the server MAY allow the session to remain open, or MAY send a DNS Push Notification Retry Delay Operation TLV instructing the client to close the session, as described in the <a href="#RFC8490" class="xref">DSO specification</a>. Clients MUST correctly handle both cases.</p>
<h1 id="rfc.section.6.3">
<a href="#rfc.section.6.3">6.3.</a> <a href="#push" id="push">DNS Push Notification Updates</a>
</h1>
<p id="rfc.section.6.3.p.1">Once a subscription has been successfully established, the server generates PUSH messages to send to the client as appropriate. In the case that the answer set was already non-empty at the moment the subscription was established, an initial PUSH message will be sent immediately following the SUBSCRIBE Response. Subsequent changes to the answer set are then communicated to the client in subsequent PUSH messages.</p>
<p id="rfc.section.6.3.p.2">A client MUST NOT send a PUSH message. If a client does send a PUSH message, or a PUSH message is sent with the QR bit set indicating that it is a response, this is a fatal error and the receiver MUST forcibly abort the connection immediately.</p>
<h1 id="rfc.section.6.3.1">
<a href="#rfc.section.6.3.1">6.3.1.</a> PUSH Message</h1>
<p id="rfc.section.6.3.1.p.1">A PUSH unidirectional message begins with the standard <a href="#RFC8490" class="xref">DSO 12-byte header</a>, followed by the PUSH primary TLV. A PUSH message is illustrated in <a href="#push_msg" class="xref">Figure 3</a>.</p>
<p id="rfc.section.6.3.1.p.2">In accordance with the definition of DSO unidirectional messages, the MESSAGE ID field MUST be zero. There is no client response to a PUSH message.</p>
<p id="rfc.section.6.3.1.p.3">The other header fields MUST be set as described in the <a href="#RFC8490" class="xref">DSO spec-ification</a>. The DNS OPCODE field contains the OPCODE value for DNS Stateful Operations (6). The four count fields must be zero, and the corresponding four sections must be empty (i.e., absent).</p>
<p id="rfc.section.6.3.1.p.4">The DSO-TYPE is PUSH (tentatively 0x41).</p>
<p id="rfc.section.6.3.1.p.5">The DSO-LENGTH is the length of the DSO-DATA that follows, which specifies the changes being communicated.</p>
<p id="rfc.section.6.3.1.p.6">The DSO-DATA contains one or more change notifications. A PUSH Message MUST contain at least one change notification. If a PUSH Message is received that contains no change notifications, this is a fatal error, and the client MUST forcibly abort the connection immediately.</p>
<p id="rfc.section.6.3.1.p.7">The change notification records are formatted similarly to how DNS Resource Records are conventionally expressed in DNS messages, as illustrated in <a href="#push_msg" class="xref">Figure 3</a>, and are interpreted as described below.</p>
<p id="rfc.section.6.3.1.p.8">The TTL field holds an unsigned 32-bit integer <a href="#RFC2181" class="xref">[RFC2181]</a>. If the TTL is in the range 0 to 2,147,483,647 seconds (0 to 2^31 - 1, or 0x7FFFFFFF), then a new DNS Resource Record with the given name, type, class and RDATA is added. Type and class MUST NOT be 255 (ANY). If either type or class are 255 (ANY) this is a fatal error, and the client MUST forcibly abort the connection immediately. A TTL of 0 means that this record should be retained for as long as the subscription is active, and should be discarded immediately the moment the subscription is cancelled.</p>
<p id="rfc.section.6.3.1.p.9">If the TTL has the value 0xFFFFFFFF, then the DNS Resource Record with the given name, type, class and RDATA is removed. Type and class MUST NOT be 255 (ANY). If either type or class are 255 (ANY) this is a fatal error, and the client MUST forcibly abort the connection immediately.</p>
<p id="rfc.section.6.3.1.p.10">If the TTL has the value 0xFFFFFFFE, then this is a 'collective' remove notification. For collective remove notifications RDLEN MUST be zero and consequently the RDATA MUST be empty. If a change notification is received where TTL = 0xFFFFFFFE and RDLEN is not zero, this is a fatal error, and the client MUST forcibly abort the connection immediately.</p>
<p id="rfc.section.6.3.1.p.11">There are three types of collective remove notification:</p>
<p id="rfc.section.6.3.1.p.12">For collective remove notifications, if CLASS is not 255 (ANY) and TYPE is not 255 (ANY) then for the given name this removes all records of the specified type in the specified class.</p>
<p id="rfc.section.6.3.1.p.13">For collective remove notifications, if CLASS is not 255 (ANY) and TYPE is 255 (ANY) then for the given name this removes all records of all types in the specified class.</p>
<p id="rfc.section.6.3.1.p.14">For collective remove notifications, if CLASS is 255 (ANY), then for the given name this removes all records of all types in all classes. In this case TYPE MUST be set to zero on transmission, and MUST be silently ignored on reception.</p>
<p id="rfc.section.6.3.1.p.15">Summary of change notification types: </p>
<ul class="empty">
<li>Remove all RRsets from a name, in all classes<br> TTL = 0xFFFFFFFE, RDLEN = 0, CLASS = 255 (ANY)</li>
<li>Remove all RRsets from a name, in given class:<br> TTL = 0xFFFFFFFE, RDLEN = 0, CLASS gives class, TYPE = 255 (ANY)</li>
<li>Remove specified RRset from a name, in given class:<br> TTL = 0xFFFFFFFE, RDLEN = 0<br> CLASS and TYPE specify the RRset being removed</li>
<li>Remove an individual RR from a name:<br> TTL = 0xFFFFFFFF<br> CLASS, TYPE, RDLEN and RDATA specify the RR being removed</li>
<li>Add individual RR to a name<br> TTL >= 0 and TTL <= 0x7FFFFFFF<br> CLASS, TYPE, RDLEN, RDATA and TTL specify the RR being added</li>
</ul>
<p> </p>
<p id="rfc.section.6.3.1.p.16">Note that it is valid for the RDATA of an added or removed DNS Resource Record to be empty (zero length). For example, an <a href="#RFC3123" class="xref">Address Prefix List Resource Record</a> may have empty RDATA. Therefore, a change notification with RDLEN = 0 does not automatically indicate a remove notification. If RDLEN = 0 and TTL is the in the range 0 - 0x7FFFFFFF, this change notification signals the addition of a record with the given name, type, class, and empty RDATA. If RDLEN = 0 and TTL = 0xFFFFFFFF, this change notification signals the removal specifically of that single record with the given name, type, class, and empty RDATA.</p>
<p id="rfc.section.6.3.1.p.17">If the TTL is any value other than 0xFFFFFFFF, 0xFFFFFFFE, or a value in the range 0 - 0x7FFFFFFF, then the receiver SHOULD silently ignore this particular change notification record. The connection is not terminated and other valid change notification records within this PUSH message are processed as usual.</p>
<p id="rfc.section.6.3.1.p.18">For efficiency, when generating a PUSH message, a server SHOULD include as many change notifications as it has immediately available to send, rather than sending each change notification as a separate DSO message. Once it has exhausted the list of change notifications immediately available to send, a server SHOULD then send the PUSH message immediately, rather than waiting to see if additional change notifications become available.</p>
<p id="rfc.section.6.3.1.p.19">For efficiency, when generating a PUSH message, a server SHOULD use standard DNS name compression, with offsets relative to the beginning of the DNS message <a href="#RFC1035" class="xref">[RFC1035]</a>. When multiple change notifications in a single PUSH message have the same owner name, this name compression can yield significant savings. Name compression should be performed as specified in Section 18.14 of the <a href="#RFC6762" class="xref">Multicast DNS specification</a>, namely, owner names should always be compressed, and names appearing within RDATA should be compressed for only the RR types listed below: </p>
<dl>
<dt></dt>
<dd style="margin-left: 8">NS, CNAME, PTR, DNAME, SOA, MX, AFSDB, RT, KX, RP, PX, SRV, NSEC</dd>
</dl>
<p id="rfc.section.6.3.1.p.20">Servers may generate PUSH messages up to a maximum DNS message length of 16,382 bytes, counting from the start of the DSO 12-byte header. Including the two-byte length prefix that is used to frame DNS over a byte stream like TLS, this makes a total of 16,384 bytes. Servers MUST NOT generate PUSH messages larger than this. Where the immediately available change notifications are sufficient to exceed a DNS message length of 16,382 bytes, the change notifications MUST be communicated in separate PUSH messages of up to 16,382 bytes each. DNS name compression becomes less effective for messages larger than 16,384 bytes, so little efficiency benefit is gained by sending messages larger than this.</p>
<p id="rfc.section.6.3.1.p.21">If a client receives a PUSH message with a DNS message length larger than 16,382 bytes, this is a fatal error, and the client MUST forcibly abort the connection immediately.</p>
<div id="rfc.figure.3"></div>
<div id="push_msg"></div>
<pre>
1 1 1 1 1 1
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \
| MESSAGE ID (MUST BE ZERO) | \
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
|QR| OPCODE(6) | Z | RCODE | |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
| QDCOUNT (MUST BE ZERO) | |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ > HEADER
| ANCOUNT (MUST BE ZERO) | |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
| NSCOUNT (MUST BE ZERO) | |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
| ARCOUNT (MUST BE ZERO) | /
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ /
| DSO-TYPE = PUSH (tentatively 0x41) |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| DSO-LENGTH (number of octets in DSO-DATA) |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \
\ NAME \ \
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
| TYPE | |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
| CLASS | |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
| TTL | |
| (32-bit unsigned big-endian integer) | > DSO-DATA
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
| RDLEN (16-bit unsigned big-endian integer) | |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
\ RDATA (sized as necessary) \ |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
: NAME, TYPE, CLASS, TTL, RDLEN, RDATA : |
: Repeated As Necessary : /
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ /</pre>
<p class="figure">Figure 3: PUSH Message</p>
<p id="rfc.section.6.3.1.p.22">When processing the records received in a PUSH Message, the receiving client MUST validate that the records being added or removed correspond with at least one currently active subscription on that session. Specifically, the record name MUST match the name given in the SUBSCRIBE request, subject to the usual established DNS case-insensitivity for US-ASCII letters. For individual additions and removals, if the TYPE in the SUBSCRIBE request was not ANY (255) then the TYPE of the record must match the TYPE given in the SUBSCRIBE request, and if the CLASS in the SUBSCRIBE request was not ANY (255) then the CLASS of the record must match the CLASS given in the SUBSCRIBE request. For collective removals, at least one of the records being removed must match an active subscription. If a matching active subscription on that session is not found, then that particular addition/removal record is silently ignored. Processing of other additions and removal records in this message is not affected. The DSO session is not closed. This is to allow for the unavoidable race condition where a client sends an outbound UNSUBSCRIBE while inbound PUSH messages for that subscription from the server are still in flight.</p>
<p id="rfc.section.6.3.1.p.23">In the case where a single change affects more than one active subscription, only one PUSH message is sent. For example, a PUSH message adding a given record may match both a SUBSCRIBE request with the same TYPE and a different SUBSCRIBE request with TYPE = 255 (ANY). It is not the case that two PUSH messages are sent because the new record matches two active subscriptions.</p>
<p id="rfc.section.6.3.1.p.24">The server SHOULD encode change notifications in the most efficient manner possible. For example, when three AAAA records are removed from a given name, and no other AAAA records exist for that name, the server SHOULD send a "remove an RRset from a name" PUSH message, not three separate "remove an individual RR from a name" PUSH messages. Similarly, when both an SRV and a TXT record are removed from a given name, and no other records of any kind exist for that name, the server SHOULD send a "remove all RRsets from a name" PUSH message, not two separate "remove an RRset from a name" PUSH messages.</p>
<p id="rfc.section.6.3.1.p.25">A server SHOULD combine multiple change notifications in a single PUSH message when possible, even if those change notifications apply to different subscriptions. Conceptually, a PUSH message is a session-level mechanism, not a subscription-level mechanism.</p>
<p id="rfc.section.6.3.1.p.26">The TTL of an added record is stored by the client. While the subscription is active, the TTL is not decremented, because a change to the TTL would produce a new update. For as long as a relevant subscription remains active, the client SHOULD assume that when a record goes away the server will notify it of that fact. Consequently, a client does not have to poll to verify that the record is still there. Once a subscription is cancelled (individually, or as a result of the DSO session being closed) record aging for records covered by the subscription resumes and records are removed from the local cache when their TTL reaches zero.</p>
<h1 id="rfc.section.6.4">
<a href="#rfc.section.6.4">6.4.</a> <a href="#unsubscribe" id="unsubscribe">DNS Push Notification UNSUBSCRIBE</a>
</h1>
<p id="rfc.section.6.4.p.1">To cancel an individual subscription without closing the entire DSO session, the client sends an UNSUBSCRIBE message over the established DSO session to the server.</p>
<p id="rfc.section.6.4.p.2">The entity that initiates an UNSUBSCRIBE message is by definition the client. A server MUST NOT send an UNSUBSCRIBE message over an existing session from a client. If a server does send an UNSUBSCRIBE message over a DSO session initiated by a client, or an UNSUBSCRIBE message is sent with the QR bit set indicating that it is a response, this is a fatal error and the receiver MUST forcibly abort the connection immediately.</p>
<h1 id="rfc.section.6.4.1">
<a href="#rfc.section.6.4.1">6.4.1.</a> UNSUBSCRIBE Message</h1>
<p id="rfc.section.6.4.1.p.1">An UNSUBSCRIBE unidirectional message begins with the standard <a href="#RFC8490" class="xref">DSO 12-byte header</a>, followed by the UNSUBSCRIBE primary TLV. An UNSUBSCRIBE message is illustrated in <a href="#unsubscribe_msg" class="xref">Figure 4</a>.</p>
<p id="rfc.section.6.4.1.p.2">In accordance with the definition of DSO unidirectional messages, the MESSAGE ID field MUST be zero. There is no server response to an UNSUBSCRIBE message.</p>
<p id="rfc.section.6.4.1.p.3">The other header fields MUST be set as described in the <a href="#RFC8490" class="xref">DSO spec-ification</a>. The DNS OPCODE field contains the OPCODE value for DNS Stateful Operations (6). The four count fields must be zero, and the corresponding four sections must be empty (i.e., absent).</p>
<p id="rfc.section.6.4.1.p.4">The DSO-TYPE is UNSUBSCRIBE (tentatively 0x42).</p>
<p id="rfc.section.6.4.1.p.5">The DSO-LENGTH field contains the value 2, the length of the 2-octet MESSAGE ID contained in the DSO-DATA.</p>
<p id="rfc.section.6.4.1.p.6">The DSO-DATA contains the value previously given in the MESSAGE ID field of an active SUBSCRIBE request. This is how the server knows which SUBSCRIBE request is being cancelled. After receipt of the UNSUBSCRIBE message, the SUBSCRIBE request is no longer active.</p>
<p id="rfc.section.6.4.1.p.7">It is allowable for the client to issue an UNSUBSCRIBE message for a previous SUBSCRIBE request for which the client has not yet received a SUBSCRIBE response. This is to allow for the case where a client starts and stops a subscription in less than the round-trip time to the server. The client is NOT required to wait for the SUBSCRIBE response before issuing the UNSUBSCRIBE message.</p>
<p id="rfc.section.6.4.1.p.8">Consequently, it is possible for a server to receive an UNSUBSCRIBE message that does not match any currently active subscription. This can occur when a client sends a SUBSCRIBE request, which subsequently fails and returns an error code, but the client sent an UNSUBSCRIBE message before it became aware that the SUBSCRIBE request had failed. Because of this, servers MUST silently ignore UNSUBSCRIBE messages that do not match any currently active subscription.</p>
<div id="rfc.figure.4"></div>
<div id="unsubscribe_msg"></div>
<pre>
1 1 1 1 1 1
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \
| MESSAGE ID (MUST BE ZERO) | \
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
|QR| OPCODE(6) | Z | RCODE | |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
| QDCOUNT (MUST BE ZERO) | |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ > HEADER
| ANCOUNT (MUST BE ZERO) | |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
| NSCOUNT (MUST BE ZERO) | |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
| ARCOUNT (MUST BE ZERO) | /
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ /
| DSO-TYPE = UNSUBSCRIBE (tentatively 0x42) |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| DSO-LENGTH (2) |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \
| SUBSCRIBE MESSAGE ID | > DSO-DATA
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ /</pre>
<p class="figure">Figure 4: UNSUBSCRIBE Message</p>
<h1 id="rfc.section.6.5">
<a href="#rfc.section.6.5">6.5.</a> <a href="#reconfirm" id="reconfirm">DNS Push Notification RECONFIRM</a>
</h1>
<p id="rfc.section.6.5.p.1">Sometimes, particularly when used with a <a href="#DisProx" class="xref">Discovery Proxy</a>, a DNS Zone may contain stale data. When a client encounters data that it believes may be stale (e.g., an SRV record referencing a target host+port that is not responding to connection requests) the client can send a RECONFIRM message to ask the server to re-verify that the data is still valid. For a Discovery Proxy, this causes it to issue new Multicast DNS queries to ascertain whether the target device is still present. How the Discovery Proxy causes these new Multicast DNS queries to be issued depends on the details of the underlying Multicast DNS implementation being used. For example, a Discovery Proxy built on Apple's dns_sd.h API <a href="#SD-API" class="xref">[SD-API]</a> responds to a DNS Push Notification RECONFIRM message by calling the underlying API's DNSServiceReconfirmRecord() routine.</p>
<p id="rfc.section.6.5.p.2">For other types of DNS server, the RECONFIRM operation is currently undefined, and SHOULD result in a NOERROR response, but otherwise need not cause any action to occur.</p>
<p id="rfc.section.6.5.p.3">Frequent use of RECONFIRM operations may be a sign of network unreliability, or some kind of misconfiguration, so RECONFIRM operations MAY be logged or otherwise communicated to a human administrator to assist in detecting and remedying such network problems.</p>
<p id="rfc.section.6.5.p.4">If, after receiving a valid RECONFIRM message, the server determines that the disputed records are in fact no longer valid, then subsequent DNS PUSH Messages will be generated to inform interested clients. Thus, one client discovering that a previously-advertised device (like a network printer) is no longer present has the side effect of informing all other interested clients that the device in question is now gone.</p>
<p id="rfc.section.6.5.p.5">The entity that initiates a RECONFIRM message is by definition the client. A server MUST NOT send a RECONFIRM message over an existing session from a client. If a server does send a RECONFIRM message over a DSO session initiated by a client, or a RECONFIRM message is sent with the QR bit set indicating that it is a response, this is a fatal error and the receiver MUST forcibly abort the connection immediately.</p>
<h1 id="rfc.section.6.5.1">
<a href="#rfc.section.6.5.1">6.5.1.</a> RECONFIRM Message</h1>
<p id="rfc.section.6.5.1.p.1">A RECONFIRM unidirectional message begins with the standard <a href="#RFC8490" class="xref">DSO 12-byte header</a>, followed by the RECONFIRM primary TLV.<br> A RECONFIRM message is illustrated in <a href="#reconfirm_msg" class="xref">Figure 5</a>.</p>
<p id="rfc.section.6.5.1.p.2">In accordance with the definition of DSO unidirectional messages, the MESSAGE ID field MUST be zero. There is no server response to a RECONFIRM message.</p>
<p id="rfc.section.6.5.1.p.3">The other header fields MUST be set as described in the <a href="#RFC8490" class="xref">DSO spec-ification</a>. The DNS OPCODE field contains the OPCODE value for DNS Stateful Operations (6). The four count fields must be zero, and the corresponding four sections must be empty (i.e., absent).</p>
<p id="rfc.section.6.5.1.p.4">The DSO-TYPE is RECONFIRM (tentatively 0x43).</p>
<p id="rfc.section.6.5.1.p.5">The DSO-LENGTH is the length of the data that follows, which specifies the name, type, class, and content of the record being disputed.</p>
<p id="rfc.section.6.5.1.p.6">The DSO-DATA for a RECONFIRM message MUST contain exactly one record. The DSO-DATA for a RECONFIRM message has no count field to specify more than one record. Since RECONFIRM messages are sent over TCP, multiple RECONFIRM messages can be concatenated in a single TCP stream and packed efficiently into TCP segments.</p>
<p id="rfc.section.6.5.1.p.7">TYPE MUST NOT be the value ANY (255) and CLASS MUST NOT be the value ANY (255).</p>
<p id="rfc.section.6.5.1.p.8">DNS wildcarding is not supported. That is, a wildcard ("*") in a RECONFIRM message matches only a literal wildcard character ("*") in the zone, and nothing else.</p>
<p id="rfc.section.6.5.1.p.9">Aliasing is not supported. That is, a CNAME in a RECONFIRM message matches only a literal CNAME record in the zone, and no other records with the same owner name.</p>
<p id="rfc.section.6.5.1.p.10">Note that there is no RDLEN field, since the length of the RDATA can be inferred from DSO-LENGTH, so an additional RDLEN field would be redundant.</p>
<div id="rfc.figure.5"></div>
<div id="reconfirm_msg"></div>
<pre>
1 1 1 1 1 1
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \
| MESSAGE ID (MUST BE ZERO) | \
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
|QR| OPCODE(6) | Z | RCODE | |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
| QDCOUNT (MUST BE ZERO) | |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ > HEADER
| ANCOUNT (MUST BE ZERO) | |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
| NSCOUNT (MUST BE ZERO) | |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
| ARCOUNT (MUST BE ZERO) | /
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ /
| DSO-TYPE = RECONFIRM (tentatively 0x43) |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| DSO-LENGTH (number of octets in DSO-DATA) |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ \
\ NAME \ \
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
| TYPE | |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ > DSO-DATA
| CLASS | |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
\ RDATA \ /
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ /</pre>
<p class="figure">Figure 5: RECONFIRM Message</p>
<h1 id="rfc.section.6.6">
<a href="#rfc.section.6.6">6.6.</a> DNS Stateful Operations TLV Context Summary</h1>
<p id="rfc.section.6.6.p.1">This document defines four new DSO TLVs. As recommended in Section 8.2 of the <a href="#RFC8490" class="xref">DNS Stateful Operations specification</a>, the valid contexts of these new TLV types are summarized below.</p>
<p id="rfc.section.6.6.p.2">The client TLV contexts are: </p>
<dl>
<dt>C-P:</dt>
<dd style="margin-left: 8">Client request message, primary TLV</dd>
<dt>C-U:</dt>
<dd style="margin-left: 8">Client unidirectional message, primary TLV</dd>
<dt>C-A:</dt>
<dd style="margin-left: 8">Client request or unidirectional message, additional TLV</dd>
<dt>CRP:</dt>
<dd style="margin-left: 8">Response back to client, primary TLV</dd>
<dt>CRA:</dt>
<dd style="margin-left: 8">Response back to client, additional TLV</dd>
</dl>
<p> </p>
<div id="rfc.table.2"></div>
<div id="tlv_client_contexts"></div>
<table cellpadding="3" cellspacing="0" class="tt full center">
<caption>DSO TLV Client Context Summary</caption>
<thead><tr>
<th class="right">TLV Type</th>
<th class="center">C-P</th>
<th class="center">C-U</th>
<th class="center">C-A</th>
<th class="center">CRP</th>
<th class="center">CRA</th>
</tr></thead>
<tbody>
<tr>
<td class="right">SUBSCRIBE</td>
<td class="center">X</td>
<td class="center"></td>
<td class="center"></td>
<td class="center"></td>
<td class="center"></td>
</tr>
<tr>
<td class="right">PUSH</td>
<td class="center"></td>
<td class="center"></td>
<td class="center"></td>
<td class="center"></td>
<td class="center"></td>
</tr>
<tr>
<td class="right">UNSUBSCRIBE</td>
<td class="center"></td>
<td class="center">X</td>
<td class="center"></td>
<td class="center"></td>
<td class="center"></td>
</tr>
<tr>