Skip to main content

Internet and Data Communications

Network Fundamentals

Types of Networks

TypeFull NameRangeExample
LANLocal Area NetworkA building or campusSchool computer lab, office network
WANWide Area NetworkCities, countries, globalThe Internet, a company's offices across cities
PANPersonal Area NetworkWithin ~10 mBluetooth connection between phone and headphones

Network Topologies

Star Topology

All devices connect to a central hub or switch.

[Device]
|
[Device] -- [Hub/Switch] -- [Device]
|
[Device]
AspectDetail
AdvantagesEasy to install and manage; if one cable fails, only that device is affected; easy to add/remove devices
DisadvantagesIf the central hub/switch fails, the entire network goes down; requires more cabling than bus topology
Failure impactSingle device failure: no impact on others. Central node failure: total network failure

Bus Topology

All devices share a single backbone cable.

[Device] ---[Device] ---[Device] ---[Device] ---[Terminator]
AspectDetail
AdvantagesSimple and cheap; requires less cabling; easy to set up for small networks
DisadvantagesIf the backbone cable breaks, the entire network fails; performance degrades as more devices are added (collisions); difficult to troubleshoot
Failure impactBackbone failure: total network failure. Single device failure: network continues but that device is disconnected

Ring Topology

Each device connects to exactly two others, forming a closed loop.

+---> [Device] --+
| |
[Device] | | [Device]
| |
+--- [Device] <--+
AspectDetail
AdvantagesData travels in one direction, reducing collisions; equal access for all devices; suitable for token ring networks
DisadvantagesIf one device or cable fails, the entire network can fail; adding/removing devices disrupts the ring; slower than star for large networks
Failure impactSingle failure can bring down the entire ring (unless using a dual ring)

Mesh Topology

Every device is connected to every other device (full mesh) or to multiple devices (partial mesh).

[Device] --- [Device]
| \ |
| \ |
[Device] --- [Device]
AspectDetail
AdvantagesHigh redundancy and reliability; multiple paths for data; no single point of failure (full mesh)
DisadvantagesExpensive and complex cabling; difficult to set up and manage; not scalable for large networks (full mesh)
Failure impactHigh fault tolerance; data can route around failed connections

:::warning[Exam Tip] In exam questions, always discuss both advantages AND disadvantages of each topology. Star is the most common in modern LANs due to ease of management and fault isolation. :::


Networking Hardware

DeviceFunctionOSI Layer
RouterConnects different networks; routes packets between them using IP addresses; operates at Network layerLayer 3
SwitchConnects devices within a LAN; forwards frames based on MAC addresses; reduces collisions by creating separate collision domainsLayer 2
HubConnects devices in a LAN; broadcasts data to ALL ports (no intelligence); all devices share bandwidthLayer 1
NICNetwork Interface Card; provides the physical connection to the network; has a unique MAC addressLayer 1/2
ModemModulator-Demodulator; converts digital signals to analogue (and vice versa) for transmission over telephone linesLayer 1
Access Point (AP)Allows wireless devices to connect to a wired network; acts as a bridge between wireless and wired segmentsLayer 2

Hub vs Switch

FeatureHubSwitch
Data forwardingBroadcasts to all portsForwards only to the destination port
Collision domainsSingle shared collision domainSeparate collision domain per port
BandwidthShared among all devicesDedicated bandwidth per port
MAC address tableNoYes (learns and stores MAC addresses)
IntelligenceNoneUses MAC addresses for smart forwarding

Internet Services

ServiceDescriptionProtocol(s)
World Wide Web (WWW)Access and navigate web pages using hyperlinksHTTP, HTTPS
EmailSend and receive electronic messagesSMTP, POP3, IMAP
File Transfer Protocol (FTP)Upload and download files between client and serverFTP, SFTP
Voice over IP (VoIP)Make voice calls over the internet (e.g., Skype, Zoom)SIP, RTP
StreamingReal-time audio/video delivery (e.g., YouTube, Netflix)HTTP, RTSP, HLS
Cloud ComputingOn-demand computing resources over the internet (IaaS, PaaS, SaaS)Various

