Elective Wireless Networking

Wireless NetworkingUnit 614 min read

Mobile Networks & Transport Layer: Protocols, TCP/UDP, QoS, and 5G Basics

Unit 6 of Wireless Networking explores the architecture of mobile networks (GSM, 4G, 5G) alongside transport layer protocols (TCP, UDP, SCTP), quality of service (QoS) mechanisms, and their real-world applications in apps like eSewa, WhatsApp, and Ncell. Students learn how data flows end-to-end, how congestion control

TAKEAWAYS:

  • Understand the mobile network architecture (core network, RAN, EPC) and how it differs from wired networks, with a focus on 5G’s non-standalone (NSA) and standalone (SA) modes.
  • Master TCP vs. UDP vs. SCTP: when to use each, their header fields, and how TCP’s sliding window, congestion control (Reno, Vegas), and flow control ensure reliable delivery.
  • Learn QoS mechanisms (DiffServ, IntServ, MPLS) and how they prioritize voice (VoIP), video (YouTube), and IoT traffic in crowded networks like Kathmandu’s Ncell towers.
  • Trace real-world protocol exchanges: how WhatsApp uses UDP for instant messaging (low latency) while eSewa uses TCP for secure transactions (reliability).
  • Compare 4G LTE vs. 5G in terms of latency, throughput, and use cases (e.g., NTC’s fiber backhaul vs. Pathao’s ride-hailing app).
  • Solve worked examples: calculate TCP’s RTT, throughput, and congestion window for a Daraz order processing delay, or model a 5G slice for NEPSE’s real-time stock trading.

1. Mobile Network Architecture: From GSM to 5G

Mobile networks are layered systems that connect devices (phones, IoT sensors) to the internet via radio access networks (RAN) and core networks. Unlike wired networks, they must handle mobility, handoffs, and heterogeneous access (Wi-Fi, LTE, 5G NR).

User Equipment (UE)PDU SessionRadio Access Network (RAN)RRC MessageCore Network (EPC/5GC)IP PacketTransport NetworkEthernet Frame
5G SA architecture with service-based interfaces (SBI) and network slicing (e.g., NEPSE’s low-latency slice).

1.1 Core Components of a Mobile Network

classDiagram
    class UserEquipment {
        +Device (Phone/IoT)
        +Radio Interface (Uu)
    }
    class RadioAccessNetwork {
        +Base Station (eNB/gNB)
        +Handles Radio Resources
        +Handover Management
    }
    class CoreNetwork {
        +EPC (4G) / 5GC (5G)
        +PDN Gateway (Internet Access)
        +Mobility Management Entity (MME/AMF)
    }
    class TransportNetwork {
        +Backhaul (Fiber/Copper)
        +Core Network Functions
    }
    UserEquipment --> RadioAccessNetwork : "Uu Interface"
    RadioAccessNetwork --> CoreNetwork : "S1/X2 Interface"
    CoreNetwork --> TransportNetwork : "Ethernet/IP"

Key Layers:

Layer 4G (LTE) Components 5G Components Function
Radio Access Network eNodeB (eNB) gNodeB (gNB) Manages radio resources, handoffs, and cell coverage.
Core Network EPC (MME, SGW, PGW) 5GC (AMF, SMF, UPF) Handles mobility, session management, and IP connectivity.
Transport Network Backhaul (MPLS, IP) Ultra-low latency fiber Connects RAN to core network (e.g., NTC’s fiber backbone for Ncell towers).
Service Layer IMS (VoIP), OTT (WhatsApp) Network Slicing (e.g., NEPSE) Delivers services like voice, messaging, and IoT.

1.2 Evolution: 4G LTE to 5G

  • 4G LTE:
    • Uses OFDMA for downlink, SC-FDMA for uplink.
    • EPC core with MME (mobility), SGW (switching), PGW (gateway).
    • Latency: ~30–50 ms (sufficient for HD video but not AR/VR).
  • 5G:
    • New Radio (NR) supports mmWave (24 GHz+) and sub-6 GHz.
    • 5GC core with service-based interfaces (SBI) and network slicing.
    • Latency: <1 ms (critical for autonomous vehicles, remote surgery).
    • Throughput: 10 Gbps (vs. 1 Gbps in 4G).

Worked Example: Ncell’s 5G Rollout Ncell uses 5G NSA mode (4G core + 5G RAN) initially to reduce costs. For a user in Kathmandu:

  1. A phone connects to a gNB (5G base station) at 3.5 GHz.
  2. The gNB hands off to a 4G eNB when moving to a non-5G area (seamless handover).
  3. The 5GC core (AMF/SMF) routes traffic to the internet via UPF. Question: If a Pathao driver’s phone has RTT = 5 ms in 5G vs. 40 ms in 4G, how much faster is real-time GPS updates? Answer: 4G RTT = 40 ms → 25 updates/sec. 5G RTT = 5 ms → 200 updates/sec (8× faster).

