Sei sulla pagina 1di 16

Transport Layer Protocols

HUAWEI TECHNOLOGIES CO., LTD.


Foreword

The transport layer is associated with the end-to-end behavior of


transport layer protocols, that are defined once data reaches the intended
destination. TCP and UDP represent the protocols commonly supported
within IP networks. The characteristics of data, such as sensitivity to
delay and the need for reliability often determines the protocols used at
the transport layer. This section focuses on the knowledge of how such
characteristics are supported through the behavior of each protocol.

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 2
Objectives

Upon completion of this section, trainees will be able to:


l Describe the common differences between TCP and UDP.

l Describe the forms of data to which TCP and UDP are applied.

l Identify well known TCP and UDP based port numbers.

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 3
Transmission Control Protocol

Host A TCP Connection Host B

Request Reply

l A connection is established before data is sent.

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 4
TCP Ports

Host A HTTP Server

S:1027 D:80 Data S:80 D:1027 Data

Protocol Port
FTP 20 - 21
HTTP 80
TELNET 23

SMTP 25

l Ports represent individual services such as those listed above.

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 5
TCP Header

IP TCP Header Data

0 15 31

Source Port Destination Port

Sequence Number

20bytes Acknowledge Number

Header NC E U A P R S F
Resv. S W C R C S S Y I Window
Length R EGKHT NN

Checksum Urgent Pointer

Options Padding

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 6
TCP Connection Establishment

Host A Server A

Send S
YN
(seq=a,
C TL=SYN
)
K)
N ,A CK N ,AC
SY S Y
S end ,C TL=
‚ k =a+1
ac
eq =b,
(s
ƒSe
(seq nd A
=a+ CK
1,ac
k=b
+1,C
TL=
A CK
)

l A TCP connection is established after a three-way handshake.

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 7
TCP Transmission Process

Host A Server A

Send 1,2,3

Acknowledge 4
Send 4,5,6

Acknowledge 4
Send 4,5,6

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 9
TCP Flow Control

Host A length 1 Server A


024 window
length 1 4096
024 window
4096

48
049 w indow 20
ack 2

length 1
024 window
length 1 4096
024 window
4096

048
window 2
ack 4097

length 1
024 window
length 1 4096
024 window
4096

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 10
TCP Connection Termination

Host A Server A
 FIN

K
‚ AC

ƒ FIN

TIME_WAIT 2x MSL
(MSL = 2 minutes)
„ACK
. Closed
.
Closed

l Host A will ensure ACK is received by Server A before closing.

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 11
User Datagram Protocol

Host A Host B

Request Reply

l UDP based data is sent without establishing a connection.

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 12
UDP Datagram Format

IP UDP Data

0 15 16 31

Source port Destination port


8 bytes
Length Checksum

l UDP achieves minimal overhead for each datagram.

l Datagram delivery is not guaranteed with UDP.


Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 13
UDP Forwarding Behavior

Host A Host B

l UDP susceptible to the possibility of datagram duplication or


non-orderly delivery of datagrams.

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 14
UDP Forwarding Behavior

Host A Host B
Voice/Video

Packet Loss

l There are no acknowledgements, therefore lost packets are not


retransmitted, this however is beneficial to delay sensitive data.

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 15
Summary

l What is the purpose of the acknowledgement field in the TCP header?

l Which TCP code bits are involved in a TCP three-way handshake?

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 16
Thank you
www.huawei.com

Potrebbero piacerti anche