Email Protocols

ProtocolPortPurposeDirection
SMTP25 / 587Send emailClient to server, server to server
POP3110Receive emailDownloads messages to local device, often deletes from server
IMAP143Receive emailAccesses messages on server without downloading; syncs across devices

Web Development Basics

HTML (HyperText Markup Language)

HTML defines the structure and content of a web page.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>My Web Page</title>
</head>
<body>
<h1>Welcome to My Page</h1>
This is a paragraph of text.
<a href="https://example.com">Click here</a>
<img src="photo.jpg" alt="A photo" width="300" />
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<table border="1">
<tr>
<th>Name</th>
<th>Age</th>
</tr>
<tr>
<td>Alice</td>
<td>20</td>
</tr>
</table>
</body>
</html>

Key HTML tags:

TagPurpose
<html>Root element
<head>Metadata, title, links to CSS/JS
<body>Visible page content
<h1> -- <h6>Headings (h1 is largest)
``Paragraph
<a href="URL">Hyperlink
<img src="URL" alt="text">Image
<ul>, <ol>, <li>Unordered list, ordered list, list item
<table>, <tr>, <th>, <td>Table, row, header cell, data cell
<form>, <input>, <button>Form elements

CSS (Cascading Style Sheets)

CSS controls the presentation and layout of a web page.

body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
margin: 0;
padding: 20px;
}

h1 {
color: #333366;
text-align: center;
}

p {
font-size: 16px;
line-height: 1.5;
}

.highlight {
background-color: yellow;
font-weight: bold;
}

#main-content {
width: 800px;
margin: 0 auto;
}

CSS selectors:

SelectorSelectsExample
ElementAll elements of that typep { }
ClassElements with that class.highlight { }
IDThe element with that ID#main-content { }

JavaScript

JavaScript adds interactivity and dynamic behaviour to web pages.

// Change content of an element
document.getElementById('demo').innerHTML = 'Hello, World!';

// Display an alert
alert('Welcome!');

// Simple function
function calculateSum() {
var a = parseInt(document.getElementById('num1').value);
var b = parseInt(document.getElementById('num2').value);
var result = a + b;
document.getElementById('result').innerHTML = 'Sum: ' + result;
}

// Event handling
document.getElementById('myButton').onclick = function () {
alert('Button clicked!');
};
info

HTML = structure, CSS = style, JavaScript = behaviour. This three-way separation is a fundamental principle of web development.


IP Addressing

IPv4

  • 32-bit address, written as four octets in dotted decimal: 192.168.1.1
  • Each octet ranges from 0 to 255 (2812^8 - 1).
  • Total addresses: 2324.32^{32} \approx 4.3 billion.

IPv4 address classes:

ClassFirst Octet RangeNetwork BitsHost BitsDefault Subnet Mask
A1 -- 126824255.0.0.0
B128 -- 1911616255.255.0.0
C192 -- 223248255.255.255.0

Special addresses:

  • 127.0.0.1 -- loopback (localhost)
  • 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 -- private address ranges (not routable on the internet)
  • 255.255.255.255 -- broadcast address

IPv6

  • 128-bit address, written as eight groups of 4 hex digits: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
  • Leading zeros in each group can be omitted.
  • One consecutive block of all-zero groups can be replaced with ::.
  • Total addresses: 21283.4×10382^{128} \approx 3.4 \times 10^{38}.

IPv4 vs IPv6:

FeatureIPv4IPv6
Address length32 bits128 bits
Address formatDotted decimalColon-separated hex
Number of addresses~4.3 billion~3.4×10383.4 \times 10^{38}
Header complexityComplex, variable optionsSimplified, fixed header
SecurityOptional (IPsec add-on)Built-in IPsec support
NATRequired (due to address shortage)Not required
Auto-configurationLimitedSLAAC (Stateless Address Autoconfiguration)

