Presentation is loading. Please wait.

Presentation is loading. Please wait.

CCNA1-1 Chapter 4 OSI Transport Layer. CCNA1-2 Chapter 4 Note for Instructors These presentations are the result of a collaboration among the instructors.

Similar presentations


Presentation on theme: "CCNA1-1 Chapter 4 OSI Transport Layer. CCNA1-2 Chapter 4 Note for Instructors These presentations are the result of a collaboration among the instructors."— Presentation transcript:

1 CCNA1-1 Chapter 4 OSI Transport Layer

2 CCNA1-2 Chapter 4 Note for Instructors These presentations are the result of a collaboration among the instructors at St. Clair College in Windsor, Ontario. These presentations are the result of a collaboration among the instructors at St. Clair College in Windsor, Ontario. Thanks must go out to Rick Graziani of Cabrillo College. His material and additional information was used as a reference in their creation. Thanks must go out to Rick Graziani of Cabrillo College. His material and additional information was used as a reference in their creation. If anyone finds any errors or omissions, please let me know at: If anyone finds any errors or omissions, please let me know at:

3 CCNA1-3 Chapter 4 OSI Transport Layer Roles of the Transport Layer

4 CCNA1-4 Chapter 4 Purpose of the Transport Layer The Layer 4 data stream is a logical connection between the endpoints of a network. The Layer 4 data stream is a logical connection between the endpoints of a network. It provides transport services from a host to a destination. It provides transport services from a host to a destination. This service is sometimes referred to as an end-to-end service. This service is sometimes referred to as an end-to-end service. Provides two protocols: Provides two protocols: TCP – Transmission Control ProtocolTCP – Transmission Control Protocol UDP – User Datagram ProtocolUDP – User Datagram Protocol

5 CCNA1-5 Chapter 4 Purpose of the Transport Layer We will be focusing on the Layer that: We will be focusing on the Layer that: Segments the data.Segments the data. Creates and inserts the header for either the TCP or the UDP protocol.Creates and inserts the header for either the TCP or the UDP protocol.

6 CCNA1-6 Chapter 4 Purpose of the Transport Layer Primary responsibilities: Primary responsibilities: Tracking the individual communications between applications on the source and destination hosts.Tracking the individual communications between applications on the source and destination hosts. Segmenting the data and managing each piece.Segmenting the data and managing each piece. Reassembling the segments into streams of application data.Reassembling the segments into streams of application data. Identifying the different applications.Identifying the different applications. Performing flow control between end users.Performing flow control between end users. Enabling error recovery.Enabling error recovery. Initiating a session.Initiating a session.

7 CCNA1-7 Chapter 4 Segmentation and Reassembly An Ethernet frame has a maximum frame size or Maximum Transmission Unit (MTU) of 1,518 bytes. An Ethernet frame has a maximum frame size or Maximum Transmission Unit (MTU) of 1,518 bytes. When a larger message must be sent, the application data must be segmented into sections that will not exceed the maximum size.When a larger message must be sent, the application data must be segmented into sections that will not exceed the maximum size. The segment size must also take into account the encapsulation process that must take place before the frame can be transmitted.The segment size must also take into account the encapsulation process that must take place before the frame can be transmitted.

8 CCNA1-8 Chapter 4 Segmentation and Reassembly

9 CCNA1-9 Chapter 4 Tracking Individual Conversations Any host can have multiple applications running simultaneously. Any host can have multiple applications running simultaneously. Transport Layer maintains these separate data streams. Transport Layer maintains these separate data streams. For example, it makes sure that Instant Messaging data does not appear on the application.For example, it makes sure that Instant Messaging data does not appear on the application.

10 CCNA1-10 Chapter 4 Segmenting Data Transport Layer breaks into smaller pieces called segments. Application Layer passes large amounts of data.

11 CCNA1-11 Chapter 4 Segmenting Data Multiplexing allows multiple, concurrent applications. Segmentation allows multiplexing of the data from all sessions.

