of 42 /42
Copyright 2011 1 Module 5 TCP/IP (The Transport and Internetworking Layer Protocol) By Dr. Percy Dias

Embed Size (px)



Transcript of TCP/IP(networking)

Page 1: TCP/IP(networking)

Copyright 2011


Module 5TCP/IP

(The Transport and Internetworking Layer Protocol)

By Dr. Percy Dias

Page 2: TCP/IP(networking)

Copyright 2011


History and Future of TCP/IP

• The U.S. Department of Defense (DoD) created the TCP/IP reference model because it wanted a network that could survive any conditions.

• Some of the layers in the TCP/IP model have the same name as layers in the OSI model.

Page 3: TCP/IP(networking)

Copyright 2011


Internet Layer

The purpose of the Internet layer is to send packets from a network node and have them arrive at the destination node independent of the path taken.

Internet Protocol (IP)Internet Control Message Protocol (ICMP)Address Resolution (ARP)Reverse Address Resolution Protocol (RARP)Dynamic Host Configuration Protocol (DHCP)

Page 4: TCP/IP(networking)

Copyright 2011


Internet Layer Protocols

• IP performs the following operations– Defining a packet and an addressing scheme– Transferring data between the Internet Layer

and the Network Access Layer– Routing packets to remote hosts

• IP is sometimes referred to as an unreliable protocol– Provides connectionless, best-effort delivery

routing of packets

Page 5: TCP/IP(networking)

Copyright 2011

Network Layer Protocols and Internet Protocol (IP)

Page 6: TCP/IP(networking)

Copyright 2011

Network Layer Protocols and Internet Protocol (IP)

Page 7: TCP/IP(networking)

Copyright 2011

Transport Layer Role and Services

• Supporting Reliable Communication


Page 8: TCP/IP(networking)

Copyright 2011


Transport Layer Perspective

Page 9: TCP/IP(networking)

Copyright 2011


The Transport Layer FunctionsFive basic services:• Segmenting upper-layer application data• Establishing end-to-end operations• Sending segments from one end host to

another end host• Ensuring data reliability provided by

sequence numbers and acknowledgments• Ensuring flow control provided by sliding


Page 10: TCP/IP(networking)

Copyright 2011


Reliable Data Transport• Ensure that segments delivered will be

acknowledged to the sender• Provide for retransmission of any

segments that are not acknowledged• Put segments back into their correct

sequence at the destination• Provide congestion avoidance and control

Page 11: TCP/IP(networking)

Copyright 2011


Connectionless and Connection-Oriented Protocols

• Connection-oriented protocol– A protocol either that requires an exchange of

messages before data transfer begins or that has a required pre-established correlation between two endpoints

• Connectionless protocol– A protocol that does not require an exchange

of messages and that does not require a pre-established correlation between two endpoints

Page 12: TCP/IP(networking)

Copyright 2011

Connectionless Communication

Page 13: TCP/IP(networking)

Copyright 2011


Three-way Handshake• TCP is connection-oriented, so it requires

connection establishment before data transfer begins

• For a connection to be established, two hosts must synchronize on each other’s initial sequence numbers (ISNs)

• Initial Sequence numbers are actually large random numbers chosen by each host

• Connection establishment refers to the process of initializing sequence and acknowledgement fields and agreeing to the port numbers used.

Page 14: TCP/IP(networking)

Copyright 2011


Three-Way Handshake

Page 15: TCP/IP(networking)

Copyright 2011


TCP Connection Establishment

Page 16: TCP/IP(networking)

Copyright 2011


Windowing• Flow-control mechanism requiring that source

device receive an acknowledgment from the destination

• TCP uses expectational acknowledgments (Forward Acknowledgment)

• Window size determines the amount of data can transmit at one time before receiving an acknowledgment

• Larger window sizes increase communication efficiency.

• Window field implies the maximum number of unacknowledged bytes allowed outstanding at any instance in time.

Page 17: TCP/IP(networking)

Copyright 2011


Window Size

Larger window sizes increase communication efficiency.

Page 18: TCP/IP(networking)

Copyright 2011


Window Size• TCP window sizes are variable during the

lifetime of a connection.• The window “Slides” up and down based on

network performance, so it is called sliding window.

Page 19: TCP/IP(networking)

Copyright 2011


Flow Control

Page 20: TCP/IP(networking)

Copyright 2011


TCP Dynamic Sliding Windows

Page 21: TCP/IP(networking)

Copyright 2011


TCP Dynamic Sliding Windows

Page 22: TCP/IP(networking)

Copyright 2011


Acknowledgment• Sender keeps a record of each data

packet that it sends and expects an acknowledgment.

• Sender starts a timer when it sends a segment, and it retransmits if the timer expires before an acknowledgment (transmission rate should be slowed)

• Each Acknowledgement contains a window advertisement that indicates the number of bytes receiver can accept

Page 23: TCP/IP(networking)

Copyright 2011


Segmentation, Reassembly, and In-Order Delivery

• TCP on the receiving computer reassembles data into its original form

• The data is put in the correct order– If segments of a file are assembled out-of-