Subnet Masks

A subnet mask determines which part of an IP address is the network portion and which is the host portion.

For example, 192.168.1.50 with subnet mask 255.255.255.0:

  • Network portion: 192.168.1.0
  • Host portion: 0.0.0.50
  • Broadcast address: 192.168.1.255
  • Usable host range: 192.168.1.1 to 192.168.1.254 (254 hosts)

CIDR notation: /24 means 24 bits for the network, 8 bits for the host.


DNS (Domain Name System)

DNS translates human-readable domain names (e.g., www.example.com) into IP addresses (e.g., 93.184.216.34).

DNS Resolution Process

  1. User types www.example.com in the browser.
  2. The browser checks its local cache for the IP address.
  3. If not found, the request goes to the recursive DNS resolver (usually provided by the ISP).
  4. The resolver checks its cache. If not found: (a) Query the root name server -- returns the TLD name server for .com. (b) Query the TLD name server (.com) -- returns the authoritative name server for example.com. (c) Query the authoritative name server -- returns the IP address for www.example.com.
  5. The resolver returns the IP address to the browser.
  6. The browser connects to the web server at that IP address.

Domain Name Structure

A domain name is read right to left: www.example.com

  • .com -- Top-Level Domain (TLD)
  • example -- Second-Level Domain (registered by the organisation)
  • www -- Subdomain

Common TLDs: .com (commercial), .org (organisation), .edu (education), .gov (government), .hk (Hong Kong), .net (network), .cn (China).

Domain Registration

To register a domain:

  1. Choose a domain name and check availability.
  2. Register through an accredited domain registrar (e.g., GoDaddy, Namecheap).
  3. Pay an annual registration fee.
  4. Provide registrant information (name, contact, DNS server details).
  5. The registrar updates the TLD's authoritative name server with the domain's DNS records.

Transmission Media

Wired Media

TypeDescriptionSpeedMax DistanceCostInterference
Twisted PairPairs of copper wires twisted together; UTP or STP1 Gbps (Cat 6)100 mLowModerate (EMI)
Coaxial CableCentral copper conductor with insulating and shielding layers10 Gbps500 mMediumLow
Fibre OpticThin glass/plastic fibres transmitting light pulses100+ Gbps100+ kmHighNone (immune to EMI)

Wireless Media

TypeDescriptionSpeedRangeFrequency
Wi-FiIEEE 802.11 standards (a/b/g/n/ac/ax)Up to ~10 Gbps (Wi-Fi 6)30--100 m indoor2.4 GHz, 5 GHz, 6 GHz
BluetoothShort-range wireless for peripherals1--2 Mbps (Classic) / 2 Mbps (LE)~10 m2.4 GHz
Cellular (4G/5G)Mobile network100 Mbps (4G) -- 10 Gbps (5G)km-scaleVarious

:::warning[Exam Tip] Fibre optics is immune to electromagnetic interference (EMI), supports the highest bandwidth and longest distances, but is the most expensive and difficult to install. Twisted pair is the cheapest but has the lowest bandwidth and is susceptible to EMI. :::


Transmission Modes

Serial vs Parallel

ModeDescriptionAdvantagesDisadvantages
SerialData sent one bit at a time over a single channelFewer wires, cheaper, longer distances, higher clock speedsSlower for short distances
ParallelMultiple bits sent simultaneously over multiple channelsFaster for short distancesMore wires, more expensive, signal skew over distance, limited cable length

Synchronous vs Asynchronous

ModeDescriptionFeatures
SynchronousData sent in continuous stream, synchronised by a clock signalNo start/stop bits; faster; used for large data transfers
AsynchronousData sent one byte at a time with start and stop bitsNo shared clock; uses start/stop bits; simpler but slower

Simplex, Half-Duplex, Full-Duplex

ModeDescriptionExample
SimplexData flows in one direction onlyTV broadcast, keyboard to CPU
Half-DuplexData flows in both directions, but only one at a timeWalkie-talkie
Full-DuplexData flows in both directions simultaneouslyTelephone, modern Ethernet