2. Transport Layer Protocols: TCP, UDP, and SCTP

The transport layer ensures end-to-end communication between devices. Mobile networks use:

  • TCP: Reliable, connection-oriented (e.g., eSewa transactions).
  • UDP: Low-latency, connectionless (e.g., WhatsApp voice calls).
  • SCTP: Multihoming and message-oriented (used in SS7 signaling for mobile calls).
sequenceDiagram
    participant Client as WhatsApp (UDP)
    participant Server as WhatsApp Server
    participant Internet as NTC Fiber Backhaul
    Client->>Internet: UDP Datagram (Port 443)
    Internet-->>Server: UDP Datagram
    Server->>Internet: UDP ACK (if needed)
    Note right of Client: No 3-way handshake; low latency for voice calls
    Note right of Internet: RTT ~20 ms (vs. 80 ms for TCP)
WhatsApp’s UDP-based messaging (no connection setup, minimal overhead).

2.1 TCP: Reliable Data Delivery

TCP uses:

  • 3-way handshake (SYN, SYN-ACK, ACK) for connection setup.
  • Sliding window for flow control (adjusts based on receiver’s buffer).
  • Congestion control (Reno, Vegas) to avoid network collapse.
sequenceDiagram
    participant Client as User (e.g., eSewa App)
    participant Server as Bank Server
    Client->>Server: SYN (Seq=100)
    Server->>Client: SYN-ACK (Seq=200, Ack=101)
    Client->>Server: ACK (Seq=101, Ack=201)
    Note right of Client: Connection Established
    Client->>Server: Data (Seq=101, Ack=201)
    Server->>Client: ACK (Seq=201, Ack=102)

TCP Header Fields (Key for Exams):

0                   1                   2                   3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          Source Port          |       Destination Port        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        Sequence Number                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                    Acknowledgment Number                      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Data |           |U|A|P|R|S|F|                               |
| Offset| Reserved  |R|C|S|S|Y|I|            Window             |
|       |           |G|K|H|T|N|N|                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           Checksum            |         Urgent Pointer        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                    Options                    |    Padding    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             Data                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Key Flags:

  • SYN: Connection request.
  • ACK: Acknowledgment.
  • FIN: Terminate connection.

Worked Example: Daraz Order Processing Delay A Daraz user in Pokhara places an order. The TCP connection has:

  • RTT (Round-Trip Time) = 80 ms (including wireless + wired delay).
  • Bandwidth = 10 Mbps.
  • Packet size = 1500 bytes. Calculate the maximum achievable throughput (ignoring congestion). Solution: Throughput = (Packet Size × 8) / RTT = (1500 × 8) / 0.08 = 150 Kbps (theoretical max; real-world is lower due to overhead).

2.2 UDP: Low-Latency, No Guarantees

Used in:

  • VoIP (WhatsApp calls).
  • Online gaming (low latency > reliability).
  • IoT (sensors sending data to cloud).

UDP Header (Simpler than TCP):

0                   1                   2                   3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          Source Port          |       Destination Port        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            Length             |           Checksum            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             Data                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Worked Example: WhatsApp Voice Call WhatsApp uses UDP for voice calls to minimize latency. If a call has:

  • Packet size = 60 bytes.
  • Sampling rate = 8 kHz (160 samples/sec).
  • RTT = 50 ms (including wireless delay). Calculate the jitter buffer size needed to handle 20% packet loss. Solution:
  • Voice data rate = 160 samples/sec × 1 byte/sample = 160 bps.
  • Packet loss = 20% → 32 samples lost per 160-sample packet.
  • Jitter buffer must store 32 samples (4 ms of audio) to smooth delays.

2.3 SCTP: Multihoming and Signaling

  • Used in SS7 (mobile call setup) and Diameter (authentication).
  • Supports multi-homing (backup paths if primary fails).
  • Message-oriented (unlike TCP’s byte stream).

Comparison Table: TCP vs. UDP vs. SCTP

Feature TCP UDP SCTP
Connection Connection-oriented Connectionless Connection-oriented
Reliability Guaranteed (ACKs, retries) No guarantees Reliable, message-based
Overhead High (20+ bytes header) Low (8 bytes header) Moderate (12+ bytes header)
Use Cases HTTP, eSewa, FTP VoIP, gaming, IoT SS7, Diameter, CDNs
Congestion Control Yes (Reno, Vegas) No Yes (similar to TCP)
Multihoming No No Yes

