Blog
Computer Communication & Network MSc IT 2nd Term Past Paper 2018 UOS
University of Sargodha M.Sc. IT 2nd term Computer Communication & Network (CMP-2540) past paper 2018, retyped from the original paper, with solved answers below.
Solved answers
Q1 – Short questions
(i) ASK vs FSK: in Amplitude Shift Keying the amplitude of the carrier is varied to represent 0 and 1 (frequency and phase constant); it is simple but very sensitive to noise. In Frequency Shift Keying the frequency of the carrier is changed for 0 and 1 (amplitude constant); it is more noise-resistant but needs more bandwidth.
(ii) Why protocols are needed: a protocol is a set of rules (syntax, semantics, timing) governing data communication. Without agreed rules, devices made by different vendors could not understand each other’s format, speed, error handling or sequence of messages.
(iii) Half-duplex vs full-duplex: in half-duplex both stations can transmit, but not at the same time (walkie-talkie); in full-duplex both can transmit and receive simultaneously (telephone).
(iv) Addresses used: a) Application layer — specific/user-friendly addresses such as e-mail addresses and URLs (resolved by DNS); b) Network layer — logical (IP) addresses; c) Transport layer — port numbers. (The data-link layer uses physical/MAC addresses.)
(v) No routing decision is needed: a router’s job is to choose a path between networks, and with only one path there is nothing to choose — link-layer devices (switches) can forward the frames. A router would be needed only to connect two different networks.
(vi) Baseband vs broadband: baseband transmission sends the digital signal over the channel without changing it to analog; it needs a low-pass channel and uses the whole bandwidth for one signal (Ethernet). Broadband transmission modulates the signal onto a carrier (analog), uses a band-pass channel and can carry many signals at different frequencies (cable TV, DSL).
(vii) Scrambling: a technique used with bipolar AMI (e.g. B8ZS, HDB3) that replaces long runs of zeros with a special pattern of violations. Purpose: maintain synchronisation and avoid a DC component without increasing the bandwidth.
(viii) Digital-to-analog conversion: changing one of the characteristics of an analog carrier (amplitude, frequency or phase) according to digital data — ASK, FSK, PSK and QAM.
(ix) Goal of multiplexing: to share one high-bandwidth link among several signals simultaneously, using the bandwidth efficiently and reducing cost.
(x) Line configurations: point-to-point (a dedicated link between two devices) and multipoint/multidrop (more than two devices share one link).
(xi) Sky vs line-of-sight propagation: in sky propagation, higher-frequency radio waves radiate upward and are reflected back to earth by the ionosphere, so they travel long distances. In line-of-sight propagation, very high-frequency signals travel in a straight line directly from antenna to antenna, which must face each other and be high enough to clear the earth’s curvature.
(xii) Refraction: the bending of a wave (light in fibre, radio waves in the atmosphere) when it passes from one medium into another with a different density, because its speed changes.
(xiii) 3G vs 4G: 3G (UMTS/WCDMA, CDMA2000) uses CDMA with circuit- and packet-switching and offers up to a few Mbps. 4G (LTE-Advanced, WiMAX) is an all-IP packet-switched network using OFDMA and MIMO, with data rates of about 100 Mbps (mobile) to 1 Gbps (stationary) and lower latency.
(xiv) No. 192.168.256.80 is not a valid IPv4 address because each octet must be between 0 and 255, and 256 is out of range.
(xv) High-speed Ethernet: Ethernet faster than the original 10 Mbps — Fast Ethernet (100 Mbps), Gigabit Ethernet (1 Gbps) and 10 Gigabit Ethernet (10 Gbps) — using switches and full-duplex mode while remaining compatible with standard Ethernet frames.
(xvi) Flow control: a set of procedures that limits how much data the sender may transmit before receiving an acknowledgement, so a fast sender does not overwhelm a slow receiver (stop-and-wait, sliding window). It is implemented at the data-link layer (hop-to-hop) and the transport layer (end-to-end).
Q2 – Types of errors; detection and correction
Types of errors:
- Single-bit error: only one bit of the data unit is changed (0 → 1 or 1 → 0); rare in serial transmission.
- Burst error: two or more bits in the data unit are changed; the length of the burst is measured from the first to the last corrupted bit. Most common, caused by noise lasting longer than one bit time.
Error detection (redundancy):
- Parity check: simple (VRC) — one extra bit makes the number of 1s even/odd; detects all single-bit errors. Two-dimensional (LRC) — parity for rows and columns; detects burst errors better.
- Cyclic Redundancy Check (CRC): data is divided (modulo-2) by a generator polynomial and the remainder is appended; the receiver divides again — zero remainder means no error. Detects all burst errors shorter than the degree of the polynomial.
- Checksum: data is divided into segments that are added using one’s-complement arithmetic; the complement of the sum is sent; used in IP, TCP and UDP.
Error correction:
- Retransmission (ARQ): the receiver detects the error and asks for the data again — stop-and-wait, go-back-N, selective repeat.
- Forward error correction: enough redundant bits are sent for the receiver to locate and correct the error, e.g. Hamming code: r redundant bits with 2ʳ ≥ m + r + 1 placed at positions 1, 2, 4, 8…; recalculating the parity bits gives the position of the erroneous bit, which is inverted.
Q3
a) PCM vs DM:
| PCM (Pulse Code Modulation) | DM (Delta Modulation) |
|---|---|
| Samples the signal, quantises each sample and encodes it into n bits | Sends only one bit per sample showing whether the signal is higher (1) or lower (0) than the previous approximation |
| Several bits per sample → higher bit rate and bandwidth | One bit per sample → lower bit rate, simpler |
| Sampling at the Nyquist rate (2 × highest frequency) | Needs a much higher sampling rate |
| Quantisation error only | Slope-overload distortion and granular noise |
| Complex encoder/decoder; better quality | Simple staircase circuit; lower quality (adaptive DM improves it) |
b) Maximum bit rate (noiseless channel, Nyquist): Bit rate = 2 × B × log₂ L = 2 × 3000 × log₂ 2 = 6000 bps.
Q4
a) Multiplexing is the set of techniques that allows several signals to be transmitted simultaneously over a single data link. A multiplexer (MUX) combines n input lines into one link and a demultiplexer (DEMUX) separates them at the other end.
- Frequency-Division Multiplexing (FDM): analog technique; the link bandwidth is divided into frequency bands separated by guard bands, and each signal modulates its own carrier frequency (radio, TV broadcasting).
- Wavelength-Division Multiplexing (WDM): FDM for optical fibre; different light wavelengths (colours) are combined by a prism and separated at the receiver.
- Time-Division Multiplexing (TDM): digital technique; each connection gets a time slot in a frame. Synchronous TDM gives fixed slots to each input even if it has no data; statistical TDM allocates slots dynamically only to inputs with data, using addresses in the slots.
- (Code-division multiplexing/CDMA: all users share the band at the same time using different codes.)
b) Architecture of a cellular network: the service area is divided into hexagonal cells, each served by a base station (BS/BTS) with antennas and a transceiver. Neighbouring cells use different frequencies, and the same frequencies are reused in distant cells (frequency reuse pattern, e.g. 4 or 7). Base stations are controlled by a Mobile Switching Center (MSC), which connects calls between mobiles and to the public telephone network (PSTN), keeps databases (HLR, VLR) for location and authentication, and handles handoff when a mobile moves from one cell to another. Components: mobile station → BTS → BSC → MSC → PSTN/Internet.
Q5 – Physical structures (topologies) of networks
| Topology | Architecture | Speed / performance | Cost | Expansion | Reliability |
|---|---|---|---|---|---|
| Mesh | Every device has a dedicated point-to-point link to every other (n(n−1)/2 links) | High — dedicated links, no traffic sharing | Very high — many cables and I/O ports | Difficult; each new node needs links to all | Very high; a failed link does not affect others; easy fault isolation |
| Star | Each device has a link only to a central hub/switch | Good; depends on the hub | Moderate — one link and port per device | Easy; just connect to the hub | Single link failure affects one node; hub failure stops whole network |
| Bus | All devices tap into one backbone cable | Drops as devices and traffic increase (collisions) | Low — least cabling | Limited by cable length and taps; adding nodes degrades signal | A break in the backbone stops all transmission; fault isolation hard |
| Ring | Each device connected to two neighbours forming a closed loop; signal passes from device to device with repeaters (token passing) | Predictable; no collisions; slows with many nodes | Moderate | Adding/removing a node requires changing two links | A break disables the ring (dual ring improves it) |
| Hybrid / tree | Combination, e.g. a star of stars or a bus backbone with star branches | Depends on design | Higher | Very scalable | Failure isolated to a branch, but backbone failure is serious |
Q6
a) Analog-to-digital conversion:
- Pulse Code Modulation (PCM): three steps — sampling (PAM; taking samples at regular intervals at least at the Nyquist rate, twice the highest frequency), quantisation (rounding each sample to one of L levels, which introduces quantisation error) and encoding (each level is coded into n = log₂ L bits). Bit rate = sampling rate × n.
- Delta Modulation (DM): transmits only the change from the previous sample: 1 if the signal increased by δ, 0 if it decreased, producing a staircase approximation. Adaptive DM changes δ with the signal’s slope.
b) Serial transmission techniques:
- Asynchronous: each byte is framed by a start bit (0) and one or more stop bits (1), with variable gaps between bytes; timing is resynchronised for every byte. Cheap and simple but slower due to the overhead (keyboards, low-speed links).
- Synchronous: bits are sent as a continuous stream grouped into frames without start/stop bits or gaps; the receiver counts bits using a shared clock. Faster and more efficient, but needs accurate timing (high-speed links).
- Isochronous: guarantees data arrives at a fixed rate with fixed delay between frames, as required by real-time audio/video; synchronisation between whole frames as well as bits.
Q7 – TCP/IP model
The TCP/IP protocol suite is a hierarchical model with (in the original version) four layers — host-to-network, internet, transport and application — or five layers when the bottom layer is split into physical and data link.
- Physical and data link (host-to-network/network access) layer: TCP/IP does not define specific protocols here; it supports all standard ones (Ethernet, Wi-Fi, PPP). It transmits bits over the medium, frames data, and handles physical (MAC) addressing, error and flow control on a link.
- Internet (network) layer: IP provides connectionless, best-effort delivery of datagrams from source host to destination host, logical addressing and routing. Supporting protocols: ARP (IP → MAC), RARP, ICMP (error reporting and ping), IGMP (multicast).
- Transport layer: process-to-process delivery using port numbers. TCP — connection-oriented, reliable, byte-stream with segmentation, sequence numbers, acknowledgements, flow and congestion control. UDP — connectionless, unreliable, low overhead. SCTP — message-oriented reliable transport for multimedia/telephony.
- Application layer: corresponds to the OSI session, presentation and application layers; provides services to users: HTTP (web), SMTP/POP3/IMAP (mail), FTP (file transfer), DNS (name resolution), TELNET/SSH (remote login), SNMP (network management), DHCP.
Data is encapsulated as it moves down: message → segment/user datagram → IP datagram → frame → bits, and decapsulated at the receiver.
