Designing Cuckoo Based Pending Interest Table for CCN Networks

— Content Centric Networking (CCN) is a modern architecture that got wide attention in the current researches as a substitutional for the current IP-based architecture. Many studies have been investigated on this novel architecture but only little of them focused on Pending Interest Table (PIT) which is very important component in every CCN router. PIT has fundamental role in packet processing in both upstream process (Interest packets) and downstream process (Data packets). PIT must be fast enough in order to not become an ob-struction in the packet processing and also it must be big enough to save a lot of incoming information. In this paper, we suggest a new PIT design and implementation named CF-PIT for CCN router. Our PIT design depends on modifying and utilizing an approximate data structure called Cuckoo filter (CF). Cuckoo filter has ideal characteristics like: high insertion/query/deletion performance, acceptable storage demands and false positive probability which make it with our modification convenient for PIT implementation. The experimental results showed that our CF-PIT design has high performance in different side of views which make it very suitable to be implemented on CCN routers.


Introduction
Content Centric Networks (CCN) is a new paradigm that aims to dominate the restrictions that are exist in the present network paradigm [1]. The concept of communication in CCN is requester-driven [2,3]. A requester (i.e., consumer) transmits out an Interest packet, which holds a CCN name that identify, uniquely, the required data [4].
The role of PIT in any CCN router is to remember these CCN names and from which port the Interest packet comes in. When this Interest packet reach the content provider, the latter will respond by sending back the requested data in a Data packet [5]. Whenever Data packet reaches any CCN router, the latter will search its PIT for the CCN name in order to retrieve its associated port number (which already requested this data) and send this Data packet back through this port [6]. Later, CCN router will remove this CCN name from its PIT because it has been satisfied [7]. So, when ing Name Component Encoding (NCE) technique to encode the CCN names in order to minimize PIT size. The main limitations of this technique are: the need to dedicated encoding algorithm, the need to utilize more sophisticated architecture to ensure PIT size minimization, extra utilization of memory space, and difficult to collect statistics that are necessary to overcome some kinds of attacks. DiPIT [13] has been suggested later to improve the achievement of PIT. This technique depends on utilizing several counting Bloom filters (CBFs) one filter for every port inside CCN router. Moreover, it employs a central/shared CBF that holds the information of all CCN names that arrive from all ports. The central filter has been utilized in order to minimize the false positive ratio of BFs and to ensure information consistency. DiPIT has several drawbacks: it utilizes five hash functions and, so, will result in doing extra calculations and extra memory accesses, the high false positive probability of Bloom filters, the utilization of counting Bloom filters requires extra memory usage to support delete operation, and also the additional overhead that result from the central/shared Bloom filter to ensure information consistency. The authors of [14] focus on compressing PIT by utilizing one of the variations of Bloom filter which called United Bloom Filter (UBF) to avoid the necessity of elimination to obviate unforeseen exceptions resulted by improper elimination in CBF. The main weaknesses of this method are the inability to handle, correctly, the Interest packet that holds the same CCN names, and the growing delay of CCN name routing. In [15] a novel PIT design technique has been suggested in which fixed-length fingerprints have been employed instead of complete CCN names. It aims to perform packet routing with minimum storage usage. The main obstacles of this technique are inability to overcome PIT overflow, and it cannot cope with the increasing link speed specially in the lookup process. Finally, [16] proposed a new variant of BF named Mapping Bloom Filter (MBF). They employed this new variant to build PIT for CCN router called MaPIT that has the ability to employs the existing faster memory chips. MBF consists of two modules: Index Table (IT) and Packet Store (PS). The main disadvantages of this technique are the need for proceeding algorithm which consumes more memory usage, there is no way to overcome false negative and PIT overflow when they are take place.

