53
TRANSPORT LAYER Chapter 7 Intro to Routing & Switching

Chapter 7 Intro to Routing & Switching. Upon completion of this chapter, you should be able to: Explain the need for the transport layer. Identify

Embed Size (px)

Citation preview

Page 1: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

TRANSPORT LAYER

Chapter 7

Intro to Routing & Switching

Page 2: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

OBJECTIVES Upon completion of this chapter, you should be

able to: Explain the need for the transport layer. Identify the role of the transport layer as it provides

the end-to-end transfer of data between applications. Describe the role of two TCP/IP transport layer

protocols: TCP and UDP. Explain the key functions of the transport layer,

including reliability, port addressing, and segmentation.

Explain how TCP and UDP each handle key functions. Identify when it is appropriate to use TCP or UDP and

provide examples of applications that use each protocol.

Page 3: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

LAYER 4 PROTOCOLS USED Each protocol does its’

own job IP addresses & routes

data Doesn’t say how it is

transported

Different applications use different protocols for transport of the data How data is

sent/exchanged

TCP or UDP

Page 4: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

THE TRANSPORT LAYER

7.1.1

Page 5: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

TRANSPORT LAYER INTRODUCTION What PDU?

Segments

Simply, the responsibilities: Ensures end-to-end delivery of data Establish a session between applications Segmenting the data Transport the data Handling the flow of data Reassembling the data Passing the data to the proper application Retransmit if necessary

Page 6: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

TRANSPORT LAYER INTRODUCTION Protocols

TCP- most commonUDP

Page 7: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

CONNECTION-ORIENTED PROTOCOL TCP Establish a connection 1st, then sends

data3-way handshakeSYN, SYN-ACK, ACK

Page 8: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

CONNECTIONLESS PROTOCOL UDP No connection Doesn’t ensure error-free delivery Faster than TCP, more efficient for

quicker deliveryLive audio/video over Internet or VoIPTCP would bog it down; incomplete pics or

audio; pics wouldn’t coincide with audio

Page 9: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

SEGMENTATION Large amounts of data broken into smaller

units Segments Also consider the MTU of the media 6000 byte message on a 1500 byte MTU

Ethernet 4 segments

Reassembled at destination

Sequencing Identifies the segments & helps is re-ordering

Page 10: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

SEGMENTATION & REASSEMBLY Words split to send Dest. reassembles the words

Words may arrive out of orderSequence #’s help re-order into sentence

Page 11: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

REVIEW- Q What is the PDU of the Transport Layer?

Segment What helps put a TCP segmented

message back in order at the destination?Sequence numbers

Which Layer 4 protocol could deliver data with errors or not be delivered at all?UDP

How is TCP able to establish a connection?3-way handshake

Page 12: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

REVIEW- Q When sending a web page, which Layer

4 protocol would be used?TCP

In the same scenario as above, what would happen if the destination did not receive an ACK after sending data? It would re-send just that segment

Which layer 4 protocol is able to deliver data quickly?UDP

Page 13: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

INTRODUCING TCP & UDP

7.1.2

Page 14: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

TCP SUMMARY Connection-oriented Sends acknowledgements

Like tracking a FedEx delivery Breaks messages into small segments

If sender doesn’t get an ACK of message received, it retransmits

Only portion lost is resent On receiving host, TCP reassembles

data

FTP & HTTP are examples of protocols using TCP

Page 15: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

TCP SEGMENT

Page 16: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

TCP CONVERSATION

SEQUENCE #= 200SYN

SYN-ACK

SEQ#= 1450

ACK= 201

ACKSEQ#= 201ACK= 1451

Page 17: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

TCP SLIDING WINDOW How much data it can receive

Page 18: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

TCP END THE CONVERSATION

Page 19: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

TCP SUMMARY Connection-oriented Guaranteed delivery 3-way handshake Segments & sequence # Acknowledgements Flow control Retransmission

Generates more traffic because of all this

Page 20: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

REVIEW- Q What significance does the ACK# have?

It’s the next expected byte numberSequence # received PLUS 1

When a conversation is ready to end, nothing more is being sent, what flag gets sent?FIN

What are 2 protocols that use TCP?HTTP & FTP

Explain flow control.Adjusting the amount/flow of data being

sent/received

Page 21: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

UDP

7.2.3

Page 22: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

UDP Connectionless Used for faster transmissions Low overhead “Best effort delivery”

Regular mail / no guarantee of delivery No ACK or retransmission No error checking* Used for streaming audio, video, VoIP

DNS, DHCP, TFTP, VoIP, Gaming, SNMP are examples of protocols that use UDP

Page 23: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

UDP HEADER

Source Port Destination Port

Length Checksum

Data

Page 24: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

UDP INTERRUPTIONS

Page 25: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

USE TCP OR UDP? TCP

