Skip to content

Network Access Layer

The Network Access layer is the foundation of network communication, handling the physical transmission of data between devices. This layer converts digital information into physical signals that can travel over various network media.

This layer is a combination of:

  • Drivers and hardware that know how to convert digital data into physical signals and vice versa
  • A protocol on top of it that defines unique addresses for each device on the network and how to establish connections between them

Physical links are the actual connections between devices - wires, fiber optic cables, or wireless connections. These links enable computers to send and receive digital information by converting it into physical signals.

Serialization and Deserialization:

  • Serialization: Converting digital data (bits) into physical signals for transmission
  • Deserialization: Converting received physical signals back into digital data

Wired Connections:

  • Copper: Electrical signals over twisted pair cables
  • Fiber Optic: Light signals through glass fibers
  • Coaxial: Electrical signals through shielded cables

Wireless Connections:

  • Wi-Fi: Radio waves in 2.4GHz/5GHz bands
  • Bluetooth: Short-range radio communication
  • Cellular: Radio waves for mobile networks

Network Interface Cards (NICs): Hardware Components

A NIC is the hardware component that connects a computer to a network. It handles the conversion between digital data and physical signals.

NIC Functions:

  • Signal Conversion: Converts digital data to/from physical signals
  • Frame Processing: Creates and interprets Ethernet frames
  • Error Detection: Checks for transmission errors using CRC
  • Media Access Control: Manages access to shared network media

What is a Local Network?

A local network (LAN) is a group of devices connected to the same network infrastructure. Devices on a local network can communicate directly with each other without going through external routers.

Characteristics of Local Networks:

  • Shared Media: All devices share the same network cable or wireless channel
  • Direct Communication: Devices can send data directly to each other
  • Limited Range: Typically confined to a building or campus
  • High Speed: Fast communication due to proximity

Network Switches: Intelligent Traffic Management

In early Ethernet networks, all devices were connected to a single shared cable (bus topology), which caused performance problems as the network grew. Network switches solve this by creating dedicated connections between devices.

What is a Network Switch?

A network switch is a networking device that connects multiple devices on a local network and intelligently forwards data only to the intended destination. Unlike older hubs that broadcast all traffic to every device, switches learn which devices are connected to which ports and forward traffic only where it needs to go.

Switch Functions:

  • Learning: Discovers which devices are connected to which ports
  • Forwarding: Sends frames only to the appropriate destination port
  • Filtering: Prevents unnecessary traffic from reaching other devices
  • Loop Prevention: Prevents network loops using Spanning Tree Protocol

How Switches Work

Learning Process:

  1. Frame Reception: Switch receives a frame on a port
  2. Source Learning: Records the source MAC address and port number
  3. Table Update: Updates its MAC address table (also called CAM table)
  4. Forwarding Decision: Uses the table to forward future frames

Forwarding Process:

  1. Frame Arrival: Switch receives a frame with destination MAC
  2. Table Lookup: Checks MAC address table for destination port
  3. Forwarding: Sends frame only to the correct port (if known)
  4. Flooding: If destination unknown, sends to all ports (except source)

Network Topologies: How Devices Are Connected

Network topology refers to the physical or logical arrangement of devices in a network. Different topologies have different advantages and disadvantages.

Common Network Topologies

Bus Topology (Obsolete):

  • All devices connected to a single shared cable
  • Simple but prone to collisions
  • Single point of failure
  • Limited scalability

Star Topology (Modern):

  • All devices connected to a central switch/hub
  • Easy to manage and troubleshoot
  • Central point of failure (switch)
  • Scalable and reliable

Ring Topology:

  • Devices connected in a circular arrangement
  • Data travels around the ring
  • Good for token-passing protocols
  • Single point of failure

Mesh Topology:

  • Every device connected to every other device
  • Maximum redundancy and reliability
  • Expensive and complex
  • Used in critical systems

Ethernet: The Most Common Local Network Technology

Ethernet is the dominant technology for establishing local area networks (LANs). It defines how devices communicate over a single shared medium.

What is Ethernet?

Ethernet is a family of networking technologies that define how devices communicate over local networks. It specifies the physical layer (cables, connectors) and data link layer (frame format, addressing) standards.

Ethernet Standards:

  • 10BASE-T: 10 Mbps over twisted pair
  • 100BASE-TX: 100 Mbps over twisted pair
  • 1000BASE-T: 1 Gbps over twisted pair
  • 10GBASE-T: 10 Gbps over twisted pair

What is a MAC Address?