12 CCNA1-12 Chapter 4 Reassembling Segments Segment numbers allow reassembly of the data in the proper order.

13 CCNA1-13 Chapter 4 Reassembling Segments When created, each segment is assigned a unique application identifier. (Port Number) After reassembly, the port number is used to pass the data to the correct application

14 CCNA1-14 Chapter 4 Flow Control Network hosts have limited resources. (Memory, Bandwidth) Regulating the amount that can be transmitted or received is flow control.

15 CCNA1-15 Chapter 4 Error Recovery It is possible for a piece of data to become corrupted or lost. Transport layer protocols can request a retransmission.

16 CCNA1-16 Chapter 4 Initiating a Session Transport layer provides for connection orientation. Allows the data to be closely managed.

17 CCNA1-17 Chapter 4 Supporting Reliable Communication Different applications have different requirements. Different applications have different requirements. Different protocols have been developed to meet them. Different protocols have been developed to meet them. UDP TCP

18 CCNA1-18 Chapter 4 OSI Transport Layer TCP and UDP

19 CCNA1-19 Chapter 4 TCP and UDP Two most common Transport Layer protocols Two most common Transport Layer protocols

20 CCNA1-20 Chapter 4 TCP and UDP

21 CCNA1-21 Chapter 4 User Datagram Protocol (UDP) Connectionless Connectionless “Best Effort” delivery “Best Effort” delivery Low overhead Low overhead Example Applications Domain Name System (DNS) Online Games Voice over IP (VoIP) Dynamic Host Configuration Protocol (DHCP) Trivial File Transfer Protocol (TFTP)

22 CCNA1-22 Chapter 4 Transmission Control Protocol (TCP) Connection-oriented Connection-oriented Reliable delivery Reliable delivery Error checking Error checking Flow control Flow control Example Applications Hypertext Transfer Protocol (HTTP) File Transfer Protocol (FTP) Telnet Simple Message Transfer Protocol (SMTP)

23 CCNA1-23 Chapter 4 OSI Transport Layer Port Addressing

24 CCNA1-24 Chapter 4 Identifying the Conversations At the TCP/IP Internet Layer: At the TCP/IP Internet Layer: The IP Packet Header has a Protocol field that specifies whether the segment is TCP or UDP.The IP Packet Header has a Protocol field that specifies whether the segment is TCP or UDP. IP Packet Header

25 CCNA1-25 Chapter 4 Identifying the Conversations When a packet is encapsulated at the Network Layer, it is coded to identify the source of the packet (TCP or UDP). When a packet is encapsulated at the Network Layer, it is coded to identify the source of the packet (TCP or UDP). IP Packet Header

26 CCNA1-26 Chapter 4 Identifying the Conversations IP Protocol = 6 Data sent to TCP _____________ IP Protocol = 17 Data sent to UDP When a packet is decapsulated at the destination, the code is used to send the packet to the proper protocol (TCP or UDP). When a packet is decapsulated at the destination, the code is used to send the packet to the proper protocol (TCP or UDP).

27 CCNA1-27 Chapter 4 Identifying the Conversations Both TCP and UDP use port numbers to pass information to the upper layers. Both TCP and UDP use port numbers to pass information to the upper layers. These ports are actually termed sockets. These ports are actually termed sockets. A socket is simply the combination of the device’s IP address and the source/destination port for the data, separated by a colon.A socket is simply the combination of the device’s IP address and the source/destination port for the data, separated by a colon. e.g :80 references an HTTP socket.e.g :80 references an HTTP socket.

28 CCNA1-28 Chapter 4 Identifying the Conversations

29 CCNA1-29 Chapter 4 Port Addressing Types and Tools Port numbers are managed and assigned by the Internet Assigned Number Authority (IANA). Port numbers are managed and assigned by the Internet Assigned Number Authority (IANA).

