TCPIPProtocolSuite02
TCPIPProtocolSuite02
Unit 2
Outline
Application Layer Protocols
HTTP/FTP
Response
Webpage
Application Layer Protocols
HTTP FTP
Telnet SSH Application
Transport
Internet
Network Access
HTTP – Hyper Text Transfer Protocol
HTTP response
<HTML>
FTP – File Transfer Protocol
Application
TCP and UDP operate at the transport layer.
Network Access
TCP – Transmission Control Protocol
Applications that require reliability use TCP as their transport layer protocol.
TCP reliability mechanisms create overhead that slows down data transfer.
Applications that require fast light-weight transport service, TCP is not the best choice.
TCP Sessions
Client Server
1 Connection establishment
2 Data transfer
3 Connection Termination
Three-Way Handshake
SYN, ACK 2
3 ACK
TCP Reliability
TCP reliability:
Recover from damaged, lost or duplicated data
Ensure ordered delivery
TCP achieves this reliability by assigning a sequence number to each octet it transmits and
requiring a positive acknowledgment (ACK) from the receiving peer.
If the ACK is not received within the time-out interval, the data is retransmitted.
At the receiver, the sequence numbers are used to correctly order segments that may be received out
of order, and to eliminate duplicates.
TCP Reliability Example
Sender - the segment sequence number (SEQ#) is the number of the first byte in the segment.
Receiver – the acknowledgment number (ACK#) is the number of the next byte it expects to
receive.
Sender Receiver
SEQ# SEQ# SEQ#
0 10 20
ACK#
30
TCP Retransmit Example
Sender Receiver
SEQ# SEQ# SEQ#
0 10 20
ACK#
10
17
Flow Control
The sender sends data in a faster rate than the receiver is capable to process
Excess data is dropped
TCP will retransmit dropped data
Sender Receiver
17
TCP Flow Control
Sender Receiver
ACK# WIN
30 30
ACK# WIN
60 20
TCP Summary
TCP mechanisms:
Connection oriented 3-way handshake
Retransmit lost or corrupted data
Ordered delivery
Flow control
TCP overhead:
More resources
More bandwidth
Slower transfer
UDP – User Datagram Protocol
UDP provides a procedure for applications to communicate with each other with a minimum
protocol overhead.
UDP performance :
Less resources
Less bandwidth
Faster transfer
Port Numbers
Transport layer protocols, such as TCP and UDP, use source and destination port numbers to
identify the specific process within the local and remote nodes.
The destination port is a well-known number, identifying the service requested on the remote server
The Source port is a dynamically allocated number identifying the process that sends the data
FTP
Source port: 80
Destination port: 2000
Port Numbers Example
FTP
21 FTP FTP
22 SSH DNS
53 DNS
110 POP3
Internet Layer Protocols
IP – Internet Protocol
Transport
IPv4 IPv6 Internet
Network Access
IP Services
IP provides the functions necessary to deliver a packet from a source to a destination over an
interconnected system of networks.
In order to fulfill these functions, IP provides the following:
Layer 3 addressing
Layer 3 packet format
Routing functionalities
IP Network
IP
IP
TCP/UDP
IPv4 Addressing
192.168.1.22
Subnet A Subnet B
Network Host
192.168.1.0 192.168.5.0
Address Address
192.168.5.203
192.168.1.58 192.168.5.47
IP Routers
IP Network
10.2.2.2
The application layer protocol formats the message and requests transport services from the
transport layer
The transport layer (TCP/UDP) adds a layer 4 header and requests network services from network
layer
The network layer (IP) add a layer 3 header
The IP packet is ready to be carried
over the physical medium
IP is a medium independent protocol, HTTP FTP
meaning it can be carried over different Message
Telnet SSH Application
media types
Ethernet is most commonly used
physical medium Segment/ TCP/UDP
Datagram Transport
Packet IP Internet
A company has a teleconferencing system that uses VOIP technology. This system uses UDP as the
transport. If UDP datagrams arrive at their destination out of sequence, what will happen?
Window size of 3 and segment size of one-byte have been negotiated for this transfer. If only the
two first segments were received by Receiver, which message will be returned from the Receiver to
the Sender as part of this TCP/IP transport?
A. ACK 1-3
B. ACK 3
C. ACK 4
D. ACK 2
E. ACK 2-3
Examine Your Knowledge 3
Which three statements characterize the transport layer protocols? Select three answers:
What are two ways that TCP uses the sequence numbers in a segment? (Select two)
A. To identify missing segments at the destination.
B. To reassemble the segments at the remote location.
C. To specify the order in which the segments travel from source to destination.
D. To limit the number of segments that can be sent out of an interface at one time.
E. To determine if the packet changed during transit.