CCN background
In contrast to the current networks, the basic variation is that CCN forwards requested contents depending on their names instead of the IP addresses of their hosts [11]. These names are unique and hierarchically structured and have similar structures to the URLs. Interest and Data packets are the fundamental two kinds of packets that are employed in CCN [17,18]. Each of these packets holds a CCN name of the requested/retrieved data. The end host (i.e., the consumer) generates an Interest packet that is forwarded depending on the name of the requested data and, as a response to it, a Data packets will be forwarded back from the original container or from any router on the way between them. There exist three essential data structures in every CCN router: Pending Interest Table (PIT), Forwarding Information Base (FIB), and Content Store (CS) [19]. PIT is used as a reference to the ports that requested the data. FIB is used to get the appropriate port to transmit the Interest packet. CS represents a cashe memory that holds, temporarily, some the retrieved data [20]. Whenever an Interest packet access the router, the latter will examine its content store first and if it found the desired data, it will generate and transmits back, immediately, a Data packet with the desired data. Otherwise, it will register the incoming input port inside its pending interest table without transmitting the Interest packet if the desired data is already registered and it will register the desired name of the data along with its incoming port and will transmit the Interest packet, if not. When a Data packet access the router, it will transmit back this packet to every port that already registered in its pending interest table if there is such registered ports or it will drop it if not. Also, the router may cashe a copy of the retrieved data to be used in satisfying the latter requests [21,22].

Proposed Pending Interest Table Design
Here, we will present our proposed PIT design for CCN routers in which we focus on making it fast, cost effective, high performance, and space efficient to meet CCN node requirements. Doing lookup operation in O(1) time regardless of PIT size can be considered as the main characteristic that all former PIT design attempts try to satisfy. Our fundamental design for PIT relies on employing a modified version of Cuckoo filter. CF [23] has been employed in many networking applications like: DPI [24], IP search operations [25], packet processing [22] and so on. Every position in the standard Cuckoo filter holds a fingerprint of the inserted element whereas in our modified version of Cuckoo filter for PIT design (we called CF-PIT) we made some modifications. The number of slots in every bucket of CF-PIT is like the number of ports in the CCN router to reflect the incoming port number for every inserted CCN name. Also, rather than storing only one fingerprint in every slot in CF, we will replace this single position by a mini bucket in order to hold more than one fingerprint of the CCN names that arrive from every port. Note that in CCN paradigm the terms interface and port are utilized interchangeably. Figure 1 illustrates the general structure of the proposed CF-PIT.  Figure 2 depicts an example for processing an incoming Interest packet with our proposed CF-PIT that holds 7 buckets and 4 slots (i.e.,4 ports). For every incoming CCN name, incoming Interest packet, the two candidate buckets (b1 and b2) will be calculated and then the specified slot (depending on the incoming port number) in b1 will be accessed. If the mini bucket inside this slot has a vacant entry, then the fingerprint for this CCN name will be inserted. Otherwise, the same slot number in bucket b2 will be accessed and also if its mini bucket has a vacant entry the fingerprint will be inserted and if not the relocation process will take place to find an empty place to insert this fingerprint. In our example in Fig. 3 the incoming port is (2) and the fingerprint (F) has been stored in b1 because it has a vacant entry.  incoming Data packet, the two candidate buckets (b1 and b2) will be calculated and then all slots in b1 and b2 will be accessed looking for the fingerprint of this incoming CCN name. If there is a match with any slot, then the incoming Data packet will be transmitted back to the specified port depending on the number of slots that hold the fingerprint. In our example in figure 3 the fingerprint has been found in b1 in slot 1 and slot 4 and, thus, the Data packet will be sent back through both port 1 and port 4. Then, the fingerprint will be deleted from these two slots. Here, in our discussion, we will concentrate on the main job of PIT in the CCN router and neglect the other operations that occur in both (CS) and (FIB). Remember that PIT deals with two kinds of streams, upstream (Interest packets) and downstream (Data packets). When an incoming Interest packet arrives at any port of CCN node, the CCN name will be matched against PIT and here there will be three scenarios. First, if this CCN name is already inserted into the PIT from the same interface, which means that the same interface demanded the same data twice, then the incoming Interest packet will be dropped. Second, if this CCN name is not already inserted in the PIT then this name will be inserted into PIT with its incoming port number. Second, if this CCN name is already inserted into PIT (but with different interface) then only the incoming port number will be registered inside PIT. Algorithm 1 illustrates the main steps for handling an incoming Interest packet based on our PIT design (CF-PIT).