30 CCNA1-30 Chapter 4 Port Addressing Types and Tools Some ports are reserved in both TCP and UDP, although applications might not be written to support them. Some ports are reserved in both TCP and UDP, although applications might not be written to support them. Three groupings of port types: Three groupings of port types: Well-known or Contact Ports (0 to 1023).Well-known or Contact Ports (0 to 1023). Registered Ports (1024 through 49151).Registered Ports (1024 through 49151). Private and/or Dynamic Ports (49152 through 65535).Private and/or Dynamic Ports (49152 through 65535).

31 CCNA1-31 Chapter 4 Port Addressing Types and Tools Well-Known Ports: Well-Known Ports: Reserved for common services and applications.Reserved for common services and applications. 21 – FTP Control 23 – Telnet 25 – SMTP 194 – IRC 110 – POP3 20 – FTP Data 443 – HTTPS 520 – RIP 69 – TFTP

32 CCNA1-32 Chapter 4 Port Addressing Types and Tools Registered Ports: Registered Ports: Optional user processes and applications.Optional user processes and applications – MSN Messenger 8008 – Alternate HTTP 8080 – Alternate HTTP 2000 – Cisco VoIP 1812 – RADIUS 5004 – RTP 5060 – SIP (VoIP)

33 CCNA1-33 Chapter 4 Port Addressing Types and Tools Dynamic Ports: Dynamic Ports: Assigned to a user application at connect time.Assigned to a user application at connect time. Dynamic port usage will become clearer as we move through the material. STAY TUNED!

34 CCNA1-34 Chapter 4 Port Addressing Types and Tools Using both TCP and UDP: Using both TCP and UDP: Some applications may use both TCP and UDP.Some applications may use both TCP and UDP. For example, the low overhead of UDP enables DNS to serve many client requests very quickly.For example, the low overhead of UDP enables DNS to serve many client requests very quickly. Sometimes, however, sending the requested information may require the reliability of TCP. In this case, the well known port number of 53 is used by both protocols with this service.Sometimes, however, sending the requested information may require the reliability of TCP. In this case, the well known port number of 53 is used by both protocols with this service.

35 CCNA1-35 Chapter 4 Port Addressing Types and Tools Actually, when you open up a single web page, there are usually several TCP sessions created, not just one. Actually, when you open up a single web page, there are usually several TCP sessions created, not just one. TCP/UDP Source IP Source Port Destination IP Destination Port Connection State Source Socket Destination Socket netstat –a –n command

36 CCNA1-36 Chapter 4 OSI Transport Layer TCP Communicating with Reliability

37 CCNA1-37 Chapter 4 Transmission Control Protocol (TCP) Connection-oriented Connection-oriented Reliable delivery Reliable delivery Error checking Error checking Flow control Flow control Example Applications Hypertext Transfer Protocol (HTTP) File Transfer Protocol (FTP) Telnet Simple Message Transfer Protocol (SMTP)

38 CCNA1-38 Chapter 4 Making Conversations Reliable The key difference between TCP and UDP is reliability. The key difference between TCP and UDP is reliability. TCP uses connection-oriented sessions. TCP uses connection-oriented sessions. Before any data is exchanged, the Transport Layer initiates a connection to the destination.Before any data is exchanged, the Transport Layer initiates a connection to the destination. This connection allows the tracking of the session.This connection allows the tracking of the session. Sequence NumbersSequence Numbers AcknowledgmentsAcknowledgments Creates the overhead of TCP.Creates the overhead of TCP. Reliability is achieved by having fields in the TCP header that have specific functions.Reliability is achieved by having fields in the TCP header that have specific functions.

39 CCNA1-39 Chapter 4 Making Conversations Reliable TCP session that opened a connection. Usually a random value above Upper Layer application on the remote site. The number of the last octet (byte) in the segment. The number of the next octet (byte) expected by the receiver.

