Top Banner
Project3 Malabika Das Prajna Setty Preeti Rao
20

Project3 Malabika Das Prajna Setty Preeti Rao. Assumptions and Address Scheme Assumptions End hosts can only connect to one router and knows which router.

Dec 16, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Project3 Malabika Das Prajna Setty Preeti Rao. Assumptions and Address Scheme Assumptions End hosts can only connect to one router and knows which router.

Project3Malabika DasPrajna SettyPreeti Rao

Page 2: Project3 Malabika Das Prajna Setty Preeti Rao. Assumptions and Address Scheme Assumptions End hosts can only connect to one router and knows which router.

Assumptions and Address Scheme• Assumptions

• End hosts can only connect to one router and knows which router it is connected to.

• Content copies can be shared between hosts• Every router has at most 4 ports• New routers can connect to atmost one router in the network• All the input ports have input queues and output ports have output

queues• Total number of contents, hosts and routers- 255 each• There is no centralized server• Every router requires approx 75kB memory for their routing table• Every ARP table requires a memory area of 3.7kB• The maximum time taken for a message to reach the farthest host is

around 10ms (MaxRTT=20ms)

Page 3: Project3 Malabika Das Prajna Setty Preeti Rao. Assumptions and Address Scheme Assumptions End hosts can only connect to one router and knows which router.

• Naming Scheme & Address Scheme• End Hosts and Routers- Have a unique MAC address

and a unique 9bit network address (511 address spaces + 111111111 for broadcast messages)

• Host network addresses referred to as H1, H2… H255• Router network addresses referred to as R1, R2….

R255• Every Host is assigned with a network address by the

router it is connecting to at startup• Content ID- 256 CIDs (serial numbers) available as a

list at every host. (C1, C2…. C256)• Randomly picks the ID from the table based on an

algorithm and assigns to a new content

Page 4: Project3 Malabika Das Prajna Setty Preeti Rao. Assumptions and Address Scheme Assumptions End hosts can only connect to one router and knows which router.

Bootstrapping and Discovery• Routers and hosts boot up- tables that need to be

initialized

Page 5: Project3 Malabika Das Prajna Setty Preeti Rao. Assumptions and Address Scheme Assumptions End hosts can only connect to one router and knows which router.

• Routers discover neighboring routers - Network address is assigned & ARP table is populated and copied to the new router

• Hosts discovering router: Attached router assigns a network address from its pool of available addresses & informs the host.

• Periodic “I am alive” message exchange

Initialisation of the network

Page 6: Project3 Malabika Das Prajna Setty Preeti Rao. Assumptions and Address Scheme Assumptions End hosts can only connect to one router and knows which router.

● Failure of a host and revival/ Joining of a new host○ Population of ARP Table of Router○ Request for “CID column” from attached router -

BootUp packet○ Updates its content ID table ○ Eliminates the need for a new host to learn and

update its table over time.

● Failure of a router and revival/ Joining of a new router○ Population of ARP Table of Router○ Request for 2nd and 3rd columns from attached

routers - through BootUp packet○ Updates its 2nd column with the used contentIDs.○ Updates third column, by keeping those nodes which

are connected directly to it.

Page 7: Project3 Malabika Das Prajna Setty Preeti Rao. Assumptions and Address Scheme Assumptions End hosts can only connect to one router and knows which router.

Baseline Algorithm to choose unique content IDs• Content ID table at every host:

• Contains complete list of available content IDs (001 - 256)• Used content IDs are marked as 1; Unused are available for

future use;• Content files whose copies are present on host are marked

with local name of file;

Page 8: Project3 Malabika Das Prajna Setty Preeti Rao. Assumptions and Address Scheme Assumptions End hosts can only connect to one router and knows which router.

• Suppose two hosts contend for the same Content_ID.

Page 9: Project3 Malabika Das Prajna Setty Preeti Rao. Assumptions and Address Scheme Assumptions End hosts can only connect to one router and knows which router.

• Advertising Content IDs:•Generation and Receipt of a content must be advertised/broadcast.

•announce(contentID, Host address)•Routers update their routing tables with the content ID and nearest nodes’(having access to that contentID) network address.

