ece 544 project 3 content-based routing - winlab · 2015-03-04 · assumptions and address scheme...

33
ECE 544 Project 3 Aishwarya Babu Rakesh Ravuru Sudarshan Kandi Content-based Routing

Upload: others

Post on 09-May-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

ECE 544 Project 3

Aishwarya BabuRakesh Ravuru

Sudarshan Kandi

Content-based Routing

Page 2: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

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

Page 3: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

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.

Page 4: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

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

Page 5: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

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

Page 6: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

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

Page 7: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

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)

Page 8: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

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

Page 9: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

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)

Page 10: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

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)

Page 11: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

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)

Page 12: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

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)

Page 13: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

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

Page 14: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

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

Page 15: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

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

Page 16: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

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

Page 17: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

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

Page 18: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

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)

Page 19: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

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)

Page 20: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

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)

Page 21: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

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

Page 22: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

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

Page 23: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

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

Page 24: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

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

Page 25: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

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

Page 26: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

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

Page 27: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

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

Page 28: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

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

Page 29: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

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

Page 30: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

Baseline Algorithm

H1

H2

H3

C1 C2C3

R1R2 R3

R4

R5

C2

● Disconnected node

ADH 0 0 .. 0

H2 Update Advertisement

Page 31: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

Baseline Algorithm

H1

H2

H3

C1 C2C3

R1R2 R3

R4

R5

C2

● Disconnected node

ADR 1 3 inf 4

R5 Update Advertisement

Page 32: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

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

Page 33: ECE 544 Project 3 Content-based Routing - WINLAB · 2015-03-04 · Assumptions and Address Scheme Assumptions End hosts can only connect to routers Each host is directly connected

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