HTTP IPFTPTelnetSMTP/POPDNS

UDPDHCPTFTPSNMPVoIP Internet TV/RadioDNS

Page 26: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

COMPARING TCP & UDP

UDP TCP

Faster Best effort delivery No

acknowledgements No retransmit

Connectionless

Slower Segments Acknowledgements Retransmission Reassembles Connection-

oriented Flow control

Page 27: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

ACTIVITY 1

Page 28: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

ACTIVITY 2

Page 29: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

REVIEW- Q

Page 30: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

TCP-WHAT DO YOU REMEMBER? Which is connection-oriented?

TCP TCP establishes a connection or a ________

with the destination.Session

Why is TCP reliable?Sends acknowledgments of receiving &

retransmits missing data Explain flow control for TCP.

Regulates the flow of data Protocols used?

HTTP, SMTP, Telnet, FTP

Page 31: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

UDP-WHAT DO YOU REMEMBER? Speed?

Fast Connection or connectionless?

Connectionless Reliability?

UnreliableNo ACK or retransmission

Flow control?None

Protocols used:DNS, VoIP, Video Stream, SNMP

Page 32: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

TRACKING THE CONVO You have many conversations at the

same timeWebEmailDHCPVoIPVideo streaming

Transport Layer tracks each one

Page 33: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

MANY CONVOS, ONE STREAM All of those conversations come out as

one stream of dataExample: your streaming video coming in

does not take up the entire connection

Multiplexing (sending) Demultiplexing (receiving)

This is what it does…………………………………

Page 34: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

PASS DATA TO APPLICATION Sends data to proper application

Your many conversations: Web goes to web browser Email goes to email program DHCP goes to IP config VoIP goes to VoIP software Video streaming goes to media player

Each protocol has a port # In the segment to direct to the correct

application

Page 35: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

PORT NUMBERS All the conversations need to be tracked

Port Number in each segmentHelps identify what service the message is

for Web request, email, DHCP, etc.

Protocols identified by port numbers

Page 36: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

PORT # EXAMPLE

Page 37: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

PORT # & COMMUNICATION Each message sent, has a source &

destination port number Source Port

Randomly generated & placed into segmentTracks incoming segment

Destination PortUsed to pass data to proper application at

destination

Page 38: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

REVIEW- Q

Page 39: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

PORT NUMBERS 1-65,535 Well-known ports

1- 1023Common applications

Registered ports1024- 49,151Can be source or destination portsUsed for specific applications like IM

Private ports49,152 & above For source ports

Page 40: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

IMPORTANT PORT #’S Destination- tells about service

requested20 & 21- FTP23- Telnet25- SMTP53- DNS (BOTH TCP & UDP)67 & 68- DHCP69- TFTP80- HTTP110- POP3161- SNMP443- HTTPS

Page 41: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

SOCKETS

The combo of the source & destination IP AND the source & destination port number is known as a socket. 192.168.1.7:80

Page 42: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

CHECK IT! Check your active connections

Unexplained ones could be threats! C:\> netstat

Page 43: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

ACTIVITY 7.1.2.11 Drag each description to TCP or UDP

Page 44: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

REVIEW-

Page 45: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

REVIEW-

Page 46: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

SENDING A MESSAGE Web Server to client (you)

Application data broken into TCP segments Each segment has a header w/ source & dest

portsSegment encapsulates HTTP & HTML dataEncapsulates into a packet w/ IP header

IP header has source & dest IP addresses IP Packet sent to Ethernet protocol

Encapsulates into frame header & trailer Source & destination MAC AND error checking

Bits encoded onto the media

Page 47: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

RECEIVING THE MESSAGE Last process in reverse

Bits received by NIC & decoded Destination MAC recognized

Ethernet header & trailer removed Source & dest MAC removed

IP header removed Source & dest IP removed

TCP header removed Source & dest ports removed

Web page data passed to HTTP & browserTCP segment received, reassembled, &

page displays

Page 48: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

ACTIVITY 192.168.5.101

80 or TCP or UDP

01-5A-FF-65-80-DC

1100101101000010

DHCP or POP3 or HTTP

Page 49: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

REVIEW- 4Q

Page 50: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

REVIEW- 3Q

Page 51: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

REVIEW & STUDY Complete the study guide handout

Take the quiz on netacad.com

Jeopardy review

Page 52: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

SUMMARYIn this chapter, you learned: The role of the Transport layer is to provide three

main functions: multiplexing, segmentation and reassembly, and error checking.

These functions are necessary in order to address issues in quality of service and security on networks.

Knowing how TCP and UDP operate and which popular applications use each protocol will allow the implementation of quality of service and build more reliable networks.

Ports provide a “tunnel” for data to get from the Transport layer to the appropriate application at the destination.

Page 53: Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify

TRANSPORT LAYER

Chapter 7

Intro to Routing & Switching