CISCO NETWORKING ACADEMY Chabot College ELEC Transport Layer (4)
CISCO NETWORKING ACADEMY TCP/IP Protocol Suite (simplified)
CISCO NETWORKING ACADEMY Layer 3 - Network Layer In Chapters 10 & 11, we covered Layer 3 protocols: –Internet Protocol (IP) Used for addressing –Address Resolution Protocol (ARP) Used to relate IP and MAC addresses –Internet Control Message Protocol (ICMP) Used for ping and traceroute commands
CISCO NETWORKING ACADEMY Layer 3 - IP, ARP, ICMP
CISCO NETWORKING ACADEMY Layer 3 Limitations No way to assure delivery of packets. No way to control traffic flow to prevent hosts from being “overwhelmed” by data arriving too fast. No way to keep track of multiple conversations between between pairs of hosts running multiple applications. (e.g. mail & web)
CISCO NETWORKING ACADEMY Layer 4 - Transport Layer Layer 4 addresses these limitations. 4
CISCO NETWORKING ACADEMY Transport Layer Functions Segments data from upper layer applications. Uses port numbers to direct data to/from correct upper layer application (more about ports in Semester 2). Establishes end-to-end connection. Optionally, provides flow control and data reliability.
CISCO NETWORKING ACADEMY Function: Data Segmentation
CISCO NETWORKING ACADEMY Transport Layer Protocols TCP/IP uses two protocols at Layer 4: TCP and UDP.
CISCO NETWORKING ACADEMY Layer 4 - TCP & UDP
CISCO NETWORKING ACADEMY TCP vs UDP TCP - Transmission Control Protocol –connection-oriented, reliable (virtual circuit) –divides outgoing messages into segments –reassembles messages at the destination –re-sends anything not received –provides flow control –more overhead than UDP (less efficient)
CISCO NETWORKING ACADEMY TCP vs UDP UDP - User Datagram Protocol –connectionless, unreliable, does not check message delivery –sends “datagrams” –does not reassemble incoming messages –provides no flow control –low overhead - faster than TCP
CISCO NETWORKING ACADEMY TCP and UDP A packet will use either TCP or UDP, but not both. Normally, the application makes this choice for the user.
CISCO NETWORKING ACADEMY TCP
UDP
Function: Direct Data to Applications Uses port numbers. We will study ports further in Semester 2.
CISCO NETWORKING ACADEMY Function: Establish Connection
CISCO NETWORKING ACADEMY TCP is connection-oriented three-way handshake TCP establishes a connection with a host by using the three-way handshake.
CISCO NETWORKING ACADEMY Six bits in the TCP header play an important role in establishing, maintaining, and terminating a connection: URG - Urgent Pointer ACK - Acknowledgement PSH - Push Function RST - Reset Request SYN - Synchronization Request FIN - End of Transmission Marker TCP Code Bits URGACK PSH RSTSYN FIN
CISCO NETWORKING ACADEMY TCP Code Bits To initiate a TCP three way handshake, the code bits are set: URGACK PSH RSTSYN FIN
CISCO NETWORKING ACADEMY An Example TCP Header TCP - Transport Control Protocol Source Port: 2352 Destination Port: 80 World Wide Web HTTP Sequence Number: Ack Number: 0 Offset: 7 Reserved: % Code: % Sync Sequence Window: 8192 Checksum: 0x6711 Urgent Pointer: 0 TCP Options: URGACK PSH RSTSYN FIN
CISCO NETWORKING ACADEMY An Example TCP Header TCP - Transport Control Protocol Source Port: 80 World Wide Web HTTP Destination Port: 2352 Sequence Number: Ack Number: Offset: 6 Reserved: % Code: % Ack is valid Sync Sequence Window: Checksum: 0x9640 Urgent Pointer: 0 TCP Options: URGACK PSH RSTSYN FIN
CISCO NETWORKING ACADEMY An Example TCP Header TCP - Transport Control Protocol Source Port: 2352 Destination Port: 80 World Wide Web HTTP Sequence Number: Ack Number: Offset: 5 Reserved: % Code: % Ack is valid Window: 8760 Checksum: 0xd035 Urgent Pointer: 0 URGACK PSH RSTSYN FIN
CISCO NETWORKING ACADEMY “syn flood” Attacks Use vast numbers of TCP synchronization requests to overwhelm a host. Code: % Synch Sequence Window: 8192 Checksum: 0x6711 Urgent Pointer: 0 TCP Options: URGACK PSH RSTSYN FIN
CISCO NETWORKING ACADEMY Function: Flow Control Used only by TCP.
CISCO NETWORKING ACADEMY Windowing (TCP only)
CISCO NETWORKING ACADEMY Window Size Specifies number of octets a host is willing to accept in the next TCP segment to be sent. Defines the amount of data that can be transmitted without receiving an ack (acknowledgement).
CISCO NETWORKING ACADEMY Function: Reliability (PAR) Positive Acknowledgement w/ Retransmission Packet 5 not received