Winter CMPE 155 Week 9
Winter Project 8 Setting up wireless ad hoc network. Designing/implementing application- level neighbor discovery protocol.
Winter Wireless and Mobile Networking
Winter Overview Wireless access and mobility – Force us to rethink many of our assumptions…
Winter The Physical Layer Many possible realizations. –Radio transmission range defined by cell. “Nanocell”: 6 meters in diameter. –Receiver within range can hear transmission. –Interaction of multiple transmitters at receiver: Collisions: receiver is “in range” of more than one transmitter. Capture: receiver in transmission range of 2 transmitters but able to receive cleanly from closer one. Interference: receiver is in range of one transmitter and slightly out of range of another transmitter; unable to receive cleanly from closer transmitter due to the other.
Winter MAC approaches Contention. –More robust. –Good performance under light load. –Example: CSMA Round-robin. –Token-based. Reservation.
Winter Carrier Sense Does Not Work Station avoids collisions by sensing carrier before transmitting. Relevant contention at the receiver, not sender. –Collision happens when multiple signals interfere at receiver. –CS cannot avoid collisions at receiver. A B C
Winter Hidden terminals B can hear both A and C. But A and C cannot hear each other. If A is transmitting to B, and if C starts to transmit, hidden terminal scenario at B. A B C
Winter Exposed terminals B is sending to A. C is ready to transmit but detects carrier and defers transmission. But A is out of C’s range. A B C
Winter Medium Access Collision Avoidance (MACA) Uses 2 short, fixed size signaling packets: RTS and CTS. –RTS: request-to-send. –CTS: clear-to-send.
Winter MACA Before sending data, send RTS. Target responds with CTS. RTS-generator can then transmit. Others who hear RTS defer transmission until after CTS. Stations overhearing CTS defer transmission. –Data packet length in RTS and CTS messages If station hears RTS but not CTS, can transmit. CTS as indication of being in-range of receiver. If CTS is not heard, or RTS collides: –Retransmit RTS after binary exponential backoff. –Backoff doubled after each retransmission. –Goes back to minimum after success.
Winter Backoff Can lead to unfairness –Even starvation. Need to share congestion information. –Backoff copy. Avoid oscillations in backoff counter. – Increase multiplicatively – Decrease additively – Improves throughput (less contention) A BC
Winter Adding Reliability Transmission errors: –Noise, collisions, etc. Add an ACK after DATA transmission – If ACK not received, sender restarts RTS/CTS again. – If ACK was lost, receiver sends ACK instead of CTS. A B C
Winter Fairness with RTS/CTS An exposed terminal may not be able to compete effectively. –Can send RTS but may not hear CTS. –Doesn’t know if RTS/CTS was successful. Fix: – Carrier sense. – …or a DS packet Short 30-byte data- sending packet. A B C
Winter IEEE Standard for wireless communication. MAC-layer uses many of the ideas discussed. –RTS/CTS/ACK. –Careful backoff. Allows two modes –Ad-hoc. –Wired/wireless.
Winter Mobile IP Internet standard for “last-hop” mobility support in IP networks (RFC 2290). How do we deliver IP packets when the endpoints move? –Mobile host must be able to communicate after changing its link-layer point-of- attachment to the Internet. –Mobile host must be able to communicate using its permanent (home) IP address.
Winter Mobile IP Issues: –Impact on IP addressing. –Impact on routing. Key design considerations: –Scale. Routing updates (size and frequency). –Simplicity. –Incremental deployment.
Winter Mobile IP Terminology Home Agent (HA) Mobile Host (MH) Foreign Agent (FA)
Winter Discovering Agents Agents periodically beacon advertisements
Winter Registration
Winter Tunneling Tunneled Data Packet HA keeps binding between MH and FA Src
Winter Other Mobile IP Issues Route optimality – resulting paths can be sub-optimal – can be improved with route optimization unsolicited binding cache update to sender Authentication – registration messages – binding cache updates
Winter What’s a MANET?
Winter MANET Multihop, (wireless), (mobile) ad hoc network. What does that really mean? –No fixed network infrastructure. –No distinction between hosts and routers. –All nodes can be traffic sources and forwarders.
Winter Applications Military applications. –Battlefield, tanks, boats. Disaster relief scenarios. Personal area network. –Communications between personal devices PDA’s, Laptops, Watches, Play Stations. SoHo (Small office Home office). Business Indoor Applications. –Exhibitions, Symposiums. –Demos, Meetings.
Winter Issues Mobility –Widely varying mobility patterns. –Routes can change rapidly. –Does it make sense to use stateful routing protocols? Power, bandwidth, and processing capabilities. –May be limited. –Multihop. –Power-aware algorithms.
Winter
Winter Ad-Hoc Routing Requirements Distribution paths –Multi hop paths. –Loop free. –Minimal transmission data overhead. Self starting and adaptive to dynamic topology. Low consumption of memory, bandwidth, power. –Scalable with number of nodes. –Localized effects of link failure.
Winter Unicast routing classification Table Driven - Proactive Routing Protocols Source Initiated - On DemandHybrid DSDVWRP AODVDSRTORALAR ZRPDDR
Winter Problems using DV or LS DV protocols: –May form loops: wasteful in wireless environment Bandwidth and power. –Loop avoidance may be complex LS protocols: –Higher storage and communication overhead.
Winter Flooding ? Flooding may deliver packets to too many nodes and in worst case all nodes reachable from sender may receive the packet. S R
Winter Alternatives to flooding Flood only control packets –Use flooding to set up routes and use established routes for data. –Need to limit flooding as much as possible.
Winter Proactive protocols Table Driven. –Maintain consistent, up-to-date routing information from each node to every other node in the network. –Each node has to maintain one or more tables to store routing information. –Periodically propagate updates throughout network to account for link changes.
Winter DSDV Destination Sequenced Distance Vector: – Based on Bellman-Ford algorithm. –Guarantees loop freedom. Each node maintains routing table. –Next hop. –Cost metrics. –Destination sequence number. –Each node periodically sends its local routing table with an incremented sequence number.
Winter On-demand protocols AODV –Primary Objectives Provide, unicast, broadcast and multicast capability. Minimize broadcast of control packets. Disseminate information about link breakages to neighboring nodes using the link. –Characteristics On-demand route creation.
Winter Route Requests in AODV B A S E F H J D C G I K Z Y Represents a node that has received RREQ for D from S M N L
Winter Route Requests in AODV B A S E F H J D C G I K Represents transmission of RREQ Z Y Broadcast transmission M N L
Winter Route Requests in AODV B A S E F H J D C G I K Represents links on Reverse Path Z Y M N L
Winter Reverse Path Setup in AODV B A S E F H J D C G I K Node C receives RREQ from G and H, but does not forward it again, because node C has already forwarded RREQ once Z Y M N L
Winter Reverse Path Setup in AODV B A S E F H J D C G I K Z Y M N L
Winter Reverse Path Setup in AODV B A S E F H J D C G I K Z Y Node D does not forward RREQ, because node D is the intended target of the RREQ M N L
Winter Route Reply in AODV B A S E F H J D C G I K Z Y Represents links on path taken by RREP M N L
Winter Forward Path Setup in AODV B A S E F H J D C G I K Z Y M N L Forward links are setup when RREP travels along the reverse path Represents a link on the forward path
Winter Data Delivery in AODV B A S E F H J D C G I K Z Y M N L Routing table entries used to forward data packet. Route is not included in packet header. DATA
Winter Timeouts A routing table entry maintaining a reverse path is purged after a timeout interval –timeout should be long enough to allow RREP to come back A routing table entry maintaining a forward path is purged if not used for a active_route_timeout interval –if no is data being sent using a particular routing table entry, that entry will be deleted from the routing table (even if the route may actually still be valid)
Winter Link Failure Reporting A neighbor of node X is considered active for a routing table entry if the neighbor sent a packet within active_route_timeout interval When the next hop link in a routing table entry breaks, all active neighbors are informed Link failures are propagated by means of Route Error messages, which also update destination sequence numbers
Winter Link Failure Detection Hello messages: Neighboring nodes periodically exchange hello message Absence of hello message is used as an indication of link failure Alternatively, failure to receive several MAC-level acknowledgement may be used as an indication of link failure
Winter Dynamic Source Routing (DSR) [Johnson96] When node S wants to send a packet to node D, but does not know a route to D, node S initiates a route discovery Source node S floods Route Request (RREQ) Each node appends own identifier when forwarding RREQ
Winter Route Discovery in DSR B A S E F H J D C G I K Z Y Represents a node that has received RREQ for D from S M N L
Winter Route Discovery in DSR B A S E F H J D C G I K Represents transmission of RREQ Z Y Broadcast transmission M N L [S] [X,Y] Represents list of identifiers appended to RREQ
Winter Route Discovery in DSR B A S E F H J D C G I K Node H receives packet RREQ from two neighbors: potential for collision Z Y M N L [S,E] [S,C]
Winter Route Discovery in DSR B A S E F H J D C G I K Node C receives RREQ from G and H, but does not forward it again, because node C has already forwarded RREQ once Z Y M N L [S,C,G] [S,E,F]
Winter Route Discovery in DSR B A S E F H J D C G I K Z Y M Nodes J and K both broadcast RREQ to node D Since nodes J and K are hidden from each other, their transmissions may collide N L [S,C,G,K] [S,E,F,J]
Winter Route Discovery in DSR B A S E F H J D C G I K Z Y Node D does not forward RREQ, because node D is the intended target of the route discovery M N L [S,E,F,J,M]
Winter Route Reply in DSR B A S E F H J D C G I K Z Y M N L RREP [S,E,F,J,D] Represents RREP control message
Winter Data Delivery in DSR B A S E F H J D C G I K Z Y M N L DATA [S,E,F,J,D] Packet header size grows with route length
Winter Use of Route Caching B A S E F H J D C G I K [P,Q,R] Represents cached route at a node (DSR maintains the cached routes in a tree format) M N L [S,E,F,J,D] [E,F,J,D] [C,S] [G,C,S] [F,J,D],[F,E,S] [J,F,E,S] Z
Winter Route Error (RERR) B A S E F H J D C G I K Z Y M N L RERR [J-D] J sends a route error to S along route J-F-E-S when its attempt to forward the data packet S (with route SEFJD) on J-D fails Nodes hearing RERR update their route cache to remove link J-D