CCN/DCN, Past Papers

CCN Past Paper UOS (Computer Communication and Networks)

CCN Computer Communication and Networks past paper University of Sargodha

University of Sargodha Computer Communication & Networks (CCN) past paper, retyped from the original paper, with solved answers below.

The top of the original paper (program, semester and year) was cut off in the photo, so only the questions are shown.

Solved answers

Q1 – Short questions

(1) ARP vs RARP: ARP (Address Resolution Protocol) finds the MAC (physical) address of a host when its IP address is known. RARP (Reverse ARP) does the opposite: a diskless host that knows its MAC address asks a RARP server for its IP address. RARP has been replaced by BOOTP/DHCP.

(2) Why ICMP is used: IP has no error reporting or diagnostics; ICMP reports errors (destination unreachable, time exceeded, redirect, parameter problem) and supports queries such as echo request/reply used by ping and traceroute.

(3) Default subnet mask of 172.20.0.0: 172 is in the class B range (128–191), so the default mask is 255.255.0.0 (/16).

(4) FDMA vs TDMA: in FDMA the bandwidth is divided into separate frequency bands and each user gets its own band all the time. In TDMA all users share the same frequency but each gets its own time slot in turn.

(5) RTT: Round-Trip Time — the time for a segment to travel from sender to receiver and for its acknowledgement to return. TCP measures RTT to set its retransmission time-out (RTO).

(6) CIDR and its significance: Classless Inter-Domain Routing allocates addresses in variable-size blocks written as a.b.c.d/n, ignoring classes. It reduces address waste and allows route aggregation (supernetting), which keeps routing tables small.

(7) L2TP tunnels: Layer 2 Tunnelling Protocol carries PPP frames inside UDP/IP packets between an L2TP Access Concentrator and an L2TP Network Server, creating a virtual point-to-point link across the internet for VPNs. It provides no encryption by itself, so it is usually combined with IPsec (L2TP/IPsec).

(8) Transmit and receive windows: in sliding-window flow control the sender’s window holds frames/bytes it may send without waiting for acknowledgement; the receiver’s window holds the frames/bytes it is ready to accept. Example: with window size 4, the sender transmits frames 0–3; when ACK for frame 0 arrives, the window slides and frame 4 may be sent.

(9) Sockets: an endpoint for communication between two processes, identified by IP address + port number; programs use the socket API (socket, bind, listen, accept, connect, send, recv).

(10) Major functions of LCP: establishing, configuring, maintaining and terminating PPP links; negotiating options (MRU, authentication, compression, magic number); testing link quality and detecting loop-backs.

(11) HDLC frame and significance: Flag (01111110) | Address | Control | Information | FCS (CRC) | Flag. It provides bit-oriented framing, addressing, sequence numbers for flow and error control (I-, S- and U-frames) and error detection; PPP and many WAN protocols are based on it.

(12) Why sequence numbers are used: to identify each packet/byte so the receiver can detect lost or duplicate data, put out-of-order data back in order, and acknowledge specific data for retransmission and flow control.

(13) Port address: a 16-bit number (0–65535) identifying a process/application on a host, e.g. 80 for HTTP. The transport layer (TCP/UDP) is responsible for it (process-to-process delivery).

(14) Fast Ethernet vs Gigabit Ethernet: Fast Ethernet (IEEE 802.3u) runs at 100 Mbps (100BASE-TX over Cat5). Gigabit Ethernet (802.3z/ab) runs at 1000 Mbps (1000BASE-T over Cat5e, or fibre), is mostly full-duplex and is used for backbones and servers.

(15) Why BOOTP is used: the Bootstrap Protocol lets a diskless or newly booted host obtain its IP address, subnet mask, gateway and boot file location from a server; it was the predecessor of DHCP.

(16) TCP segmentation: TCP divides the application’s byte stream into segments that fit the maximum segment size (MSS), adds a header with sequence and acknowledgement numbers to each, and the receiver reassembles them in order.

Q2 – CSMA/CD

Carrier Sense Multiple Access with Collision Detection is the medium-access method of classic shared Ethernet (IEEE 802.3).

  1. Carrier sense: a station listens to the medium before sending.
  2. If the medium is busy it waits (1-persistent in Ethernet); when idle it transmits.
  3. Collision detection: while transmitting, the station monitors the medium; if signals collide, it stops and sends a 32-bit jam signal so all stations know.
  4. Back-off: after the n-th collision it waits a random time K × 512 bit-times, with K chosen from 0 to 2ⁿ − 1 (binary exponential back-off, up to 10), and tries again; after 16 attempts it gives up.