Bandwidth and Broadband

Bandwidth: The maximum data transfer rate of a network connection, measured in bps (bits per second).

Common units: kbps (10310^3), Mbps (10610^6), Gbps (10910^9).

Broadband: High-speed internet access (generally defined as >\gt 256 kbps). Technologies include:

  • ADSL (Asymmetric Digital Subscriber Line) -- uses telephone lines, faster download than upload
  • Fibre broadband (FTTH/FTTP) -- uses fibre optic cables, highest speeds
  • Cable -- uses coaxial cable TV infrastructure
  • Mobile broadband (4G/5G) -- cellular network

Baseband vs Broadband transmission:

FeatureBasebandBroadband
Signal typeDigitalAnalogue
TransmissionSingle signal on the mediumMultiple signals (frequency division multiplexing)
ExampleEthernet LANCable TV, ADSL

Protocols

A protocol is a set of rules governing data communication between devices.

ProtocolLayerPurpose
TCPTransportReliable, connection-oriented delivery; ensures packets arrive in order; uses acknowledgements and retransmission
IPNetworkAddresses and routes packets across networks
HTTPApplicationRequest and transfer web pages (port 80)
HTTPSApplicationSecure HTTP using TLS/SSL encryption (port 443)
SMTPApplicationSend email (port 25/587)
POP3ApplicationReceive email (port 110)
FTPApplicationTransfer files (ports 20/21)
UDPTransportFast, connectionless delivery; no error checking; used for streaming, gaming

TCP vs UDP

FeatureTCPUDP
ConnectionConnection-oriented (3-way handshake)Connectionless
ReliabilityReliable (acknowledgements, retransmission)Unreliable (best effort)
OrderingPackets arrive in orderNo guarantee of order
SpeedSlower due to overheadFaster, less overhead
Use casesWeb browsing, email, file transferVideo streaming, online gaming, VoIP

OSI Model

The OSI (Open Systems Interconnection) model has 7 layers:

LayerNameFunctionExample Protocols/Devices
7ApplicationProvides network services to user applicationsHTTP, FTP, SMTP, DNS
6PresentationData format translation, encryption, compressionSSL/TLS, JPEG, ASCII
5SessionEstablishes, manages, terminates sessionsNetBIOS, RPC
4TransportEnd-to-end error-free data deliveryTCP, UDP
3NetworkLogical addressing and routingIP, ICMP, routers
2Data LinkFrame formatting, MAC addressing, error detectionEthernet, Wi-Fi, switches
1PhysicalPhysical transmission of raw bitsCables, hubs, electrical signals

OSI vs TCP/IP Model

OSI LayerTCP/IP Layer
Application, Presentation, SessionApplication
TransportTransport
NetworkInternet
Data Link, PhysicalNetwork Access (Link)

:::warning[Exam Tip] Memorise the OSI layers from top to bottom using mnemonics. Common one: All People Seem To Need Data Processing (Application, Presentation, Session, Transport, Network, Data Link, Physical). :::


Network Security

Firewall

A firewall monitors and controls incoming and outgoing network traffic based on predefined security rules.

  • Packet filtering: Examines source/destination IP and port. Fast but basic.
  • Stateful inspection: Tracks the state of active connections; more intelligent.
  • Application-level (proxy): Inspects the actual content of packets at the application layer. Most thorough but slowest.

Encryption

  • Symmetric encryption: Same key for encryption and decryption (e.g., AES). Fast but key distribution is a problem.
  • Asymmetric encryption: Public key for encryption, private key for decryption (e.g., RSA). Slower but solves key distribution.

Digital Certificate

A digital certificate is an electronic document issued by a Certificate Authority (CA) that binds a public key to an identity (e.g., a website domain). It verifies the authenticity of a website, enabling HTTPS secure connections.

VPN (Virtual Private Network)

