330 likes | 449 Vues
This project outlines a straightforward network architecture with static addressing for routers, hosts, and content. Key assumptions include each end host connecting to a single router and host/content mobility. The main focus lies in packet forwarding and constructing forwarding tables. The routing mechanism relies on an unchanging link-state table, while bootstrapping allows routers to discover neighbors and maintain a consistent global topology. Our solution aims to promote efficient data retrieval with a focus on both performance and simplicity.
E N D
ECE 544 Project3 Team member: BIAO LI, BO QU, XIAO ZHANG
Assumptions and Address Scheme • Assumptions • End hosts can only connect to one router • Same content available at multiple end nodes • the path cost between adjacent router is 1. • Host and content can move at any time • Naming scheme and eventual address scheme • Router ID (statically assigned, range 0~255) • End hosts ID (statically assigned, range 0~255) • Content ID (statically assigned, range 0~255)
Our Goal Keep it simple
We Don't care • How to assign a Address to a Host • How to assign a Address to a Router • How to generate a ID for a Content
We Do care • How to forward a packet • How to build a forwarding table
Forwarding Table (@ R1) H2 C1 C2 R5 C3 H1 2 2 1 1 3 R1 R2 R3 R4 H3
Scenario 1: @host_H1: get (content_C2) Packet FilePacket C2 H2 1 C1 R5 2 C3 H1 2 1 2 1 3 R1 R2 R3 R4 H3
Then … ... How to build a Forwarding table?
Resource Table • maintained at each router • contains the location information regarding host and content • when ID is content, owner ID is a list of hosts. • when ID is host, owner ID is its directly connected router. H2 C1 C2 R5 C3 H1 2 2 1 1 3 R1 R2 R3 R4 H3
Routing Table • need not to be computed every time unless something changed in link-state table H2 C1 C2 R5 C3 H1 2 2 1 1 3 R1 R2 R3 R4 H3
Then … ... How to build a Routing table?
Routing Table (shortest path) • need not to be computed every time unless something changed in link-state table (for example: @R2) H2 R5 2 2 1 3 R1 R2 R3 R4
Link-State Table ( the same at each router ) • remain unchanged after routers boot up unless some new router is added or failure of some router is detected. R5 2 2 1 3 R1 R2 R3 R4
Router Bootstrapping and Discovery • Each Router find its directly connected neighbors • Exchange the information of neighbors • Each router would have the same view of the global topology • Each router can computes its shortest path to reach other router
Neighbor R5 2 2 1 3 R1 R2 R3 R4
Neighbor @ R5 @R5 H2 C1 C2 R5 C3 1 2 H1 1 2 1 1 2 2 3 R1 H3 R2 R3 R4
Loop-free Note that we includes the complete paths as a enumerated list of routers when flooding the message.As long as a router finds itself included in the path, it would ignore this message to avoid path loop. When R1 receives the message sent by R2 that <R1 is neighbor of @R2, PATH: R1- R2>, R1 no longer relays the message. R5 2 2 1 3 R1 R2 R3 R4
Then … ... How to build a Resource table?
Host Bootstrapping and Discovery Consider H1 that first gets configured in R1 R5 R5 H1 H1 2 2 2 2 2 1 1 1 1 3 3 R1 R1 R2 R2 R3 R3 R4 R4
Resource table in each router R5 R5 H1 H1 2 2 2 2 2 1 1 1 1 3 3 R1 R1 R2 R2 R3 R3 R4 R4
Disconnection of host Do it in the same way! R5 R5 H1 H1 2 2 2 2 X 1 1 1 2 1 3 3 R1 R1 R2 R2 R3 R3 R4 R4
Content Bootstrapping and Discovery Use the same approach as host advertisement H2 H2 C1 R5 R5 H1 H1 2 2 2 2 1 1 1 1 2 1 3 3 R1 R1 R2 R2 R3 R3 R4 R4 H3 H3
One forwarding table does all !!! • For every packet, the destination is either Host ID or Content ID. The router always find the next-hop from the forwarding table.
Header format All packets have the same header structure! Header | Version 3 bit | Type 5 bits | | Dest ID 8 bits | | Src ID 8 bits | | Type: • Heartbeat: monitor the liveness of router and host • Neighbor: exchange the neighbor info. • Host Discovery: host actively joins or leaves the network • Content Discovery: content adds to or withdraw from the network • Get Content Request • Get Content Respond: reply with content data • ACK
Data Transfer and Reliability • Message Forward • Not support Multicast • ARQ Scheme • receive windows • timeout for each data request packet • ACK for routing information packet • NO ACK for data packet
Scenario 2: @host_H1: get (content_C2) C2 H2 C3 C1 C2 R5 C3 H1 R1 R2 R3 R4 H3 C
Scenario 3: @host_H1: get (content_C1) X H1 Send C1 H2 H3 H4 Send C1 C2 C3 Get C1 C1 C1 C1 Get C1
Advantages and Disadvantages Pros • Simple and Scalable • Efficient: can choose the nearest provider • Automatically forward a packet to other provider if the original one unavailable. Cons • Throughput is not perfect by using timeout scheme for data packet.
Content Request Packet | Version 3 bit | Request | | Content ID 8 bits | | Src Host ID 8 bits | | offset 16 bits | | size 16 bits | Header extension
Content Respond Packet | Version 3 bit | Respond | | Dest Host ID 8 bits | | Content ID 8 bits | | offset 16 bits | | size 16 bits | | Flags | | Payload | Header extension
Host Discovery Packet | Version 3 bit | Host Discovery | | R2 | | R1 | | random seq 16 bits | | Add / DEL | | HOST ID = H1 | | Owner ID =R1 | | Len of PATH=1 | | R1 | Header extension
Content Discovery Packet | Version 3 bit |Content Discovery | | R2 | | R1 | | random seq 16 bits | | Add / DEL | | HOST ID = C1 | | Owner ID = H1 | | Len of PATH=1 | | R1 | Header extension