order, the file is useless– TCP provides a guarantee of in-order delivery

Page 24: TCP/IP(networking)

Copyright 2011


Segmentation, Reassembly, and In-Order Delivery

• Due to IP routing, a TCP receiver can receive data out of order

• If multiple routes exist between a source and a destination, routers can load-balance over several routes

• Packets can arrive out of order

Page 25: TCP/IP(networking)

Copyright 2011


TCP Providing In-Order Delivery

Page 26: TCP/IP(networking)

Copyright 2011


Port Numbers

Page 27: TCP/IP(networking)

Copyright 2011


TCP and UDP Port Numbers• Internet layer delivers data (packets) from one computer

to another, but it does not think about which application sent the data or which application on the receiving computer needs the data.

• For example, if you have five web-browser windows open, the internet layer delivers the data to the computer, but the transport layer works to ensure that each browser gets the data destined for it and not one of the others.

• TCP and UDP use port numbers to pass information to the upper layers

• Port numbers use to keep track of different conversations crossing the network at the same time (Enables the receiving computer to know which application to give the data to).

Page 28: TCP/IP(networking)

Copyright 2011


Using Port Numbers to Identify the Correct Application Process

Page 29: TCP/IP(networking)

Copyright 2011


Identifying Application Processes Using Port Numbers

• In previous slide, the application was assigned a dynamic port number by the host computer– A host typically dynamically allocates port

numbers of value 1024 (210) through 65,535 (216 - 1).

– When a host starts a new application process, it allocates a dynamic port number that is not already in use by another process.

– By each process having its own port number, a PC can have multiple conversations with other PCs (sometimes called multiplexing).

Page 30: TCP/IP(networking)

Copyright 2011


Identifying Application Processes Using Port Numbers

• Connection to Servers: Well-Known Ports– Most TCP/IP applications use a client/server model

for communications.– Servers cannot use dynamic port numbers because

clients must know ahead of time what port numbers servers use.

– Numbers below 1024 are considered well-known port numbers.

– well-known port numbers are used by Servers, other port numbers used by clients.

– Each client on the same host uses a different port number, but a server uses a same port number for all connections.

– Well-Know Port Numbers are controlled by Internet Assigned Number Authority (IANA).

Page 31: TCP/IP(networking)

Copyright 2011


Client Connecting to Well-Known Port of a Web Server (80)

Page 32: TCP/IP(networking)

Copyright 2011


Popular Well-Known Port Numbers

Page 33: TCP/IP(networking)

Copyright 2011


TCP Sequence and Acknowledgment

Page 34: TCP/IP(networking)

Copyright 2011


TCP• Connection Establishment and

Termination• Reliable (Error recovery – consume more

bandwidth and use more processing cycles)

• Divides outgoing messages into segments • Reassembles messages at the destination


Page 35: TCP/IP(networking)

Copyright 2011


TCP• Flow control using sliding windows• Multiplexing using port numbers• TCP relies on IP for end-to-end delivery of

data• At the receiving station, TCP reassembles

the segments into a complete message using sequence numbers. TCP must recover data that is damaged, lost or delivered out of order.

Page 36: TCP/IP(networking)

Copyright 2011

UDP Protocol


Page 37: TCP/IP(networking)

Copyright 2011

UDP Protocol


Page 38: TCP/IP(networking)

Copyright 2011


UDP• Connectionless • Unreliable ( No error recovery – use less

bandwidth and fewer processing cycle.) • Does not reassemble incoming messages • Uses no acknowledgments • Provides no flow control• Less overhead than TCP•

Page 39: TCP/IP(networking)

Copyright 2011


TCP Function Summary

Function DescriptionMultiplexing Function that allows receiving hosts to

decide the correct application forwhich the data is destined, based onthe port number

Error recovery (reliability)

Process of numbering andacknowledging data with Sequenceand Acknowledgment header fields

Flow control usingwindowing

Process that uses window sizes toprotect buffer space

Page 40: TCP/IP(networking)

Copyright 2011


Comparing TCP and UDP

Page 41: TCP/IP(networking)

Copyright 2011


Cisco Academy 3 References

Slide 2 CCNA1 9.1.1Slide 3-4 CCNA1 9.1.4Slide 9-10 CCNA1 11.1.1Slide 11 CCNA1 10.1.4Slide 13-15 CCNA1 11.1.4Slide 16-18 CCNA1 11.1.5-

11.1.6Slide 19 CCNA1 11.1.2-

11.1.3Slide 20-22,33 CCNA1 11.1.5-

11.1.6Slide 26-

27,30,32 CCNA1 11.1.9Slide 34-35,38-

39CCNA1 11.1.7-


Page 42: TCP/IP(networking)

Copyright 2011


Cisco Academy 4 Exploration Reference

Networking FundamentalsSlide 2-4 5.1.1-5.1.5Slide 8-10 4.1.1Slide 11 4.2.1Slide 13-14 4.2.3-4.2.4Slide 16-18 4.3.2Slide 19 4.3.4Slide 20-22 4.3.4Slide 32 4.1.4Slide 38 4.4.1-4.4.3Slide 40 4.1.4