Computer NetworksUnit 310 min read

Physical Layer: Signals, Media, Modulation & Ethernet

Unit 3 of Computer Networks explores the Physical Layer (Layer 1)—the foundation of all networks. This note covers signaling techniques, transmission media (copper, fiber, wireless), modulation schemes (AM, FM, digital), Gigabit Ethernet (full/half duplex, CSMA/CD, 1000BASE-T), and real-world implementations like NTC’s

TAKEAWAYS:

  • The Physical Layer transmits raw bits as signals (electrical, optical, or wireless) over media, defining bit rate, bandwidth, and modulation.
  • Guided media (twisted pair, coaxial, fiber) vs. unguided media (wireless) differ in speed, cost, and interference susceptibility.
  • Gigabit Ethernet (1000BASE-T) uses full-duplex (simultaneous TX/RX) and half-duplex (CSMA/CD) modes, with Manchester encoding for clock synchronization.
  • Modulation (ASK, FSK, PSK) converts digital bits to analog signals for transmission over bandwidth-limited channels.
  • Real-world applications: NTC’s fiber-optic backbone (high-speed data), Ncell’s 4G towers (wireless modulation), and eSewa’s payment servers (Ethernet redundancy).
  • Exam focus: Compare media types, explain Gigabit Ethernet parameters, and calculate bandwidth/throughput for given scenarios.

1. Role of the Physical Layer

The Physical Layer is the lowest layer in the OSI model, responsible for:

  • Transmitting raw bits (0s and 1s) over a physical medium.
  • Defining electrical/optical/mechanical characteristics (e.g., voltage levels, light pulses, radio frequencies).
  • Modulation/demodulation (converting bits to signals and vice versa).
  • Bit synchronization (ensuring sender/receiver clocks align).
PhysicalData LinkNetworkTransportSessionPresentationApplication
OSI Model with Physical Layer (Layer 1) highlighted

2. Transmission Media: Guided vs. Unguided

Media are classified into guided (wired) and unguided (wireless), each with trade-offs in speed, cost, and interference.

Copper-basedGuided mediaTwisted PairCoaxial CableFiber Optic
Comparison of guided media types (simplified)

A. Guided Media

Type Description Pros Cons Example Use Case
Twisted Pair Copper wires twisted to reduce crosstalk. Cheap, easy to install. Susceptible to EMI, limited speed. Ncell’s DSL lines, office Ethernet.
Coaxial Cable Copper core + shielding (used in old Ethernet and cable TV). Higher bandwidth than TP. Bulky, expensive. NTC’s legacy broadband.
Fiber Optic Glass/plastic fibers transmitting light pulses. High speed, immune to EMI, secure. Expensive, fragile. NTC’s fiber backbone, Daraz data centers.

fiber optic cable cross sectionLabelled diagram showing cladding, core, and light propagation. (Image: J.P.Lon at English Wikipedia, CC BY 2.5, via Openverse)

B. Unguided Media (Wireless)

  • Radio Waves: Used in Wi-Fi (2.4 GHz/5 GHz), Bluetooth, and 4G/5G.
  • Microwaves: Satellite communication (e.g., Ncell’s backhaul).
  • Infrared: Short-range (e.g., TV remotes).

Comparison Table:

Media Speed Cost Interference Use Case
Twisted Pair 10 Mbps–10 Gbps Low High (EMI) Ethernet (1000BASE-T)
Fiber Optic 10 Gbps–100 Tbps High None NTC’s backbone, ISPs
Wireless (4G) 10–100 Mbps Medium Medium (signal loss) Ncell, Pathao’s ride-hailing GPS

3. Signaling Techniques

A. Analog vs. Digital Signals

  • Analog: Continuous waveform (e.g., human voice, AM radio).
  • Digital: Discrete pulses (0s and 1s, e.g., Ethernet frames).

B. Modulation Schemes

Digital data must be modulated to transmit over analog channels (e.g., radio waves). Common techniques:

  1. Amplitude Modulation (AM): Vary signal amplitude (e.g., old radio broadcasts).
  2. Frequency Modulation (FM): Vary frequency (e.g., FM radio).
  3. Phase Shift Keying (PSK): Encode bits in phase changes (used in Wi-Fi, 4G).
  4. Quadrature Amplitude Modulation (QAM): Combine amplitude/phase (used in cable TV, DSL).

Worked Example: Calculating Bandwidth for a Daraz Data Center

  • Daraz’s server sends 10 Gbps over 1000BASE-T Ethernet (copper twisted pair).
  • Bandwidth required = Bit rate × (1 + overhead).
    • Overhead for Ethernet ≈ 20% (preamble, CRC, etc.).
    • Total bandwidth = 10 Gbps × 1.2 = 12 Gbps.
  • Fiber optic would handle this easily, but copper (Cat 6/7) is limited to ~10 Gbps over short distances.

4. Gigabit Ethernet (1000BASE-T)

Gigabit Ethernet is a Physical Layer standard for 1 Gbps data transfer. Key parameters:

