0% found this document useful (0 votes)
8 views

TCPIPProtocolSuite02

Uploaded by

osama738314849
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

TCPIPProtocolSuite02

Uploaded by

osama738314849
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

TCP/IP Protocol Suite

Unit 2
Outline
Application Layer Protocols
 HTTP/FTP

Transport Layer Protocols


 TCP/UDP

Network Layer Protocols


 IP
• IP Addressing
• IP Routing
Application Layer Protocols
Data Transfer

 Remote applications exchange messages over the network.


 Applications must implement the same protocol.
 Example – a web browser asking for a web page from a web server.

Request Web browser:


GET: www.nvidia.com address: www.nvidia.com

Response
Webpage
Application Layer Protocols

 The application layer provides network services to data generated by applications.


 Whenever an application layer protocol wishes to communicate with a remote application, it hands
over the data to the transport layer.

HTTP FTP
Telnet SSH Application

Transport
Internet

Network Access
HTTP – Hyper Text Transfer Protocol

 HTTP is an application layer protocol.


 HTTP is the protocol to exchange text and logical links (hyperlinks) between nodes.
 HTTPS is the secured variant of HTTP.
HTTP Operation

 HTTP functions as a request–response protocol in the client–server computing model.


 The client submits an HTTP request message to the server.
 The server, which provides resources such as HTML files and other content types, returns a response message to
the client.
 The response contains the request’s completion status information and may also contain requested content in its
message body.

HTTP request Web browser:


www.nvidia.com? address: www.nvidia.com

HTTP response
<HTML>
FTP – File Transfer Protocol

 FTP is an application layer protocol used to transfer files between hosts.


 FTP users may connect anonymously if the server is configured to allow it or may authenticate
themselves with a clear-text sign-in protocol, normally in the form of a username and a password.
 FTPS can be used for secure transmission that protects the username and the password and
encrypts the content.
Transport Layer Protocols
Transport Layer Protocols

 Transport layer protocols establish end-to-end logical communication channels between


applications.
 The transport layer functions are:
 Facilitating the communicating hosts to carry on a conversation
 Asking for layer 3 protocols to carry data to the destination
 Providing a reliable connection.
It can also carry out error checking, flow control and verification

Application
 TCP and UDP operate at the transport layer.

TCP UDP Transport


Internet

Network Access
TCP – Transmission Control Protocol

 TCP is a reliable, connection-oriented transport protocol.


 Connection oriented - a connection is established between the peer entities prior to transmission.
 Reliable - TCP uses sequence numbers and acknowledgments (ACKs) to recover from damaged or lost data.
 Flow control - TCP allows the receiver to govern the amount of data sent by the sender.
TCP uses a “window” size to indicate the allowed number of bytes the sender may transit before receiving further
permission.
 Ordered delivery - Sequence numbers are used to order segments.

 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

 When two application processes wish to communicate over TCP:


1. A connection must first be established.
2. Once a connection is established , data can be transferred.
 TCP uses a keep-alive feature to keep connections open and manage them.
3. After data transmission is completed, the connection is terminated, and all allocated resources are released.

Client Server

1 Connection establishment

2 Data transfer

3 Connection Termination
Three-Way Handshake

 TCP connections are established using the “three-way handshake” process


 To establish a connection, each peer must send a SYN and receive an ACK for it from the other peer
 SYN and ACK are flags in the TCP header (aka control bits)

Client 1 SYN Server

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

 Damaged or lost segments are re-transmitted.

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

 Flow control mechanisms allow to adjust transmission rate


 Prevent a fast sender from overwhelming a slow receiver
 The receiver controls the transmission rate by sending feedback
to the sender
SLOW DOWN
SLOW DOWN

Sender Receiver

17
TCP Flow Control

 TCP implements a flow control mechanism.


 Window size – The receiver reports to the sender what is the number of bytes it is prepared to receive before an
ACK is sent.

Sender Receiver
ACK# WIN
30 30

SEQ# SEQ# SEQ#


30 40 50

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 is an unreliable, connectionless protocol.


 Connectionless - no session establishment
 Unreliable - no ACKs and no re-transmissions
 No flow control
 No ordered delivery

 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

