WIRE-SPEED PENDING INTEREST TABLE
Various embodiments relate to a method performed by a router. The method may include: receiving, at a first line card of the router, a request for content having a content identifier; determining a second line card that is responsible for the content identifier; switching the request for content to the second line card; and updating a pending interest table at the second line card based on the request for content. Various embodiments relate to a router for content based routing that receives a plurality of requests for contents including a content identifier. The router may include: a fabric switch; and a plurality of line cards interconnected by the fabric switch, each line card includes a network processor and a pending interest table configured to store entries for a subset of the requests defined by the content identifier.
1 . A method performed by a router, the method comprising:
receiving, at a first line card of the router, a request for content having a content identifier;
determining a second line card that is responsible for the content identifier;
switching the request for content to the second line card;
updating a pending interest table at the second line card based on the request for content.
2 . The method of claim 1 , wherein the step of determining a second line card comprises:
hashing the content identifier to obtain a content hash; and
performing a modulus operation on the content hash based on a number of line cards in the router.
3 . The method of claim 1 , wherein the step of updating the pending interest table comprises:
determining that the pending interest table does not include an entry for the content identifier;
creating a new pending interest table entry including the content identifier and the first line card; and
forwarding the request for content based on the content identifier.
4 . The method of claim 3 , further comprising: forwarding the request for content to a plurality of the line cards.
5 . The method of claim 1 , wherein the step of updating the pending interest table comprises:
determining that the pending interest table already includes an entry for the content; and
updating the pending interest table entry with the first line card.
6 . The method of claim 1 , further comprising:
receiving, at a third line card, data responsive to the request for content having the content identifier;
determining that the second line is responsible for the data based on the content identifier;
switching the data to the second line card;
looking up a pending interest table entry in the pending interest table based on the content identifier;
identifying the first line card that received a request for the content based on the pending interest table entry;
forwarding the data responsive to the request from the first line card; and
deleting the pending interest table entry from the pending interest table.
7 . The method of claim 6 , wherein the step of forwarding the data responsive to the request from the first line card comprises:
determining that a plurality of line cards, including the first line card, received a request for the content based on the pending interest table; and
multicasting the data responsive to the request from the plurality of line cards indicated by the pending interest table.
8 . The method of claim 1 , wherein the pending interest table is a d-left open-addressed hash-table.
9 . The method of claim 1 , wherein the pending interest table comprises a plurality of pending interest table entries, each entry including: a content identifier, an expiration time, a nonce, and a list of line cards.
10 . The method of claim 1 , further comprising:
storing a nonce included in the request for content in the pending interest table;
receiving a second request for the content having the content identifier;
determining that the second request includes the nonce stored in the pending interest table; and
determining that the second request has looped back to the router.
11 . A router for content based routing that receives a plurality of requests for contents, each including a content identifier, the router comprising:
a fabric switch; and
a plurality of line cards interconnected by the fabric switch, each line card comprising a network processor and a pending interest table configured to store entries for a subset of the requests defined by the content identifier,
wherein the network processor of a line card that receives a request is configured to determine which line card of the plurality of line cards is configured to process the received request based on the content identifier.
12 . The router of claim 11 , wherein the network processor is configured to hash the content identifier included in a received request and perform a modulus operation on the hash result to determine the line card configured to process the received request.
13 . The router of claim 11 , wherein the pending interest table comprises a plurality of pending interest table entries, each entry including: a content identifier, an expiration time, a nonce, and a list of line cards.
14 . The router of claim 11 , wherein the pending interest table of a line card is smaller than a cache of the network processor.
15 . The router of claim 11 , wherein the pending interest table is an open-addressed d-left hash table.
16 . The router of claim 11 , further comprising a forwarding table including a mapping of content identifiers to interfaces.
17 . The router of claim 16 , wherein each line card is configured to:
receive a request for content from a first line card via the fabric switch;
update the pending interest table of the line card with the content identifier and an identifier of the first line card; and
forward the request for content based on an interface indicated by the forwarding information base for the content identifier.
18 . The router of claim 17 , wherein each line card is further configured to:
receive content data responsive to a request for content, the content data including a content identifier; and
determine which line card of the plurality of line cards is configured to process the received content data based on the content identifier.
19 . The router of claim 18 , wherein each line card is further configured to:
receive the content data responsive to a request for content from the third line card via the fabric switch;
determine the first line card based on the content identifier and the pending interest table; and
forward the content data to the first line card.