Algorithm 1: Handling of Interest Packet
1 Input: incoming CCN name (N), incoming port (p); 2 fin = getfingerprint(N); 3 b1 = gethash(N); 4 b2 = b1 Å gethash(fin); 5 if (either bucket (b1 or b2) has an entry in its mini bucket in slot number (p) that already holds fin) then 6 Drop Interest packet; 7 Exit; 8 if (either bucket (b1 or b2) has an empty entry in its mini bucket in slots number (p)) then 9 insert fin to this mini bucket; 10 exit; 11 else 12 // Else, perform a relocation; 13 b = select randomly between (b1 and b2); 14 for i ¬ 0 to maximum number of attempts do 15 Select an entry (e) randomly inside the mini bucket from bucket (b) slot (p); 16 swap fin and the fingerprint saved in entry e; 17 b = b Ågethash(fin); 18 if bucket(b) has an empty entry in its mini bucket in slot number (p) then 19 insert fin to this mini bucket; 20 //Otherwise PIT is full; Algorithm 1 explained how to deal with an Interest packet that reach to the CCN router from port number (p). First, the fingerprint and the indices to the two indicated buckets of CCN name is calculated. Next, if either of these two indicated buckets have an entry that holds fin in the same incoming port (i.e., p) then the incoming Interest packet will be dropped because this port is already requested this content. Latter, if either of these two indicated buckets have an empty entry in their mini buckets of slot number (p) then the fingerprint of CCN name will be inserted. Otherwise, just like the standard Cuckoo filter does, a relocation must be performed to make an empty entry to insert this fingerprint.
Whenever a Data packet comes from any port, the CCN name is checked against CF-PIT to specify all ports that already requested this Data packet. Thus, satisfying these Interests by sending back the Data packet through these ports. The main steps for dealing with an incoming Data packet are depicted in Algorithm 2. Specify port numbers depending on slot numbers; 10 Send Data packet back through all these ports; 11 Delete fin from these entries; 12 Exit; Algorithm 2 presented the main steps that must be followed when a Data packet access the CCN router. First, the fingerprint and the indices to the two candidate buckets of CCN name is calculated. Next, if both buckets have no entry that holds the fingerprint of the incoming CCN name then the incoming Data packet will be dropped. The latter situation occurs when the fingerprint has been removed from PIT because it was stay in the PIT for a period that exceed the predefined threshold. Latter, if the previous situation does not occur, the fingerprint is examined against the mini buckets in all the slots in these two candidate buckets in order to specify the number of ports that already requested that Data packet. Then the incoming Data packet will be sent back through all these ports and, finally, the fingerprint of CCN name will be deleted from all these slots (because it has been satisfied).

Results and Discussions
Here, we will debate our evaluation for the proposed CF-PIT aiming to evince the competence of our suggested technique. We utilized ndnSIM [26], an open-source package, which performs CCN protocol stack for NS-3 simulator. In our evaluation, a standard dataset has been utilized. It has been gotten from an open-source store website [27] which holds datasets of CCN [28,29] names in different sizes and formats which are gathered from URLs or by tracing web pages. Four previously proposed PIT design techniques: DiPIT [13], CBFPIT [14], MaPIT [16], and NCE [30] have been utilized in our evaluation.

