ECE 544 Protocol Design Project 2016 Chengyao Wen Hua Deng Xiaoyu Duan
Network Architecture & Topology Service Objective k-out-of-n multicast (n = 3, k <= n) Multicast message to ‘best k’ destinations Routing protocol chooses the ‘best’ multicast path
Network Assumptions Assumptions Unreliable network with packet loss prob. per link of p Each end node is attached to only one router All links have same characteristics (i.e. hop cost 1 and same MTU 1500 bytes) Network scale 50 – 100 routers and <= 256 hosts
Protocol Concept Overall Concept Multicast message to ‘best k out of 3’ destinations Static IP address allocation. Control Packet ACK Hello Hello_ACK Routing_Update (RIP) Data Packet Distance Vector Go-back-N ARQ
Syntax and Semantics Control Packets ACK Type (1 Byte): Packet Type Seq # (1 Byte): Data Packet Sequence Number Src (4 Bytes): Source IP Address Dst (4 Bytes): Destination IP Address
Syntax and Sematics Control Packet Hello Type (1 Byte): Packet Type Src (4 Bytes): Source IP Address Hello_ACK Type (1 Byte): Packet Type Src (4 Bytes): Source IP Address Dst (4 Bytes): Destination IP Address
Syntax and Semantics Control Packet Routing_Update Type (1 Byte): Packet Type Len (1 Byte): Packet Length IP Addr 1 (4 Bytes): Destination IP Address 1 Subnet 1 (4 Bytes): Subnet of Dst IP Address 1 Next Hop 1 (4 Bytes): Next Hop Address of Route to Addr 1 Hop Cnt 1 (1 Bytes): Total Number of Hop Counts to Addr 1
Syntax and Semantics Data Packet Data Type (1 Byte): Packet Type Len (1 Byte): Packet Length TTL (1 Byte): Time to Live (Hops #) K (1 Byte): Number of Destinations in the Multicast Flag (3 Bits): Indicate the validation of Dst1 to Dst3 Src (4 Bytes): Source IP Address Dst 1 to 3 (12 Bytes): Destination IP Address 1 to 3 Data: Data Payload
Routing table DestinationCostNext Hop D12R1 D23R2 D33R2 Routing table of a router
Routing Algorithm For each router: Let # be the total number of valid dst addrs of pkt if (K=1) // the pkt is unicast if (K = #) Directly forward the pkt to ‘next hop’ of the valid dst addr; else Choose the dst with smallest cost, invalidate the rest dst and forward to ‘next hop’ of the chosen dst; else if (K = #) if (all “next hop” for the rest valid dst are the same) The router directly forwards the pkt to the next hop; else The router duplicates pkt, invalidates specific dst addr and changes K value to # and forwards to corresponding ‘next hop’;
Routing Algorithm else if (K = 2 and # = 3) if (all ‘next hop’ are same for 3 dst) Directly forward the pkt to ‘next hop’; else Router operate ‘best k-out-of N’ routing Split 3 dst into groups with 2 dst each Compute total cost for each group if (‘next hop’ is same for dst in a group) totCost = Cost1 + Cost2 – 1 else totCost = Cost1 + Cost2 Choose the group with smallest totCost as the ‘best k’ dst and router invalidate the not chosen dst and repeat the algorithm. (If multiple groups with same totCost, choose the group with the same ‘next hop’)
Example Networks: Network 1 According to the algorithm 1. R1 operates “ best K out of N” routing; 2. totCost(D1, D2)=totCost(D1,D3)=totCost(D2,D3)=2 ; 3. R1 chooses D1 and D2 (with the smallest node ID) and invalidates D2, D3 addr for pkt sending to R2 and invalidate D1, D3 addr for pkt sending to R3. 4. In R2, R3, K= # = 1, routers just directly forward the pkt to “next hop”. copy
Example Networks: Network 2 There are two situations: 1.The routing table of R1: 2.The routing table of R1 DestinationCostNext hop D12R2 DestinationCostNext hop D12R3
Example Networks: Network 2 In situation 1 According to the algorithm copy K out of N 1. R1 operates “best K out of N” routing; 2. totCost(D1,D2) = totCost(D1,D3)=5 and totCost(D2,D3)=6-1=5 with the same “next hop” R3. So D2 and D3 are chosen and D1 addr is invalidated. 3. In R3 and R5, K=#=2, both routers directly forward the pkt to “next hop”;
Example Networks: Network 2 In situation 2 According to the algorithm 1.In R1, K=2 and #=3 and all 3 dst have same ‘next hop’, R1 directly forwards the pkt to R3; 2. R3 operates “best K out of N” routing; 3. totCost(D1,D2)=totCost(D1,D3) = 3 and totCost(D2,D3) = 4- 1 = 3 with same “next hop”. So D2 and D3 are chosen and D1 addr is invalidated. 4.In R5, K=#=2, R5 directly forwards the pkt to R6. copy K out of N
Summary Key features Routers periodically flood hello message Routers use DV method to build routing table Our algorithm values shared links in ‘best k’ choosing The method is ‘greedy’ and gets local optimal Performance Our algorithm chooses the overall optimal route and destinations in the given examples. Implementation complexity Routing table and pkt information are used to choose ‘best k’ destinations Only simple addition and comparison are required for routers