A MAC (Media Access Control) address is a unique 48-bit identifier assigned to every network interface. It serves as the "physical address" of a device on a local network.

MAC Address Format:

cpp
XX:XX:XX:XX:XX:XX

Where each X is a hexadecimal digit (0-9, A-F)

Example MAC Address:

cpp
AA:BB:CC:DD:EE:FF

MAC Address Structure

cpp
MAC Address Structure (48 bits = 6 bytes)

┌─────────────────┬─────────────────┬─────────────────┐
OUI (24 bits) │   OUI (24 bits) │   NIC (24 bits) │
│  (Manufacturer) │  (Manufacturer) │   (Device ID)   │
├─────────────────┼─────────────────┼─────────────────┤
│     AA:BB:CC    │     DD:EE:FF    │     00:11:22
└─────────────────┴─────────────────┴─────────────────┘

Components:

  • OUI (Organizationally Unique Identifier): First 24 bits identify the manufacturer
  • NIC (Network Interface Controller): Last 24 bits identify the specific device

MAC Address Types

Unicast Addresses:

  • Unicast: Sent to a specific device (normal communication)
  • Multicast: Sent to a group of devices
  • Broadcast: Sent to all devices on the network (FF:FF:FF:FF:FF:FF)

Ethernet Frame Structure: Packaging Data

Ethernet really only needs a few things to function:

  • Destination MAC address: The MAC address of the device to which the data is being sent
  • Source MAC address: The MAC address of the device from which the data is being sent
  • EtherType: The type of protocol being used in the payload or the length of the payload
  • Payload: The actual data being transmitted
  • CRC: A checksumA small set of bits computed from the payload to prove that the data has not been corrupted to ensure the integrity of the data

Therefore, ethernet packages data into frames with specific headers and trailers:

cpp
Ethernet Frame Structure

┌─────────────────────────────────────────────────────────────────────────────┐
│                           Ethernet Frame (14 + Payload + 4 bytes)          │
├─────────────────┬─────────────────┬─────────────────┬─────────────────────┤
│ Destination MAC │   Source MAC    │   EtherType     │       Payload       │ CRC │
│   (6 bytes)     │   (6 bytes)     │   (2 bytes)     │   (variable)        │(4B) │
├─────────────────┼─────────────────┼─────────────────┼─────────────────────┤
│ AA:BB:CC:DD:EE:FF│ 11:22:33:44:55:660x0800     │   [Upper Layer Data]│     │
└─────────────────┴─────────────────┴─────────────────┴─────────────────────┘

Maximum Transmission Unit (MTU)

The MTU is the largest size of a data packet that can be transmitted over a network link.

Common MTU Values:

  • Ethernet: 1500 bytes (standard)
  • Jumbo Frames: 9000 bytes (for high-performance networks)
  • Wi-Fi: 2304 bytes (varies by standard)

Direct Device Communication

When two devices on the same local network want to communicate:

  1. Frame Creation: Sending device creates an Ethernet frame
  2. Address Resolution: Device determines destination MAC address
  3. Frame Transmission: Frame is sent over shared media
  4. Frame Reception: All devices receive the frame
  5. Address Filtering: Only destination device processes the frame

The Network Access layer provides the fundamental building blocks for network communication. Understanding how physical links work, how NICs and switches function, how networks are organized, and how Ethernet frames are structured is essential for building efficient network applications and troubleshooting network issues.

Questions

Q: What is the primary function of the Network Access layer?

The Network Access layer's primary function is to convert digital data to physical signals (electrical, optical, or radio) for transmission over the network medium.

Q: What is the purpose of a Network Interface Card (NIC)?

A NIC converts digital data from the computer to physical signals (electrical, optical, or radio) for transmission, and converts incoming physical signals back to digital data.

Q: What is the main difference between a hub and a switch?

A switch is intelligent and can learn MAC addresses to forward packets only to the correct port, while a hub simply broadcasts all incoming traffic to all ports.

Q: What is the purpose of MAC addresses?

MAC addresses provide physical addressing for devices on a local network. They are unique hardware identifiers that allow devices to communicate directly on the same network segment.

Q: What is the maximum size of an Ethernet frame?

The maximum size of a standard Ethernet frame is 1518 bytes (including header and trailer). The payload portion is limited to 1500 bytes, which is the MTU (Maximum Transmission Unit).

Q: Which network topology provides the best fault tolerance?

Mesh topology provides the best fault tolerance because each device is connected to every other device, creating multiple paths for data transmission. If one connection fails, data can still reach its destination through alternative paths.