340 likes | 510 Views
Multicast + Network Coding in Ad Hoc Networks. CS 218 Fall 2008. Routing vs Network Coding. y 1. y 1. f 1 ( y 1 ,y 2 ,y 3 ). y 1. y 2. f 2 ( y 1 ,y 2 ,y 3 ). y 3. y 3. y 3. x. B. C. A. y. B. C. A. x y. B. C. A. B. C. A. Benefit of Network Coding. y. x. B. C. A.
E N D
Multicast + Network Coding in Ad Hoc Networks CS 218 Fall 2008
Routing vs Network Coding y1 y1 f1(y1,y2,y3) y1 y2 f2(y1,y2,y3) y3 y3 y3
x B C A y B C A x y B C A B C A Benefit of Network Coding y x B C A x B C A y B C A y B C A y = x (x y) x 3 transmissions with NC 4 transmissions without NC (Katabi’05, Chou’04)
a a ,b a a a+b a+b b a+b b b b ,a NC achieves multicast capacity • Alswede, Cai, Li, Yeung (2000): • mintЄT MinCut(s,t) is alwaysachievable by network coding • h = mintЄT MinCut(s,t)is “multicast capacity” a,b optimal routingthroughput = 1 network codingthroughput = 2 sender receiver coding node
How to code? Given: Directed graph (V,E) Sender s Receiver set T (subset of V)
Random Linear Coding Sender Every packet p carries e = [e1e2e3] encoding vector prefix indicating how it is constructed (e.g., coded packet p = ∑eixiwhere xiis original packet) x y z A αx + βy + γz buffer Random combination Intermediate nodes randomly mix incoming packets to generate outgoing packets Destination
Random Linear Coding Original Packets p1 p2 p3 g*p1 + h*p2 + e*p3 = n3 a*p1 + b*p2 + c*p3 = n1 d*p1 + e*p2 + f*p3 = n2 n1 n2 n3
Random Linear Coding (cont.) Original Packets p1 p2 p3 5*p1[1] + 8*p2[1] + 1*p3[1] = n1[1] 2*p1[1] + 3*p2[1] + 7*p3[1] = n2[1] 9*p1[1] + 6*p2[1] + 5*p3[1] = n3[1] [9 6 5] [5 8 1] [2 3 7] n1 n2 n3 Recover original by matrix inversion
Random Linear Coding (cont.) An application generates a stream of frames … Block/Generation 1 Block 2 Network layer generates stream of coded packets … (delay) Generation 2 Generation 1 time A random linear combination of Block 1 frames A random linear combination of Block 2 frames
Forwarding – RLC Source Receiver
Random Network Coding Every packet p carries e = [e1e2e3] encoding vector prefix indicating how it is constructed (e.g., coded packet p = ∑eixiwhere xiis original packet) buffer random combination Receivers recover original by matrix inversion Intermediate nodes randomly mix incoming packets to generate outgoing packets
Robust Multicast using NC • In tactical nets one must consider: • Random errors; External interference/jamming • Motion; path breakage • Target application: • Multicast (buffered) video streaming • Some loss tolerance • Some delay tolerance (store & playback at destination) - non interactive
Problem Statement • Multicast streaming in mobile wireless networks is non-trivial • Streaming requires: high reliability (but not 100%), low delay (but not 0) • But network is: unreliable, bandwidth-limited • Major concern: packet drops • Lossy wireless channel (uncorrelated, random like errors) • Route breakage due to mobility, congestion, etc (correlated errors)
Conventional vs NC Multicast • Conventional Approaches • Time diversity => O/H, delay? • Recovery scheme a la ARQ (Reliable Multicast) • (End-to-end) Coding (FEC, MDC, …) • Multipath diversity (ODMRP, …) => O/H? • NC Approach • Main ingredient: Random network coding (by Médardet al., Chou et al.) • Exploit time and multipath diversity • Controlled-loss (near 100%), bounded-delay (hundreds of ms) • Suitable for buffered streaming • Real time version (tens of ms delay bound) possible
Simulation experiments • Settings • QualNet • 100 nodes on 1500 x 1500 m2 • 5 Kbytes/sec traffic (512B packet) - light load • Single source; multiple destinations • Random Waypoint Mobility • 20 receivers • Metrics • Good Packet ratio: num. of data packets received within deadline (1sec) vs. total num. of data packets generated • Normalized packet O/H: total no. of packets generated vs no. of data packet received • Delay: packet delivery time
ODMRP vs C-Cast: Reliability Good Packet Ratio
Throughput Bounds • Max NC throughput in wireless networks? • Previous simulation results based on light load. As load is increased, congestion leads to performance collapse • Evaluate max throughput analytically for a simple grid structure, the “corridor”: sender receivers
Linear Programming Formulation maximize f Wireless medium contention and scheduling constraints Wireless flow conservation constraints
Maximum Multicast Throughput CodeCast vs Conventional CORRIDOR MODEL Sender Receivers
Link schedule achieving 2/3 throughput (Assuming time-slotted system) sender B C A A B A B receiver (3) (1) (2) (4)
Link schedule for NC achieving throughput of 2/3 A B C D C B D A B A (3) (1) (2) (4) (5) (6) E F G H G H E F F E D C A B C D A+B C+D (9) (7) (8) (10) (11) (12)
Multicast with multiple embedded trees (no NC): Link schedule achieves 2/5 throughput B A A B A B A (3) (1) (2) (4) (5) D C C D C D C B (9) (7) (8) (10) (6)
Modeling Wireless Medium • We model the broadcast nature of the wireless medium using hyperarcs • An hyperarc (i,J) represents a specific usage of the broadcast link from the sender i to a set of destination nodes , where is the number of neighbors of node i • Total number of hyperarcs = Interference i i i (a) Examples of Hyperarcs in red
Modeling Wireless Medium (cont) • Wireless medium is shared, which is a main factor that limits the capacity of wireless multi–hop networks. • To model this shared nature of the medium, we map it into a graph theory problem, the Maximal Independent Set Enumeration Problem. A Independent Set represents a set of non interfering hyperarcs. (By finding only maximal sets, the number of sets is reduced.) Conflict! i (a) I.S. (b) NO I.S. (c) Maximal I.S.
Modeling Wireless Medium (cont) • All hyperarcs in a Maximal I.S. can be activated at the same time. Scheduling is always feasible when only one Maximal I.S. is exclusively activated in a time slot. • Let be the fraction of time in which the k-th Maximal I.S. is activated. Clearly we have: • Let be the time share allocated to a hyperarc (i, J). Then, sufficient and necessary condition for a link schedule to be feasible is: where . (L: link capacity)
Server 4 1 3 6 2 5 4 1 6 2 5 3 Network Coding in P2P Swarming • P2P Swarming • File is divided into many small pieces for distribution • Clients request different pieces from the server/other peers • When all pieces are downloaded, clients can re-construct the whole file • Rare piece problem • P2P using Network Coding • Avalanche, Infocom’05 4 1 6 5 2 3 [Rodriguez, Biersack, Infocom’00]
Multicast in VANETs - CodeTorrent • Content distribution in VANET such as ad movie clips etc • VANET challenges • Error-prone channel • Dense, but intermittent connectivity • High, but restricted mobility patterns • No guaranteed cooperativeness (only, users of the same interests will cooperate) • CodeTorrent approach • Single-hop data pulling • BitTorrent-style file swarming with random network coding to cope with dynamic environments
Design Rationale • Why single-hop pulling? • Multi-hop data pulling does not perform well in VANET (routing O/H is high) • Users in multi-hop may not forward packets not useful to them (lack of incentive)! • Network coding • Mitigate a rare piece problem • Maximize the benefits of overhearing • Exploits mobility such that coded blocks are carried from AP and forwarded to other nodes • Mobility helps data dissemination
Buffer Buffer Buffer Download a “coded” piece CodeTorrent: Basic Idea Internet Random Linear Combination of Blocks Outside Range of Gateway Exchange Re-Encoded Blocks Downloading a Coded Block from Gateway Meeting Other Vehicles with Coded Blocks
Simulations - Setup • Qualnet • IEEE 802.11b / 2Mbps • Real-track mobility model (Westwood map) • 2.4x2.4 km2 • Distributing 1MB file • 4KB block / 250 pieces • 1KB per packet • # of APs: 3 • Randomly located at the road sides • Comparing CarTorrent (w/ AODV) and CodeTorrent Vicinity of UCLA
Simulation Results • Overall downloading progress 200 nodes40% popularity
Simulation Results • Speed helps disseminate from AP’s and C2C • Speed hurts multihop routing (CarT) • Car density+mhop promotes congestion (CarT) 40% popularity