🌐

Introduction to IP 2.1

Sep 3, 2024

Networking and Internet Protocols Lecture Notes

Moving Box Metaphor

  • Transporting Boxes: Common method is using a moving truck.
    • Network Comparison: The road represents the network (wireless, DSL, cable, Ethernet).
    • Truck as IP: Internet Protocol (IP) likened to the moving truck.
    • Box as Data: Encapsulated data traveling inside the truck.

Network Structure

  • Devices: Include workstations, clients, laptops (senders) and servers (receivers).
  • Ethernet Frame Structure:
    • Payload: Contains IP data, which includes TCP data, and further HTTP data.
    • Headers and Trailers: Ethernet header and trailer surround the payload.

IP and Protocols

  • IP (Internet Protocol): The main protocol for moving data across networks.
  • TCP (Transmission Control Protocol):
    • Connection-oriented, ensures reliable delivery, and has flow control.
    • Features: Acknowledgment of data receipt, retransmission of lost data, message reordering.
  • UDP (User Datagram Protocol):
    • Connectionless, no acknowledgment of receipt, no flow control.
    • Use Cases: Ideal for real-time applications like VoIP, DHCP, TFTP.

Protocol Layers

  • OSI Model: TCP/UDP operate at Transport Layer (Layer 4 of OSI).
  • Encapsulation: TCP and UDP are encapsulated within IP packets.

Addressing and Multiplexing

  • IP Addressing: Unique identifiers for devices in a network (like house addresses).
  • Port Numbers: Direct data to the correct application or "room" (e.g., Port 80 for HTTP).
    • Non-Ephemeral Ports: Well-known and permanent (e.g., Port 80, 443).
    • Ephemeral Ports: Temporary, assigned in real-time by the OS.

TCP vs UDP

  • TCP Characteristics:
    • Reliable, connection-oriented, flow control.
    • Used in applications like HTTPS, SSH.
  • UDP Characteristics:
    • Unreliable, connectionless, no flow control.
    • Used in applications like VoIP, DHCP.

Port Numbers and Security

  • Standardization: Same port numbers across servers for simplicity (e.g., Port 80 for web traffic).
  • Security Implications:
    • Port numbers are not a security feature.
    • Easy to scan and find open ports.

Example of Traffic Flow

  • Scenario: Client with IP 10.0.0.1 communicates with server IP 10.0.0.2.
  • Traffic Types: HTTP (Port 80), VoIP (Port 5004), Email (Port 143).
  • Port Assignments:
    • Source ports are random for outgoing traffic.
    • Destination ports are well-known for incoming traffic.