4deda7d4-79ec-4ba5-a59e-3ee97f26bc23

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 24

Introduction to Traditional TCP

Learning Outcomes 学习成果


At the end of this course, students will be able to:

 Describe transmission control protocol (TCP) and its major responsibilities

 Define congestion control and slow start

 Describe fast retransmit and fast recovery

 Highlight the problems with traditional TCP in wireless environments

 Describe classical TCP improvements (Indirect TCP (I-TCP), snooping TCP, mobile TCP)

 Highlight the advantages and disadvantages of indirect TCP (I-TCP), snooping TCP, mobile TCP

 Define transmission/time-out freezing, selective retransmission, and transaction-oriented TCP


Introduction to Transmission Control Protocol
 The Transmission Control Protocol (TCP) is one of(TCP)
the core protocols of the Internet
protocol suite, often simply referred to as TCP/IP.

 TCP is reliable, guarantees in-order delivery of data and incorporates congestion


control and flow control mechanisms.

 It supports many of the Internet's most popular application protocols and resulting
applications, including the World Wide Web, e-mail, File Transfer Protocol and
Secure Shell.

 In the Internet protocol suite, TCP is the intermediate layer between the Internet
layer and application layer.

 The major responsibilities of TCP in an active session are to:


 Provide reliable in-order transport of data: to not allow losses of data.

 Control congestions in the networks: to not allow degradation of the network performance,

 Control a packet flow between the transmitter and the receiver: to not exceed the
receiver's capacity.
Congestion Control
 Congestion may appear from time to time even in carefully designed networks.
 The packet buffers of a router are filled and the router cannot forward the packets fast enough
because the sum of the input rates of packets destined for one output link is higher than the
capacity of the output link.
 The only thing a router can do in this situation is to drop packets.
 A dropped packet is lost for the transmission, and the receiver notices a gap in the packet
stream.
 Now the receiver does not directly tell the sender which packet is missing, but continues to
acknowledge all in-sequence packets up to the missing one.
 The sender notices the missing acknowledgement for the lost packet and assumes a packet
loss due to congestion.
 Retransmitting the missing packet and continuing at full sending rate would now be unwise, as
this might only increase the congestion.
 To mitigate congestion, TCP slows down the transmission rate dramatically.
 All other TCP connections experiencing the same congestion do exactly the same so the
congestion is soon resolved.
Slow Start
 The behavior TCP shows after the detection of congestion is called slow start.

 The sender always calculates a congestion window for a receiver.

 The start size of the congestion window is one segment (TCP packet).

 The sender sends one packet and waits for acknowledgement.

 If this acknowledgement arrives, the sender increases the congestion window

by one, now sending two packets (congestion window = 2).

 This scheme doubles the congestion window every time the acknowledgements

come back, which takes one round trip time (RTT).

 This is called the exponential growth of the congestion window in the slow start

mechanism.
Problems with Traditional TCP in Wireless
Environments
 Slow Start mechanism in fixed networks decreases the efficiency of TCP if used

with mobile receivers or senders.

 Error rates on wireless links are orders of magnitude higher compared to fixed

fiber or copper links. This makes compensation for packet loss by TCP quite

difficult.

 Mobility itself can cause packet loss. There are many situations where a soft

handover from one access point to another is not possible for a mobile end-

system.

 Standard TCP reacts with slow start if acknowledgements are missing, which

does not help in the case of transmission errors over wireless links and which

does not really help during handover. This behavior results in a severe

performance degradation of an unchanged TCP if used together with wireless


Classical TCP Improvements
 Indirect TCP (I-TCP) segments a TCP connection into a fixed part

and a wireless part.

 The following figure shows an example with a mobile host

connected via a wireless link and an access point to the ‘wired’

internet where the correspondent host resides.

 Standard TCP is used between the fixed computer and the access

point. No computer in the internet recognizes any changes to TCP.

Instead of the mobile host, the access point now terminates the

standard TCP connection, acting as a proxy. This means that the

access point is now seen as the mobile host for the fixed host and

as the fixed host for the mobile host.


Advantages and Disadvantages of I-TCP
 No changes in the fixed network necessary, no changes for the hosts (TCP protocol) necessary, all
current optimizations to TCP still work
 Simple to control, mobile TCP is used only for one hop between, e.g., a foreign agent and mobile host
transmission errors on the wireless link do not propagate into the fixed network therefore, a very fast
retransmission of packets is possible, the short delay on the mobile hop is known.
 It is always dangerous to introduce new mechanisms in a huge network without knowing exactly how
they behave. Therefore New optimizations can be tested at the last hop, without jeopardizing the
stability of the Internet.
 It is easy to use different protocols for wired and wireless networks.

