Computer Network and Security - Exam Notes

Address Resolution Protocol (ARP)

  • Used to determine the destination MAC address of a local device given its IPv4 address.
  • Functions:
    • Resolving IPv4 addresses to MAC addresses.
    • Maintaining an ARP table (IPv4 to MAC mappings).
  • To send a frame, a device checks its ARP table. If no entry is found, an ARP request is sent.
  • Commands to view ARP table:
    • Cisco router: show ip arp
    • Windows 10 PC: arp -a
  • Vulnerabilities: ARP spoofing, mitigated by enterprise-level switches.

Network Layer

  • Provides services for end devices to exchange data.
  • Protocols: IPv4 and IPv6.
  • Basic operations:
    • Addressing end devices
    • Encapsulation
    • Routing
    • De-encapsulation
  • IP encapsulates the transport layer segment; IP addressing doesn't change from source to destination (except with NAT).

IPv4 Packet

  • Header ensures packets are sent correctly and contains info for layer 3 processing.
  • Header fields include version, differentiated services, header checksum, TTL, protocol, source IPv4 address, and destination IPv4 address.
  • Limitations:
    • Address depletion
    • Lack of end-to-end connectivity due to NAT
    • Increased network complexity from NAT

IPv6 Packet

  • Developed to overcome IPv4 limitations.
  • Improvements:
    • Increased address space (128-bit addresses)
    • Simplified packet handling
    • Elimination of NAT
  • Header is fixed at 40 bytes and simplified.
  • Significant fields: version, traffic class, flow label, payload length, next header, hop limit, source IPv6 address, destination IPv6 address.

Host Forwarding Decision

  • Packets are created at the source; each host has a routing table.
  • A host can send packets to itself (loopback addresses 127.0.0.1127.0.0.1 for IPv4, ::1::1 for IPv6), local hosts, or remote hosts.
  • Source determines if destination is local or remote based on IP address and subnet mask (IPv4) or network address and prefix (IPv6).
  • Remote traffic is forwarded to the default gateway.

Default Gateway (DGW)

  • Must have an IP address in the same range as the LAN.
  • Accepts data from the LAN and forwards traffic off-LAN.
  • Can route to other networks.
  • Configured statically or via DHCP (IPv4) or router solicitation (IPv6).
  • Acts as a static route (last resort) in the routing table.

IP Router Routing Table

  • Types of routes:
    • Directly Connected: Automatically added for active interfaces with addressing.
    • Remote: Learned manually (static route) or dynamically (routing protocol).
    • Default Route: Forwards unmatched traffic in a specific direction.

Static vs Dynamic Routing

  • Static Routing: Configured manually, good for small networks.
  • Dynamic Routing: Automatically discovers networks and adapts to topology changes.
  • Command show ip route shows route sources (L, C, S, O, D) and types (directly connected, remote, default).

IPv4 Address Structure

  • 32-bit hierarchical address with network and host portions.
  • Subnet mask determines network and host portions.
  • Prefix length identifies the subnet mask (e.g., /24).

Types of IPv4 Addresses

  • Network Address: All host bits are 0.
  • Host Addresses: Range between the first and last address.
  • Broadcast Address: All host bits are 1.
  • Public: Globally routed between ISPs.
  • Private: Non-routable, used internally (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16).
  • Loopback: 127.0.0.0/8127.0.0.0 /8, used for testing TCP/IP stack.
  • Link-Local: 169.254.0.0/16169.254.0.0 /16, self-assigned when DHCP is unavailable (APIPA).

IPv4 Address Classes (Historical)

  • Class A: 0.0.0.0/80.0.0.0/8 to 127.0.0.0/8127.0.0.0/8
  • Class B: 128.0.0.0/16128.0.0.0 /16 to 191.255.0.0/16191.255.0.0 /16
  • Class C: 192.0.0.0/24192.0.0.0 /24 to 223.255.255.0/24223.255.255.0 /24
  • Class D: 224.0.0.0 to 239.0.0.0
  • Class E: 240.0.0.0 – 255.0.0.0
  • Classful addressing is obsolete; classless addressing is now used.

Network Segmentation

  • Broadcast Domain: Area where broadcasts are propagated; routers do not forward broadcasts.
  • Subnetting: Reduces broadcast domain size, improving network performance and security.

Subnetting IPv4 Networks

  • Octet Boundary: Common subnetting at /8, /16, and /24.
  • Within Octet Boundary: Subnetting using masks like /25, /26, /27, etc.
  • Private vs. Public: Intranet uses private addresses, DMZ uses public addresses.

VLSM (Variable Length Subnet Masking)

  • Subnetting a subnet to efficiently allocate addresses.
  • Start with largest subnet requirements and subnet until smallest subnet requirements are met.

IPv4 Network Address Planning

  • Crucial for scalable network design.
  • Consider:
    • Number of subnets needed
    • Number of hosts per subnet
    • Device types
    • Private vs. public addresses

Device Address Assignment

  • End User Clients: Use DHCP.
  • Servers and Peripherals: Static IP addresses.
  • Internet-Accessible Servers: Public IPv4 addresses (often using NAT).
  • Intermediary Devices: Addresses for management.
  • Gateway: Routers and firewalls.