Minimum frame size: a frame must last at least as long as twice the maximum propagation delay so a collision is detected while still sending — 64 bytes for 10 Mbps Ethernet. Advantages: simple, decentralised; disadvantages: performance drops under heavy load, not usable in wireless. Modern switched full-duplex Ethernet no longer needs CSMA/CD.

Q3 – Routing protocols and routing metrics

Routing protocols let routers exchange information and build routing tables automatically.

  • Distance-vector (e.g. RIP): each router shares its table with neighbours periodically; uses Bellman–Ford; metric is hop count (max 15); simple but slow convergence and count-to-infinity problem (solved by split horizon, poison reverse).
  • Link-state (e.g. OSPF, IS-IS): each router floods link-state advertisements, builds a full topology map and runs Dijkstra’s shortest-path algorithm; fast convergence, supports areas; needs more memory and CPU.
  • Path-vector (BGP): used between autonomous systems on the internet; advertises full AS paths and applies policies.
  • Hybrid (EIGRP): advanced distance-vector with link-state features.
  • Also: interior (IGP) vs exterior (EGP) protocols; static vs dynamic routing.

Routing metrics are the values used to choose the best path: hop count, bandwidth, delay, load, reliability, cost, MTU and administrative policies. RIP uses hop count; OSPF uses cost (based on bandwidth); EIGRP combines bandwidth and delay.

Q4 – VLSM

Variable Length Subnet Masking lets a network be divided into subnets of different sizes by using different prefix lengths, so each subnet gets just the number of addresses it needs and fewer addresses are wasted than with fixed-length subnetting.

Procedure: list the subnets by required hosts, largest first; for each, choose the smallest block 2ᵏ ≥ hosts + 2; assign it on a boundary that is a multiple of its size; continue with the remaining space.

SubnetHosts neededBlockPrefixRange
A100128/25192.168.1.0 – 192.168.1.127
B5064/26192.168.1.128 – 192.168.1.191
C2032/27192.168.1.192 – 192.168.1.223
WAN link24/30192.168.1.224 – 192.168.1.227

VLSM requires classless routing protocols (RIPv2, OSPF, EIGRP) that carry the mask, and it enables route summarisation.

Q5 – UDP: applications and services

UDP (User Datagram Protocol) is a connectionless, unreliable transport protocol with an 8-byte header: source port, destination port, length and checksum.

Services: process-to-process delivery using port numbers; connectionless service (each datagram independent); optional checksum for error detection; no flow control, no congestion control and no retransmission; supports multicast and broadcast; encapsulation and decapsulation with queues at ports.

Applications: DNS, DHCP/BOOTP, TFTP, SNMP, RIP, NTP, real-time audio/video and VoIP (with RTP), online gaming and streaming — any application that needs speed, small simple request–response or can tolerate some loss.

Q6 – Subnetting with mask /29

The question gives 255.255.255.0 with /29. A /29 prefix means the mask is 255.255.255.248 (29 ones). Taking a /24 network such as 192.168.1.0/24 and subnetting it with /29:

  • Borrowed bits = 29 − 24 = 5 → 2⁵ = 32 subnets.
  • Host bits = 3 → 2³ = 8 addresses per subnet → 6 usable hosts each.
  • Block size = 8 (in the last octet).
SubnetNetwork addressUsable hostsBroadcast
1192.168.1.0.1 – .6192.168.1.7
2192.168.1.8.9 – .14192.168.1.15
3192.168.1.16.17 – .22192.168.1.23
…………
32192.168.1.248.249 – .254192.168.1.255

Q7 – IPv4 vs IPv6

FeatureIPv4IPv6
Address size32 bits (≈4.3 billion), dotted decimal128 bits, hexadecimal with colons
HeaderVariable 20–60 bytes, 12+ fields, includes checksum and fragmentation fieldsFixed 40-byte base header, 8 fields: version, traffic class, flow label, payload length, next header, hop limit, source, destination; no checksum
Address typesUnicast, multicast, broadcastUnicast, multicast, anycast — no broadcast
OptionsOptions inside the header (0–40 bytes), slow processingNo options in base header; extension headers instead
Extension headers—Hop-by-hop, routing, fragment, authentication (AH), ESP, destination options — chained by Next Header
FragmentationBy routers and hostsOnly by the source host (fragment extension header)
ConfigurationManual or DHCPStateless auto-configuration (SLAAC) or DHCPv6
SecurityIPsec optionalIPsec support built into the design
QoSType of service / DS fieldTraffic class and flow label

Answers prepared by Shining Study for revision. Check them against your class notes and teacher’s guidance.

About Saif R

An educator and technology enthusiast passionate about empowering students through quality education and digital learning. Dedicated to making academic resources and opportunities accessible to everyone.