-
Notifications
You must be signed in to change notification settings - Fork 90
/
Copy pathdraft-irtf-icnrg-ccnxsemantics-07.txt
1960 lines (1369 loc) · 85.6 KB
/
draft-irtf-icnrg-ccnxsemantics-07.txt
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
ICNRG M. Mosko
Internet-Draft PARC, Inc.
Intended status: Experimental I. Solis
Expires: September 8, 2018 LinkedIn
C. Wood
University of California Irvine
March 7, 2018
CCNx Semantics
draft-irtf-icnrg-ccnxsemantics-07
Abstract
This document describes the core concepts of the Content Centric
Networking (CCNx) architecture and presents a network protocol based
on two messages: Interests and Content Objects. It specifies the set
of mandatory and optional fields within those messages and describes
their behavior and interpretation. This architecture and protocol
specification is independent of a specific wire encoding.
The protocol also uses a Control message called an InterestReturn,
whereby one system can return an Interest message to the previous hop
due to an error condition. This indicates to the previous hop that
the current system will not respond to the Interest.
This document is a product of the Information Centric Networking
research group (ICNRG).
Status of This Memo
This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79.
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 http://datatracker.ietf.org/drafts/current/.
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."
This Internet-Draft will expire on September 8, 2018.
Mosko, et al. Expires September 8, 2018 [Page 1]
Internet-Draft CCNx Semantics March 2018
Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(http://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.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Requirements Language . . . . . . . . . . . . . . . . . . 4
1.2. Architecture . . . . . . . . . . . . . . . . . . . . . . 5
1.3. Protocol Overview . . . . . . . . . . . . . . . . . . . . 6
2. Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.1. Message Grammar . . . . . . . . . . . . . . . . . . . . . 9
2.2. Consumer Behavior . . . . . . . . . . . . . . . . . . . . 13
2.3. Publisher Behavior . . . . . . . . . . . . . . . . . . . 14
2.4. Forwarder Behavior . . . . . . . . . . . . . . . . . . . 15
2.4.1. Interest HopLimit . . . . . . . . . . . . . . . . . . 15
2.4.2. Interest Aggregation . . . . . . . . . . . . . . . . 16
2.4.3. Content Store Behavior . . . . . . . . . . . . . . . 17
2.4.4. Interest Pipeline . . . . . . . . . . . . . . . . . . 17
2.4.5. Content Object Pipeline . . . . . . . . . . . . . . . 18
3. Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.1. Name Examples . . . . . . . . . . . . . . . . . . . . . . 20
3.2. Interest Payload ID . . . . . . . . . . . . . . . . . . . 20
4. Cache Control . . . . . . . . . . . . . . . . . . . . . . . . 20
5. Content Object Hash . . . . . . . . . . . . . . . . . . . . . 21
6. Link . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
7. Hashes . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
8. Validation . . . . . . . . . . . . . . . . . . . . . . . . . 22
8.1. Validation Algorithm . . . . . . . . . . . . . . . . . . 22
9. Interest to Content Object matching . . . . . . . . . . . . . 23
10. Interest Return . . . . . . . . . . . . . . . . . . . . . . . 24
10.1. Message Format . . . . . . . . . . . . . . . . . . . . . 25
10.2. ReturnCode Types . . . . . . . . . . . . . . . . . . . . 25
10.3. Interest Return Protocol . . . . . . . . . . . . . . . . 26
10.3.1. No Route . . . . . . . . . . . . . . . . . . . . . . 27
10.3.2. HopLimit Exceeded . . . . . . . . . . . . . . . . . 28
10.3.3. Interest MTU Too Large . . . . . . . . . . . . . . . 28
Mosko, et al. Expires September 8, 2018 [Page 2]
Internet-Draft CCNx Semantics March 2018
10.3.4. No Resources . . . . . . . . . . . . . . . . . . . . 28
10.3.5. Path Error . . . . . . . . . . . . . . . . . . . . . 28
10.3.6. Prohibited . . . . . . . . . . . . . . . . . . . . . 28
10.3.7. Congestion . . . . . . . . . . . . . . . . . . . . . 28
10.3.8. Unsupported Content Object Hash Algorithm . . . . . 29
10.3.9. Malformed Interest . . . . . . . . . . . . . . . . . 29
11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 29
12. Security Considerations . . . . . . . . . . . . . . . . . . . 29
13. References . . . . . . . . . . . . . . . . . . . . . . . . . 32
13.1. Normative References . . . . . . . . . . . . . . . . . . 32
13.2. Informative References . . . . . . . . . . . . . . . . . 32
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 34
1. Introduction
This document describes the principles of the CCNx architecture. It
describes a network protocol that uses a hierarchical name to forward
requests and to match responses to requests. It does not use
endpoint addresses, such as Internet Protocol. Restrictions in a
request can limit the response by the public key of the response's
signer or the cryptographic hash of the response. Every CCNx
forwarder along the path does the name matching and restriction
checking. The CCNx protocol fits within the broader framework of
Information Centric Networking (ICN) protocols [RFC7927]. This
document concerns the semantics of the protocol and is not dependent
on a specific wire format encoding. The CCNx Messages [CCNMessages]
document describes a type-length-value (TLV) wire protocol encoding.
This section introduces the main concepts of CCNx, which are further
elaborated in the remainder of the document.
The CCNx protocol derives from the early ICN work by Jacobson et al.
[nnc]. Jacobson's version of CCNx is known as the 0.x version ("CCNx
0.x") and the present work is known as the 1.0 version ("CCNx 1.0").
There are two active implementations of CCNx 1.0. The most complete
implementation is Community ICN (CINC) [cicn], a Linux Foundation
project hosted at fd.io. Another active implementation is CCN-lite
[ccnlite], with support for IoT systems and the RIOT operating
system.
The original work by Jacobson formed the basis of the Named Data
Networking [ndn] (NDN) university project. The current CCNx 1.0
specification diverges from NDN in a few significant areas. As CCNx
0.x is no longer under development, we will only describe some of the
differences with NDN. In both NDN and CCNx 1.0, a forwarder uses a
longest prefix match of a request name against the forwarding
information base (FIB) to send the request through the network to a
system that can issue a response. A forwarder must then match a
response's name to a request's name to determine the reverse path and
Mosko, et al. Expires September 8, 2018 [Page 3]
Internet-Draft CCNx Semantics March 2018
deliver the response to the requester. Herein lies the main
difference between NDN and CCNx 1.0.
NDN performs, at the network layer, content discovery via various
strategies of partial matching a request name to a response name.
NDN supports several different content discovery strategies that
differ in their load on the network and the state maintained at each
hop. A forwarding strategy must be implemented at each forwarder.
On a match, a forwarder returns the entire response (e.g. several
kilobytes to megabytes of data) hop-by-hop to the requester. The
requestor may then use that response or issue a new request that
excludes the unwanted result via a type of interval filter on the
last name component of the request's name. CCNx 1.0 does not include
discovery at the network level, but uses a protocol on top of it's
layer 3 protocol. In CCNx 1.0, not every forwarder needs to
implement discovery and the network could support multiple discovery
protocols. The main ramification of this approach is that in CCNx
1.0 the name in a response always exactly matches the name in a
request (see Section 9 for the exact details and one exception for
nameless responses). A forwarder does not prefix match a response to
a request.
CCNx Selectors [selectors] is an example of using a higher-layer
protocol on top of the CCNx 1.0 layer-3 to perform content discovery.
The selector protocol uses a method similar to the original CCNx 0.x
and the current NDN techniques without requiring partial name
matching of a response to a request in the forwarder.
The document represents the consensus of the ICN RG. It is the first
ICN protocol from the RG, created from the early CCNx protocol [nnc]
with significant revision and input from the ICN community and RG
members. The draft has received critical reading by several members
of the ICN community and the RG. The authors and RG chairs approve
of the contents. The document is sponsored under the IRTF and is not
issued by the IETF and is not an IETF standard. This is an
experimental protocol and may not be suitable for any specific
application and the specification may change in the future.
1.1. Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119].
Mosko, et al. Expires September 8, 2018 [Page 4]
Internet-Draft CCNx Semantics March 2018
1.2. Architecture
We describe the architecture of the network in which CCNx operates
and introduce certain terminology from [terminology]. The detailed
behavior of each component and message grammars are in Section 2.
A producer (also called a publisher) is an endpoint that encapsualtes
content in Content Objects for transport in the CCNx network. A
producer has a public/private keypair and signs (directly or
indirectly) the content objects. Usually, the producer's keyid (hash
of the public key) is well-known or may be derived from the
producer's namespace via standard means.
A producer operates within one or more namespaces. A namespace is a
name prefix that is represented in the forwarding information base
(FIB). This allows a request to reach the producer and fetch a
response (if one exists).
The forwarding information base (FIB) is a table that tells a
forwarder where to send a request. It may point to a local
application, a local cache or content store, or to a remote system.
If there is no matching entry in the FIB, a forwarder cannot process
a request. The detailed rules on name matching to the FIB are given
in Section 2.4.4. An endpoint has a FIB, though it may be a simple
default route. An intermediate system (i.e. a router) typically has
a much larger FIB. A core CCNx forwarder, for example, would know
all the global routes.
A consumer is an endpoint that requests a name. It is beyond the
scope of this document to describe how a consumer learns of a name or
publisher keyid -- higher layer protocols build on top of CCNx handle
those tasks, such as search engines or lookup services or well known
names. The consumer constructs a request, called an Interest, and
forwards it via the endpoint's FIB. The consumer should get back
either a response, called a Content Object, that matches the Interest
or a control message, called an InterestReturn, that indicates the
network cannot handle the request.
There are three ways to detect errors in Interest handling. An
InterestReturn is a network control message that indicates a low-
level error like no route or out of resources. If an Interest
arrives at a producer, but the producer does not have the requested
content, the producer should send an application-specific error
message (e.g. a not found message). Finally, a consumer may not
receive anything, in which case it should timeout and, depending on
the application, retry the request or return an error to the
application.
Mosko, et al. Expires September 8, 2018 [Page 5]
Internet-Draft CCNx Semantics March 2018
1.3. Protocol Overview
The goal of CCNx is to name content and retrieve the content from the
network without binding it to a specific network endpoint. A routing
system (specified separately) populates the forwarding information
base (FIB) tables at each CCNx router with hierarchical name prefixes
that point towards the content producers under that prefix. A
request finds matching content along those paths, in which case a
response carries the data, or if no match is found a control message
indicates the failure. A request may further refine acceptable
responses with a restriction on the response's signer and the
cryptographic hash of the response. The details of these
restrictions are described below.
The CCNx name is a hierarchical series of path segments. Each path
segment has a type and zero or more bytes. Matching two names is
done as a binary comparison of the type and value, segment by
segment. The human-readable form is defined under a URI scheme
"ccnx:" [CCNxURI], though the canonical encoding of a name is a
series of (type, octet string) pairs. There is no requirement that
any path segment be human readable or UTF-8. The first few segments
in a name will matched against the FIB and a routing protocol may put
its own restrictions on the routable name components (e.g. a maximum
length or character encoding rules). In principle, path segments and
names have unbounded length, though in practice they are limited by
the wire format encoding and practical considerations imposed by a
routing protocol. Note that in CCNx path segments use binary
comparison whereas in a URI the authority uses case-insensitive
hostname (due to DNS).
The CCNx name, as used by the forwarder, is purposefully left as a
general octet-encoded type and value without any requirements on
human readability and character encoding. The reason for this is
that we are concerned with how a forwarder processes names. We
expect that applications, routing protocols, or other higher layers
will apply their own conventions and restrictions on the allowed path
segment types and path segment values.
CCNx is a request and response protocol to fetch chunks of data using
a name. The integrity of each chunk may be directly asserted through
a digital signature or Message Authentication Code (MAC), or,
alternatively, indirectly via hash chains. Chunks may also carry
weaker message integrity checks (MICs) or no integrity protection
mechanism at all. Because provenance information is carried with
each chunk (or larger indirectly protected block), we no longer need
to rely on host identities, such as those derived from TLS
certificates, to ascertain the chunk legitimacy. Data integrity is
therefore a core feature of CCNx; it does not rely on the data
Mosko, et al. Expires September 8, 2018 [Page 6]
Internet-Draft CCNx Semantics March 2018
transmission channel. There are several options for data
confidentiality, discussed later.
This document only defines the general properties of CCNx names. In
some isolated environments, CCNx users may be able to use any name
they choose and either inject that name (or prefix) into a routing
protocol or use other information foraging techniques. In the
Internet environment, there will be policies around the formats of
names and assignments of names to publishers, though those are not
specified here.
The key concept of CCNx is that a subjective name is
cryptographically bound to a fixed payload. These publisher-
generated bindings can therefore be cryptographically verified. A
named payload is thus the tuple {{Name, ExtraFields, Payload,
ValidationAlgorithm}, ValidationPayload}, where all fields in the
inner tuple are covered by the validation payload (e.g. signature).
Consumers of this data can check the binding integrity by re-
computing the same cryptographic hash and verifying the digital
signature in Validation.
In addition to digital signatures (e.g. RSA), we also support
message authentication codes (e.g. HMAC) and message integrity codes
(e.g. SHA-256 or CRC). To maintain the cryptographic binding, there
should be an object with a signature or authentication code, but not
all objects require it. For example, a first object with a signature
could refer to other objects via a hash chain, a Merkle tree, or a
signed manifest. The later objects may not have any validation and
rely purely on the references. The use of an integrity code (e.g.
CRC) is intended for protecting Interests in the network from
accidental corruption.
CCNx specifies a network protocol around Interests (request messages)
and Content Objects (response messages) to move named payloads. An
Interest includes the Name -- which identifies the desired response
-- and optional matching restrictions. Restrictions limit the
possible matching Content Objects. Two restrictions exist:
KeyIdRestr and ContentObjectHashRestr. The first restriction on the
KeyId limits responses to those signed with a ValidationAlgorithm
KeyId field equal to the restriction. The second is the Content
ObjectHash restriction, which limits the response to one where the
cryptographic hash of the entire named payload is equal to the
restriction.
The hierarchy of a CCNx Name is used for routing via the longest
matching prefix in a Forwarder. The longest matching prefix is
computed name segment by name segment in the hierarchical path name,
where each name segment must be exactly equal to match. There is no
Mosko, et al. Expires September 8, 2018 [Page 7]
Internet-Draft CCNx Semantics March 2018
requirement that the prefix be globally routable. Within a
deployment any local routing may be used, even one that only uses a
single flat (non-hierarchical) name segment.
Another concept of CCNx is that there should be flow balance between
Interest messages and Content Object messages. At the network level,
an Interest traveling along a single path should elicit no more than
one Content Object response. If some node sends the Interest along
more than one path, that node should consolidate the responses such
that only one Content Object flows back towards the requester. If an
Interest is sent broadcast or multicast on a multiple-access media,
the sender should be prepared for multiple responses unless some
other media-dependent mechanism like gossip suppression or leader
election is used.
As an Interest travels the forward path following the Forwarding
Information Base (FIB), it establishes state at each forwarder such
that a Content Object response can trace its way back to the original
requester(s) without the requester needing to include a routable
return address. We use the notional Pending Interest Table (PIT) as
a method to store state that facilitates the return of a Content
Object.
The notional PIT table stores the last hop of an Interest plus its
Name and optional restrictions. This is the data required to match a
Content Object to an Interest (see Section 9). When a Content Object
arrives, it must be matched against the PIT to determine which
entries it satisfies. For each such entry, at most one copy of the
Content Object is sent to each listed last hop in the PIT entries.
An actual PIT table is not mandated by the specification. An
implementation may use any technique that gives the same external
behavior. There are, for example, research papers that use
techniques like label switching in some parts of the network to
reduce the per-node state incurred by the PIT table [dart]. Some
implementations store the PIT state in the FIB, so there is not a
second table.
If multiple Interests with the same {Name, KeyIdRestr,
ContentObjectHashRestr} tuple arrive at a node before a Content
Object matching the first Interest comes back, they are grouped in
the same PIT entry and their last hops aggregated (see
Section 2.4.2). Thus, one Content Object might satisfy multiple
pending Interests in a PIT.
In CCNx, higher-layer protocols are often called "name-based
protocols" because they operate on the CCNx Name. For example, a
versioning protocol might append additional name segments to convey
Mosko, et al. Expires September 8, 2018 [Page 8]
Internet-Draft CCNx Semantics March 2018
state about the version of payload. A content discovery protocol
might append certain protocol-specific name segments to a prefix to
discover content under that prefix. Many such protocols may exist
and apply their own rules to Names. They may be layered with each
protocol encapsulating (to the left) a higher layer's Name prefix.
This document also describes a control message called an
InterestReturn. A network element may return an Interest message to
a previous hop if there is an error processing the Interest. The
returned Interest may be further processed at the previous hop or
returned towards the Interest origin. When a node returns an
Interest it indicates that the previous hop should not expect a
response from that node for the Interest, i.e., there is no PIT entry
left at the returning node for a Content Object to follow.
There are multiple ways to describe larger objects in CCNx.
Aggregating layer-3 content objects in to larger objects is beyond
the scope of this document. One proposed method, FLIC [flic], uses a
manifest to enumerate the pieces of a larger object. Manifests are,
themselves, Content Objects. Another option is to use a convention
in the Content Object name, as in the CCNx Chunking [chunking]
protocol where a large object is broken in to small chunks and each
chunk receives a special name component indicating its serial order.
At the semantic level, described in this document, we do not address
fragmentation. One experimental fragmentation protocol, BeginEnd
Fragments [befrags] uses a multipoint-PPP style technique for use
over layer-2 interfaces with the CCNx Messages [CCNMessages] TLV wire
forman specification.
With these concepts, the remainder of the document specifies the
behavior of a forwarder in processing Interest, Content Object, and
InterestReturn messages.
2. Protocol
CCNx is a request and response protocol. A request is called an
Interest and a response is called a Content Object. CCNx also uses a
1-hop control message called InterestReturn. These are, as a group,
called CCNx Messages.
2.1. Message Grammar
The CCNx message ABNF [RFC5234] grammar is shown in Figure 1. The
grammar does not include any encoding delimiters, such as TLVs.
Specific wire encodings are given in a separate document. If a
Validation section exists, the Validation Algorithm covers from the
Body (BodyName or BodyOptName) through the end of the ValidationAlg
Mosko, et al. Expires September 8, 2018 [Page 9]
Internet-Draft CCNx Semantics March 2018
section. The InterestLifetime, CacheTime, and Return Code fields
exist outside of the validation envelope and may be modified.
The various fields -- in alphabetical order -- are defined as:
o AbsTime: Absolute times are conveyed as the 64-bit UTC time in
milliseconds since the epoch (standard POSIX time).
o CacheTime: The absolute time after which the publisher believes
there is low value in caching the content object. This is a
recommendation to caches (see Section 4).
o ConObjField: These are optional fields that may appear in a
Content Object.
o ConObjHash: The value of the Content Object Hash, which is the
SHA256-32 over the message from the beginning of the body to the
end of the message. Note that this coverage area is different
from the ValidationAlg. This value SHOULD NOT be trusted across
domains (see Section 5).
o ExpiryTime: An absolute time after which the content object should
be considered expired (see Section 4).
o HopLimit: Interest messages may loop if there are loops in the
forwarding plane. To eventually terminate loops, each Interest
carries a HopLimit that is decremented after each hop and no
longer forwarded when it reaches zero. See Section 2.4.
o InterestField: These are optional fields that may appear in an
Interest message.
o KeyIdRestr: The KeyId Restriction. A Content Object must have a
KeyId with the same value as the restriction.
o ContentObjectHashRestr: The Content Object Hash Restriction. A
content object must hash to the same value as the restriction
using the same HashType. The ContentObjectHashRestr MUST use
SHA256-32.
o KeyId: An identifier for the key used in the ValidationAlg. For
public key systems, this should be the SHA-256 hash of the public
key. For symmetric key systems, it should be an identifier agreed
upon by the parties.
o KeyLink: A Link (see Section 6) that names how to retrieve the key
used to verify the ValidationPayload. A message SHOULD NOT have
both a KeyLink and a PublicKey.
Mosko, et al. Expires September 8, 2018 [Page 10]
Internet-Draft CCNx Semantics March 2018
o Lifetime: The approximate time during which a requester is willing
to wait for a response, usually measured in seconds. It is not
strongly related to the network round trip time, though it must
necessarily be larger.
o Name: A name is made up of a non-empty first segment followed by
zero or more additional segments, which may be of 0 length. Path
segments are opaque octet strings, and are thus case-sensitive if
encoding UTF-8. An Interest MUST have a Name. A Content Object
MAY have a Name (see Section 9). The segments of a name are said
to be complete if its segments uniquely identify a single Content
Object. A name is exact if its segments are complete. An
Interest carrying a full name is one which specifies an exact name
and the ContentObjectHashRestr of the corresponding Content
Object.
o Payload: The message's data, as defined by PayloadType.
o PayloadType: The format of the Payload. If missing, assume
DataType. DataType means the payload is opaque application bytes.
KeyType means the payload is a DER-encoded public key. LinkType
means it is one or more Links (see Section 6).
o PublicKey: Some applications may wish to embed the public key used
to verify the signature within the message itself. The PublickKey
is DER encoded. A message SHOULD NOT have both a KeyLink and a
PublicKey.
o RelTime: A relative time, measured in milli-seconds.
o ReturnCode: States the reason an Interest message is being
returned to the previous hop (see Section 10.2).
o SigTime: The absolute time (UTC milliseconds) when the signature
was generated.
o Hash: Hash values carried in a Message carry a HashType to
identify the algorithm used to generate the hash followed by the
hash value. This form is to allow hash agility. Some fields may
mandate a specific HashType.
Mosko, et al. Expires September 8, 2018 [Page 11]
Internet-Draft CCNx Semantics March 2018
Message := Interest / ContentObject / InterestReturn
Interest := HopLimit [Lifetime] BodyName [Validation]
ContentObject := [CacheTime / ConObjHash] BodyOptName [Validation]
InterestReturn:= ReturnCode Interest
BodyName := Name Common
BodyOptName := [Name] Common
Common := *Field [Payload]
Validation := ValidationAlg ValidatonPayload
Name := FirstSegment *Segment
FirstSegment := 1* OCTET
Segment := 0* OCTET
ValidationAlg := RSA-SHA256 HMAC-SHA256 CRC32C
ValidatonPayload := 1* OCTET
RSA-SHA256 := KeyId [PublicKey] [SigTime] [KeyLink]
HMAC-SHA256 := KeyId [SigTime] [KeyLink]
CRC32C := [SigTime]
AbsTime := 8 OCTET ; 64-bit UTC msec since epoch
CacheTime := AbsTime
ConObjField := ExpiryTime / PayloadType
ConObjHash := Hash ; The Content Object Hash
DataType := "1"
ExpiryTime := AbsTime
Field := InterestField / ConObjField
Hash := HashType 1* OCTET
HashType := SHA256-32 / SHA512-64 / SHA512-32
HopLimit := OCTET
InterestField := KeyIdRestr / ContentObjectHashRestr
KeyId := 1* OCTET ; key identifier
KeyIdRestr := 1* OCTET
KeyLink := Link
KeyType := "2"
Lifetime := RelTime
Link := Name [KeyIdResr] [ContentObjectHashRestr]
LinkType := "3"
ContentObjectHashRestr := Hash
Payload := *OCTET
PayloadType := DataType / KeyType / LinkType
PublicKey := ; DER-encoded public key
RelTime := 1* OCTET ; msec
ReturnCode := ; see Section 10.2
SigTime := AbsTime
Figure 1
Mosko, et al. Expires September 8, 2018 [Page 12]
Internet-Draft CCNx Semantics March 2018
2.2. Consumer Behavior
To request a piece of content for a given {Name, [KeyIdRest],
[ContentObjectHashRestr]} tuple, a consumer creates an Interest
message with those values. It MAY add a validation section,
typically only a CRC32C. A consumer MAY put a Payload field in an
Interest to send additional data to the producer beyond what is in
the Name. The Name is used for routing and may be remembered at each
hop in the notional PIT table to facilitate returning a content
object; Storing large amounts of state in the Name could lead to high
memory requirements. Because the Payload is not considered when
forwarding an Interest or matching a Content Object to an Interest, a
consumer SHOULD put an Interest Payload ID (see Section 3.2) as part
of the name to allow a forwarder to match Interests to content
objects and avoid aggregating Interests with different payloads.
Similarly, if a consumer uses a MAC or a signature, it SHOULD also
include a unique segment as part of the name to prevent the Interest
from being aggregated with other Interests or satisfied by a Content
Object that has no relation to the validation.
The consumer SHOULD specify an InterestLifetime, which is the length
of time the consumer is willing to wait for a response. The
InterestLifetime is an application-scale time, not a network round
trip time (see Section 2.4.2). If not present, the InterestLifetime
will use a default value (TO_INTERESTLIFETIME).
The consumer SHOULD set the Interest HopLimit to a reasonable value
or use the default 255. If the consumer knows the distances to the
producer via routing, it SHOULD use that value.
A consumer hands off the Interest to its first forwarder, which will
then forward the Interest over the network to a publisher (or
replica) that may satisfy it based on the name (see Section 2.4).
Interest messages are unreliable. A consumer SHOULD run a transport
protocol that will retry the Interest if it goes unanswered, up to
the InterestLifetime. No transport protocol is specified in this
document.
The network MAY send to the consumer an InterestReturn message that
indicates the network cannot fulfill the Interest. The ReturnCode
specifies the reason for the failure, such as no route or congestion.
Depending on the ReturnCode, the consumer MAY retry the Interest or
MAY return an error to the requesting application.
If the content was found and returned by the first forwarder, the
consumer will receive a Content Object. The consumer SHOULD:
Mosko, et al. Expires September 8, 2018 [Page 13]
Internet-Draft CCNx Semantics March 2018
o Ensure the content object is properly formatted.
o Verify that the returned Name matches a pending request. If the
request also had KeyIdRestr and ObjHashRest, it should also
validate those properties.
o If the content object is signed, it SHOULD cryptographically
verify the signature. If it does not have the corresponding key,
it SHOULD fetch the key, such as from a key resolution service or
via the KeyLink.
o If the signature has a SigTime, the consumer MAY use that in
considering if the signature is valid. For example, if the
consumer is asking for dynamically generated content, it should
expect the SigTime to not be before the time the Interest was
generated.
o If the content object is signed, it should assert the
trustworthiness of the signing key to the namespace. Such an
assertion is beyond the scope of this document, though one may use
traditional PKI methods, a trusted key resolution service, or
methods like [schematized trust].
o It MAY cache the content object for future use, up to the
ExpiryTime if present.
o A consumer MAY accept a content object off the wire that is
expired. It may happen that a packet expires while in flight, and
there is no requirement that forwarders drop expired packets in
flight. The only requirement is that content stores, caches, or
producers MUST NOT respond with an expired content object.
2.3. Publisher Behavior
This document does not specify the method by which names populate a
Forwarding Information Base (FIB) table at forwarders (see
Section 2.4). A publisher is either configured with one or more name
prefixes under which it may create content, or it chooses its name
prefixes and informs the routing layer to advertise those prefixes.
When a publisher receives an Interest, it SHOULD:
o Verify that the Interest is part of the publishers namespace(s).
o If the Interest has a Validation section, verify the
ValidationPayload. Usually an Interest will only have a CRC32C
unless the publisher application specifically accommodates other
validations. The publisher MAY choose to drop Interests that
Mosko, et al. Expires September 8, 2018 [Page 14]
Internet-Draft CCNx Semantics March 2018
carry a Validation section if the publisher application does not
expect those signatures as this could be a form of computational
denial of service. If the signature requires a key that the
publisher does not have, it is NOT RECOMMENDED that the publisher
fetch the key over the network, unless it is part of the
application's expected behavior.
o Retrieve or generate the requested content object and return it to
the Interest's previous hop. If the requested content cannot be
returned, the publisher SHOULD reply with an InterestReturn or a
content object with application payload that says the content is
not available; this content object should have a short ExpiryTime
in the future.
2.4. Forwarder Behavior
A forwarder routes Interest messages based on a Forwarding
Information Base (FIB), returns Content Objects that match Interests
to the Interest's previous hop, and processes InterestReturn control
messages. It may also keep a cache of Content Objects in the
notional Content Store table. This document does not specify the
internal behavior of a forwarder -- only these and other external
behaviors.
In this document, we will use two processing pipelines, one for
Interests and one for Content Objects. Interest processing is made
up of checking for duplicate Interests in the PIT (see
Section 2.4.2), checking for a cached Content Object in the Content
Store (see Section 2.4.3), and forwarding an Interest via the FIB.
Content Store processing is made up of checking for matching
Interests in the PIT and forwarding to those previous hops.
2.4.1. Interest HopLimit
Interest looping is not prevented in CCNx. An Interest traversing
loops is eventually discarded using the hop-limit field of the
Interest, which is decremented at each hop traversed by the Interest.
Every Interest MUST carry a HopLimit.
When an Interest is received from another forwarder, the HopLimit
MUST be positive. A forwarder MUST decrement the HopLimit of an
Interest by at least 1 before it is forwarded.
If the HopLimit equals 0, the Interest MUST NOT be forwarded to
another forwarder; it MAY be sent to a publisher application or
serviced from a local Content Store.
Mosko, et al. Expires September 8, 2018 [Page 15]
Internet-Draft CCNx Semantics March 2018
2.4.2. Interest Aggregation
Interest aggregation is when a forwarder receives an Interest message
that could be satisfied by another Interest message already forwarded
by the node so the forwarder suppresses the new Interest; it only
records the additional previous hop so a Content Object sent in
response to the first Interest will satisfy both Interests.
CCNx uses an Interest aggregation rule that assumes the
InterestLifetime is akin to a subscription time and is not a network
round trip time. Some previous aggregation rules assumed the
lifetime was a round trip time, but this leads to problems of
expiring an Interest before a response comes if the RTT is estimated
too short or interfering with an ARQ scheme that wants to re-transmit
an Interest but a prior interest over-estimated the RTT.
A forwarder MAY implement an Interest aggregation scheme. If it does
not, then it will forward all Interest messages. This does not imply
that multiple, possibly identical, Content Objects will come back. A
forwarder MUST still satisfy all pending Interests, so one Content
Object could satisfy multiple similar interests, even if the
forwarded did not suppress duplicate Interest messages.
A RECOMMENDED Interest aggregation scheme is:
o Two Interests are considered 'similar' if they have the same Name,
KeyIdRestr, and ContentObjectHashRestr.
o Let the notional value InterestExpiry (a local value at the
forwarder) be equal to the receive time plus the InterestLifetime
(or a platform-dependent default value if not present).
o An Interest record (PIT entry) is considered invalid if its
InterestExpiry time is in the past.
o The first reception of an Interest MUST be forwarded.
o A second or later reception of an Interest similar to a valid
pending Interest from the same previous hop MUST be forwarded. We
consider these a retransmission requests.
o A second or later reception of an Interest similar to a valid
pending Interest from a new previous hop MAY be aggregated (not
forwarded).
o Aggregating an Interest MUST extend the InterestExpiry time of the
Interest record. An implementation MAY keep a single
InterestExpiry time for all previous hops or MAY keep the
Mosko, et al. Expires September 8, 2018 [Page 16]
Internet-Draft CCNx Semantics March 2018
InterestExpiry time per previous hop. In the first case, the
forwarder might send a Content Object down a path that is no
longer waiting for it, in which case the previous hop (next hop of
the Content Object) would drop it.
2.4.3. Content Store Behavior
The Content Store is a special cache that sits on the fast path of a
CCNx forwarder. It is an optional component. It serves to repair
lost packets and handle flash requests for popular content. It could
be pre-populated or use opportunistic caching. Because the Content
Store could serve to amplify an attach via cache poisoning, there are
special rules about how a Content Store behaves.
1. A forwarder MAY implement a Content Store. If it does, the
Content Store matches a Content Object to an Interest via the
normal matching rules (see Section 9).
2. If an Interest has a KeyIdRestr, then the Content Store MUST NOT
reply unless it knows the signature on the matching Content
Object is correct. It may do this by external knowledge (i.e.,
in a managed network or system with pre-populated caches) or by
having the public key and cryptographically verifying the
signature. If the public key is provided in the Content Object
itself (i.e., in the PublicKey field) or in the Interest, the
Content Store MUST verify that the public key's SHA-256 hash is
equal to the KeyId and that it verifies the signature. A Content
Store MAY verify the digital signature of a Content Object before
it is cached, but it is not required to do so. A Content Store
SHOULD NOT fetch keys over the network. If it cannot or has not
yet verified the signature, it should treat the Interest as a
cache miss.
3. If an Interest has an ContentObjectHashRestr, then the Content
Store MUST NOT reply unless it knows the the matching Content
Object has the correct hash. If it cannot verify the hash, then
it should treat the Interest as a cache miss.
4. It must object the Cache Control directives (see Section 4).
2.4.4. Interest Pipeline
1. Perform the HopLimit check (see Section 2.4.1).
2. Determine if the Interest can be aggregated, as per
Section 2.4.2. If it can be, aggregate and do not forward the
Interest.
Mosko, et al. Expires September 8, 2018 [Page 17]
Internet-Draft CCNx Semantics March 2018
3. If forwarding the Interest, check for a hit in the Content Store,
as per Section 2.4.3. If a matching Content Object is found,
return it to the Interest's previous hop. This injects the
Content Store as per Section 2.4.5.
4. Lookup the Interest in the FIB. Longest prefix match (LPM) is
performed name segment by name segment (not byte or bit). It
SHOULD exclude the Interest's previous hop. If a match is found,
forward the Interest. If no match is found or the forwarder
choses to not forward due to a local condition (e.g.,
congestion), it SHOULD send an InterestReturn message, as per
Section 10.
2.4.5. Content Object Pipeline
1. It is RECOMMENDED that a forwarder that receives a content object
check that the Content Object came from an expected previous hop.
An expected previous hop is one pointed to by the FIB or one
recorded in the PIT as having had a matching Interest sent that
way.
2. A Content Object MUST be matched to all pending Interests that
satisfy the matching rules (see Section 9). Each satisfied
pending Interest MUST then be removed from the set of pending
Interests.
3. A forwarder SHOULD NOT send more then one copy of the received
Content Object to the same Interest previous hop. It may happen,
for example, that two Interest ask for the same Content Object in
different ways (e.g., by name and by name an KeyId) and that they
both come from the same previous hop. It is normal to send the
same content object multiple times on the same interface, such as
Ethernet, if it is going to different previous hops.
4. A Content Object SHOULD only be put in the Content Store if it
satisfied an Interest (and passed rule #1 above). This is to
reduce the chances of cache poisoning.
3. Names
A CCNx name is a composition of name segments. Each name segment
carries a label identifying the purpose of the name segment, and a
value. For example, some name segments are general names and some
serve specific purposes, such as carrying version information or the