ad hoc networking

Download Ad Hoc Networking

Post on 19-Jan-2016

21 views

Category:

Documents

0 download

Embed Size (px)

DESCRIPTION

Ad Hoc Networking. Tom Roeder CS415 2005sp. Part IV questions?. What is an ad hoc network?. Nodes discover and maintain routes no use of infrastructure Every host is also a router (thus not all routers are trusted…) Can be done over the infrastructure. Features of an ad hoc network. - PowerPoint PPT Presentation

TRANSCRIPT

  • Ad Hoc NetworkingTom RoederCS415 2005sp

  • Part IV questions?

  • What is an ad hoc network?Nodes discover and maintain routesno use of infrastructureEvery host is also a router(thus not all routers are trusted)Can be done over the infrastructure

  • Features of an ad hoc networkChange in reachabilityover time as nodes die and come backover space as nodes moveOften power constrainedThe screen is the constraint on your laptops, but on many smaller machines, it is the networkOft cited: 1 packet for 3000 instructionsIt adapts!Must not rely on static configurations

  • ApplicationsSensor networkslittle, power-constrained motesattached to animals in a parkscattered on the ground from the air (military)Rescue workers in a disaster areaEducational apps (www.silicon-chalk.com)Operating systemsMagnetOS (Mobisys 05) (www.cs.cornell.edu/people/egs/magnetos)

  • Overlaysleads in to P2P systemsWhy bother?route around problemsbuild multicast treesillegally share filesgain anonymitybuild trust networksoptimize RSS feedsIf this interests you, check out Copano

  • Types of ad hoc routingProactiveDSDV, Link-state variantsReactiveDSR, AODVHybridZRP, HARP, SHARPOverlayWere not going to discuss this more

  • Costs and benefits: proactivePushes informationlow message latencyhigh state overheadhigh message overheadOK when network is smallFull link state grows as n2Can seriously impact throughputNot good for high mobility

  • Costs and benefits: reactiveGenerates route at send timehigh initial latencycaching helps tremendouslyno wasted route informationcan lead to broadcast stormsbrings the network down even faster at the endGood for reasonably high mobilitytoo fast and theres nothing we can doWidely used

  • 802.11b MAC layerTo send a packet, must reserve the mediumUses a CSMA protocolAdditional optional protocol for 802.11b isRTS (Ready To Send)CTS (Clear To Send)DataACKHidden terminal problemmay get lower throughput than expected

  • Distance Vector protocolsKey Distance Vector idea: Instead of storing the full path, just keep directionIf I want to get to A, my next hop is BTrade DV information with neighbors via floodingBased on distributed Bellman-Ford algorithmCan suffer from loops and counting-to-infinityAODV finds distance vectors reactivelyBased on DSDV, which does it proactivelyUses a sequence number to try to avoid problems

  • AODV information per nodeA table (cache) of known distance vectorsrefresh rate will controll the message overhead

    seqnum: incremented on new informationused to avoid counting to infinity.Remember the last known seqnum for each cache eltdest: the identifier of the destinationnote that identifiers are arbitraryhop: the identifier of next hop to get to desthopcount: how many hops on this route

  • AODV route requestsNode A wants to send a packet to Bbroadcasts a RREQ (with some TTL)heard by B, B sends a replyA sends directly to BNode A wants to send a packet to Cbroadcasts a RREQheard by B, but B just heard from CSends reply A sends packet to B, who forwards it to CABC

  • AODV route repliesA node receiving a RREQ sends a route replyfrom its cache if it has this routeelse it forwards the RREQIt also updates its path to the requestor with the RREQ and TTL, if it is betterIf a node hears a better route replyit doesnt send its ownit records the better routethis helps avoid broadcast storms in flooding

  • AODV route cachesThink of the route cache as an optimizationWe could always choose to floodThis would just have high latency and broadcast storms, but would still be correct (dont do it!)Timeout is critical When a link goes down, the cache is wrongWe dont do explicit invalidationreal AODV doesuses MAC link error info to guess at disconnection

  • AODV exampleABCRREQRREQRREQRREQRREQRREQRREQRREQRREQRREQRREQRREQRREQRREQ!RREPRREPRREP

  • AODV details to ignoreCounting to infinity is possible but hardsee http://www.cse.ucsc.edu/research/ ccrg/publications/hari.icc.2005.pdf Dont worry about securityWe are not managing the errors explicitlyThis is clearly suboptimal, but easierSee the AODV and DSR papers if youre interestedDont worry if you get low throughput

  • AODV header spectype (2 bits)RREP, RREQ, DATAseqnum (4 bytes)incremented on new routesfrom node (4 bytes)destination node (4 bytes)Time To Live (1 byte)set to MAX_PATH_LENGTH

  • Layering and AbstractionAODV is a layer below miniportsit acts like IP for usit should encapsulate the miniports codeOther than AODV control packets,all packets should be miniports or minisocketswe still are delivering to miniports on remote nodeWe have simply taken away the reliance on the IP routing infrastructure

  • Testing: over the infrastructureWe provide a broadcast layer for your codefile format

    saranac heineken dosequis kingfisher tecate

    .xx.x x.xx. xx... .x..x x..x.

  • Testing: over the infrastructureUse the network_broadcast_pktTo send to all reachable nodesWhen you dont know the direction: RREQFor returning cached RREPs (optimization)Use the network_send_pktFor returning RREPsFor data packetsYou implement miniroute_send_pktDoes AODV, then unicasts the packet

  • Testing: over the wirelessWe do not have enough tablets to give youYou would need a large network to test thisWe will do it in sectionWe will schedule a few other timesCan also use any 802.11b Windows devicelaptopdesktop with wireless card

  • Broadcast stormIssues with flooding wireless networksMay have already heard an answer, but unicastMay have a better answer than one you hearn2 flooding is expensive to discover linear pathsWhat can we do?DampingPromiscuous unicast listening

  • Implementations and helpFor real implementations, seeAODV: moment.cs.ucsb.edu/AODV/aodv.htmlDSR: www.monarch.cs.cmu.edu/dsr-impl.htmlTo try out AODV without the hassle, seesns: www.cs.cornell.edu/People/egs/sns/simulated implementation of AODVPapersSee the above sites for references or just google it