Network Security I

Computer Networks

Circuit and Packet Switching
  • Circuit Switching

    • Used in the legacy phone networks.
    • A dedicated path is established through a sequence of hardware devices when two nodes start communication.
    • Data is sent along this established route which is maintained until the communication ends.
  • Packet Switching

    • Primarily used in the Internet.
    • Data is divided into packets that are transported independently through the network.
    • Each packet is handled on a best-effort basis, meaning it may follow different routes to reach the destination.
Advantages of Packet Switching
  • No Wasted Bandwidth
    • Links are not reserved during idle periods.
  • Multiplexing
    • Multiple connections of lesser quality can be established without blocking users.
  • Adaptation
    • Can adapt to network congestion and failures more effectively than circuit switching.
Multiplexing Methods
  • Time Division Multiplexing (TDM)
  • Frequency Division Multiplexing (FDM)
    • Allows multiple sender/receiver pairs to share the same physical link.
Disadvantages of Packet Switching
  • No Guaranteed Bandwidth
  • Overhead
    • Each packet carries a header with a source/destination address.
  • Complex Control
    • Packets can be lost, corrupted, or delivered out of order.
  • Delay and Congestion
    • Lack of congestion control may lead to arbitrary delays and packet drops.
Internet Protocols vs OSI Model
LayerOSI LayerInternet Protocol Stack
ApplicationApplicationFTP, SMTP, HTTP
PresentationPresentation-
SessionSession-
TransportTransportTCP, UDP
NetworkNetworkIP, routing protocols
Data LinkData LinkPPP, Ethernet
PhysicalPhysical-
Protocol Layering and Routing
  • Data encapsulation example:
    • Each network layer encapsulates data from the layer above it into packets and frames for transport.
  • What is a Protocol?
    • Defined formats and actions for message exchanges between network entities.
Key Functions of Network Layer
  • Forwarding
    • Moves packets from router input to appropriate output.
  • Routing
    • Determines the path that packets will follow from source to destination.
IP Addressing
  • IP Address
    • A 32-bit identifier for devices on the network, which includes a network part and a host part.
  • Forwarding vs. Routing
    • Forwarding is a direct action at routers using a forwarding table.
    • Routing involves computing paths and updating forwarding tables among routers.
Transport Layer Protocols
  • TCP (Transmission Control Protocol)

    • Connection-oriented, provides reliable, ordered delivery of byte streams.
    • Includes error detection, retransmission, flow control, and congestion control.
  • UDP (User Datagram Protocol)

    • Connectionless, provides best-effort delivery without guarantees.
    • Efficient for real-time applications like multimedia, where some loss is acceptable.
Network Attacks and Security
  • ARP Spoofing
    • Allows an attacker to intercept traffic by sending false ARP responses.
  • Denial of Service (DoS) Attacks
    • Overwhelm a service to take it offline, targeting weaknesses in the protocol stack (against TCP/UDP).
Understanding Network Components and Operations
  • Clients and Servers

    • In the client-server model, the client requests services from an always-on server (e.g., web applications).
    • In peer-to-peer models, nodes can act as both client and server.
  • Address Resolution Protocol (ARP)

    • Used to map an IP address to a MAC address in a local area network.
Best Practices
  • Network Configuration and Monitoring
    • Tools like Wireshark are used for packet analysis and monitoring network security.
  • Preventive Measures Against Attacks
    • Use of static ARP entries, secure protocols, and regular monitoring to deter ARP spoofing and other security threats.