Internet Protocols
Two Protocols
Open Systems Interconnection (OSI)
- Overview
- Based on strictly controlled layers
- ISO standard
- If you follow it it works, but not much room for expansion
- Layers
- Physical
- Provides electrical connections to a transmission medium
- Uses bits
- One device to another
- Data link
- Packet framing. Hardware addressing
- Uses MAC addresses and frames
- One device to another
- Network
- Addresses packets and routes them to provide end-to-end communication
- One network to another
- Transport
- Transfers data reliably or unreliably
- Reliable transfer involves a connection
- One process to another (TCP/UDP)
- Session
- Opens/Closes session between applications
- One application to another (socket port) (and the rest below)
- Presentation
- Formats data (compression and encryption)
- Application
- Provides the user interface
Internet Protocol (IP)
- Overview
- Incremental implementation and model
- Based on loosely layered model
- Created for ARPAnet (US military)
- Not a strict standard, and fully extensible to allow for rapid innovation
- Layer
- Access (ethernet and electrical connections)
- Network (IPv4 and IPv6)
- Transport (TCP, UDP)
- Application Protocols (FTP, TFTP, HTTP, SMTP, …)
- Within OS
- Access: Network interface and driver
- Network/Transport: Protocol stack
- Application: Sockets API
- Packet and Frames
- Packet switching network protocol
- The size of data sent over the network is more than just the data due to the overhead of each layer
- Packets are for transmission between networks (contains IP)
- Frames are for transmission through the access (contains MAC address)
- Steps
- Data
- Addressing
- Routing
- Error Detection
- Delivery Mechanisms
- Unicast: Single destination
- Multicast: Group destination
- Broadcast: All network hosts
Transport Protocols
Transmission Control Protocol (TCP)
- Connection-oriented protocol (impression of a dedicated channel)
- Data is delivered in-order
- Lost data (dropped packets) is re-transmitted
- All data is sent with a transmission number and a checksum
- Acknowledge sent for each package
- Will resend if not acknowledged fast enough
- Only unicast
- Three step handshake
- A to B: sync
- B to A: acknowledge sync
- A to B: acknowledge
- Three step handshake used for closing as well (just with finish instead of sync)
- Features
- The client sends a confirmation of data delivery to the server and data arrives
- If a confirmation does not arrive after a timeout period, the server attempts retransmission for the data that was not delivered
- In a congested network, TCP can delay data transmission
- Flow control
- Prevents a sender form overwhelming a receiver

- Receive window is the remaining space in the receive buffer. It can be used for simple load balancing
- When the window size is 0, it will stop transmitting data
- With every ack message, the receiver advertises its current receive window
User Datagram Protocol (UDP)
- Connectionless (like a mailbox)
- Best effort delivery
- Data may arrive out of order
- No handshake
- Unicast, multicast, or broadcast
- Features
- Adapts to bandwidth-intensive applications that tolerate a loss of packets (ex: video streaming)
- There are fewer delays in data transmission
- It is used to send a large number of packets at a time
- There is a possibility that you may lose some data