Disadvantages of I-TCP

 Loss of end-to-end semantics: an acknowledgement to a sender no longer means that a receiver


really has received a packet, foreign agents might crash.
 Higher latency is possible: due to buffering of data within the foreign agent and forwarding to a new
foreign agent.
 Security issue: The foreign agent must be a trusted entity.
Snooping TCP
 The main drawback of I-TCP is the segmentation of the single TCP
connection into two TCP connections, which loses the original end-to-end
TCP semantic.
 A new enhancement, which leaves the TCP connection intact and is
completely transparent, is Snooping TCP.
 The main function is to buffer data close to the mobile host to perform fast
local retransmission in case of packet loss.
 Here, the foreign agent buffers all packets with destination mobile host
and additionally ‘snoops’ the packet flow in both directions to recognize
acknowledgements.
 The foreign agent buffers every packet until it receives an
acknowledgement from the mobile host.
 If the FA does not receive an acknowledgement from the mobile host
within a certain amount of time, either the packet or the
acknowledgement has been lost.
Advantages and Disadvantages of snooping
TCP
 The end-to-end TCP semantic is preserved.
 Most of the enhancements are done in the foreign agent itself which keeps correspondent host unchanged.
 Handover of state is not required as soon as the mobile host moves to another foreign agent. Even though
packets are present in the buffer, time out at the CH occurs and the packets are transmitted to the new COA.
 No problem arises if the new foreign agent uses the enhancement or not. If not, the approach automatically falls
back to the standard solution.

Disadvantages of snooping TCP


 Snooping TCP does not isolate the behavior of the wireless link as well as I-TCP. Transmission errors may
propagate till CH.
 Using negative acknowledgements between the foreign agent and the mobile host assumes additional
mechanisms on the mobile host. This approach is no longer transparent for arbitrary mobile hosts.
 Snooping and buffering data may be useless if certain encryption schemes are applied end- to-end between the
correspondent host and mobile host. If encryption is used above the transport layer, (eg. SSL/TLS), snooping TCP
can be used.
Mobile TCP
 Both I-TCP and Snooping TCP does not help much, if a mobile host gets
disconnected.
 The M-TCP (mobile TCP) approach has the same goals as I-TCP and snooping
TCP: to prevent the sender window from shrinking of bit errors or disconnection
but not congestion cause current problems.
 M-TCP wants to improve overall throughput, to lower the delay, to maintain
end-to-end semantics of TCP, and to provide a more efficient handover.
 M-TCP is especially adapted to the problems arising from lengthy or frequent
disconnections.
 M-TCP splits the TCP connection into two parts as I-TCP does.
 An unmodified TCP is used on the standard host-supervisory host (SH)
connection, while an optimized TCP is used on the SH-MH connection.
 The SH monitors all packets sent to the MH and ACKs returned from the MH.
 If the SH does not receive an ACK for some time, it assumes that the MH is
disconnected.
Advantages and Disadvantages of M-TCP
 It maintains the TCP end-to-end semantics. The SH does not send any
ACK itself but forwards the ACKs from the MH.

 If the MH is disconnected, it avoids useless retransmissions, slow starts


or breaking connections by simply shrinking the sender’s window to 0.

 As no buffering is done as in I-TCP, there is no need to forward buffers to


a new SH. Lost packets will be automatically retransmitted to the SH.

Disadvantages of M-TCP

 As the SH does not act as proxy as in I-TCP, packet loss on the wireless
link due to bit errors is propagated to the sender. M-TCP assumes low bit
error rates, which is not always a valid assumption.

 A modified TCP on the wireless link not only requires modifications to


the MH protocol software but also new network elements like the
bandwidth manager.
Transmission/Time-out Freezing
 Often, MAC layer notices connection problems even before the connection is actually interrupted
from a TCP point of view and also knows the real reason for the interruption.
 The MAC layer can inform the TCP layer of an upcoming loss of connection or that the current
interruption is not caused by congestion.
 TCP can now stop sending and ‘freezes’ the current state of its congestion window and further timers.

 If the MAC layer notices the upcoming interruption early enough, both the mobile and correspondent
host can be informed.
 With a fast interruption of the wireless link, additional mechanisms in the access point are needed to
inform the correspondent host of the reason for interruption.
 Otherwise, the correspondent host goes into slow start assuming congestion and finally breaks the
connection.
 As soon as the MAC layer detects connectivity again, it signals TCP that it can resume operation at
exactly the same point where it had been forced to stop.
 Because TCP time simply does not advance, so no timers expire.
Advantages and Disadvantages of Transmission/Time-out Freezing

Advantages

 It offers a way to resume TCP connections even after long

interruptions of the connection.

 It can be used together with encrypted data as it is

