ccm 4300 lecture 6 computer networks: wireless and mobile communication systems dr e. ever
DESCRIPTION
CCM 4300 Lecture 6 Computer Networks: Wireless and Mobile Communication Systems Dr E. Ever School of Computing Science. Lesson objectives. To acquire a basic understanding of performance issues of TCP with wireless communication systems - to investigate enhancement schemes. - PowerPoint PPT PresentationTRANSCRIPT
CCM 4300 Lecture 6
Computer Networks: Wireless and Mobile Communication
Systems
Dr E. EverSchool of Computing Science
Lesson objectives• To acquire a basic understanding of performance issues of
TCP with wireless communication systems
- to investigate enhancement schemes.
- explore the architecture of such technologies
- identify some of the advantages and disadvantages of using these
technologies.
•Understand TCP performance issues for Mobile Ad Hoc Networks
- to investigate routing protocols in ad-hoc networks
TCP performance over wireless and mobile networks
Motivation TCP-mechanisms
Slow start Congestion Control
Classical approaches
Indirect TCP Snooping TCP Mobile TCP SACK
Additional optimizations
Fast handoffs Selective retransmission Hop-by-hop rate control
Typical mobile wireless scenario
FH: Fixed Host MH: Mobile Host BS: Base Station (gateway)
Recovering from Error
Packet
ACK
Tim
eou
t
Packet
ACK
Tim
eou
t
Packet
Tim
eou
t
Packet
ACKT
ime
out
Time
Packet
ACK
Tim
eou
t
Packet
ACK
Tim
eou
t
ACK lost Packet lost Early timeoutDUPLICATEPACKETS!!!
Sliding Windows•The window size advertised by the receiver
•Tells the sender how much data, can be sent without waiting for further acknowledgements.
6
Go-Back-N in ActionDon’t wait for an acknowledgement of each packet
Selective Repeat
Slow Start and Congestion Control•When a TCP connection first begins, the Slow Start algorithm initializes a congestion window to one segment.
•Congestion window doubles up to the maximum window size advertised by the receiver.
•The sender can transmit the minimum of the congestion window and the advertised window of the receiver.
•In the Congestion Avoidance algorithm a retransmission timer expiring or the reception of duplicate ACKs (transmission window to one half of the current window size).
•If congestion was indicated by a timeout (or three or more duplicate ACKs are received), the congestion window is reset to one segment
9
Typical TCP behaviour
0
5
10
15
20
25
Time (round trips)
Con
gest
ion
win
dow
(se
gmen
ts)
ssthresh = 8
cwnd = 20
After timeout
What is the case in your lab experiment?(Time vs Sequence number)
Motivation I Transport protocols typically designed for
Fixed end-systemsFixed, wired networks
Research activitiesPerformanceCongestion controlEfficient retransmissions
TCP congestion controlpacket 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 indirectly via
missing acknowledgements, retransmissions unwise, they would only contribute to the congestion and make it even worse
slow-start algorithm as reaction11
TCP Problems in wireless links
In Wire network: Packet Loss CongestionIn Mobile Networks: Packet Loss disconnections, handoffs, high bit error rates
TCP was designed to work well in networks with low channel error rates, however Wireless links can exhibit high & variable error rates due to attenuation, fading, or interfering active radiation sources.
TCP has no means of detecting the nature of the error, so losses due to channel errors also get treated as congestion losses
TCP Performance Issues (Slow start)
Slow-start is used in conjunction with other algorithms to avoid sending more data than the network is capable of transmitting
Inappropriate reduction of congestion windowTCP backs off upon detection of packet loss Slow-start assumes that unacknowledged segments are due
to network congestion. While this is an acceptable assumption for many networks, segments may be lost for other reasons, such as poor data link layer transmission quality. Thus, slow-start can perform poorly in situations with poor reception, such as wireless networks.
Severe degradation in TCP throughput
halved
Packet loss
TCP Congestion Control
CWND
t
Congestion window size (CWND) limits the rate at which sender can send data traffic, in order to avoid congestion situation in network.
congestion window is smaller when congestion is larger and vice versa
Slow Start
Congestion Avoidance
Ehsan Hamadani (2004)
Congestion Avoidance
Three or more duplicatesOr
Time outCongestion Avoidance
Congestion Avoidance
TCP Performance Issues (Cont.)
Throughput loss WLAN
Frame Error Rate (FER) Cellular Communications systems
Increased processing delay due to interleaving
Widely varying RTT (round trip time)Disruptions caused by link resets suffer from severe error rates, due to
external interference
Interleaving (Bursty errors)
Error-free code words: aaaabbbbccccddddeeeeffffgggg
Interleaved: abcdefgabcdefgabcdefgabcdefg
Transmission with a burst error: abcdefgabcd____bcdefgabcdefg
Received code words after deinterleaving: aa_abbbbccccdddde_eef_ffg_gg
Link Layer mechanisms
Forward Error Correction (FEC) Can be use to correct small number of errors Incurs overhead even when errors do not occur GSM uses block coding (40 bits redundancy),
Convolutional coding (various rates 1/2, 1/3 and 1/6 as well as 244/456)
Link Level Retransmissions Retransmit a packet at the link layer, if errors are
detected Retransmission overhead incurred only if errors
occur
TCP Enhancement Schemes Indirect TCP or I-TCP (Split 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 hostaccess point (foreign agent) wired Internet
wireless TCP standard TCP
mobile host
access point2
Internet
access point1
socket migrationand state transfer
MSR – Mobility Source Router/ Base Station
19
Indirect TCP operates in Transport layer
20
Ajay V. Bakre, B.R. Badrinath, “Implementation and Performance Evaluation of Indirect TCP” , IEEE Transactions on Computers
Split Connection
Wireless related problems are isolated from the existing network protocols.
Splitting the TCP connection into 2 independent flow control between the mobile host and the fixed host into two separate connections:
1) Wired connection between the fixed host and the base station
2) Wireless connection between the base station and the mobile host.
Mobile Host
BSFixed Host
Connectio
n1
Connection2
Split Connection
Ajay V. Bakre, B.R. Badrinath, “Implementation and Performance Evaluation of Indirect TCP” , IEEE Transactions on Computers
TCP Enhancement Schemes (Snooping)
Snooping TCP at BS Better than split TCP Confine retransmission to wireless paths only Foreign agent sits between fixed network and mobile network No need to modify fixed network
FH MHBSwireless
physical
link
network
transport
application
physical
link
network
transport
application
physical
link
network
transport
application
TCP connection
”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 recognises acknowledgements in both directions, it also filters ACKs
It uses NACK to prompt retransmission changes of TCP only within the foreign agent
Snooping TCP (cont)
“ wired ” Internet
buffering of data
end-to-end TCP connection
local retransmission correspondenthostforeign
agent
mobilehost
snooping of ACKs
24
Snoop Protocol(2)
In the snoop protocol the base station monitors communication across the connection in either direction and caches packets.
A packet loss is detected by the arrival of a small number of
duplicate acknowledgements from the receiver or by local timeout at the base station.
Basic operation at BS: Data from MH -> FH
Detect missing packetsPerform negative acknowledgements
Data from FH -> MH Cache unacknowledged TCP data Perform local retransmissions
MH FHBS
Performance – Effect of Bit Errors
26
Hari Balakrishnan, Venkata N. Padmanabhan, Srinivasan Seshan and Randy H.Katz, “A Comparison of Mechanisms for Improving TCP Performance over Wireless Links”,
M-TCP
FH MHBS
Ack 1000Ack 999
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 BS does not send an ack to FH, unless BS has received an ack from MH
(maintains end-to-end semantics) BS withholds ack for the last byte ack’d by MH. When BS does not receive
ACK for sometime, it chokes sender by setting advertise window to 0
M-TCP (2)
When a new ack is received with receiver’s advertised window = 0, the sender enters persist mode
Sender does not send any data in persist modeexcept when persist timer goes off
When a positive window advertisement is received, sender exits persist mode
On exiting persist mode, cwnd are same as before the persist mode.
Some other well known TCP Enhancement Schemes
Notifying the causes of packet lossExplicit Loss Notification (ELN)Works well together with Snoop TCP
Adding selective ACK to TCPSACKCombat multiple losses in one RTT Data receiver can inform the sender about
all segments that have arrived successfully, so the sender need retransmit only the segments that have actually been lost.
SACKCombat multiple losses in one RTT
Comparison Things need to consider when assessing TCP enhancement schemes
End-to-end semantics (e.g. In I-TCP because the connection is split, separate acknowledgements are generated )
IP payload access Wireless gateway overhead Ease of deployment
Additional Approaches to Improve TCP Performance
Fast hand-offs The last packets before the handoff are
available with new BS as well.HA uses multicast address to forward
packetsPackets are automatically forwarded to
BSThe new BS joins the multicast group
before hand-off occursThe new BS buffers last few packetsThe new BS starts forwarding the
buffered packets to the mobile host after hand-off
31
TCP/IP over Heterogeneous Wireless Sys.
Challenges Multiple systems co-exist Direct interoperability between different
wireless systems Hierarchical cellular systems
Research projects Multi-Service Link Layer (MSLL) Wireless Internet Network (WINE) Wireless Adaptation Layer (WAL)
Characteristics of Mobile Networks
Cellular networksBase station (BS) arbitrates channel
allocationMobile hosts communicate with each
other via BSs Ad hoc networks
No BSAll mobile hosts act as routers
33
34
Mobile Ad hoc networksStandard 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!
routing
no default router available
every node should be able to forward
Cellular vs Ad-hoc Networks
35
Impacts of Mobility on TCP Performance Blackouts
LocationFadingDegrade TCP throughput
Handoff latencyPacket re-routingBursty lossesDegrade TCP throughput
Triangular routing and large RTTTriangular causes extra delay TCP throughput inversely proportional to RTTLarge RTT results in lesser throughput
•IP packets to a mobile node that is outside its home network are routed through the home agent.
•Packets from the mobile node to the correspondent nodes are routed directly (triangle routing)
36
• TCP does not distinguish between congestion and packet loss due to transmission errors and route failures
• This inability results in performance degradation in ad hoc networks
•Route re-computation takes a finite amount of time
• During this time no packet can reach the destinationthrough the existing route
• Packets and ACKs may get queued and possibly dropped
• In turn leads to timeouts at the source, which ismisinterpreted as congestion
Implications of using Normal TCP over Ad-Hoc Wireless N/W
37
Different approaches to improve the performance of TCP over Ad-Hoc Networks
• in wireless networks we have:– I-TCP– Snoop TCP– M-TCP– SACK
• Ad hoc networks– TCP-F– ELFN– ATCP
Recall ….
38
TCP Performance Issues in Ad Hoc NW
Route failureTCP may lose a congestion window of
packetsLarge RTT variationDegrade TCP throughput
Route Re-computationIncur extra delayResult in a more inflated re-transmission
time-out
39
TCP Performance Issues in Ad Hoc Networks
Network Partition TCP may reset the connection if the
partition lasts for more than 100 sec.TCP enters slow-start phase after
cutting down its window size to 1Degrade TCP throughput
40
Impact of Multi-Hop Wireless Paths
0
200
400
600
800
1000
1200
1400
1600
1 2 3 4 5 6 7 8 9 10
Number of hops
TCP Throughtput(Kbps)
TCP Throughput using 2 Mbps 802.11 MAC
Nael B. Abu-Ghazaleh , ” tcp over wireless”
Approaches for Improvement
TCP-feedback and TCP-ELFNEmploy Explicit Link Failure Notification
(ELFN)A source node issues a route re-
computation request upon receipt of an ELFN
Reset TCP congestion window size to half its size (instead of 1)
42
Approaches for Improvement (Cont.)
Hop-by-hop rate controlEach router (mobile host) performs
rate control on each of its outgoing links based on feedback from downstream routers
Feedback time is minimalMore responsive to route failures
43
ATCP – TCP for Mobile Ad Hoc Networks
•Thin layer between TCP and IP
• Treats loss due to congestion and medium
differently (notifications, network feedback)
• Functions efficiently even with high bit error
rates
• Handles network partition gracefully
• Maintains end-to-end TCP semantics!
44
• ATCP– Normal– Congested– Loss– Disconnected
• TCP– Depending on it’s mode of operation ATCP
sets TCP in one of the following modes• Normal• Congested• Persist
Modes of operation
45
46
Ad Hoc NetworksKey question:
How do we provide connectivity between different mobile wireless technologies in a mobile Ad-hoc network (MANET)?
An Ad-Hoc network is defined as: Dynamically formed mobile nodes, no central manager, no fixed topology, and nodes can act as routers.
47
Connectivity – how to achieve it?• “Mostly “Wireless:
• Router to wired network• Mobile ad-hoc networks:
• MANET• Examples
– Example 1– cell 1 hosts use IEEE802.11 ….– cell 2 hosts use Bluetooth– host with one interface of each type acts as
router– Example 2
– some hosts in cell 1– some hosts in cell 2– cell-cell distance > Tx range– host in cell 1 and cell 2 acts as router between
cells
Routing in Ad hoc networks
Proactive: “Normal” routingCreate routing tables
periodically:oRoute ready when requiredoComputation overhead oRouting updates
Topology changes may be frequent
oDue to mobility
Reactive: Build routes on demandNeed to build routes
oRouting information evaluated only when neededolatency (due to path search)oDiscover route and destination
Topology changes may be frequent
oHow to re-evaluate on the flyoWhat if flow is in progress
48
49
Reactive routing
•Route Discovery:
•Find path to destination
• define protocols for requests and responses
•Report reachability / nonreachability
•Data forwarding (routing):
•Forwarding Mechanism
•Depending on the algorithm
• Information (state) needed in routers
• Information (state) needed in packets
Router End system
50
Reactive routing ….. Cont….
•Route Maintenance:
•Dealing with forwarding path outages (e.g. link breaks, next hop “disappears”)
• Recovery procedures for finding alternative routes
•Signalling/reporting mechanisms
•State information in network:
•Hold in network (routers),
•What if router losses connectivity?
•Possible to keep information in the packets
51
Reactive routing … cont….•State information in packets:
•Hold in packet header•Waste of wireless capacity
•Complexity of algorithm •Computational cost •Energy/power expenditure
•Timeliness of routing update:•Route maintenance •Periodic probes may waste resources (similar to proactive)•Use layer1 and 2 connectivity information to see if forwarding path still up
•Scalability(?)•Small network …. OK … but … what about large networks?
52
FixedNetwork
MobileDevices
MobileRouter
Manet
Mobile IP, DHCP
Router End system
Mobile Ad hoc networks
53
Routing examples for ad-hoc networks
N1
N4
N2
N5
N3
N1
N4
N2
N5
N3
good linkweak link
time = t1 time = t2
•Asymmetric links
•Redundant links
•Interference
•Dynamic topology
54
•Split routing into discovering a path and maintaining a path,
Discover a path
only if a path for sending packets to a certain destination is needed and no path is currently available
Maintaining a path
only while the path is in use one has to make sure that it can be used continuously
No periodic updates needed!
Dynamic Source Routing…. DSR
55
Discover a path (A-G)
A
B
C
E
D
G
H
F
A
A
A-B
A-C
A-C-E
A-C-E
A-C-E
A-B-D
A-B-D-GA-B-D-G
A-B-D-G
56
Maintain a path (A-G)
A
B
C
E
D
G
H
F
G
RERRRERR
Route Cache (A)G: A, B, D, G
G: A, C, E, H, GF: B, C, F
57
Dynamic Source Routing (DSR)•Route for packet:
•list of IP addresses (hops) in IP header (option header)
•Route discovery
•Source Broadcasts
•ROUTE_REQ with destination address and ID number, i.e., id = 45, Target = G (Slide 55)
•At intermediate node:
•check ID for duplicates (if same request, discard)
•if route unknown, add your address to packet header and flood
•if route to destination known, send ROUTE_REPLY back to source
58
DSR ….. Cont…..
•At destination:
•send ROUTE_REPLY, containing all address in ROUTE_REQ, back to source
•backward learn
•At source:
•check ID number for duplicates
•add route to route cache
destination
source1
65
4
3
2
8
7
(1,4)
(1,2)
(1,3)
(1,3,5,6)(1,3,5)
(1,4,7)
source broadcasts a packet containing address of source and destination
The route looks up its route caches to look for a route to destinationIf not find, appends its address into the packet
The destination sends a reply packet to source.
The node discards the packets having been seen
59
60
DSR … continues …
•Data forwarding:
•source puts route (list of IP addresses – hops – to destination) from route cache in IP header
•Intermediate hops forward to next IP address in list and forwards
•Route maintenance:
•upstream hop should monitor transmission from downstream hop to see if downstream is “alive”
61
DSR .. Continues …
•error message generated giving information about break in route
•source restarts route discovery for destination
•Simple
•Only useful for small networks:
•Only need to use it for small networks
•Inefficient (too complicated)
62
Ad hoc On demand distance vector routing: AODVDistance Vector routing:
•(hop count) on demand evaluation
•Route Discovery
•source broadcasts – •ROUTE_REQ:
•destination sequence number (DSN) used to detect old routs
•Intermediate node:
•sends ROUTE_REPLY if it knows route to destination and has a “newer” DSN for that route
63
AODV ….. Continues •Destination:
•sends ROUTE_REPLY
Data forwarding •Next hop forwarding:
•routing tables kept by all nodes
Route Maintenance •HELLO packets:
•broadcast periodically by all nodes – “heart beat”
•If link is dead, ROUTE-REPLY using poisoned reverse for all routes that use that link
64
AODV …. Continues
•Use of poisoned reverse: a route is no longer reachable and should be removed from their routing tables
•avoids count-to-infinity
•Use of DSN:
•avoids looping
•DSN associated with each routing table entry
•DSN incremented on new route discovery
65
AODV – the benefits
•No need for multiple route discovery:
•Routers established some state from HELLO packets
•More scalable than DSR
•More complex than DSR:
•computationally expensive
•energy usage
66
Other Protocols
•Single stability routing protocol (SSA)
•DSDV (Destination Sequenced Distance Vector)
•Zone routing protocol (ZRP)
•On-Demand Multicast Routing Protocol (ODMRP)
•(plus others)
67
Recap
•Ad hoc routing:
•Proactive
•Reactive
•Reactive routing examples:
•DSR
•AODV (early work) -
•(other protocols exist)
68
Summary
• wireless networks–I-TCP – Indirect TCP– Snoop TCP–M-TCP - – SACK
• Ad-hoc networks –TCP-Feedback (TCP-F)
–TCP with Explicit Link Failure Notification (ELFN)–ATCP – TCP for Mobile Ad-hoc Networks
Further Correction of error on UDP ChecksumMy previous explanation of how the UDP checksum worked was incorrect. Here is the correct
version.1. Segment is divided into consecutive 16 bit words2. The words are summed up using 1’s complement addition3. The final sum from step 2 is then complemented. The resulting 16 bit word is the
Checksum.
What is 1’s complement addition?1. Sum the numbers normally2. The carry of the sum is whatever bits are to the left of the rightmost 16 bits.3. If carry=0 then the normal sum is the 1’s complement sum.
If carry!=0 then add the carry back into normal sum to get 1’s complement sum.4. Examples below use 8 bits5. 1’s complement is actually a way of adding signed numbers (but we will not discuss
this)
1 0 0 0 1 0 0 1 Word 1 1 0 1 1 1 0 0 0 Word 2------------------------------------- 1 0 1 0 0 0 0 0 1 Normal Sum (note carry to remove) 1 Remove carry and add it back------------------------------------- 0 1 0 0 0 0 1 0 1’s complement sum
0 0 1 0 1 0 0 1 Word 11 0 1 1 1 0 0 0 Word 2---------------------------------1 1 1 0 0 0 0 1 1’s complement sum
Checksum example1 0 0 0 1 0 0 1 Input Word 11 1 1 1 0 0 0 0 Input Word 20 0 1 1 1 1 0 0 Input Word 31 0 1 0 0 0 0 1 Input Word 4
1 0 0 0 1 0 0 1 W1 1 1 1 1 0 0 0 0 W2--------------------------------------------------------------------- 1 0 1 1 1 1 0 0 1 Normal sum 1 Carry--------------------------------------------------------------------- 0 1 1 1 1 0 1 0 1’s Comp sum W1, W2 0 0 1 1 1 1 0 0 W3--------------------------------------------------------------------- 1 0 1 1 0 1 1 0 1’s Comp sum W1, W2, W3 1 0 1 0 0 0 0 1 W4--------------------------------------------------------------------- 1 0 1 0 1 0 1 1 1 Normal sum 1 Carry--------------------------------------------------------------------- 0 1 0 1 1 0 0 0 1’s Comp sum W1, W2, W3, W4 1 0 1 0 0 1 1 1 complement
= checksum of W1-W4