40 CCNA1-40 Chapter 4 Making Conversations Reliable The length of the segment header in bytes. Individual 1 bit fields used in session management. Flow control. Error checking the header. If the Urgent FLAG is set, the location of the urgent data.

41 CCNA1-41 Chapter 4 Making Conversations Reliable - FYI URG – the Urgent Pointer Field is significant. URG – the Urgent Pointer Field is significant. ACK – the Acknowledgement Number field is significant ACK – the Acknowledgement Number field is significant PSH – push function PSH – push function RST – reset connection RST – reset connection SYN – synchronize sequence numbers SYN – synchronize sequence numbers FIN – no more data from sender FIN – no more data from sender URGURGURGURG ACKACKACKACK PSHPSHPSHPSH RSTRSTRSTRST SYNSYNSYNSYN FINFINFINFIN 6 Bits 0 = OFF 1 = ON 6 Bits 0 = OFF 1 = ON

42 CCNA1-42 Chapter 4 TCP Server Processes Server is listening on Port 80 for HTTP connections. Server is listening on Port 80 for HTTP connections. The client sets the destination port to 80 and uses a dynamic port as its source. The client sets the destination port to 80 and uses a dynamic port as its source. Source = Destination = 80

43 CCNA1-43 Chapter 4 TCP Server Processes Server replies with the web page. Server replies with the web page. Sets the source port to 80 and uses the client’s source port as the destination.Sets the source port to 80 and uses the client’s source port as the destination. Source = 80 Destination = 49650

44 CCNA1-44 Chapter 4 TCP Server Processes Notice how the source and destination ports are used. Notice how the source and destination ports are used. Source = 80 Destination = Source = Destination = 80

45 CCNA1-45 Chapter 4 TCP Server Processes What if there are two sessions to the same server? What if there are two sessions to the same server? The client uses another dynamic port as its source and the destination is still port 80.The client uses another dynamic port as its source and the destination is still port 80. Different source ports keep the sessions unique on the server.Different source ports keep the sessions unique on the server. Source = Destination = 80 Source = Destination = 80 Source = 80 Destination = Source = 80 Destination =

46 CCNA1-46 Chapter 4 TCP Server Processes How does the Transport Layer keep them separate? How does the Transport Layer keep them separate? The socket (IP Address:Port)The socket (IP Address:Port) Source = Destination = 80 Source = Destination = 80 Source = 80 Destination = Source = 80 Destination = : : : :49655

47 CCNA1-47 Chapter 4 OSI Transport Layer TCP Connection Establishment and Termination

48 CCNA1-48 Chapter 4 TCP Three-Way Handshake For a connection to be established, the two end stations must synchronize on each other's initial sequence numbers (ISNs). For a connection to be established, the two end stations must synchronize on each other's initial sequence numbers (ISNs). The ISN is the starting sequence number used when a TCP connection is established. The ISN is the starting sequence number used when a TCP connection is established.

49 CCNA1-49 Chapter 4 TCP Three-Way Handshake Sequence numbers are used to track the order of segments and to ensure that no segments are lost in transmission. Sequence numbers are used to track the order of segments and to ensure that no segments are lost in transmission. The Flag fields are used to identify the type of segment. The Flag fields are used to identify the type of segment.

50 CCNA1-50 Chapter 4 TCP Three-Way Handshake I wish to connect and here’s my first sequence number. 1

51 CCNA1-51 Chapter 4 TCP Three-Way Handshake 1 OK….Here’s my first sequence number. I’ve added 1 to your ISN as an acknowledgement. I’ll expect that to be your next sequence number. 2

52 CCNA1-52 Chapter 4 TCP Three-Way Handshake 1 2 OK….Here’s the next segment with the sequence number you expect. I’ve added 1 to your ISN to acknowledge your segment. I’ll expect that to be your next sequence number. 3

53 CCNA1-53 Chapter 4 TCP Three-Way Handshake Only part of the TCP headers are displayed…. Only part of the TCP headers are displayed…

