CIS 527



Lab 3 - Transport Layer

Transport Layer

  • Provides Host-to-Host Communication for Applications
  • May Provide Reliability, Flow Control, Sustained Connections
  • Typically TCP or UDP

Transmission Control Protocol (TCP)

  • Stateful
  • Reliable
    • Acknowledge
    • Retransmit
    • Rearrange
  • Connection-Oriented

Image Source: Wikipedia

TCP Packet

Source PortDest. Port
Sequence Number
Acknowledgement Number
OptionsLength
ChecksumUrgent
Data...

User Datagram Protocol (UDP)

  • Stateless
  • Unreliable
    • No Guarantees!
  • Connectionless

UDP Packet

UDP Packet Structure
Source PortDest. Port
LengthChecksum
Data...

TCP

Great for long, reliable communication between two hosts

UDP

Great for short bursts of data which could be lost in transit

Ports

  • Virtual Connection Points on a Host
  • Typically 1 Application per Port
  • Numbered 0 - 65535 (216)
  • Several "Well Known" Ports Have Established Uses
  • Outgoing Connections use High-Numbered "Ephemeral" Ports
  • Example: 192.168.0.1:1234

Well Known Ports

  • 21 - FTP
  • 22 - SSH
  • 23 - Telnet
  • 25 - SMTP
  • 53 - DNS
  • 80 - HTTP
  • 443 - HTTP over TLS/SSL

Summary

  • 5 - 7: Application Writes a Letter
  • 4: Transport Adds To/From Name
  • 3: Network Adds To/From Address
  • 2: Data Link Puts Into Box(es)
  • 1: Physical Transports to Next PO

Summary

  • 5 - 7: Application Creates a Packet
  • 4: Transport Adds To/From Port
  • 3: Network Adds To/From IP Address
  • 2: Data Link Puts Into Frame(s)
  • 1: Physical Transports to Next Node