independent of other TCP mechanisms such as

sequence no or acknowledgements

Disadvantages

 Lots of changes have to be made in software of MH, CH

and FA.
Selective Retransmission
 A very useful extension of TCP is the use of selective retransmission.

 TCP acknowledgements are cumulative, i.e., they acknowledge in-order receipt of packets up to a

certain packet.

 A single acknowledgement confirms reception of all packets up to a certain packet. If a single packet

is lost, the sender has to retransmit everything starting from the lost packet (go-back-n

retransmission).

 This obviously wastes bandwidth, not just in the case of a mobile network, but for any network.

 Using selective retransmission, TCP can indirectly request a selective retransmission of packets.

 The receiver can acknowledge single packets, not only trains of in-sequence packets.

 The sender can now determine precisely which packet is needed and can retransmit it.

 The advantage of this approach is that a sender retransmits only the lost packets. This lowers

bandwidth requirements and is extremely helpful in slow wireless links.

 The disadvantage is that a more complex software on the receiver side is needed.
Transaction-oriented TCP
 Assume an application running on the mobile host that sends a short request to a server from time to time,
which responds with a short message and it requires reliable TCP transport of the packets.

 For it to use normal TCP, it is inefficient because of the overhead involved.

 Standard TCP is made up of three phases: setup, data transfer and release.

 First, TCP uses a three-way handshake to establish the connection. At least one additional packet is usually
needed for transmission of the request, and requires three more packets to close the connection via a three-
way handshake.

 So, for sending one data packet, TCP may need seven packets altogether.

 This kind of overhead is acceptable for long sessions in fixed networks, but is quite inefficient for short
messages or sessions in wireless networks. This led to the development of transaction-oriented TCP (T/TCP).

 T/TCP can combine packets for connection establishment and connection release with user data packets.

 This can reduce the number of packets down to two instead of seven.

 The obvious advantage for certain applications is the reduction in the overhead which standard TCP has for
connection setup and connection release.

 Disadvantage is that it requires changes in the software in mobile host and all correspondent hosts.
Classical Enhancements To TCP For Mobility: A
Comparison
For Further Readings
 https://www.fortinet.com/resources/cyberglossary/tcp-ip

 https://www.geeksforgeeks.org/what-is-transmission-control-protocol-tcp/

 https://www.khanacademy.org/computing/computers-and-internet/xcae6f4a7ff015e7d:the-internet/
xcae6f4a7ff015e7d:transporting-packets/a/transmission-control-protocol--tcp

 https://www.tutorialspoint.com/data_communication_computer_network/transmission_control_protocol.htm

 https://www.youtube.com/watch?v=kio27um--pg

 https://www.youtube.com/watch?v=VHQMysYWGgA

 https://www.youtube.com/watch?v=UUSh5nwcDhs

 http://www.idc-online.com/technical_references/pdfs/data_communications/Classical_TCP_Improvements.pdf

 https://www.geeksforgeeks.org/snooping-tcp/

 https://www.researchgate.net/figure/Classification-of-TCP-improvement-schemes-for-wireless-ad-hoc-
networks_fig8_236671492
Practical Session
MOBILE APPLICATION
DEVELOPMENT (ANDROID)
In this session, you will learn how to design a simple splash
screen on android studio.
A splash screen is a graphical control element consisting of a
window containing an image, a logo, and the current version
of the software. A splash screen usually appears while a game
or program is launching.
Step 1

Add SplashScreen
activity
Step 2

Copy and paste your


company logo or image into
the drawable folder

Step 3: Add splash screen


dependency and Sync
https://github.com/pantrif/Eas
ySplashScreen

implementation
'gr.pantrif:easy-android-
splash-screen:0.0.1'
Step 4

Open the manifest folder and


set your splash screen as start
up activity
Step 5
Add the code below to your Splashscreen.java file

public class SplashScreen extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

requestWindowFeature(Window.FEATURE_NO_TITLE); //add this line to remove the action bar

EasySplashScreen easySplashScreen=new EasySplashScreen(SplashScreen.this)


.withFullScreen()
.withTargetActivity(MainActivity.class)
.withSplashTimeOut(5000)
.withBackgroundColor(Color.parseColor("#ffffff"))
.withLogo(R.drawable.luclogo)
.withHeaderText("WELCOME TO LUC MOBILE APP")
.withFooterText("© 2019 LUC");

//set font color


easySplashScreen.getHeaderTextView().setTextColor(Color.RED);
easySplashScreen.getFooterTextView().setTextColor(Color.RED);

//set to view
View view=easySplashScreen.create(); Step 6: Run your project
setContentView(view);
}
}
Thank you
for your

You might also like