54 CCNA1-54 Chapter 4 TCP Session Termination Four step process using the Flag and sequence number fields. Four step process using the Flag and sequence number fields.

55 CCNA1-55 Chapter 4 OSI Transport Layer TCP Acknowledgements and Windowing

56 CCNA1-56 Chapter 4 TCP Acknowledgements and Windowing Remember that the Transport Layer must reassemble the segments in the correct order. Remember that the Transport Layer must reassemble the segments in the correct order.

57 CCNA1-57 Chapter 4 TCP Acknowledgements and Windowing Used together to confirm the receipt of data

58 CCNA1-58 Chapter 4 TCP Acknowledgements and Windowing ACK = ISN + 1 Expectational Acknowledgement

59 CCNA1-59 Chapter 4 TCP Acknowledgements and Windowing With a window size of 10, each segment carries only ten bytes of data and must be acknowledged before another segment is transmitted. With a window size of 10, each segment carries only ten bytes of data and must be acknowledged before another segment is transmitted. Window Size: Window Size: The amount of data that can be sent before requiring an acknowledgement.The amount of data that can be sent before requiring an acknowledgement. Determined by the Window field in the header.Determined by the Window field in the header.

60 CCNA1-60 Chapter 4 TCP Retransmission A destination host service using TCP usually only acknowledges data for contiguous sequence bytes. A destination host service using TCP usually only acknowledges data for contiguous sequence bytes. If one or more segments are missing, only the data in the segments that complete the stream are acknowledged. If one or more segments are missing, only the data in the segments that complete the stream are acknowledged.

61 CCNA1-61 Chapter 4 TCP Flow Control

62 CCNA1-62 Chapter 4 TCP Flow Control The initial window size is determined during the three-way handshake. Amount of data that can be sent before an acknowledgement.

63 CCNA1-63 Chapter 4 TCP Dynamic Window Sizes TCP Full-duplex Service: TCP Full-duplex Service: Means data can be flowing in each direction, simultaneously.Means data can be flowing in each direction, simultaneously. Window sizes, sequence numbers and acknowledgment numbers are independent of each other’s data flow.Window sizes, sequence numbers and acknowledgment numbers are independent of each other’s data flow. The receiver sends an acceptable window size to the sender during each segment transmission. The receiver sends an acceptable window size to the sender during each segment transmission. If too much is data being sent, the acceptable window size is reduced.If too much is data being sent, the acceptable window size is reduced. if more data can be handled, the acceptable window size is increased.if more data can be handled, the acceptable window size is increased. This is known as a Stop-and-Wait windowing protocol. This is known as a Stop-and-Wait windowing protocol.

64 CCNA1-64 Chapter 4 Dynamic Window Sizes Initial Window Size

65 CCNA1-65 Chapter 4 OSI Transport Layer UDP Communicating with Low Overhead

66 CCNA1-66 Chapter 4 User Datagram Protocol (UDP) Connectionless Connectionless “Best Effort” delivery “Best Effort” delivery Low overhead Low overhead Example Applications Domain Name System (DNS) Online Games Voice over IP (VoIP) Dynamic Host Configuration Protocol (DHCP) Trivial File Transfer Protocol (TFTP) NO THREE-WAY HANDSHAKE

67 CCNA1-67 Chapter 4 User Datagram Protocol (UDP) Low Overhead: Low Overhead: Connectionless:Connectionless: No connection establishment as with TCP.No connection establishment as with TCP. Unreliable or “Best Effort” delivery:Unreliable or “Best Effort” delivery: No error checkingNo error checking No flow controlNo flow control No congestion controlNo congestion control No sequence numbers for ordered deliveryNo sequence numbers for ordered delivery

