Skip to main content

Command Palette

Search for a command to run...

Physical Layer and Data Link Layer

Published
•4 min read•View as Markdown

In computer networks, the Physical Layer and the Data Link Layer sit at the bottom of the OSI 7-layer model. They define how data is actually transmitted across the medium. In this chapter, we will go through Ethernet, NICs and cables, hubs, and switches.


01. Ethernet

1) Ethernet Standards

  • The most widely used technology in Local Area Networks (LANs)

  • Based on the IEEE 802.3 standard

  • Evolution of transmission speeds:

    • 10 Mbps: Original Ethernet

    • 100 Mbps: Fast Ethernet

    • 1 Gbps: Gigabit Ethernet

    • 10 Gbps and beyond: Data centers, backbone networks


2) Transmission Media Notation

Example: 100BASE-TX

  • 100: Transmission speed (100 Mbps)

  • BASE: Baseband signaling (digital transmission)

  • TX: Type of transmission medium

    • T: Twisted Pair

    • F: Fiber optic

💡 Examples:

  • 10BASE-T → 10 Mbps using UTP cable

  • 1000BASE-SX → 1 Gbps using short-range multimode fiber


3) Ethernet Frame Structure

| Preamble | Destination MAC | Source MAC | Type/Length | Data | FCS |
  • Preamble: Synchronization signal (alternating 1s and 0s)

  • Destination MAC / Source MAC: Hardware addresses of sender and receiver

  • Type/Length: Identifies the upper-layer protocol (e.g., IP, ARP)

  • Data: Payload (minimum 46 bytes, maximum 1500 bytes)

  • FCS (Frame Check Sequence): Error detection using CRC


4) [More to Know] Token Ring

  • Developed by IBM

  • Only the device holding a token can transmit data

  • Advantage: No collisions

  • Disadvantage: If one device fails, the entire network is affected → rarely used today

📌 Key Takeaways (4 items)
Ethernet standards / BASE notation / Frame structure / MAC address


02. NIC and Cables

1) NIC (Network Interface Card)

  • Appearance: Installed as a card on the motherboard, or built-in as a chipset

  • Roles:

    • Connects a computer to the network

    • Provides a unique MAC address

    • Converts digital data into electrical/optical signals and vice versa

💡 Examples: Wi-Fi NIC, Ethernet NIC


2) Twisted Pair Cable

  • Appearance: Copper wires twisted together to reduce interference

  • Types:

    • UTP (Unshielded Twisted Pair): No shielding, low cost

    • STP (Shielded Twisted Pair): Shielded against electromagnetic noise, more expensive

  • Categories:

    • Cat5e: 100 Mbps ~ 1 Gbps

    • Cat6: 1 ~ 10 Gbps

    • Cat7/8: High-performance, used in data centers


3) Fiber Optic Cable

  • Appearance: Glass or plastic fibers transmitting data using light

  • Single Mode Fiber (SMF):

    • Straight path, uses laser light

    • Supports several kilometers to tens of kilometers

    • Ideal for long-distance communication

  • Multimode Fiber (MMF):

    • Multiple paths for light

    • Limited to hundreds of meters

    • Suitable for LANs and building-level connections


📌 Key Takeaways (5 items)
NIC / MAC address / Twisted pair / Fiber optic / Cable categories

TypeCharacteristicsDistanceExample Use Case
UTPLow-cost, no shieldTens to hundreds of metersHome/office LAN
STPNoise-resistantTens to hundreds of metersIndustrial sites
Fiber (SMF)Long distance, high speedSeveral km ~ tens of kmBackbone, ISP
Fiber (MMF)Shorter range, cheaperHundreds of metersBuilding LAN

03. Hub

1) Features of a Hub

  • Operates at the Physical Layer

  • Forwards incoming signals to all ports (broadcast)

  • Simple but inefficient (many collisions)


2) Collision Domain

  • A network segment where packet collisions can occur

  • With hubs, all ports share one collision domain → high collision rates


3) CSMA/CD (Carrier Sense Multiple Access with Collision Detection)

A method to reduce collisions in Ethernet:

  1. Carrier Sense: Check if the channel is idle before sending

  2. Multiple Access: Many devices can attempt to use the channel

  3. Collision Detection: Detect if a collision occurs (signal corruption)

  4. Backoff and Retry: Wait a random time and retransmit

📌 Key Takeaways (5 items)
Hub / Broadcast / Collision domain / CSMA/CD / Physical layer


04. Switch

1) Features of a Switch

  • Operates at the Data Link Layer

  • Forwards frames based on MAC addresses

  • Supports independent communication between ports → fewer collisions


2) MAC Address Learning

  • The switch records the source MAC address of incoming frames into its MAC address table

  • When sending, it looks up the destination MAC and forwards only to the correct port


3) VLAN (Virtual LAN)

  • Logically separates one physical network into multiple sub-networks

  • Port-based VLAN: Divides based on port numbers

  • MAC-based VLAN: Divides based on device MAC addresses

  • Benefits: Improved security, traffic separation, simplified management

📌 Key Takeaways (4 items)
Switch / MAC learning / VLAN / Data link layer

More from this blog

psk-study

134 posts