5.1
Memory usage Figure 4 depicts the memory usage for all techniques in terms of the arriving CCN names. NCE utilizes trie structure which causes CCN names in the PIT strongly systematic and simple to administrate, despite that, it has no ability to participate much to decreasing PIT storage or noticeably increasing PIT access achievement. DiPIT utilizes several counting Bloom filters (CBF) in a distributed manner (one filter for every port) along with a main counting Bloom filter that is shared among all ports. Also, MaPIT consumes larger storage than CF-PIT because of its extra utilization of counting BF. CF-PIT consumes smaller amount of memory than the previous three techniques but little larger than of CBFPIT because it needs to store the fingerprints of CCN names in only one data structure. This little storage requirements of CBFPIT comes with extra degradation for the performance.  Figure 5 illustrates the false positive probability for all techniques with different number of CCN names. It can be noticed that the false positive average of CF-PIT is considerably less than the false positive average of both DiPIT and NCE. DiPIT utilizes Bloom filter as its main data structure and it has high false positive rate. NCE tries to specify code allocation for CCN names which results in false positive in determining some of these CCN names. Because of the compression operation that has been utilizes in CBFPIT, the false positive rate of it will be higher than all the other techniques.

Memory accesses
DiPIT, CBFPIT, and MaPIT techniques utilize several CBFs in a distributed manner and it employs five hash functions which results in five memory accesses to accomplish element insertion/query and deletion. Moreover, along with these CBFs, it utilizes a main CBF (shared among all ports) which also employs the same number of hashes which make it expends additional memory accesses. NCE is built on utilizing trie structure which requires traversing this trie beginning from root node down to each part of CCN name. CF-PIT can perform CCN name insertion/query/deletion and regain its port number in O(1) time and, thus, it consumes lower memory accesses comparing with the other two mechanisms.

5.4
Insertion performance Figure 6 depicts the insertion performance for all techniques. DiPIT, CBFPIT, and MaPIT employ counting Bloom filter with five hash functions for every insertion which consume extra calculation. Also, it needs to insert the CCN name in both the counting Bloom filter on the incoming port and the central/shared counting BF. NCE utilizes trie structure and, so, every insertion needs extra work to access the right node starting from the root node. CF-PIT has the ability to perform CCN name insertion faster than the other two techniques because of its simple structure.

Lookup performance
The lookup performance for all techniques can be found in figure 7 CF-PIT has the ability to access the required CCN name directly with simple calculation. DiPIT and MaPIT needs to do extra calculation to check the existence of CCN name because it needs to examine five positions (with one hash function to access every position). The compression operation that has been utilizes in CBFPIT will add extra burden on the insertion achievement of this technique. NCE requires examining the trie structure starting from rote node moving down to reach the required leaf node.

5.6
Delete performance Figure 8 illustrates the delete performance for all techniques. Deleting CCN name from NCE involves visiting the trie nodes starting from root node to access the required leaf node. Then the delete operation is accomplished by backtracking the way to check if the parent node still requires to be eliminated, and so on. DiPIT requires subtracting one from every position from the five counting Bloom filter positions. Moreover, it also needs to make this update on the central/shared counting Bloom filter. CBFPIT and MaPIT need to do extra calculations to access the CCN to be deleted. Whereas, CF-PIT has the ability to access and delete the required CCN name directly with simple calculations.

PIT security
The proposed CF-PIT has been designed to confront the worst-case flow balance situation in order to dominate an Interest flooding attack. CF-PIT provides a straightdirect way for collecting the necessary statistics on the routers to detect any offensive and then enforce appropriate procedures. Moreover, CF-PIT has the ability to deal with the Interest flooding issue by its architecture that stores fingerprints only which make it sufficiently huge to store the entire flooded packets. Nevertheless, the storage demand may still be reasonable because just a fingerprint with a fixed-length is saved for every CCN name.

Conclusion
CCN is a new promising networking architecture, which has the ability to increase the process of content delivery. PIT is one of the main parts of the CCN routers that plays crucial rule in the content delivery process. Fast and scalable PIT design is a challenge in CCN. In this paper, we proposed PIT design for CCN router that ensures fast packet transforming and substantially minimizes the storage usage by saving fingerprints instead of CCN names. Our design depends on utilizing our modified version of CF as a fundamental structure to save the fingerprint for the CCN names (called CF-PIT). CF-PIT architecture has reasonable memory specification and high insertion/query/deletion performance with minimum false positive probability. Our promising results discovered that the proposed PIT can meet the major demands of designing an effective PIT.