Download presentation
Presentation is loading. Please wait.
1
Viet Nguyen Jianqing Liu Yaqin Tang
ECE 544 Project3 Viet Nguyen Jianqing Liu Yaqin Tang
2
Assumptions and Address Scheme
Each host can only connect to one router Same content available at multiple end nodes If two routers are connected, cost = 1 Naming scheme and eventual address scheme Routers and end hosts: IP Address Contents: ID from 0 to 255
3
Bootstrapping and Discovery
Algorithm Routers boot up - Neighbor router receive broadcast message, send back their IP addresses - Routers add its neighbors to routing table Hosts boot up - Broadcast DHCP requesting packet to - Routers reply with info about default gateway
4
Bootstrapping and Discovery
Routers discover other routers - Sending broadcast message - Add neighbors info into routing table step by step Hosts discover their default router - Through DHCP request
5
Bootstrapping and Discovery
Packet Format - Router boot up packet Type Packet Length Cost Source Router’s IP Address Neighbor Router’s IP Address
6
Bootstrapping and Discovery
Packet Format - Host boot up packet Type Packet Length TTL yiaddr (Default Router’s IP Address) chaddr (16 bytes, Host’s Ethernet Address)
7
Contents Advertisement
A host periodically sends an advertisement message to tell its router about its contents After receiving advertisement message, the router stores both the host’s IP address and its contents into its routing table Destination Cost Next Hop TTL H1 1 C1 C2 C1 C2 H1 R1
8
Content Advertisement packet
Packet type Message Length Number of Contents Host’s IP Address Content ID #1 Content ID #2 …. …
9
Link-state Advertisement packet
Packet type Message Length LS Age Advertising router’s IP Address LS sequence number Number of neighbor routers Neighbor node’s IP Address #1 Neighbor node’s IP Address #2 … Neighbor node’s IP Address #n Number of hosts Host IP Address #1 Host IP Address #2 Host IP Address #3 NumOfContents Content ID #1 Content ID #2
10
Information at each router
Link state table Neighbors table Routing table
11
Link state table (for each router)
Router’s IP Number of neighbor routers List of neighbor routers Number of hosts List of hosts Number of contents List of contents TTL R5 1 R2 H2 C2 2 R1, R5 - @R1 H2 C2 Each router store Link state of OTHER router! C1 R5 H1 R1 R2
12
Neighbor table (for each router)
Number of neighbor routers List of neighbor routers Number of hosts List of hosts Number of contents List of contents 1 R2 H1 C1 @R1 H2 C2 C1 R5 H1 R1 R2
13
Routing table Each router maintains its own routing table
Calculated from Link state table and neighbor table As each host can be either content requester or content provider, routing is based on both content identifiers and host addresses Destination Cost Next Hop H1 1 C1 C2 C1 C2 @R1 H1 R1
14
Routing Protocol We use link-state protocol with reduced message format (Link-state packet - LSP) Routers flood LSPs to all other routers Once a router has a copy of the LSP from every other router, it computes a complete map for the topology of the network, and from this map decide the best routes to each destination Algorithm: Dijkstra’s shortest-path algorithm
15
Routing Protocol (2) LSP also carries a time to live. A node always decrements the TTL of a newly received LSP before flooding it to its neighbors. It also “ages” the LSP while it is stored in the node When the TTL reaches 0, the node refloods the LSP with a TTL of 0, which is interpreted by all the nodes in the networks as a signal to delete that LSP
16
Routing protocol (3) Each router sends “hello” packet to its immediate neighbors at defined intervals. If a sufficiently long time passes without receipt of a “hello” from a neighbor, the link will be declared down, and a new LSP will be generated to reflect this fact.
17
Router - ‘Hello’ Packet
Send to neighbor routers to say “I am alive” Packet type HELLO Message Length Option Router’s IP Address
18
Routing protocol (4) Only generate LSP if:
Timer expires Change in topology (link dies, a neighbor router dies) A change in LSP table or neighbor table causes a router to recalculate the routing table!
19
Host: REQUEST packet format
Packet type (REQUEST) Content ID SeqNum Option Requester’s IP Address Content provider’s IP Address (=0) SeqNum: used for supporting resume download from different content provider
20
How to route a content-request packet (Content discovery)
@host_H1: get (content_C3) H1 sends request to its router R1 C1 C2 C3 H1 R1 R2 R3 H3 get(C3)
21
How to route a content-request packet (Content discovery)
@host_H1: get (content_C3) R1 looks up its routing table for next hop to send Routing R1: Destination Cost Next Hop … C3 3 R2 C1 C2 C3 H1 R1 R2 R3 H3 get(C3)
22
How to route a content-request packet (Content discovery)
@host_H1: get (content_C3) Routing R2: Destination Cost Next Hop … C3 2 R3 C1 C2 C3 H1 R1 R2 R3 H3 get(C3)
23
How to route a content-request packet (Content discovery)
@host_H1: get (content_C3) Routing R3: Destination Cost Next Hop … C3 1 H3 C1 C2 C3 H1 R1 R2 R3 H3 get(C3)
24
How to route a content-request packet (Content discovery)
@host_H1: get (content_C3) Request packet arrived at H3 ! C1 C2 C3 H1 Arrived R1 R2 R3 H3 get(C3)
25
Delivering data After request packet arrived, the host with the needed content start data transfer process. C1 C2 C3 H1 R1 R2 R3 H3 Data transfer
26
Delivering data: Error
If during transfer, the connection dies (router down, link dies, etc.), both the provider and the requester must be able to detect! Proposed method: set limitation on how many times we send the same packets (same sequence number) After detecting dead connection, discard this connection: requester does CONTENT DISCOVERY again, provider STOPS transferring data
27
Delivering data: Error (2)
After retrieving IP address of new content provider, the requester RESUME from the last sequence number Append to the file received from the last provider
28
Data Transfer and Reliability
Message Forward Unicast: ACK & Data transmission Broadcast: boot up & update file ID info DATA Packet Format - TTL: time to live SeqNum: sequence # - Offset: offset regard to fragmented file Type File ID SeqNum TTL Source Address Destination Address Payload (file to be transmitted)
29
Data Transfer and Reliability
Message Forward ACK Packet Format Type File ID SeqNum TTL Source Address (File receiver’s IP Address) Destination Address (File sender’s IP Address)
30
Data Transfer and Reliability
ARQ Scheme End-to-end Routers know the cost of the entire network Selective-repeat - Transmit continuously, no waiting - Receiver ACKs all successfully received packets - Sender only retransmits unACKed packets when their timers expire - buffer needed at both transmitter and receiver
31
Data Transfer and Reliability
Selective- repeat
32
Advantages and Disadvantages
Aspects Good or not Scalability ✔ Latency Bandwidth ✗ Reliability
33
Scenario 1: @host_H2: get (content_C3) H2 C1 C2 R5 C3 H1 R1 R2 R3 R4
34
Scenario 1: @host_H2: get (content_C3) @R1: Destination Cost Next Hop
4 R2 @R1: H2 C1 C2 R5 C3 H1 R1 R2 R3 R4 H3 get(C3)
35
Scenario 1: @host_H2: get (content_C3) @R2: Destination Cost Next Hop
36
Scenario 1: @host_H2: get (content_C3) @R3: Destination Cost Next Hop
37
Scenario 1: @host_H2: get (content_C3) @R4: Destination Cost Next Hop
38
Scenario 1: @host_H2: get (content_C3) H2 C1 C2 R5 C3 H1 Arrived R1 R2
39
Scenario 1: @host_H2: get (content_C3) Data transfer H2 C1 C2 R5 C3 H1
40
Appendix: Network Architecture
Scenario get (content_C2) H1 H2 H3 C1 C2 C3 R1 R2 R3 R4 R5 H1 send request for C2 to default router R1 R1 choose shortest path, set DstAdrr as H2 When H2 receives request, ACK back Connection between H1 & H2 established
41
Appendix: Network Architecture
Scenario get (content_C2) H1 H2 H3 C1 C2 C3 R1 R2 R3 R4 R5 H2 prepare fragmented file Begin file transmission Selective-repeat mechanism to ensure delivery
42
Appendix: Network Architecture
Scenario get (content_C1) - Basic mechanism is the same as discussed H1 H2 H3 H4 C1 C2 C3 C1 C1
43
Appendix: Network Architecture
Scenario get (content_C1) - Link to H2 die: - H1 send 10 ACKs for the same packet - H1 gives up and request for C1 again starting with the smallest sequence number lost
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.