Skip to main content

1. OSI-7-Layer-Networking-Model


  • Local networking - Ethernet
  • Routing
  • Segmenting, ports, sessions
  • Applications

Best way to understand networking is to fully understand the OSI 7 Layer Model. Definition: https://osi-model.com/ Key Phrase: People don't need those stupid packets anyway. 1-7 ;) image.png

Network Layer 1 Physical


Types:

  • Ethernet Cable - The actual physical cable
  • WIFI - Radio Frequencies
  • Fiber - Light

Notes:

  • Physical connections between places
  • Defines the physical standards of the medium
    • transmitting and receiving standards
  • a Hub is needed to connect more than two devices. Anything received on one port is transmitted to all the ports - this is not a router. it doesn't route from one machine to a specific machine, nor does it act as a switch.
  • No way to avoid collisions
  • Each layer understands the layers below them, but not the ones above them. An ethernet cable doesn't understand anything because it's a Layer 1 Physical thing. A layer 3 will understand layer 2 and layer 1.

Network Layer 2 Data Link


  • Runs on Layer 1
  • MAC address - 48 bits in hex, 24 for a manufacturer
  • Frame that contains the source and destination and payload that travels across the Layer 1 physical media
  • Identifies devices
  • Layer 2 has a way to detect and work around collisions which can do Unicast 1:1 and Broadcast communications 1:ALL
  • Switch instead of a hub which helps with collisions.

Frame


  • Preamble
  • Destination
  • Source
  • EtherType
  • Payload
  • Frame Check Sequence (FCS)

image.png

Decimal to Binary conversion (IP Addresses)


image.png

Network Layer 3 Network


  • IP - the frame is then wrapped with data that says where this packet is going.
  • Subnets and subnet masks
  • Routes - where to forward this packet
  • Route tables - multiple routes
  • Router - moves packets from source to destination while encapsulating on Layer 2
  • ARP - Address Resolution Protocol - sends to MAC addresses via the IP address
  • Device to device communications over the Internet
  • Can be delivered out of order

Network Layer 4 Transport and Layer 5 Session Layer


  • TCP and UDP
  • TCP Handshake will be used.
  • Session layer 5 lies on top of Transport Layer 4.
  • Ordering packets and lost packets are fixed here.
  • Flow control
  • Delay control
    image.png