Client Source port: 2000 Server


Destination port: 80
HTTP

FTP

Source port: 80
Destination port: 2000
Port Numbers Example

 The client generates an HTTP request for a webpage


 Destination port: 80
 Source port: 2000
 The server responses to the request:
 Destination port: 2000
Client requests an HTTP service
 Source port: 80
Client Source port: 2000 Server
Destination port: 80
HTTP

FTP

Server responses to client’s request


Source port: 80
Destination port: 2000
Well Known Port Numbers
 Port numbers are 16-bit, ranging 1-65,535 (0 is reserved)
 Port numbers in the range of 0-1023 are the well-known ports that are used by common TCP/IP
applications.

Client Destination Port Services Server


80 HTTP HTTP

21 FTP FTP

22 SSH DNS

53 DNS

110 POP3
Internet Layer Protocols
IP – Internet Protocol

 IP operates in the network layer


 IP provides services to layer 4 protocols
 IP asks for layer 2 protocols to carry the IP packets
 IP is a best-effort protocol, as such, it DOES NOT include mechanisms for:
 Reliability
 Flow-control
 Sequencing
Application

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

 An IP address is assigned to a network interface of a node.


 An IPv4 address is a sequence of 32 bits (4 octets).
11000000101010000000000100000101
 For a more readable representation, the four octets are separated with dots.
11000000 . 10101000 . 00000001 . 00000101

 In a dotted-decimal notation, every octet is represented by its decimal equivalent.


192 . 168 . 1 . 5
IP Subnets

 An IP address contain two parts:


 Network address - identifies the network portion of the address
 Host address - identifies a specific host within a network Subnet C
 All hosts in the same subnet share a common subnet address 172.16.103.0
 Every router interface defines an IP subnet

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

 Routing is the process of choosing the best path to reach a destination.


 A router is a computer that has been dedicated to the task of forwarding IP packets between
networks.
 A router makes forwarding decisions based on its routing table.

IP Network

10.2.2.2

Router # show ip route


-----------------------------
Destination next-hop interface
10.2.2.0/24 192.168.4.47 eth1/1
192.168.7.0/24 10.5.5.55 eth1/2
172.16.53.0/24 10.5.5.55 eth1/2
Summary

 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

Ethernet Network Access


Unit Summary
Application Layer Protocols
• HTTP/FTP

Transport layer protocols


• TCP/UDP

Network Layer Protocols


• IP
• IP Addressing
• IP Routing
Quiz Questions
Examine Your Knowledge 1

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?

A. UDP will send ICMP information request to the sending host.


B. UDP will pass the information in the datagrams up to the next layer in the order they arrived.
C. UDP will drop the datagrams.
D. UDP will not acknowledge the datagrams but will wait for retransmission of the datagrams.
Examine Your Knowledge 2

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

What is one purpose of the TCP three-way handshake?


A. Sending echo requests from the source to the destination host to establish the presence of the
destination.
B. Determining the IP address of the destination host in preparation for data transfer.
C. Requesting the destination to transfer a binary file to the source.
D. Synchronizing between source and destination in preparation for data transfer.
Examine Your Knowledge 4

What is the purpose of a router in the network?


A. To serve as the end point in the network, sending and receiving data.
B. To provide the means by which the signals are transmitted from one networked device to
another.
C. To provide the connection points for the media.
D. To interconnects networks and choose the best path between them.
Examine Your Knowledge 5

What is the difference between HTTP and HTTP?


A. HTTP uses TCP as the transport layer protocol while HTTP uses UDP
B. HTTPs uses encryption
C. HTTP is an application layer protocol while HTTPs provides the transport service
D. HTTP runs on the client while HTTPs runs on the server
Summary Exam
Examine Your Knowledge 1

Which three statements characterize the transport layer protocols? Select three answers:

A. TCP uses windowing and sequencing to provide reliable transfer of data.


B. TCP and UDP port numbers are used to identify application layer protocols.
C. TCP uses port numbers to provide reliable transportation of IP packets.
D. TCP is a connection-oriented protocol, UDP is a connectionless protocol.
E. UDP uses windowing and acknowledgements for reliable transfer of data.
Examine Your Knowledge 4

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.

You might also like