adhocslides.pdf

51
November 2003 Peer-to-Peer Networking 1 An Introduction to Ad Hoc Networking Lars Michael Kristensen Department of Computer Science University of Aarhus [email protected]

Upload: kavitha

Post on 03-Oct-2015

2 views

Category:

Documents


0 download

TRANSCRIPT

  • November 2003 Peer-to-Peer Networking 1

    An Introduction to Ad Hoc Networking

    Lars Michael KristensenDepartment of Computer ScienceUniversity of [email protected]

  • November 2003 Peer-to-Peer Networking 2

    Background

  • November 2003 Peer-to-Peer Networking 3

    Ad Hoc Networking

    The network operates autonomously to provide connectivity: No centralised control/components. No fixed infrastructure (e.g, base stations and wired links).

    .. wireless communication between mobile nodes (MNs).

  • November 2003 Peer-to-Peer Networking 4

    Ad Hoc Networking

    B

    A

    C

    D

    .. a group of laptops operating in wireless ad hoc mode:

    Important characteristics: The mobile nodes acts as routers (multi-hop). Highly dynamic topology due to mobility. Varying and constrained bandwidth on links. Power constrained (laptops, mobile phones, PDAs).

  • November 2003 Peer-to-Peer Networking 5

    Example: On-demand Ad Hoc Routing

    B

    A

    C

    D

    RREQ(D)

    RREQ(D)

    RREQ(D)

    RREQ(D)

    RREP(D)RREP(D)

  • November 2003 Peer-to-Peer Networking 6

    Origins of Ad Hoc NetworkingDefence Advanced Research Project Agency (DARPA) Packet Radio NETwork (PRNET) project (1972):

    SURAN - Survivable Radio Networks (1983).

    DARPA Global Mobile (GloMo) Information Systems Program (1994).

    Based on broadcast property of radios to send/receive data packets.

  • November 2003 Peer-to-Peer Networking 7

    Ad Hoc Networking TodayMobile wireless computing devices (Laptops, PDAs, mobile phones) are now relatively inexpensive and widely used.

    Wireless networking products (Wireless LAN,) with still increasing bandwidth are becoming available.Much of the communication is still based on fixed infrastructure(e.g., WLAN) or point-to-point communication (e.g., infrared).

  • November 2003 Peer-to-Peer Networking 8

    Envisioned Application Areas

    Sensor networks for environmental monitoring.Rescue operations in remote areas.Remote construction sites.Mobile conferencing.Home networking.Wireless Personal Area Networks.

    Military ad hoc networking:

  • November 2003 Peer-to-Peer Networking 9

    Wireless Ad Hoc Networking

    Sometimes there may be no network infrastructure available: Remote areas. Unplanned meetings. Emergency relief personnel quickly deployed into an area. Military where infrastructure has been destroyed or is untrusted.

    Sometimes users wont want to use the available infrastructure: Time to access and register on the service. Cost of using the service. Performance of the existing service and infrastructure. Capacity of the existing service and infrastructure.

    Can dynamically extend coverage range of any infrastructure: Allow users to be further away from infrastructure serving them.

  • November 2003 Peer-to-Peer Networking 10

    Protocols for Ad Hoc Networking

    Network Layer: Routing between end-points.

    Data Link Layer: Point-to-point Communication

  • November 2003 Peer-to-Peer Networking 11

    Link and Medium Access Control Layers

  • November 2003 Peer-to-Peer Networking 12

    Wireless Links

    Communication is based on radio waves.

    Signal strength diminishes with distance and may vary significantly.

    Radio waves may be blocked or absorbed by objects such as buildings, mountains, and rain.

    Radio waves may be reflected off objects: allows sender to reachreceiver although direct path is blocked, but creates multipaths.

    Wireless links may be unidirectional.

  • November 2003 Peer-to-Peer Networking 13

    Wireless LinksMedium Access Control (MAC) needs to be exercised to deal with interference between transmissions on the wireless medium (ether):

    A number of MAC protocols have been defined to ensure coordinated use of the wireless medium.

    Typically based on sending Request To Send (RTS) and Clear To Send (CTS) messages on a control channel to manage reservations.

  • November 2003 Peer-to-Peer Networking 14

    Hidden Terminal Problem

    RTS(A,B)

    CTS(B,A)

    Nodes that senses RTS or CTS must not transmit.

    The Network Allocation Vector specifies time media is reserved

    Two nodes (A and C) not within transmission range of each other transmits simultaneously to a third node (B).

    C is hidden from A and classical carrier sense is not appropriate.

  • November 2003 Peer-to-Peer Networking 15

    Exposed Node Problem

    Reserved by A to B communication

    C is not allowed to transmit because it receives RTS from A.

    C could transmit to D without interfering with transmission from A to B.

    This may significantly reduce performance of wireless networks.

    Data transmission from neighboring nodes can inhibit an exposed node from transmitting data.

  • November 2003 Peer-to-Peer Networking 16

    Link Layer Technologies.. a number of link layer and MAC technologies have been proposed for ad hoc networking.IEEE 802.11 Wireless LAN Standard:

    Distributed Coordination Function for ad hoc networks.Distributed Foundation Wireless MAC (CSMA/CA).

    HiperLan/2 (European Telecomunication Standards Institute):Home Enviroment Profile for one-hop ad hoc networks. Time Division Multiple Access using central controller electedamong mobile terminals.

  • November 2003 Peer-to-Peer Networking 17

    Link Layer Technologies

    Bluetooth (Bluetooth Special Interest Group):Piconets with one master and several slaves (star topology).Scatternet can be formed by multiple overlapping piconets.

    Home Radio Frequency (Home RF):Shared Wireless Access Protocol (SWAP).

    MAC layer similar to IEEE 802.11.

  • November 2003 Peer-to-Peer Networking 18

    Link Layer Technologies

    A number of other link layer technologies are emerging.

  • November 2003 Peer-to-Peer Networking 19

    Routing in Ad Hoc Networks

  • November 2003 Peer-to-Peer Networking 20

    The Need for Multi-hop Routing

    Obtaining full connectivity not feasible in general (e.g., battery power).Ad hoc networking puts additional requirements on (mobile) nodes:

    must act as routers forwarding packets to other peer nodes. need to find new routes as nodes move or link conditions change.

    .. the distinction between hosts and routers disappears.

    A B C

    .. some nodes may be out of transmission range of others:

  • November 2003 Peer-to-Peer Networking 21

    Routing Protocol Zoo for Ad Hoc NetworksIETF Mobile Ad Hoc Networks (MANET) working group:

    The WG will operate under a reduced scope by targeting the promotion of a number of core routing protocol specifications to EXPERIMENTAL RFC status.

    First goal is to standardise intra-domain unicast routing protocols:

    A suite of routing protocols is most likely needed: Many possible mobility scenarios/patterns. Large variety of link layer/transmission technologies.

    Reactive/on demand

    DSDV

    WRP

    OLSR

    ABR

    ZRP

    TORA

    LAR

    SSR

    Proactive/periodic

    DSR AODV

    TBRPF

  • November 2003 Peer-to-Peer Networking 22

    IETF Standardisation Process

    We reject kings, presidents, and voting.

    We believe in rough consensus and running code.

    - Dr. David Clark, MIT (1992)

    .. emphasis on operational experience.

    RFC

    Moving from Proposed to Draft Standard requires at least two independent and interoperable implementations.

    Current status: little consensus and some running code.

  • November 2003 Peer-to-Peer Networking 23

    Routing Protocol ChallengesConventional Routing Protocols:

    Impossible to exchange information immediately and routing information will in general be slightly out of date.

    Routing information is not inexpensive to distribute and acquire. Link conditions (e.g., congestion) may change frequently. Scalability is important (e.g., size of routing tables).

    Ad hoc Routing Protocols: The nodes are often battery powered which makes the

    consumption of energy a constraint. Highly dynamic topology due to frequent movement of nodes

    and nodes being powered off or entering sleep mode. Wireless links are bandwidth constrained compared to wired

    links, and might be unidirectional. No natural hierarchy on the network addresses in the ad hoc

    network.

  • November 2003 Peer-to-Peer Networking 24

    Graph Model of the NetworkCan represent network as a graph G = (V, E):

    V = nodes in the network. E = between two nodes if they can communicate directly (1 hop).

    Directed graph in case of unidirectional links.

    Distance will be measured in the number of hops.

  • November 2003 Peer-to-Peer Networking 25

    Routing Protocols: OverviewConventional next-hop unicast routing protocols:

    Link-state: each node maintains a complete view of the topology and periodically broadcasts information about its outgoing links to all nodes.

    Example: Open Shortest Path First (OSPF).

    Distance-vector: each node maintains information about distance to each destination via neighbors and periodically broadcasts to its neighbors estimate of shortest distance for each destination.

    Example: Routing Information Protocol (RIP).

    Ad hoc routing protocols:

    Periodic / proactive / table-driven: nodes periodically exchange routing information and attempt to keep up to date routing information.

    On-demand / reactive: nodes only try to find a route to a destination when actually needed for communication.

  • November 2003 Peer-to-Peer Networking 26

    Example Routing Protocols

    Destination-Sequenced Distance Vector (DSDV). Ad-hoc On-Demand Distance Vector Routing Protocol (AODV). Dynamic Source Routing Protocol (DSR).

  • November 2003 Peer-to-Peer Networking 27

    DSDV: Destination-Sequenced Distance Vector Routing

    A modification of standard distance-vector routing (e.g., Routing Information Protocol (RIP)) based on the Bellman-Ford algorithm.

    Problems with standard distance-vector routing for ad hoc networks: Performs at its worst with many network changes. Easily forms routing loops. Ad hoc networking is thus a very difficult case for distance-vector.

    DSDV enhancements to distance-vector routing: Guarantees no loops by adding sequence numbers to updates. Bandwidth efficiency through incremental updates. Delay route advertisements to damp fluctuations.

  • November 2003 Peer-to-Peer Networking 28

    Bellman-Ford AlgorithmNode i periodically broadcast routing tables entries to neighbours:

    Dest. Metric First HopB 1 = D(i,B) AC 2 = D(i,C) F

    Nexthop neighbour for destination x is the neighbour j that minimizes the estimated distance:

    D(i,x) = 1 + D(j,x)

    Routing table entry at node i for destination x is updated if:

    D(i,x) < D(i,x) (a smaller distance becomes available) or

    D(i,x) > D(i,x) (increase for current next hop neighbour j)

    estimate from neighbour j

  • November 2003 Peer-to-Peer Networking 29

    Distance-Vector Example

    Routing table at node A:Dest. Metric First Hop

    B 1 BC 2 BD 4 BE 3 B

    Routing table at node D:Dest. Metric First Hop

    A 4 EB 3 EC 2 EE 1 E

    Current topologyof the network:

  • November 2003 Peer-to-Peer Networking 30

    Distance-Vector Example

    New routing table at A:Dest. Metric First Hop

    B 1 BC 2 BD 1 DE 2 D

    Suppose node Dmoves closerto node A

    Routing update from D:Dest. Metric First Hop

    A 4 EB 3 EC 2 EE 1 E

  • November 2003 Peer-to-Peer Networking 31

    Routing Loops

    Bellman-Ford based protocols are prune to routing loops:

    A B C D x

    Routing tables entries with respect to destination x:

    (4,B) (3,C) (2,D) (1,x)

    (4,B) (3,C) (4,B) (3,C)

    (4,B) (5,C) (4,B) (5,C)

    (6,B) (5,C) (6,B) (5,C)

    Counting to infinity since routing information is summarised.

    More complex scenarios are also possible.

    C relearns distance from B

  • November 2003 Peer-to-Peer Networking 32

    DSDV Sequence Numbers

    Each node maintains a sequence number for itself. Increment by 2 each time the local neighbor list changes, i.e.,

    links are created or destroyed around the node. Uses only even sequence numbers.

    Each entry in routing table has a sequence number: Routing update contains sequence number from each table entry. Receiving a routing update: new entry always overrides old entry if

    sequence number is greater.When a link failure to a nexthop neighbor is noticed:

    Pretend to have received new update from that neighborwith metric infinity and next odd sequence number.

    Routing loops cannot arise with the use of sequence numbers.

  • November 2003 Peer-to-Peer Networking 33

    AODV: Ad Hoc On-demand Distance Vector Routing Protocol

    Based on: Next-hop distance-vector concept for routing table entries. Sequence numbers in routing table entries to prevent creation

    of routing loops. Create route to destination when communication requires it.

    Overall protocol operation: Route (path) discovery for creating a route to destination. Route (path) maintenance for dealing with topology changes.

  • November 2003 Peer-to-Peer Networking 34

    Route Discovery.. flooding the network with route requests (RREQ) initiated by the source:

    Broadcast sequence number and source address is used to detect duplicate RREQ that have been received before.

    Broadcast sequence number incremented whenever the node initiates a route discovery.

    RREQ

    Creating route from node A to node I

  • November 2003 Peer-to-Peer Networking 35

    Route DiscoveryRoute Reply (RREP) is unicast back along reverse route:

    RREP

    Reverse route information in nodes not on reverse route will eventually time out.

    Intermediate nodes having a route to destination may send RREP.

    Nodes on the discovered route automatically learns route to destination via RREP.

  • November 2003 Peer-to-Peer Networking 36

    Path Maintenance

    Link layer or periodic hello messages used to detect link failures.

    Link layer failure:

    Upstream neighbor sends RREP with next destination sequence and infinity metric to active neighbors.

    Ensures that routing tables entries for this route is overwritten when RREP is propagated backwards.

    Reinitiating of route discovery:

    By source node or another (earlier) upstream neighbor.

    Uses a larger destination sequence number than received in the RREP.

    Ensures that a new route is created or a never route is reused.

  • November 2003 Peer-to-Peer Networking 37

    AODV at 58th IETF

    Implementation of AODV protocol demonstrated at 58th IETF Meeting in Minneapolis, November 9-14, 2003.

    Based on IEEE 802.11 ad-hoc mode.

    Implemented as a routing daemon for Linux and Microsoft Windows operating systems.

    First ever large-scale, publicly-usable ad hoc network using the AODV routing protocol.

  • November 2003 Peer-to-Peer Networking 38

    Dynamic Source Routing (DSR)

    On-demand routing protocol based on source routing.

    Divides routing problem into two parts: Route Discovery: finds a route to a given destination

    when the node needs a route and do not have one. Route Maintenance: responds to changes in topology that

    affect a route currently in use.Characteristics of DSR:

    Source routing avoids keeping information in intermediate nodes and guarantees loop-free operation.

    On-demand operation implies no overhead when nodes are stationary and routes have already been created.

    Supports unidirectional links and asymmetric routes.

  • November 2003 Peer-to-Peer Networking 39

    Route DiscoveryInitiator initiates flooding of the network by broadcasting a Route

    Request with a unique request identification in it.When receiving a Route Request:

    If the target node is yourself, return the recorded route to theinitiator in a Route Reply; initiator caches the route.

    Else, if recently seen a request with this id, drop the Route Request.

    Otherwise, append own address to a route record in the packet and rebroadcast the Route Request.

  • November 2003 Peer-to-Peer Networking 40

    Route DiscoveryThe Route Reply can be returned in various ways:

    Target node uses a previously cached route to the source node (initiator).

    Destination performs a route discovery for the source with the route reply piggybacked to avoid an infinite loop.

    The reverse sequence of nodes can be use if all links are bidirectional.

    Rate of route requests limited using exponential back-off in case the destination is not reachable.

  • November 2003 Peer-to-Peer Networking 41

    Route MaintenanceAfter transmitting a packet to the next hop:

    Listen for link-level per-hop acknowledgement (present in many wireless LANs), or

    Listen for the next-hop node sending packet to its next hop (passive acknowledgement), or

    Set a bit in packet to request explicit next-hop acknowledgement.

    When a problem with forwarding is detected: Send a Route Error message to original sender, identifying the broken link. Sender may use another cached routes or do new Route Discovery if needed.

  • November 2003 Peer-to-Peer Networking 42

    Route Discovery OptimizationsLearn routes from forwarded and overheard packets:

    Forwarded data packets, Route Requests, Route Replies, and Route Errors (subject to unidirectional links).

    Packets overheard while in promiscuous mode.Generation of Reply to a Route Request by intermediate nodes:

    Intermediate nodes check route cache for a route to the target. If route is in cache, send a route Reply with concatenation of

    record from the Route Request plus route from cache.Reduce Route Requests flooding using expanding ring search:

    Use small hop limit for first attempt at Route Discovery. If no reply, increase hop limit for each subsequent re-attempt. Useful if target node is close to initiator, but adds latency to the

    Route Discovery procedure.

  • November 2003 Peer-to-Peer Networking 43

    Automatic Route ShorteningShorten route if a downstream node overhear a packet early:

    Suppose node A is transmitting to next-hop node B Suppose C overhears this directly:

    Node C can detect this since B is still listed as next hop Node C can send a gratuitous Route Reply to A indicating the

    shorter route A C D

  • November 2003 Peer-to-Peer Networking 44

    DSR Implementation and TestbedTested and demonstrated regularly from Dec 1998Mar 1999:

    5 cars driving 2025 MPH, looping between A and B 2 stationary nodes (E1 and E2) about 3 radio hops apart using

    off-the-shelf WaveLAN wireless LAN radios All routing between ad hoc

    network nodes done with DSR Integrated into Internet and

    Mobile IP, allowing nodes tojoin the ad hoc network

    Traffic included ftp, telnet,UDP CBR audio, real-timekinematic (RTK) GPScorrection packets, real-timestatistics and position logging

  • November 2003 Peer-to-Peer Networking 45

    Performance of Ad Hoc Routing Protocols

    The relative performance of a number of ad-hoc routing protocols has been studied in Broach et. al, 1998 using the ns-2 simulator.

    Routing protocols considered: DSDV, AODV, TORA, DSR.

    Simulation model: 50 wireless mobile node moving in a 1500mx300 square. Each node can buffer up to 50 packets waiting for transmission. Routing protocols evaluated on the same 210 scenarios. Nodes move between random points with a speed chosen

    uniformly within [0,maxspeed]. The node is then stationary for a certain pause time. A number of traffic sources (10,20,30) generates packets at a

    constant bit rate.

  • November 2003 Peer-to-Peer Networking 46

    Application Data Packet Delivery

    DSDV slow in responding to link breaks (propagate from destination).

    AODV and DSR allows local repair and multiple routes.

  • November 2003 Peer-to-Peer Networking 47

    Routing Overhead

    Routing overhead large in AODV due to flooding.

    DSR allows routes to be learned by overheard packets.

  • November 2003 Peer-to-Peer Networking 48

    Path Optimality

  • November 2003 Peer-to-Peer Networking 49

    ConclusionsPacket Delivery Ratio:

    Small pause time and high speed in movement: AODV and DSR clear winners.

    DSDV performs reasonable for medium pause time and low speed movement.

    Routing Overhead: DSR overhead lowest in number of packets. AODV lowest in the number of bytes.

    Path optimality: DSDV and DSR performs best.

    No comparison done on packet delay.Load balancing is not considered.

  • November 2003 Peer-to-Peer Networking 50

    Conclusions

    Mobile Ad Hoc Networking: Peer-to-peer wireless forwarding of packets without infrastructure. Very dynamic, potentially rapidly changing network topology. All communication is wireless over very limited shared resource.

    Very active research in this area, increasing every year.

    Main research issues currently: Scalability: current flat routing protocol supports 200-300 nodes. Client- server model? Quality of service: bandwidth and constrained applications. Security. Internet connectvity: changing point of attachments. Power control.

  • November 2003 Peer-to-Peer Networking 51

    References

    C. Perkins. Ad Hoc Networking An Introduction. Chapter 1 in C. Perkins: Ad Hoc Networking, Addison-Wesley, 2002.

    E. M. Royer et al. A Review of Current Routing Protocols for Ad Hoc Mobile Wireless Networks. IEEE Personal Communication, April 1999.

    J. Broch et al. A Performance Comparison of Multi-Hop Wireless Ad Hoc Network Routing Protocols. Proc. of MobiCom 1998.

    S. Uskela. Link Technology Aspects of Multi Ad Hoc Networks. Seminar on Ad Hoc Networking, Espoo, April 12-13, 2002. Networking Laboratory, HelsinkiUniversity of Technology.

    D. B. Johnson. Routing in Mobile and Wireless Data Networks. Tutorial at FORTE2002.