192620010 Mobile & Wireless Networking Lecture 10: Mobile Transport Layer & Ad Hoc Networks [Schiller, Section 8.3 & Section 9] [Reader, Part 8] Geert Heijenk
Outline of Lecture 10 Mobile transport layer Motivation Approaches for improvement Indirect TCP Snooping TCP Mobile TCP Selective retransmission Recommended TCP improvements Ad hoc networks Concept Addressing and forwarding in ad-hoc networks Routing in ad-hoc networks Problem description DSDV (Destination Sequenced Distance Vector) Ad-hoc On-demand Distance Vector (AODV) DSR (Dynamic Source Routing) Further alternatives 2
Motivation I Transport protocols typically designed for Fixed end-systems Fixed, wired networks TCP congestion control packet loss in fixed networks typically due to (temporary) overload situations router have to discard packets as soon as the buffers are full TCP recognizes congestion only indirect via missing acknowledgements, retransmissions unwise, they would only contribute to the congestion and make it even worse slow-start algorithm as reaction 3
Motivation II TCP slow-start algorithm sender calculates a congestion window for a receiver start with a congestion window size equal to one segment exponential increase of the congestion window up to the congestion threshold, then linear increase missing acknowledgement causes the reduction of the congestion threshold to one half of the current congestion window congestion window starts again with one segment TCP fast retransmit/fast recovery TCP sends an acknowledgement only after receiving a packet if a sender receives several acknowledgements for the same packet, this is due to a gap in received packets at the receiver however, the receiver got all packets up to the gap and is actually receiving packets therefore, packet loss is not due to severe congestion, continue with (half of) current congestion window (do not use slow-start) 4
Influences of mobility on TCP-mechanisms TCP assumes congestion if packets are dropped typically wrong in wireless networks, here we often have packet loss due to transmission errors furthermore, mobility itself can cause packet loss, if e.g. a mobile node moves from one access point (e.g. foreign agent in Mobile IP) to another while there are still packets in transit and forwarding is not possible Additional problem: it takes a long time to increase the congestion window if the latency of the wireless link is high The performance of an unchanged TCP degrades severely but TCP cannot be changed due to the large base of installation in the fixed network (end-to-end protocol) therefore TCP for mobility has to remain compatible 5
Solutions: Indirect TCP / Performance Enhancing Proxy (RFC 3135) Indirect TCP or I-TCP segments the connection no changes to the TCP protocol for hosts connected to the wired Internet, millions of computers use (variants of) this protocol optimized TCP protocol for mobile hosts splitting of the TCP connection at, e.g., the foreign agent into 2 TCP connections, no real end-to-end connection any longer hosts in the fixed part of the net do not notice the characteristics of the wireless part mobile host performance enhancing proxy: access point / foreign agent wired Internet wireless TCP standard TCP 6
I-TCP socket and state migration Socket contains current TCP connection information (seq.num, ports) During handover, current AP buffers packets Since these packets have been acknowledged, they must be forwarded to new AP after handover is executed Fixed-side connection must be maintained (socket) access point 1 socket migration and state transfer Internet mobile host access point 2 7
Indirect TCP III Advantages no changes in the fixed network necessary, no changes for the hosts (TCP protocol) necessary, all current optimizations to TCP still work transmission errors on the wireless link do not propagate into the fixed network simple to control, mobile TCP is used only for one hop between, e.g., a foreign agent and mobile host therefore, a very fast retransmission of packets is possible, the delay on the mobile hop is known Disadvantages loss of end-to-end semantics, an acknowledgement to a sender does now not any longer mean that a receiver really got a packet, foreign agents might crash higher latency possible due to buffering of data within the foreign agent and forwarding to a new foreign agent 8
Solutions: Snooping TCP I Transparent extension of TCP within the foreign agent buffering of packets sent to the mobile host lost packets on the wireless link (both directions!) will be retransmitted immediately by the mobile host or foreign agent, respectively (so called local retransmission) the foreign agent therefore snoops the packet flow and recognizes acknowledgements in both directions, it also filters ACKs changes of TCP only within the foreign agent local retransmission foreign agent correspondent host wired Internet mobile host snooping of ACKs buffering of data end-to-end TCP connection 9
Snooping TCP II Data transfer to the mobile host FA buffers data until it receives ACK of the MH, FA detects packet loss via duplicated ACKs or time-out fast retransmission possible, transparent for the fixed network Data transfer from the mobile host FA detects packet loss on the wireless link via sequence numbers, FA answers directly with a NACK to the MH MH can now retransmit data with only a very short delay Integration of the MAC layer MAC layer often has similar mechanisms to those of TCP thus, the MAC layer can already detect duplicated packets due to retransmissions and discard them Problems snooping TCP does not isolate the wireless link as good as I-TCP snooping might be useless depending on encryption schemes 10
Solutions: Mobile TCP Special handling of lengthy and/or frequent disconnections M-TCP splits as I-TCP does unmodified TCP fixed network to supervisory host (SH) optimized TCP SH to MH Supervisory host no caching, no retransmission monitors all packets, if disconnection detected set sender window size to 0 sender automatically goes into persistent mode old or new SH reopen the window Advantages maintains semantics, supports disconnection, no buffer forwarding Disadvantages loss on wireless link propagated into fixed network adapted TCP on wireless link 11
Selective retransmission TCP acknowledgements are often cumulative ACK n acknowledges correct and in-sequence receipt of packets up to n if single packets are missing quite often a whole packet sequence beginning at the gap has to be retransmitted (go-back-n), thus wasting bandwidth Selective retransmission as one solution RFC2018 allows for acknowledgements of single packets, not only acknowledgements of in-sequence packet streams without gaps sender can now retransmit only the missing packets Advantage much higher efficiency Disadvantage more complex software in a receiver, more buffer needed at the receiver 12
Recommended TCP Improvements (RFC 3481) Appropriate Window Size (Sender & Receiver) Increased Initial Window (Sender) Limited Transmit (Sender) IP MTU Larger than Default Path MTU Discovery (Sender & Intermediate Routers) Selective Acknowledgments (Sender & Receiver) Explicit Congestion Notification (Sender, Receiver & Intermediate Routers) TCP Timestamps Option (Sender & Receiver) Disabling RFC 1144 TCP/IP Header Compression (Wireless Host) (RObust Header Compression, ROHC, RFC3095, is OK) 13
Outline of Lecture 10 Mobile transport layer Motivation Approaches for improvement Indirect TCP Snooping TCP Mobile TCP Selective retransmission Recommended TCP improvements Ad hoc networks Concept Addressing and forwarding in ad-hoc networks Routing in ad-hoc networks Problem description DSDV (Destination Sequenced Distance Vector) Ad-hoc On-demand Distance Vector (AODV) DSR (Dynamic Source Routing) Further alternatives 14
Ad hoc network concept Networks of wireless terminals that do not necessarily rely on existing infrastructure Although interworking with infrastructure is possible Direct communication between terminals when needed Multi-hop communication Extended concept of mobility: network mobility (moving routers) 15
Mobile ad hoc networks Standard Mobile IP needs an infrastructure Home Agent/Foreign Agent in the fixed network DNS, routing etc. are not designed for mobility Sometimes there is no infrastructure! remote areas, ad-hoc meetings, disaster areas cost can also be an argument against an infrastructure! Main topic: routing no default router available every node should be able to forward A B C 16
Addressing & forwarding in ad-hoc networks Broadcast (single hop) Beaconing Broadcast (multihop) Geocast Unicast 17
Beaconing Beaconing: periodic single-hop broadcast Problems: risk of overload no feedback from medium because of broadcast Solutions: adapt load to number of users, e.g., inter-beacon time / power control 18
Broadcast (multihop) Broadcast (multihop) Forwarding approach: flooding: all nodes forward all newly received messages Problems: broadcast storm: redundant transmissions synchronization of transmissions no acks, no feedback from medium Solutions: (random) delay before rebroadcasting, not all nodes rebroadcast e.g., distance-based forwarding 19
Geocast Geocast: like broadcast, but packet is only forwarded to certain geographic region Forwarding approach flooding to and in region routing to region + flooding in region Problems: trade-off between accuracy and efficiency 20
Unicast Unicast: single destination with known address Forwarding approach based on routing information 21
Outline of Lecture 10 Mobile transport layer Motivation Approaches for improvement Indirect TCP Snooping TCP Mobile TCP Selective retransmission Recommended TCP improvements Ad hoc networks Concept Addressing and forwarding in ad-hoc networks Routing in ad-hoc networks Problem description DSDV (Destination Sequenced Distance Vector) Ad-hoc On-demand Distance Vector (AODV) DSR (Dynamic Source Routing) Further alternatives 22
Routing examples Routing is a major topic in principle, every node should be able to forward dynamic topology asymmetric links redundant links: too many links when terminals are close N 1 N 1 N 2 N 3 N 3 N 2 N 4 N 5 N 4 N 5 time = t good link 1 time = t 2 weak link 23
Traditional routing algorithms Distance Vector periodic exchange of messages with all physical neighbors that contain information about who can be reached at what distance (monodirectional) selection of the shortest path if several paths available Link State periodic notification of all routers about the current state of all physical links (bidirectional) router get a complete picture of the network 24
Problems of traditional routing algorithms Dynamic of the topology frequent changes of connections, connection quality, participants Limited performance of mobile systems periodic updates of routing tables need energy without contributing to the transmission of user data, sleep modes difficult to realize limited bandwidth of the system is reduced even more due to the exchange of routing information links can be asymmetric, i.e., they can have a direction dependent transmission quality Problem protocols have been designed for fixed networks with infrequent changes and typically assume symmetric links 25
Ad hoc routing algorithms Pro-active Example: Destination Sequenced Distance Vector (DSDV) Re-active Example: Ad-hoc On-demand Distance Vector (AODV) Dynamic Source Routing (DSR) 26
DSDV (Destination Sequenced Distance Vector) Extension of distance vector routing Sequence numbers for all routing updates assures in-order execution of all updates avoids loops and inconsistencies Decrease of update frequency store time between first and best announcement of a path inhibit update if it seems to be unstable (based on the stored time values) See [Schiller] for details 27
Ad-hoc On-demand Distance Vector (AODV) Specified in IETF: RFC 3561 Forms the basis for DYMO (Dynamic On-demand MANET routing protocol) which is a planned IETF reactive routing protocol. Uses destination sequence numbers to avoid loops, and ensure proper updating of routes Storage of routes in Route Table Uses only symmetric links 28
Route Discovery Source broadcasts Route Request (RREQ): <Source_Addr, Source_Seq#, Broadcast_ID, Dest_Addr, Dest_Seq#, Hop_Count> A node can reply to the RREQ if It is the destination It has a fresh enough route to the destination Otherwise it rebroadcasts the RREQ Nodes keep track of <Source_Addr, Broadcast_ID> and discard redundant broadcasts Source Destination Route Request Propagation Source: Perkins & Royer 29
Reverse Path Setup Nodes update their Route Table with source node information before forwarding RREQ Reverse path entry used to forward Route Reply (RREP) back to source if one is received Expiration time is long enough for a RREP to be received and forwarded h Source Destination Reverse Path Formation 30
Forward Path Setup Destination, or intermediate node with current route to destination, unicasts Route Reply (RREP) back to source: <Source_Addr, Dest_Addr, Dest_Seq#, Hop_Count, Lifetime> Nodes along path record forward route in Route Table, use reverse route to forward RREP Source can begin sending data when it receives first RREP If it later receives a RREP with better metric, it updates its route entry Source Destination Forward Path Formation 31
Route Table Fields: Destination IP Address mber Destination Sequence Number HopCount Next Hop IP Address Active Neighbors Expiration time Source A Source Active Upstream Neighbors Next Hop Each time a route entry is used to transmit data, the expiration time is updated to current time + active_route_timeout Route entries may be updated if a route with greater sequence number or smaller hopcount is discovered Destination 32
Path Maintenance Movement of nodes not along active path does not trigger protocol action If source node moves, it can reinitiate route discovery When destination or intermediate node moves, node upstream of break sends unsolicited RREP to all active upstream neighbors metric, incremented Seq# Used to flush stale routes RREP is propagated to their active neighbors, and so on back to source Source can reinitiate route discovery if route is still needed RREQs for reinitiated route discovery contain destination sequence number of one greater than last known number 33
Path Maintenance (example) 3 3 1 2 3 1 2 Source The Initial Route Destination Destination Source 4 4 After Route Reconstruction Node 3 moves to new location 3 Node 3 moves to new location 3 Node 2 notices loss of link, sends link failure to Node 1 Node 2 notices loss of link, sends link failure to Node 1 Node1 forwards link failure to Source Source reinitiates route discovery, finds new route through Node 4 Node 1 forwards link failure to Source Source reinitiates route discovery, finds new route 34 throu Node 4
Local Connectivity Management Node must periodically hear from active neighbors to know they are still within range Eavesdrop on neighbor transmissions If no other transmissions within hello_interval, broadcast Hello packet Failure to hear from a neighbor for (1+ allowed_hello_loss) * hello_interval indicates loss of link 35
Optimizations Expanding Ring Search by limiting TTL at first attempt, and increasing it at successive attempts. RREP generated by intermediate node only if Seq# for route to destination Dest_Seq# of RREQ Maintaining Local Connectivity by means of layer 2 info. Local Repair node upstream of link failure tries to find a new route to destination by sending a RREQ (with reduced TTL, and incremented Dest_Seq#) 36
DSR (Dynamic Source Routing) Similar to AODV Big difference: DSR uses Source Routing AODV relies on storing routing table entries in intermediate nodes RREQ and RREP carry addresses of all intermediate nodes See [Schiller] for details 37
A plethora of ad hoc routing protocols Flat proactive DSDV Destination Sequenced Distance Vector FSLS Fuzzy Sighted Link State FSR Fisheye State Routing OLSR Optimised Link State Routing Protocol TBRPF Topology Broadcast Based on Reverse Path Forwarding reactive DSR Dynamic Source Routing AODV Ad hoc On demand Distance Vector Hierarchical CGSR Clusterhead-Gateway Switch Routing HSR Hierarchical State Routing LANMAR Landmark Ad Hoc Routing ZRP Zone Routing Protocol Geographic position assisted DREAM Distance Routing Effect Algorithm for Mobility GeoCast Geographic Addressing and Routing GPSR Greedy Perimeter Stateless Routing LAR Location-Aided Routing 38