A VPN creates an encrypted tunnel over a public network (the internet), providing:

  • Privacy: data is encrypted, hiding it from ISPs and third parties.
  • Security: protects data on untrusted networks (e.g., public Wi-Fi).
  • Anonymity: masks the user's real IP address.

Social Implications

Computer Ethics

Ethical principles guiding computer use:

  • Do not use computers to harm others.
  • Do not interfere with others' computer work.
  • Do not snoop on others' files.
  • Do not steal software or data.
  • Do not use computers to bear false witness.
  • Do not copy or use proprietary software without paying.
  • Do not use others' resources without authorisation.
  • Copyright: Automatic legal protection of original creative works (software, music, text, images). Gives the creator exclusive rights to reproduce, distribute, and adapt the work.
  • Software piracy: Unauthorised copying, distribution, or use of software. Illegal and unethical.
  • Creative Commons: A licensing system allowing creators to specify how their work may be used (e.g., attribution required, non-commercial use only).

Privacy

  • Personal Data Privacy Ordinance (PDPO, HK): Hong Kong's data protection law that governs the collection, use, and disclosure of personal data.
  • Key principles of the PDPO:
    • Purpose and manner of data collection must be lawful and fair.
    • Personal data should only be used for the purpose for which it was collected.
    • Data should be accurate and up to date.
    • Data should not be kept longer than necessary.
    • Individuals have the right to access their personal data.
  • Data user: A person or organisation that controls the collection, holding, processing, or use of personal data.

Computer Crimes

CrimeDescription
HackingUnauthorised access to a computer system
Malware distributionSpreading viruses, worms, trojans, ransomware
PhishingFraudulent attempts to obtain sensitive information by pretending to be a trustworthy entity
Identity theftUsing another person's personal information without consent
Software piracyUnauthorised copying and distribution of copyrighted software
DDoS attacksFlooding a server with traffic to make it unavailable

Health Issues

IssueCausePrevention
RSI (Repetitive Strain Injury)Repeated physical movements (typing, mouse use)Regular breaks, ergonomic equipment, proper posture
Eye strainStaring at screens for long periods20-20-20 rule, proper lighting, screen distance
Back/neck painPoor posture at workstationErgonomic chair, correct monitor height, regular movement
Radiation concernProximity to wireless devicesMaintain distance; current evidence shows no significant harm from typical exposure

Digital Divide

The gap between those who have access to information and communication technology (ICT) and those who do not.

Causes: Economic inequality, geographical location (rural vs urban), age, education level, physical disability, government policy.

Effects: Reduced access to education, employment opportunities, government services, and information.

Solutions: Government subsidies, community ICT centres, improving infrastructure in underserved areas, digital literacy training programmes.

Green Computing

Practices to reduce the environmental impact of computing:

  • Energy-efficient hardware (Energy Star ratings, low-power processors).
  • Power management (sleep mode, automatic shutdown).
  • Virtualisation (running multiple virtual machines on a single physical server reduces hardware needs).
  • Cloud computing (shared resources reduce overall energy consumption).
  • Proper disposal and recycling of e-waste (contains toxic materials like lead, mercury).
  • Extending device lifespan through upgrades and maintenance.

Common Pitfalls

  1. Hub vs Switch: A hub broadcasts to all ports; a switch forwards only to the intended recipient. This distinction is fundamental.

  2. Router vs Switch: A router connects different networks (operates at Layer 3, uses IP addresses). A switch connects devices within the same network (operates at Layer 2, uses MAC addresses).

  3. TCP vs UDP: TCP is reliable and connection-oriented; UDP is fast and connectionless. Streaming and gaming use UDP despite unreliability because speed matters more than perfect delivery.

  4. HTTP vs HTTPS: HTTPS is HTTP over TLS/SSL. It encrypts data in transit, protecting against eavesdropping. Modern websites should always use HTTPS.

  5. SMTP sends, POP3/IMAP receives: Do not confuse the roles. SMTP is for sending; POP3 and IMAP are for receiving. IMAP syncs across devices; POP3 typically downloads and removes from server.

  6. Bandwidth units: Bandwidth is measured in bits per second (bps), not bytes per second. 1 byte = 8 bits. A 100 Mbps connection transfers at most 12.5 MB/s.

  7. Private vs Public IP: Private IP addresses (10.x.x.x, 172.16--31.x.x, 192.168.x.x) are not routable on the internet. NAT (Network Address Translation) is needed for private hosts to communicate on the internet.

  8. OSI layer ordering: Application is Layer 7 (top), Physical is Layer 1 (bottom). Know which protocols and devices belong to each layer.

  9. Serial vs Parallel: Serial sends one bit at a time; parallel sends multiple bits simultaneously. Modern high-speed interfaces (USB 3.0, SATA) are serial despite being fast -- parallel interfaces suffer from signal skew at high speeds.

  10. Digital divide is not just about access: It encompasses skills, affordability, and the ability to use technology effectively, not just physical availability of devices.


Practice Problems

Question 1: Network Topology Analysis

A small office with 6 computers needs to set up a LAN. The office manager asks you to recommend a topology.

(a) Recommend the most suitable topology and justify your answer.

(b) Name the networking hardware device that should be at the centre of this topology.

(c) Explain one advantage and one disadvantage of your chosen topology compared to a bus topology.

Answer:

(a) Star topology using a central switch. It is the most suitable because it is easy to manage, fault-tolerant for individual device failures, and allows easy addition/removal of devices without disrupting the network.

(b) A switch (or hub, but a switch is preferred for its intelligence and dedicated bandwidth).

(c) Advantage over bus: If one cable or device fails, only that device is affected; the rest of the network continues to work. In a bus topology, a backbone cable failure brings down the entire network.

Disadvantage over bus: Star topology requires more cabling (each device needs its own cable to the central switch), making initial installation more expensive than a bus topology with its single backbone cable.

Question 2: DNS Resolution

Explain the steps involved when a user types www.hkeaa.edu.hk into a web browser. Your answer should include the role of DNS.

Answer:

  1. The browser checks its local DNS cache for the IP address of www.hkeaa.edu.hk.
  2. If not cached, the request is sent to the recursive DNS resolver (configured by the ISP or OS).
  3. The resolver checks its own cache. If not found: (a) The resolver queries a root name server, which returns the IP address of the .hk TLD server. (b) The resolver queries the .hk TLD server, which returns the IP address of the authoritative name server for hkeaa.edu.hk. (c) The resolver queries the authoritative name server for hkeaa.edu.hk, which returns the IP address of www.hkeaa.edu.hk.
  4. The resolver returns the IP address to the browser.
  5. The browser caches the result and establishes a TCP connection to the web server at that IP address.
  6. An HTTP request is sent, and the web page is received and rendered.
Question 3: IP Addressing and Subnetting

A company has been assigned the IP address 192.168.10.0 with a subnet mask of 255.255.255.192.

(a) How many bits are used for the host portion?

(b) How many usable host addresses are available per subnet?

(c) List the network addresses of all possible subnets.

(d) What is the broadcast address of the first subnet?

Answer:

(a) The subnet mask 255.255.255.192 in binary is 11111111.11111111.11111111.11000000. The number of host bits is 6 (the number of 0s).

(b) Number of usable hosts = 262=642=622^6 - 2 = 64 - 2 = 62. (Subtract 2 for the network address and broadcast address.)

(c) The block size is 256192=64256 - 192 = 64. Subnet network addresses:

  • 192.168.10.0
  • 192.168.10.64
  • 192.168.10.128
  • 192.168.10.192

(d) Broadcast address of the first subnet (192.168.10.0): 192.168.10.63.

Question 4: Web Development

(a) Write HTML code to create a form with:

  • A text input field for a username
  • A password input field
  • A submit button