016324863Preamble7 bitsStartFrame Deli1 bitsDestination MAC48 bitsSource MAC48 bitsType/Length16 bitsPayload (Ethernet Frame)46 bits
Ethernet frame structure (simplified)

A. Topology

  • Star topology: All devices connect to a central switch (common in offices/data centers).
  • Bus topology: Legacy (e.g., old Ethernet 10BASE2).
graph TD
    subgraph Star Topology
        A["Central Switch"]
        B["PC 1"]
        C["PC 2"]
        D["Server"]
    end
    A --> B
    A --> C
    A --> D
    subgraph Bus Topology
        E["Bus Line"]
        F["Device 1"]
        G["Device 2"]
    end
    E --> F
    E --> G

B. Duplex Modes

Mode Description Collision Handling Use Case
Half-Duplex Devices take turns transmitting (like a walkie-talkie). Uses CSMA/CD (Carrier Sense Multiple Access with Collision Detection). Legacy Ethernet (10BASE-T).
Full-Duplex Devices transmit and receive simultaneously (like a phone call). No collisions (switch buffers traffic). Modern Ethernet (1000BASE-T).

Worked Example: NTC’s Fiber Backbone

  • NTC uses full-duplex fiber for its backbone to avoid collisions and achieve 100 Gbps+ speeds.
  • Half-duplex would cause packet loss due to collisions on high-traffic links.

C. Encoding: Manchester Encoding

  • Problem: How to synchronize clocks between sender/receiver?
  • Solution: Manchester encoding encodes each bit as a transition (e.g., 0 = low→high, 1 = high→low).
    • Ensures clock recovery (no need for separate clock signals).
    • Double the bandwidth (1 bit = 2 signal changes).

D. CSMA/CD (Half-Duplex Only)

  1. Carrier Sense: Check if the medium is idle.
  2. Transmit: If idle, send data.
  3. Collision Detection: If two devices transmit simultaneously, a collision occurs.
    • Both devices send a jam signal and back off (exponential delay).
  4. Retry: Devices wait a random time before retransmitting.

Mermaid Sequence for CSMA/CD Collision:

sequenceDiagram
    participant A as Device A
    participant B as Device B
    participant Medium

    A->>Medium: Sends data (senses idle)
    B->>Medium: Sends data (senses idle)
    Medium-->>A: Collision detected (jam signal)
    Medium-->>B: Collision detected (jam signal)
    A->>A: Back off (random delay)
    B->>B: Back off (random delay)
    A->>Medium: Retransmits

5. Real-World Applications

A. NTC’s Fiber-Optic Backbone

  • Idea Used: Fiber optic transmission (high bandwidth, low latency).
  • How: NTC uses dense wavelength-division multiplexing (DWDM) to send multiple data streams over a single fiber.
  • Impact: Enables high-speed internet for Nepal’s cities.

B. Ncell’s 4G Towers

  • Idea Used: Wireless modulation (OFDM) and frequency reuse.
  • How: Towers use multiple antennas (MIMO) to increase data rates (up to 1 Gbps).
  • Impact: Powers Pathao’s real-time GPS tracking and eSewa’s mobile payments.

C. eSewa’s Payment Servers

  • Idea Used: Redundant Ethernet links (full-duplex) for failover.
  • How: If one 1000BASE-T link fails, traffic switches to a backup link.
  • Impact: Zero downtime during peak transaction hours.

6. Common Drawbacks and Solutions

Drawback Cause Solution
Signal Attenuation Distance, interference. Use repeaters/amplifiers or fiber.
Electromagnetic Interference (EMI) Power lines, other signals. Shielded twisted pair (STP) or fiber.
Bandwidth Limitations Copper’s speed cap (~10 Gbps). Upgrade to fiber or higher-category cables (Cat 6a, Cat 7).
Collision in Half-Duplex Multiple devices transmitting. Switch to full-duplex or CSMA/CD.

7. Exam Tip: How to Score Full Marks

  1. For Gigabit Ethernet (1000BASE-T):

    • Must mention: Full/half-duplex, CSMA/CD, Manchester encoding, star topology, and 1000BASE-TX (Cat 5e+ cables).
    • Example: "In full-duplex mode, collisions are avoided because the switch buffers traffic, unlike half-duplex where CSMA/CD is used."
  2. For Media Comparison:

    • Use a table (as above) and highlight trade-offs (e.g., fiber vs. copper).
    • Example: "Fiber is immune to EMI but expensive; twisted pair is cheap but limited to 100 m."
  3. For Modulation:

    • Explain how AM/FM/PSK encode bits and give a real-world example (e.g., FM radio uses FM modulation).
  4. For Worked Examples:

    • Always show calculations (e.g., bandwidth = bit rate × overhead).
    • Relate to Nepal: "NTC’s fiber uses DWDM to multiplex 80 channels, increasing capacity."
  5. Diagrams:

    • Draw:
      • OSI Layer 1 position.
      • Ethernet star topology.
      • Manchester encoding waveform.
      • CSMA/CD collision sequence.

Based on the PU BE Computer (PU) syllabus for Computer Networks, unit 3.

Discussion

Loading…