Page 10: Project3 Malabika Das Prajna Setty Preeti Rao. Assumptions and Address Scheme Assumptions End hosts can only connect to one router and knows which router.

Routing of content request packet:

At each router:

1. The immediate requesting node is populated against (i.e. prev column) the content ID being requested

2. From the list of immediately available nodes attached to the content, ping to know if the content still available

3. Choose the node with fastest ACK within the timer period.

4. Populate the last column with this node, and stop timer.

5. If ACK received at the same time, choose the one with the lower network address.

6. If No ACK is received within the timer period, perform re-ping.

Routing of the content itself:

At each router:

7. Already populated table is used

8. Read in the reverse order.

9. Tracing the path back to the requesting host.

Page 11: Project3 Malabika Das Prajna Setty Preeti Rao. Assumptions and Address Scheme Assumptions End hosts can only connect to one router and knows which router.

getContent(C1) {1. (refer second column of Routing table looking for C1)2. Get the list of nodes having the content: as in 3rd column of the

table; (say H, R2, H3)3. ping each of those nodes asking if they still have access to the

content or not;4. Keep those nodes which reply with an ACK; (Say R2 and H3)5. Eliminate the Host from the table after timeout for receipt of

ACK; (Say H1)6. If one node’s ACK reaches before another, consider that as next

hop. If 2 ACKs reach at the same time, choose one which has lower network address. No ACK requires re-pinging.

7. Consider H3’s ACk reaches earliest, choose H3 as next hop;8. H3 loads contents into the DATA packet;9. Rerouted back using the same routing procedure;10.Once the requesting host receives the data, it broadcasts to the

network the receipt. and accordingly, the data is updated in all the routing tables.

}

Page 12: Project3 Malabika Das Prajna Setty Preeti Rao. Assumptions and Address Scheme Assumptions End hosts can only connect to one router and knows which router.

Packet Datagram

Page 13: Project3 Malabika Das Prajna Setty Preeti Rao. Assumptions and Address Scheme Assumptions End hosts can only connect to one router and knows which router.

Packet Datagram

Page 14: Project3 Malabika Das Prajna Setty Preeti Rao. Assumptions and Address Scheme Assumptions End hosts can only connect to one router and knows which router.

Packet Datagram

Page 15: Project3 Malabika Das Prajna Setty Preeti Rao. Assumptions and Address Scheme Assumptions End hosts can only connect to one router and knows which router.

Packet Datagram

Packet types for data packet

Page 16: Project3 Malabika Das Prajna Setty Preeti Rao. Assumptions and Address Scheme Assumptions End hosts can only connect to one router and knows which router.

Data Transfer and Reliability

● Message Forward● Unicast - Our protocol is optimised for the given

network for unicast only.

● ARQ Scheme● In our scheme, we are using Hop-by-hop

acknowledgment.● Stop-and-wait ARQ scheme is used for reliability

of the network. Failure to receive the ACK or timeout will cause all the routing tables to be updated

Page 17: Project3 Malabika Das Prajna Setty Preeti Rao. Assumptions and Address Scheme Assumptions End hosts can only connect to one router and knows which router.

Advantages and Disadvantages

• Scalability - Currently, the network has limited scalability, as the network address space is limited to 512. To add beyond 256 routers to the network, subnetting can be introduced.

• Latency - Depends on the wait time for the ACK at each router.

Page 18: Project3 Malabika Das Prajna Setty Preeti Rao. Assumptions and Address Scheme Assumptions End hosts can only connect to one router and knows which router.

Example ScenariosAssumption that all links have a weight of 1

H1

H2

H3

C1 C2C3

R1 R2 R3 R4

R5

Scenario 1: @host_H2: get (content_C3)

Page 19: Project3 Malabika Das Prajna Setty Preeti Rao. Assumptions and Address Scheme Assumptions End hosts can only connect to one router and knows which router.

H1

H2

H3

C1

C2

C2

C3

C3

R1 R2 R3 R4

R5

Scenario 2: @host_H1: get (content_C2)

Page 20: Project3 Malabika Das Prajna Setty Preeti Rao. Assumptions and Address Scheme Assumptions End hosts can only connect to one router and knows which router.

H1

C3

Scenario 3: @host_H1: get (content_C1)

H2 H3 H4

C1 C1C2C1