ece 544 project 3 content-based routing - winlab · 2015-03-04 · assumptions and address scheme...
TRANSCRIPT
ECE 544 Project 3
Aishwarya BabuRakesh Ravuru
Sudarshan Kandi
Content-based Routing
Assumptions and Address Scheme
● Assumptions● End hosts can only connect to routers● Each host is directly connected to single router● Same content available at multiple end nodes● When new node is added, connections are setup● Topology cannot change, content can.
● Addressing ● Content ID based addressing ● No dependence on IP address● Hosts identified by router port numbers
Bootstrapping and Discovery
● Algorithm● Routers and end hosts exchange
advertisements at boot up and when contents change
● Distance vector based
● Discovery● Routers already know about other routers and
hosts.
Baseline Algorithm
● Content routing algorithm● 2 Tables maintained at router
● Routing table to process requests● Request tables to process responses
● Size of tables fixed ● Tables are based on Interface numbers and Content
IDs
Content ID Out Interface/ Port # of Hops
C1 34 3
C2 25 4
... ...
C255 34 3
Routing Table
● Content ID is the “Key” of this table ● Out Interface/ Port indicates direction to forward the request of Content ID● # of hops is the minimum number of hops from the router to the content.● Lowest hop count is maintained for any given content ID.● Size of the table is limited to the number of Content IDs● If packet header = REQ, consult Routing table
Baseline Algorithm
In Port/ Interface Request Content ID Flag
0 C7 1
1 C9 0
... ... ...
255 C7 0
Request Table
● In Port/ Interface is the “Key” of this table ● Request Content ID maintains request - interface mapping● Flag indicates if the request is still active and accordingly multicasts response● Size of the table is limited to the number of Ports● If packet header = RES, consult Request Table
Baseline Algorithm
Baseline Algorithm
● Advantages● 2 fixed sized tables
No need for dynamically resizing tables
● Request table has one table row dedicated to each port/ interface
● Avoids overwriting/ merging issues when multiple threads access the same resource (request table)
Baseline Algorithm● Request - H1: get(C2)
H1
H2
H3
C1 C2C3
R1 R2 R3 R4
R5
C2
0 1 0 1 1 10 0
0
1
2
Baseline Algorithm
H1
H2
H3
C1 C2C3
R1 R2 R3 R4
R5
C2
0 1 0 1 1 10 0
0
1
2
Interf CID Flag
0 C2 1
... ... ...
● Request - H1: get(C2)
Baseline Algorithm
H1
H2
H3
C1 C2C3
R1R2 R3
R4
R5
C2
0 1 0 1 1 10 0
0
1
2
Interf CID Flag
0 C2 1
... ... ...
Interf CID Flag
0 C2 1
... ... ...
● Request - H1: get(C2)
Baseline Algorithm
H1
H2
H3
C1 C2C3
R1R2 R3
R4
R5
C2
0 1 0 1 1 10 0
0
1
2
Interf CID Flag
0 C2 1
... ... ...
Interf CID Flag
0 C2 1
... ... ...
Interf CID Flag
0 C3 0
1 C2 1
... … ...
● Request - H1: get(C2)
Baseline Algorithm
H1
H2
H3
C1 C2C3
R1R2 R3
R4
R5
C2
0 1 0 1 1 10 0
0
1
2
Interf CID Flag
0 C2 1
... ... ...
Interf CID Flag
0 C2 1
... ... ...
Interf CID Flag
0 C3 0
1 C2 1
... … ...
● Request - H1: get(C2)
Baseline Algorithm
H1
H2
H3
C1 C2C3
R1R2 R3
R4
R5
C2
0 1 0 1 1 10 0
0
1
2
Interf CID Flag
0 C2 1
... ... ...
Interf CID Flag
0 C2 1
... ... ...
Interf CID Flag
0 C3 0
1 C2 1
... … ...
● Response
Baseline Algorithm
H1
H2
H3
C1 C2C3
R1R2 R3
R4
R5
C2
0 1 0 1 1 10 0
0
1
2
Interf CID Flag
0 C2 1
... ... ...
Interf CID Flag
0 C2 1
... ... ...
Interf CID Flag
0 C3 0
1 C2 0
... … ...
● Response
Baseline Algorithm
H1
H2
H3
C1 C2C3
R1R2 R3
R4
R5
C2
0 1 0 1 1 10 0
0
1
2
Interf CID Flag
0 C2 1
... ... ...
Interf CID Flag
0 C2 0
... ... ...
Interf CID Flag
0 C3 0
1 C2 0
... … ...
● Response
Baseline Algorithm
H1
H2
H3
C1 C2C3
R1R2 R3
R4
R5
C2
0 1 0 1 1 10 0
0
1
2
Interf CID Flag
0 C2 0
... ... ...
Interf CID Flag
0 C2 0
... ... ...
Interf CID Flag
0 C3 0
1 C2 0
... … ...
● Response
Baseline Algorithm
Content ID Out Interface/ Port # of Hops
C1 32 3
C2 11 4
... ... ...
C255 15 3
Multiple requests
In Port/ Interface Request Content ID Flag
0 C2 1
1 C2 1
... ... ...
255 C7 0
Baseline Algorithm
H1
H2
H3
C1 C2C3
R1 R2 R3 R4
R5
C2
0 1 0 1 1 10 0
0
1
2
Interf CID Flag
0 C2 0
2 C1 0
● Request - H1: get(C3)
Baseline Algorithm
H1
H2
H3
C1 C2C3
R1 R2 R3 R4
R5
C2
0 1 0 1 1 10 0
0
1
2
Interf CID Flag
0 C3 1
2 C1 0
● Request - H1: get(C3)
Baseline Algorithm
H1
H2
H3
C1 C2C3
R1 R2 R3 R4
R5
C2
0 1 0 1 1 10 0
0
1
2
Interf CID Flag
0 C3 1
2 C1 0
● Request - H2: get(C3)
Baseline Algorithm
H1
H2
H3
C1 C2C3
R1 R2 R3 R4
R5
C2
0 1 0 1 1 10 0
0
1
2
Interf CID Flag
0 C3 1
2 C3 1
● Response
Baseline Algorithm
H1
H2
H3
C1 C2C3
R1 R2 R3 R4
R5
C2
0 1 0 1 1 10 0
0
1
2
Interf CID Flag
0 C3 1
2 C3 1
● Response
Baseline Algorithm
H1
H2
H3
C1 C2C3
R1 R2 R3 R4
R5
C2
0 1 0 1 1 10 0
0
1
2
Interf CID Flag
0 C3 0
2 C3 0
● Response
Baseline Algorithm
H1
H2
H3
C1 C2C3
R1 R2 R3 R4
R5
C2
0 1 0 1 1 10 0
0
1
2
Interf CID Flag
0 C3 0
2 C3 0
● Response
Packet Formats
● Content updating algorithm● Send ADX packet to all neighbors only when the node
undergoes an update (i.e change in routing table)
● Message Types:▪ ADR – Advertisement Router▪ ADH – Advertisement Host▪ RES – Response▪ REQ – Request
Packet Formats
ADR / ADH
1 4 8 …….. 3 2 1 5 3
3 Bytes 1 bit 256 Bytes
Type RT Flag Hop Count
REQ ‘Get CID’
Type CID PayloadType Message
3 Bytes 1 Byte 3 Bytes 1 Byte 1496 Bytes
‘RES’ CID Content Data
ADH Alternative
3 Bytes 32 bytes
Type Content
● Content field contains 256 bits● Each bit represents the presence of or lack of the said
content.● Hop count will only exist for those contents listed as ‘1’.● Works best for host advertisements who are less likely to
host the entire library (0 < CID < 255)
ADH Binary
Data Transfer and Reliability
● Periodic “hello” packets ● To indicate that node is still “alive” it sends a
small hello packet periodically to it’s neighbors and expects a hello packet back
● If no Hello for certain time resend a hello packet and if no response after fixed tries/ time out, update routing table to NULL/ inf and then advertise
Data Transfer and Reliability
● Message Forward● Multicast when multiple Content ID entries
● ARQ Scheme ● End-to-end● Stop-and-wait; receiver requests content again.● To avoid caching at the router
Baseline Algorithm
H1
H2
H3
C1 C2C3
R1R2 R3
R4
R5
C2
● Disconnected node
ADH 0 0 .. 0
H2 Update Advertisement
Baseline Algorithm
H1
H2
H3
C1 C2C3
R1R2 R3
R4
R5
C2
● Disconnected node
ADR 1 3 inf 4
R5 Update Advertisement
C2
Baseline Algorithm
H1
H2
H3
C1 C2C3
R1R2 R3
R4
R5
● Disconnected node
ADR 0 2 3 3
R2 Update Advertisement
R5 Update Advertisement
ADR 1 3 inf 4
Baseline Algorithm
H1
H2
H3
C1 C2C3
R1R2 R3
R4
R5
● Disconnected node
ADR 0 3 4 4
R5 Update Advertisement
ADR 0 2 3 3
R2 Update Advertisement
C2