9.3 Computer Networks, Internet Protocols, Cybersecurity & Digital Basics

Key Takeaways

  • PAN, LAN, MAN and WAN describe differing network scopes; Bluetooth range and network performance vary by implementation.

  • A hub repeats signals, a traditional Layer 2 switch forwards frames using link-layer addresses, and a router uses IP addresses to forward packets between networks.

  • The seven-layer OSI reference model and four-layer TCP/IP model correspond only approximately. TCP provides ordered reliable transport; UDP does not guarantee delivery.

  • IPv4 addresses have 32 bits and IPv6 addresses have 128 bits. DNS looks up records including addresses; HTTPS protects web communication with TLS.

  • Recognize common digital threats and use defensive controls such as distinct-factor MFA. Pakistan’s PECA as amended in 2025 establishes NCCIA under section 29.

Last updated: December 2026

Why Networking & Cybersecurity Matter in SPSC Tests

Modern public administration in Pakistan—from SPSC online portals and e-Office workflows to digital banking—runs on networked systems. Networks and digital safety are useful preparation for Technological Knowledge, one possible part of the RMR general-post General Knowledge model. Check the post-specific syllabus; the Commission does not prescribe all the following subtopics for every test.


Network Scopes & Physical Topologies

Networks are grouped first by geographic span:

  • PAN (Personal Area Network): Connects personal devices in a person’s immediate environment (actual wireless range varies) (Bluetooth earbuds, smartwatch, phone hotspot).
  • LAN (Local Area Network): Links computers inside a single room, office building, or university campus using Ethernet (IEEE 802.3) or Wi-Fi (IEEE 802.11), with performance dependent on the network design.
  • MAN (Metropolitan Area Network): Spans an entire city or metropolitan region (cable broadband or municipal fiber rings).
  • WAN (Wide Area Network): Connects distant LANs across countries or continents via fiber-optic trunks, leased lines, and satellites. The Internet interconnects many independently operated networks worldwide.
  • VPN (Virtual Private Network): Provides a restricted logical network over an existing network, often using encrypted tunnels.

Network Topology defines how nodes are physically or logically wired together:

TopologyStructureKey AdvantageKey Weakness
BusAll devices share one central backbone cable with terminatorsLow cable cost; simple setupBreak in backbone halts entire network; shared-medium collision risk
StarEvery node connects to a central Switch or HubEasy to troubleshoot; one broken cable affects only one PCCentral switch is a single point of failure in a simple star
RingEach device connects to two neighbors in a closed loopCan support orderly access with a token-passing protocolSingle break can disrupt a simple ring unless redundancy is provided
MeshDevices interconnect directly (n(n−1)/2n(n-1)/2 links in a full mesh)Multiple alternative paths in a full meshMany links and higher configuration complexity
Hybrid / TreeCombines two or more topologies (e.g., Star-Bus)Scales cleanly for large campuses and enterprisesRequires careful hierarchical design

