Skip to content

Instantly share code, notes, and snippets.

@h4k1m0u
Created April 13, 2024 18:46
Show Gist options
  • Save h4k1m0u/96a44bad37ee94c7b474979f48925992 to your computer and use it in GitHub Desktop.
Save h4k1m0u/96a44bad37ee94c7b474979f48925992 to your computer and use it in GitHub Desktop.
Notes about OSI and TCP/IP models

OSI model

For systems interconnections in a network, and has 7 layers (from top to bottom):

  • Application: Closest to user, e.g. HTTP, FTP...
  • Presentation: Encryption/Decryption, Compression/decompression, e.g. jpeg, mpeg...
  • Session: e.g. sync file transfers with checkpoints (to avoid restarting from beginning on failure).
  • Transport: Flow and error control, e.g. TCP, UDP
  • Network: breaks/assembleds data into packets, routing, e.g. IP
  • Data link: connects devices that are physically in the same network, e.g. Ethernet, MAC
  • Pyhsical: bit (raw data), e.g. cables

TCP/IP model

Organizes communication between devices over the internet, and has 4 layers (top to bottom):

  • Application: HTTP, FTP. For process to process (by ports) communication.
  • Transport: TCP, UDP. For host to host communication.
  • Internet: IP addressig, routing. For communication between independent networks.
  • Link: MAC address. For communication within the same network.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment