Blog
Computer Communication and Network Past Paper 2014 – BS IT 4th Term UOS (CMP-330)
University of Sargodha BS IT 4th term Computer Communication & Network (CMP-330) paper, 2014 exam, session 2012-16 (80 marks, 2:30 hours). The paper is retyped below without the handwritten number, followed by solved answers for all 16 short questions and all six subjective questions: a fault-tolerant network design for ZTEL, circuit and packet switching, network security, virtual-circuit networks, delta modulation, noise impairments and topologies.
Solved answers
Q1 – Short answers (16 × 2)
i. SNR with example. Signal-to-noise ratio = average signal power / average noise power; SNRdB = 10 log10(Psignal/Pnoise). A high SNR means the signal is much stronger than the noise (good quality); it limits the maximum data rate: C = B log2(1 + SNR) (Shannon). Example: signal 10 mW, noise 1 µW → SNR = 10 000 = 40 dB.
ii. MAC and two MAC protocols. Media Access Control – the lower sublayer of the data link layer that controls which station may use the shared medium and provides physical (MAC) addresses. Protocols: CSMA/CD (Ethernet), CSMA/CA (Wi-Fi), ALOHA, token passing.
iii. ISO vs OSI. ISO (International Organization for Standardization) is the standards body; OSI (Open Systems Interconnection) is the seven-layer reference model developed by ISO.
iv. Frequency domain vs time domain. Time domain shows how signal amplitude changes with time (e.g. a sine wave on an oscilloscope). Frequency domain shows the amplitude of each frequency component (spectrum), e.g. a 5 V, 10 Hz sine wave appears as one vertical line of height 5 at 10 Hz.
v. Two units of bandwidth. Bandwidth in Hz is the range of frequencies a channel passes (analog property). Bandwidth in bps is the number of bits per second the channel can carry (digital capacity). They are related: higher Hz bandwidth allows higher bit rate (Nyquist/Shannon).
vi. Latency. The total time for a message to travel from source to destination = propagation time + transmission time + queuing time + processing delay.
vii. Multiplexing with example. Sharing one link among several signals – e.g. FDM in FM radio (each station on a different frequency) or TDM in telephone T1 lines (24 calls in time slots).
viii. Attenuation and fewer twists. With fewer twists the cable behaves more like an antenna: interference and crosstalk are not cancelled and signal energy is lost/radiated, so the effective attenuation (and error rate) over distance is higher; higher-category cables have more twists per metre.
ix. Is circuit switching more efficient than packet switching? Not for data. Circuit switching reserves a dedicated path for the whole session, so bandwidth is wasted during silent periods – but it gives constant delay, good for voice. Packet switching shares links dynamically and uses bandwidth more efficiently for bursty data traffic, at the cost of variable delay.
x. Flow control. Regulating the sender’s rate so the receiver is not overwhelmed (stop-and-wait, sliding window); the data link layer does it hop-to-hop and the transport layer end-to-end.
xi. TCP vs UDP. TCP is connection-oriented (3-way handshake), reliable (acknowledgements, retransmission), ordered, with flow and congestion control – used by HTTP, FTP, e-mail. UDP is connectionless, unreliable, no ordering, small 8-byte header and fast – used by DNS, VoIP, video streaming, online games.
xii. Scrambling. Replacing long runs of zeros in bipolar AMI with special patterns containing deliberate violations so the receiver keeps synchronisation without increasing bandwidth. B8ZS replaces 8 zeros with 000VB0VB; HDB3 replaces 4 zeros with 000V or B00V.
xiii. Encryption and its layer. Encryption converts plaintext into unreadable ciphertext using an algorithm and key so only authorised parties can read it. In the OSI model it is the function of the presentation layer (layer 6); in practice it is also done at other layers (TLS, IPsec).
xiv. Signal rate vs data rate. Data rate (bit rate) is bits per second; signal rate (baud rate) is signal elements per second. S = N × (1/r) × c, where r = bits carried per signal element; e.g. with 2 bits per element, 1 Mbps needs 500 kbaud.
xv. Drawbacks of infrared networks. Short range, need line of sight, cannot pass through walls or obstacles, affected by sunlight and bright light, lower data rates and limited mobility.
xvi. Types of optical fiber. Single-mode and multimode (step-index and graded-index); also glass vs plastic fiber.
Q2 – ZTEL network design
Assumptions: 5 main offices (O1–O5) in different cities; each has 10 computers; O1 is the security office; the offices are connected through a WAN (leased lines / MPLS / fiber); the security office must have no single point of failure.
Design:
- Inside each office – star topology: 10 PCs connected to a switch, the switch to an edge router.
- Security office O1 – two core switches and two routers in redundant pairs; every server and critical PC has dual NICs connected to both switches; dual power supplies/UPS; two separate ISP/WAN links.
- Between offices – the security office is connected to every other office by its own link (partial mesh with O1 as a hub), and the other offices are also linked in a ring, so if one link fails traffic can take another route. O1 links: 4 direct links; ring O2–O3–O4–O5–O2: 4 links.
- Routing protocol (OSPF) automatically reroutes on failure; firewalls and VPN/IPsec protect the WAN links.
+-----------------------+
| O1 Security Office |
| 2 routers, 2 switches|
| 10 PCs (dual-homed) |
+--+-----+-----+-----+--+
| | | | (direct link from O1 to each office)
+-----+ +---+--+ +-+----+ +----+
| O2 |-| O3 |-| O4 |-| O5 |
+--+--+ +------+ +------+ +--+-+
|__________________________| (ring among O2-O5)
Each office: Router -> Switch -> 10 PCs (star)Justification: star topology inside offices is cheap and easy to manage; mesh links to the security office remove any single point of failure (any one link, router or switch can fail and O1 stays reachable); the ring among other offices adds alternate paths at moderate cost; a full mesh (10 WAN links) would be more reliable but much more expensive.
Q3 – Switching: circuit and packet switching
Switching connects many devices through intermediate switches so that not every pair needs a direct link. Three methods: circuit switching, packet switching (datagram and virtual circuit) and message switching.
Circuit switching (telephone network): a dedicated path is set up between sender and receiver before communication; resources (bandwidth/time slots) are reserved for the whole call. Phases: setup, data transfer, teardown. Advantages: guaranteed bandwidth, constant delay, in-order delivery. Disadvantages: setup delay, resources wasted when idle, inefficient for bursty data.
Packet switching: messages are split into packets that share links on demand.
- Datagram approach (internet/IP): each packet is routed independently using the destination address; packets may follow different paths and arrive out of order; no setup; efficient and robust.
- Virtual-circuit approach (Frame Relay, ATM): a logical path is set up first; packets carry a VCI and follow the same path in order; resources may be reserved.
| Circuit switching | Packet switching |
|---|---|
| Dedicated path reserved | No dedicated path; links shared |
| Setup required | No setup (datagram) |
| Fixed bandwidth, constant delay | Variable delay, store-and-forward |
| Wasted capacity when idle | Efficient for bursty traffic |
| Telephone network | Internet |
Q4 – Network security issues
Network security protects data and resources against unauthorised access, misuse, modification and denial of service. Its goals are confidentiality, integrity and availability (CIA), plus authentication and non-repudiation.
Main security issues / threats
- Malware – viruses, worms, Trojans, ransomware and spyware that damage or steal data.
- Unauthorised access and hacking – weak passwords, unpatched systems, privilege escalation.
- Eavesdropping / sniffing – capturing unencrypted traffic (passwords, credit card numbers).
- Spoofing and man-in-the-middle – IP/ARP/DNS spoofing; an attacker relays and alters messages.
- Denial of Service (DoS/DDoS) – flooding a server so legitimate users cannot use it.
- Phishing and social engineering – tricking users into revealing credentials.
- Insider threats and physical theft of devices.
- Wireless issues – weak WEP/WPA, rogue access points.
Countermeasures
- Cryptography – encryption (AES, RSA), digital signatures, hashing, SSL/TLS, VPN/IPsec.
- Authentication and access control – strong passwords, two-factor authentication, user roles.
- Firewalls, intrusion detection/prevention systems, antivirus software.
- Regular patching, backups, security policies, user training and auditing.
Q5 (a) – Virtual-circuit network
A virtual-circuit network is a packet-switched network in which a logical connection is set up before data transfer, combining features of circuit and datagram networks. Phases: setup (switching tables filled with incoming/outgoing port and VCI), data transfer (packets carry a short VCI, all follow the same path and arrive in order), and teardown. Resources can be reserved, giving predictable delay. It is used at the data link layer in Frame Relay and ATM and in MPLS.
Q5 (b) – Delta modulation
Delta modulation (DM) is a simple analog-to-digital technique that sends only 1 bit per sample: the change from the previous sample. The modulator keeps a staircase approximation of the signal; if the input is above the staircase, it sends 1 and the staircase goes up by δ; if below, it sends 0 and the staircase goes down by δ.
- Simpler than PCM and needs fewer bits per sample, but needs a high sampling rate.
- Slope overload distortion – when the signal changes faster than δ per sample the staircase cannot follow.
- Granular noise – when the signal is flat, the staircase oscillates ±δ.
- Adaptive DM changes δ according to the signal slope to reduce both errors.
Q6 – Noise impairments
Transmission impairments are attenuation, distortion and noise. Noise is any unwanted signal added to the transmitted signal.
- Thermal noise – random motion of electrons in conductors; present in all devices; white noise, proportional to temperature and bandwidth (N = kTB).
- Induced noise – from external sources such as motors, power lines and appliances acting as antennas.
- Crosstalk – the effect of one wire on another (signal coupling between adjacent pairs); reduced by twisting and shielding.
- Impulse noise – sudden high-energy spikes (lightning, power switching); can destroy many bits of digital data.
- Intermodulation noise – signals of different frequencies sharing a medium produce sum/difference frequencies that interfere.
The effect of noise is measured by SNR; high SNR means good quality. Countermeasures: shielding, twisting, filters, error detection/correction codes, repeaters and digital transmission.
Q7 – Network topologies
| Topology | Description | Pros | Cons |
|---|---|---|---|
| Bus | All nodes connected to one backbone cable with terminators | Cheap, easy to install, little cable | Backbone failure stops all; collisions; hard to troubleshoot |
| Star | All nodes connected to a central hub/switch | Easy to add/remove nodes, one cable fault affects one node, easy management | Central device is a single point of failure; more cable |
| Ring | Each node connected to two neighbours forming a loop; data passes in one direction (token) | No collisions, equal access, good under heavy load | One break can stop the ring (unless dual ring); adding nodes disrupts |
| Mesh | Every node connected to every other (full) or many others (partial); n(n−1)/2 links | Very reliable, redundant paths, secure, no traffic problems | Very expensive, lots of cable and ports |
| Tree (hierarchical) | Star networks connected through a bus/hierarchy | Scalable, easy expansion by groups | Root/backbone failure affects a branch; complex cabling |
| Hybrid | Combination of two or more topologies (e.g. star-bus) | Flexible, suits large organisations | Complex design and cost |
Examples: star – office LAN with a switch; bus – old coaxial Ethernet; ring – Token Ring/FDDI; mesh – internet backbone, data centres; tree/hybrid – university campus networks.