Networking Hardware by Function

  • Repeater (OSI Layer 1): Regenerates signals to extend cable distance.
  • Hub (Layer 1): A simple multi-port repeater that repeats an incoming signal to the other ports, creating a single collision domain.
  • Switch (Layer 2): A traditional Layer 2 LAN switch uses MAC (Media Access Control) addresses (commonly 48 bits, not necessarily permanently assigned) to forward frames; it may send broadcasts or unknown-destination frames to multiple ports.
  • Router (Layer 3): Connects distinct networks (such as a home or office LAN to an ISP's WAN) and forwards packets using IP addresses and routing information.
  • Modem (Modulator-Demodulator): Converts digital computer signals into analog carrier waves (and back) as needed for the transmission medium.
  • Gateway: A point of access to another network (for example, a default gateway/router); some gateways also translate protocols.

OSI 7-Layer Model vs. TCP/IP 4-Layer Model

Standardized by ISO/IEC and ITU-T, the OSI (Open Systems Interconnection) reference model splits networking into 7 layers, whereas one common TCP/IP model has 4 layers. The mapping is approximate, not an exact one-to-one equivalence:

OSI Layer (Top to Bottom)TCP/IP LayerData Unit (PDU)Core Function & Key Examples
7. ApplicationApplicationDataUser-facing network protocols: HTTP, HTTPS, FTP, SMTP, DNS
6. PresentationApplicationDataData representation, compression and encryption functions (e.g., JPEG format; TLS does not map exactly to one OSI layer)
5. SessionApplicationDataEstablishes, synchronizes, and terminates communication sessions
4. TransportTransportSegment / DatagramEnd-to-end transport; TCP provides reliability, UDP does not guarantee delivery; both use ports
3. NetworkInternetPacketLogical IP addressing and path routing (Routers)
2. Data LinkNetwork AccessFrameLink-layer MAC addressing, error detection (Switches)
1. PhysicalNetwork AccessBits (0 and 1)Raw cables, fiber optics, radio waves (Hubs, Repeaters)

Tip

Memory Trick (Bottom to Top, Layers 1 to 7): "Please Do Not Throw Sausage Pizza Away" — Physical, Data Link, Network, Transport, Session, Presentation, Application.


Key Internet Protocols, Port Numbers & TCP vs. UDP

At the Transport layer, TCP (Transmission Control Protocol) provides a connection-oriented, reliable, ordered byte stream, commonly used for web and email applications. UDP (User Datagram Protocol) is connectionless and does not itself guarantee delivery or ordering; applications such as real-time calls may use it to avoid transport-layer retransmission delays. HTTP/3 uses QUIC over UDP rather than TCP.

For protocol recognition, distinguish these conventional service numbers and roles from actual deployment configurations:

ProtocolFull NamePort(s)Primary Purpose
HTTPHypertext Transfer Protocol80Unencrypted transfer of web pages
HTTPSHTTP Secure443Web communication protected by TLS
FTPFile Transfer Protocol20 (traditional default data), 21 (control)Uploading and downloading files between client and server
SSHSecure Shell22Encrypted remote command-line login (replaces insecure Telnet on Port 23)
SMTPSimple Mail Transfer Protocol25Sending (pushing) outgoing emails between mail servers
DNSDomain Name System53Looks up records associated with domain names, including IP addresses
DHCPDynamic Host Configuration Protocol67 / 68DHCP for IPv4 supplies network settings such as IP address, subnet mask, and default gateway
POP3Post Office Protocol v3110Retrieves messages from a mail server; clients can retain server copies
IMAPInternet Message Access Protocol143Synchronizes email folders across multiple devices on the server

IPv4 vs. IPv6, URL Anatomy & Internet vs. WWW

  • IPv4 vs. IPv6: IPv4 uses 32-bit addresses written as four decimal octets (0–255) separated by dots (e.g., 192.0.2.1), offering 2322^{32} (~4.3 billion) addresses. To address limited IPv4 space, IPv6 introduced 128-bit hexadecimal addresses written in up to eight colon-separated hexadecimal groups, allowing zero-group compression (e.g., 2001:0db8:85a3::8a2e:0370:7334), supporting 21282^{128} addresses.
  • URL Anatomy: In https://www.example.com:443/results/list.html?year=2026#merit, https is the scheme, www.example.com is the host, 443 is the port, /results/list.html is the path, year=2026 is the query, and merit is the fragment (introduced by #). Pakistan’s country-code top-level domain is .pk.
  • Internet vs. World Wide Web (WWW): The Internet is the global system of interconnected networks (traceable to ARPANET in 1969). The WWW is an information system of linked hypertext pages running over the Internet, proposed by Tim Berners-Lee at CERN in 1989, with the first web browser and server implemented by the end of 1990, alongside HTML and HTTP.

Cloud Computing Models & Emerging Technologies

Cloud computing delivers on-demand IT resources over a network (including private clouds), with three main service models:

  • IaaS (Infrastructure as a Service): Rent raw virtual servers, storage, and networking (e.g., Amazon EC2, Azure Virtual Machines).
  • PaaS (Platform as a Service): Rent managed runtimes, databases, and deployment tools to build apps without managing OS patches (e.g., Google App Engine).
  • SaaS (Software as a Service): Use the provider’s complete applications, often via a browser or app (e.g., Google Workspace, Microsoft 365, Zoom).

Modern IT literacy also touches three emerging pillars:

  • Artificial Intelligence (AI) & Machine Learning (ML): AI builds systems capable of reasoning, perception, or language generation; ML is a subset where algorithms learn patterns from training data rather than hard-coded rules.
  • Internet of Things (IoT): Everyday physical objects—smart electricity meters, wearable trackers, industrial sensors—embedded with sensors and network links.
  • Blockchain: A distributed, tamper-evident and tamper-resistant ledger with cryptographically linked blocks; it is not necessarily fully decentralized or immune to all changes.

Cybersecurity Threats, Defenses & Pakistan's PECA Framework

For defensive digital literacy, distinguish common threats:

  • Phishing: Deceptive messages or sites seeking sensitive information. Spear phishing targets a particular recipient; smishing uses text messages, and vishing uses voice calls. Verify requests through a known official channel before sharing information.
  • Malware Families:
    • Virus: Malicious code that replicates by infecting a host program or file.
    • Worm: Self-contained malicious software distinguished by its ability to replicate without a host program.
    • Trojan Horse: Software that appears legitimate but has a hidden malicious purpose; not defined by self-replication.
    • Ransomware: Denies access to data or systems and demands payment; encryption is common but not universal.
    • Spyware / Keylogger: Secretly monitors user behavior or records keystrokes to capture credentials.
  • DoS / DDoS (Distributed Denial of Service): Disrupts legitimate availability of a service; distributed denial of service involves multiple sources.

Core defenses combine a Firewall (inspects and filters incoming/outgoing traffic against security rules), Encryption / TLS (scrambles readable plaintext into ciphertext), regular software updates, and Two-Factor / Multi-Factor Authentication (2FA/MFA)—requiring at least two distinct factor types: something you know (password), something you have (token), or something you are (biometric fingerprint). In Pakistan, cyber offenses including unauthorized system access, electronic fraud, identity theft, and critical infrastructure attacks are addressed under the Prevention of Electronic Crimes Act, 2016 (PECA), as amended in 2025. Section 29 establishes the National Cyber Crime Investigation Agency (NCCIA) for inquiry, investigation and prosecution of PECA offences; the amended law provides for the former FIA Cyber Crime Wing to cease on establishment of NCCIA. Use the current law and official reporting channels.

Loading diagram...
Illustrative HTTP/1.1 or HTTP/2 over TLS and TCP: Encapsulation
Test Your Knowledge

Which traditional networking device forwards packets at the OSI network layer (Layer 3) between distinct networks using IP addresses?

A

Repeater

B

Hub

C

Router

D

Switch

Test Your Knowledge

Which protocol resolves domain names to records such as IP addresses, conventionally using port 53?

A

DHCP (Dynamic Host Configuration Protocol)

B

DNS (Domain Name System)

C

SMTP (Simple Mail Transfer Protocol)

D

HTTPS (Hypertext Transfer Protocol Secure)

Test Your Knowledge

Which malware category is distinguished by being self-contained and able to replicate without infecting a host program?

A

Computer Virus

B

Trojan Horse

C

Worm

D

Spyware

Sections you finish are checked off in the contents.