68 CCNA1-68 Chapter 4 User Datagram Protocol (UDP) UDP is said to be transaction-based. UDP is said to be transaction-based. When an application has data to send, it simply sends the data.When an application has data to send, it simply sends the data. The UDP protocol data unit (PDU) is referred to as a datagram, although the terms segment and datagram are sometimes used interchangeably to describe a Transport layer PDU. The UDP protocol data unit (PDU) is referred to as a datagram, although the terms segment and datagram are sometimes used interchangeably to describe a Transport layer PDU.

69 CCNA1-69 Chapter 4 User Datagram Protocol (UDP) If datagrams take multiple paths, they will sometimes arrive in the wrong order. If datagrams take multiple paths, they will sometimes arrive in the wrong order. UDP does not sequence the datagrams as TCP does nor are there any acknowledgements. UDP does not sequence the datagrams as TCP does nor are there any acknowledgements. Re-sequencing datagrams and handling missing data is up to the application. Re-sequencing datagrams and handling missing data is up to the application.

70 CCNA1-70 Chapter 4 User Datagram Protocol (UDP) When a packet is encapsulated at the Network Layer, it is coded to identify the source of the packet (TCP or UDP). When a packet is encapsulated at the Network Layer, it is coded to identify the source of the packet (TCP or UDP). IP Packet Header

71 CCNA1-71 Chapter 4 UDP Server Processes Like TCP, UDP applications use Well-Known or Registered ports specifically set aside for UDP. Like TCP, UDP applications use Well-Known or Registered ports specifically set aside for UDP. When UDP receives a datagram destined for one of these applications, it forwards the datagram based on its port number. When UDP receives a datagram destined for one of these applications, it forwards the datagram based on its port number.

72 CCNA1-72 Chapter 4 UDP Client Processes Uses the same methods as TCP for keeping multiple conversations separate (Socket - IP Address:Port). Uses the same methods as TCP for keeping multiple conversations separate (Socket - IP Address:Port). Source = Destination = 53 Source = Destination = 53 Source = 53 Destination = Source = 53 Destination = : : : :53479

73 CCNA1-73 Chapter 4 Summary: Port Numbers Port Number Application Layer 4 Protocol Description 20FTPTCP File Transfer Protocol – Data 21FTPTCP File Transfer Protocol – Control Commands 23TELNETTCP Terminal connection 25SMTPTCP Simple Mail Transfer Protocol - 53DNSUDP Domain Name System 67,68DHCPUDP Dynamic Host Configuration Protocol 69TFTPUDP Trivial File Transfer Protocol 80HTTPTCP Hypertext Transfer Protocol

74 CCNA1-74 Chapter 4 Summary: TCP vs UDP Transmission Control Protocol (TCP): Connection-oriented Reliable end-to-end delivery of messages Error detection and recovery Flow control User Datagram Protocol (UDP): Connectionless Best-effort datagram delivery Applications that do not require full TCP services

75 CCNA1-75 Chapter 4 Summary: Applications TCP: TCP: File Transfer Protocol (FTP)File Transfer Protocol (FTP) TelnetTelnet Simple Mail Transfer Protocol (SMTP)Simple Mail Transfer Protocol (SMTP) Post Office Protocol (POP3)Post Office Protocol (POP3) Hypertext Transfer Protocol (HTTP)Hypertext Transfer Protocol (HTTP) UDP: UDP: Trivial File Transfer Protocol (TFTP)Trivial File Transfer Protocol (TFTP) Domain Name System (DNS)Domain Name System (DNS) Simple Network Management Protocol (SNMP)Simple Network Management Protocol (SNMP) Dynamic Host Configuration Protocol (DHCP)Dynamic Host Configuration Protocol (DHCP)

76 CCNA1-76 Chapter 4 Am I Drivin’ too fast for ‘ya? Time to do some STUFF!


Download ppt "CCNA1-1 Chapter 4 OSI Transport Layer. CCNA1-2 Chapter 4 Note for Instructors These presentations are the result of a collaboration among the instructors."

Similar presentations


Ads by Google