(b) Write CSS to style the form so that the background colour of the page is light grey (#f5f5f5), the form has a white background with 20px padding, and the text input fields have a 2px solid blue border.

(c) Write JavaScript to validate that the username field is not empty when the form is submitted.

Answer:

(a)

<form id="loginForm">
<label for="username">Username:</label>
<input type="text" id="username" name="username" />
<label for="password">Password:</label>
<input type="password" id="password" name="password" />
<input type="submit" value="Login" />
</form>

(b)

body {
background-color: #f5f5f5;
}

#loginForm {
background-color: white;
padding: 20px;
}

input[type='text'],
input[type='password'] {
border: 2px solid blue;
}

(c)

document.getElementById('loginForm').onsubmit = function () {
var username = document.getElementById('username').value;
if (username === '') {
alert('Username cannot be empty!');
return false;
}
return true;
};
Question 5: OSI Model

(a) A router operates at which layer of the OSI model?

(b) Data is divided into "frames" at which layer?

(c) Encryption of data is performed at which layer?

(d) Match the following protocols to their correct OSI layer:

  • TCP
  • HTTP
  • Ethernet
  • IP

Answer:

(a) Layer 3 (Network layer).

(b) Layer 2 (Data Link layer).

(c) Layer 6 (Presentation layer). Note: encryption can also occur at the Application layer (HTTPS uses TLS which operates between the Application and Transport layers, sometimes considered Layer 6).

(d)

  • TCP -- Layer 4 (Transport)
  • HTTP -- Layer 7 (Application)
  • Ethernet -- Layer 2 (Data Link) and Layer 1 (Physical)
  • IP -- Layer 3 (Network)
Question 6: Network Security

(a) Explain the difference between symmetric and asymmetric encryption. Give one example of each.

(b) Describe the role of a digital certificate in HTTPS.

(c) Explain how a firewall protects a network.

Answer:

(a) Symmetric encryption uses the same key for both encryption and decryption (e.g., AES, DES). It is fast but requires a secure method to share the key between parties.

Asymmetric encryption uses a pair of keys: a public key for encryption and a private key for decryption (e.g., RSA). The public key can be freely distributed; only the private key holder can decrypt. It is slower but solves the key distribution problem.

(b) A digital certificate, issued by a trusted Certificate Authority (CA), binds a public key to the identity of a website. When a browser connects to an HTTPS site, the server presents its certificate. The browser verifies the certificate against trusted CAs and checks that the domain matches. This ensures the website is authentic and that the public key belongs to the correct server, enabling secure encrypted communication.

(c) A firewall monitors and controls network traffic based on predefined security rules. It can block unauthorised incoming connections (e.g., blocking traffic from suspicious IP addresses), prevent access to certain ports, and filter packets based on protocol type. This protects the internal network from external threats and unauthorised access.

Question 7: Transmission Media Comparison

A school is upgrading its network cabling. They are considering twisted pair (Cat 6) and fibre optic.

(a) Compare the two media in terms of speed, maximum distance, cost, and susceptibility to interference.

(b) Recommend which type of cable should be used for: (i) Connecting computers in a classroom (ii) Connecting two buildings on the campus

Justify each recommendation.

Answer:

(a)

CriterionTwisted Pair (Cat 6)Fibre Optic
SpeedUp to 10 Gbps100+ Gbps
Max distance100 m100+ km
CostLowHigh
InterferenceSusceptible to EMIImmune to EMI

(b) (i) Twisted pair (Cat 6): Sufficient for classroom distances (well under 100 m), lower cost, and easy to install and terminate. The bandwidth of Cat 6 is more than adequate for classroom use.

(ii) Fibre optic: Buildings may be separated by more than 100 m (the maximum for twisted pair). Fibre optic supports longer distances, is immune to EMI (important when cables run between buildings near power lines), and provides higher bandwidth for future upgrades.

Question 8: Social Implications

(a) Explain the purpose of Hong Kong's Personal Data Privacy Ordinance (PDPO).

(b) A company collects customer email addresses for sending promotional materials. A customer requests that their data be removed. Under the PDPO, what rights does the customer have?