3. Quality of Service (QoS) in Mobile Networks

QoS ensures prioritization of critical traffic (e.g., voice > video > data). Key mechanisms:

E1 (100 Mbps)1 Gbps500 MbpsUDP (VoIP)Ncell Tower5GC CoreNTC Fiber BackhaulPathao ServerUser Phone
QoS routing for Pathao’s real-time GPS updates (UDP prioritized over TCP traffic).

3.1 QoS Models

Model Mechanism Example Use Case
IntServ RSVP (Resource Reservation) Video conferencing (low jitter)
DiffServ DSCP (Differentiated Services Code Point) VoIP (EF class), YouTube (AF class)
MPLS Label switching for fast routing NTC’s backhaul for Ncell towers

DiffServ Code Point (DSCP) Markings:

001010 (Decimal 22) = Expedited Forwarding (EF) → VoIP
010110 (Decimal 26) = Assured Forwarding (AF41) → Video
000000 (Decimal 0)  = Best Effort → Web browsing

3.2 QoS in 5G: Network Slicing

5G introduces network slicing, where a single physical network is divided into logical slices for different services:

  • Slice 1: Ultra-reliable low-latency (URLLC) → Autonomous vehicles.
  • Slice 2: Enhanced mobile broadband (eMBB) → 4K video.
  • Slice 3: Massive IoT (mIoT) → Smart meters.

Worked Example: NEPSE’s 5G Slice NEPSE needs <10 ms latency for real-time stock trading. A 5G operator creates a URLLC slice with:

  • Packet delay budget (PDB) = 5 ms.
  • Jitter < 1 ms.
  • Packet loss < 1e-5. Question: If a trader’s order takes 3 ms to reach the exchange, what is the remaining budget for processing? Answer: 5 ms (PDB) – 3 ms (transmission) = 2 ms for exchange processing.

4. Real-World Applications

4.1 eSewa: TCP for Secure Transactions

  • Uses TCP for reliability (no lost payments).
  • HTTPS (TLS over TCP) encrypts data.
  • Worked Example: If a user’s phone has RTT = 60 ms and the bank’s server is in the US, how long does a SYN-ACK handshake take? Answer: 3 × RTT = 180 ms (SYN → SYN-ACK → ACK).

4.2 WhatsApp: UDP for Instant Messaging

  • Uses UDP for low-latency chat.
  • Worked Example: If a message is 100 bytes and sent every 0.5 seconds, what is the data rate? Answer: (100 × 8) / 0.5 = 1.6 Kbps (low compared to video).

4.3 Pathao: 5G for Real-Time GPS

  • Uses 5G’s low latency for live driver tracking.
  • Worked Example: If a Pathao driver’s phone updates GPS every 20 ms, how many updates occur in 1 second? Answer: 1000 ms / 20 ms = 50 updates/sec (vs. 10 updates/sec in 4G).

4.4 NTC’s Backhaul: MPLS for QoS

  • Uses MPLS to prioritize traffic (e.g., emergency calls > Netflix).
  • Worked Example: If an MPLS label has CoS = 5 (Expedited Forwarding), how is it treated? Answer: Given highest priority, lowest queueing delay.

5. Exam Tips

  1. Mobile Network Architecture:

    • Draw the 5G SA/NSA core and label gNB, AMF, SMF, UPF.
    • Compare 4G EPC vs. 5G 5GC (e.g., MME vs. AMF).
    • Common exam question: "Explain how a handover works in 5G when a user moves from a gNB to an eNB."
  2. Transport Layer:

    • TCP: Know the 3-way handshake, sliding window, and congestion control (Reno vs. Vegas).
    • UDP: Know when it’s used (e.g., VoIP, gaming).
    • Worked example: Calculate throughput given RTT and packet size.
  3. QoS:

    • DiffServ vs. IntServ: Which is used in mobile networks? (DiffServ).
    • 5G slicing: Explain URLLC vs. eMBB vs. mIoT slices.
    • Worked example: Given a PDB of 10 ms, calculate remaining budget after transmission.
  4. Real-World Scenarios:

    • eSewa: TCP + TLS.
    • WhatsApp: UDP for chat.
    • Pathao: 5G low latency for GPS.
    • NEPSE: 5G slicing for trading.
  5. Common Pitfalls:

    • Confusing 4G EPC and 5G 5GC: Remember 5GC uses service-based interfaces (SBI).
    • TCP vs. UDP: UDP has no congestion control; TCP does.
    • QoS models: DiffServ is scalable (used in mobile networks), while IntServ requires per-flow setup.

Based on the TU BSc CSIT syllabus for Wireless Networking, unit 6.

Discussion

Loading…