Friday, March 19, 2021

OSI Layer

Overview


Layer 7 - Application

  • HTTP, FTP, ..

Layer 6 - Presentation

  • jpg, mpg

Layer 5 - Session

  • NetBIOS

Layer 4 - Transport

  • TCP/UDP
  • Ports
  • Segmentation (breaks large files into smaller segments)
  • Segments
  • Flow control - ensures that receiving host can handle the transfer (prevents overwhelming the receiver)
  • Session multiplexing
  • Stateful firewalls - return traffic is allowed by keeping track of src and dst ports on client end


  • 3-way handshake
  • TCP header

  • UDP header


Layer 3 - Network

  • IP addressing, logical addressing
  • Routers
  • Packets
  • IP Header


  • Maximum Transmission Unit (MTU)
    • Max packet size
    • Default: 1500 byte
    • Packets larger than MTU will be splitted into parts (fragments)
  • Time to Live (TTL)
    • Lifetime of a packet
    • Every time a packet passes on a router, the router decrements this by 1
    • Prevents routing loop (e.g on broken network)
    • Once the TTL reaches 0, the router will discard/drop the packet and send back time exceeded message to original sender
  • 8-bit Protocol - layer 4 information (TCP or UDP)
  • Quality of Service (QoS)
  • Connectionless protocol
  • Example protocols: ICMP and IPSec

Layer 2 - Data Link

  • MAC address
    • 48-bit hexadecimal address
    • first 24 bits - OUI (Organizationally Unique Identifier)
    • last 24 bits - vendor assigned
    • 248 = 281,474,976,710,656 MACs
  • Switches
  • Frames
  • Error detection (e.g CRC)
  • Ethernet Header

Layer 1 - Physical Layer

  • Cables
  • Hubs
  • Voltage levels, max transmission distance
  • Straight-Through cable - connects end device (e.g PC, laptop) to a switch
  • Crossover cable - connects devices of same type (e.g PC to PC)

  • Fiber cables - supports longer distances and higher bandwidth
    • Single mode vs Multi mode
  • Power over Ethernet (POE) - e.g IP Phones

  • Others:
    • Cat5 - up to 100 Mbps
    • Cat5e - up to 1000 Mbps

No comments:

Post a Comment