(c) Describe two measures a company should implement to comply with the PDPO.

Answer:

(a) The PDPO protects the privacy of individuals in relation to personal data. It governs how data users (organisations) collect, hold, process, and use personal data, ensuring that data is handled lawfully, accurately, and with the consent of the data subject.

(b) Under the PDPO, the customer has the right of access to their personal data held by the company and can request correction or deletion of their data. The company is obliged to comply with the request; if the company refuses, it must provide reasons.

(c) Two measures:

  1. Data access request procedure: Establish a clear process for individuals to request access to their personal data, and respond within the statutory time limit (40 days under PDPO).
  2. Purpose limitation and consent: Only collect personal data for a stated, lawful purpose and obtain the individual's consent before using their data for any other purpose (e.g., using email addresses only for the purpose stated at collection).
  3. Data security: Implement appropriate security measures (encryption, access controls, staff training) to protect personal data from unauthorised access, loss, or disclosure.
Question 9: Protocol Analysis

(a) A user is watching a live video stream. State which protocol (TCP or UDP) is more suitable and explain why.

(b) Explain why HTTPS is used instead of HTTP for online banking.

(c) Describe the three-way handshake used by TCP to establish a connection.

Answer:

(a) UDP is more suitable. Live video streaming prioritises timely delivery over reliability. If a packet is lost, it is better to skip it and continue playing the next frames than to wait for retransmission (which would cause buffering/delays). UDP's lower overhead also helps maintain real-time performance.

(b) HTTPS encrypts all data transmitted between the browser and the server using TLS/SSL. For online banking, this is essential because it protects sensitive information (account numbers, passwords, transaction details) from being intercepted by attackers (eavesdropping, man-in-the-middle attacks). HTTP transmits data in plaintext, which is completely insecure.

(c) The TCP three-way handshake:

  1. SYN: The client sends a SYN (synchronise) packet to the server to initiate a connection.
  2. SYN-ACK: The server acknowledges the request by sending a SYN-ACK (synchronise-acknowledge) packet back to the client.
  3. ACK: The client sends an ACK (acknowledge) packet to confirm the connection is established.

After this exchange, both parties have agreed on sequence numbers and the connection is open for data transfer.

Question 10: Network Design Scenario

A school has three computer labs (A, B, C) each with 30 computers, a library with 10 computers, and an administrative office with 5 computers. The school wants all computers to be connected to each other and to the internet.

(a) Draw a diagram (describe the topology) showing how you would connect these devices.

(b) List the networking hardware devices you would use.

(c) Explain the function of each device in your design.

Answer:

(a) Star topology within each room, connected via a central switch/router in the server room. Each room has a local switch connecting its computers in a star pattern. The room switches connect to the central router/switch, which also connects to the internet via a modem.

Internet -- Modem -- Router -- Central Switch
|
+-------+-------+
| | |
Switch_A Switch_B Switch_C Switch_Library Switch_Admin
/ | ... / | ... / | ... / | ... / | ...
PCs PCs PCs PCs PCs PCs PCs PCs PCs PCs

(b) Hardware devices:

  • 1 modem (connects to ISP)
  • 1 router (routes between internal network and internet, provides NAT/DHCP)
  • 1 central switch (or integrated switch in the router)
  • 5 local switches (one per room/lab)
  • 75 NICs (one in each computer)
  • Ethernet cables (Cat 6)

(c)

  • Modem: Converts the ISP's signal to digital for the router.
  • Router: Connects the school's internal LAN to the internet (WAN), performs NAT so internal private IPs can access the internet, assigns IP addresses via DHCP.
  • Central switch: Connects all room switches together, providing high-speed communication between rooms.
  • Local switches: Connect computers within each room to the network, providing dedicated bandwidth per port and reducing collisions.
  • NICs: Provide the physical interface for each computer to connect to the network.
  • Ethernet cables: Physical transmission medium carrying data between devices.