CSC263 · TU past paper
Computer Networks 2079 question paper
The complete TU 2079 exam paper for Computer Networks (CSC263), all 12 questions with solved model answers written to the mark scheme.
Tap a question to open its answer.
- 110 marksOSI Reference ModelHideAnswer
What is protocol? Explain each layer of OSI model in detail.[10]
Protocol and OSI Model
Part 1: What is a Protocol?
A network protocol is an established set of rules that determine how data is transmitted between different devices in the same network. It allows connected devices to communicate with each other, regardless of any differences in their internal processes, structure, or design. Network protocols play a critical role in modern digital communications.
In short, a protocol is a set of rules that governs communication.
Key Elements of a Protocol
Element Description Syntax Refers to the structure and format of the information/data. It defines how data is arranged. Semantics Refers to the meaning of each section of bits. It identifies the route to be taken or the final destination of the message. Timing Refers to two characteristics: when data should be sent and how fast it should be sent.
Part 2: The OSI Model
The OSI (Open Systems Interconnection) model is a conceptual framework developed by ISO that standardizes the functions of a communication system into 7 distinct layers. Each layer has specific responsibilities and communicates with the layers directly above and below it.
+---------------------------+ | 7. Application Layer | +---------------------------+ | 6. Presentation Layer | +---------------------------+ | 5. Session Layer | +---------------------------+ | 4. Transport Layer | +---------------------------+ | 3. Network Layer | +---------------------------+ | 2. Data Link Layer | +---------------------------+ | 1. Physical Layer | +---------------------------+
Layer 7: Application Layer
- This is the topmost layer and is closest to the end user.
- It is responsible for node-to-node communication and controls user-interface specifications.
- It provides network services directly to end-user applications.
- It handles protocols such as:
- HTTP/HTTPS: HTTP (Hypertext Transfer Protocol) is used by the World Wide Web (WWW) to manage communication between web browsers and servers. HTTPS is a combination of HTTP with SSL (Secure Socket Layer) for secure communication.
- SSH (Secure Shell): A terminal emulation software preferred for its ability to maintain an encrypted connection. It is efficient for filling out forms, signing in, authentication, and carrying out bank transactions.
- Other protocols: FTP, SMTP, DNS, etc.
Layer 6: Presentation Layer
- This layer is responsible for translation, encryption, and compression of data.
- It acts as a translator between the application layer and the network.
- It converts data from the application layer into a format that can be transmitted over the network, and vice versa.
- Key functions:
- Data Translation: Converts data formats (e.g., ASCII to EBCDIC).
- Encryption/Decryption: Ensures data security during transmission.
- Compression: Reduces the number of bits to be transmitted.
- Example formats: JPEG, MPEG, GIF, SSL.
Layer 5: Session Layer
- This layer is responsible for establishing, managing, and terminating sessions (connections) between two communicating devices.
- It controls the dialog between computers, deciding which side transmits, when, and for how long.
- Key functions:
- Session establishment, maintenance, and termination.
- Synchronization: Adds checkpoints (sync points) in data streams so that in case of failure, transmission can resume from the last checkpoint.
- Dialog control (half-duplex or full-duplex).
- Example protocols: NetBIOS, PPTP.
Layer 4: Transport Layer
- This layer is responsible for end-to-end communication and error-free delivery of data.
- It corresponds to the Host-to-Host layer in the TCP/IP model.
- Key functions:
- Segmentation and Reassembly: Breaks data into smaller segments for transmission and reassembles them at the destination.
- Flow Control: Manages the rate of data transmission.
- Error Control: Detects and retransmits lost or corrupted data.
- The two main protocols at this layer are:
- TCP (Transmission Control Protocol): Provides reliable and error-free communication between end systems. It performs sequencing and segmentation of data. It is connection-oriented but has more overhead, increasing cost.
- UDP (User Datagram Protocol): A cost-effective protocol used when reliable transport is not required. It is connectionless and faster than TCP.
Layer 3: Network Layer
- This layer selects and manages the best logical path for data transfer between nodes.
- It manages device addressing, tracks the location of devices on the network, and determines the best way to move data.
- Key functions:
- Translates logical network addresses into physical addresses.
- Concerned with circuit, message, or packet switching.
- Breaks larger packets into smaller packets (fragmentation).
- Provides connection services including network layer flow control, error control, and packet sequence control.
- Routers and gateways operate at this layer.
- Common protocols:
- IP (Internet Protocol): IPv4 uses 32-bit addresses displayed in dotted decimal notation. IPv6 uses 128-bit alphanumeric addresses arranged in eight groups of 16 bits each, separated by colons.
- IPX/SPX: Also associated with this layer.
Layer 2: Data Link Layer
- This layer is responsible for node-to-node delivery of data (between two directly connected nodes).
- It ensures that data transferred across the physical layer is error-free.
- Key functions:
- Framing: Divides the stream of bits received from the network layer into manageable data units called frames.
- Physical Addressing: Adds MAC (Media Access Control) addresses of sender and receiver in the frame header.
- Error Detection and Correction: Detects and possibly corrects errors that may occur in the physical layer.
- Flow Control: Coordinates the amount of data that can be sent before receiving an acknowledgment.
- Access Control: Determines which device has control over the communication channel at a given time.
- Hardware: Switches and bridges operate at this layer.
Layer 1: Physical Layer
- This is the lowest layer of the OSI model and it carries the raw bit stream over the transmission medium.
- It is concerned with the physical, electrical, and mechanical characteristics of the connection rather than with the meaning of the bits.
- Key functions:
- Bit transmission: Converts the frames handed down by the data link layer into electrical, optical, or radio signals and puts them on the medium.
- Physical topology: Defines how the devices are arranged in the network (bus, star, ring, or mesh).
- Transmission mode: Decides whether the transmission is simplex, half duplex, or full duplex.
- Data rate and synchronization: Fixes the number of bits sent per second and keeps the sender and receiver bit-synchronized.
- Hardware: Cables, connectors, hubs, repeaters, and network interface cards operate at this layer.
Conclusion
A protocol supplies the syntax, semantics, and timing rules that make communication possible, and the OSI model organizes those rules into seven cooperating layers. At the sender the data travels down all seven layers, each layer adding its own header, crosses the medium as a bit stream, and then travels up the same seven layers at the receiver, where every layer strips the header its peer added. Because each layer only has to honour the interface of the layers directly above and below it, any one layer can be designed, understood, or replaced without disturbing the rest of the stack.
- 210 marksNumericalError Detection and Correction techniquesHideAnswer
Differentiate error detection with error correction. Explain CRC (Cyclic Redundancy Check) method for error detection with a suitable example.[10]
The question is conceptual and asks for an illustrative example. No fixed data string is mandated, so a standard textbook example is used. - Chosen message: 1010011 - Chosen generator (divisor): 1011 (degree 3) The CRC below is computed ...
- 310 marksTypes of RoutingHideAnswer
Explain distance vector routing with example.[10]
Distance Vector Routing
Definition
Distance Vector Routing is a dynamic routing algorithm where each router maintains a routing table (distance vector) that contains:
- The destination network/node
- The distance (cost/hop count) to reach that destination
- The direction (vector) i.e., the next hop (outgoing interface) to reach that destination
Each router shares its routing table only with its directly connected neighbors at regular intervals. Based on the received information, each router updates its own table. This process continues until all routers have consistent, stable routing tables -- a state called convergence.
Distance Vector Routing uses the Bellman-Ford Algorithm to compute shortest paths.
Key Characteristics
Feature Description Algorithm used Bellman-Ford Information shared Only with direct neighbors Traffic overhead Less (compared to Link State) Convergence speed Slower Configuration Easy Hierarchical structure No Example protocol RIP (max 15 hops)
How It Works (Step-by-Step)
- Initialization: Each router knows only the cost to its directly connected neighbors. All other destinations are set to infinity (unknown).
- Advertisement: Each router sends its entire routing table to all directly connected neighbors periodically.
- Update: When a router receives a neighbor's table, it applies the Bellman-Ford equation:
$$D(x, y) = \min_{v} { c(x, v) + D(v, y) }$$
Where:
- $D(x, y)$ = estimated cost from node $x$ to destination $y$
- $c(x, v)$ = cost from $x$ to neighbor $v$
- $D(v, y)$ = neighbor $v$'s advertised cost to reach $y$
- Repeat until no more updates occur (convergence).
Example
Consider the following network with 4 routers: A, B, C, D and the link costs shown below:
A ---2--- B | | 4 1 | | D ---3--- CLink costs:
- A -- B = 2
- A -- D = 4
- B -- C = 1
- D -- C = 3
Step 1: Initial Routing Tables (Each router knows only direct neighbors)
Router A:
Destination Cost Next Hop A 0 - B 2 B C inf - D 4 D Router B:
Destination Cost Next Hop A 2 A B 0 - C 1 C D inf - Router C:
Destination Cost Next Hop A inf - B 1 B C 0 - D 3 D Router D:
Destination Cost Next Hop A 4 A B inf - C 3 C D 0 -
Step 2: First Exchange -- Routers share tables with neighbors
Router A updates using tables received from B and D:
- A to C via B: cost(A,B) + cost(B,C) = 2 + 1 = 3 (better than inf) --> update
- A to C via D: cost(A,D) + cost(D,C) = 4 + 3 = 7 (worse than 3) --> ignore
- A to D via B: cost(A,B) + cost(B,D) = 2 + inf = inf --> no update
- A to B via D: cost(A,D) + cost(D,B) = 4 + inf = inf --> no update
Updated Router A Table:
Destination Cost Next Hop A 0 - B 2 B C 3 B D 4 D Router B updates using tables from A and C:
- B to D via A: cost(B,A) + cost(A,D) = 2 + 4 = 6 (better than inf) --> update
- B to D via C: cost(B,C) + cost(C,D) = 1 + 3 = 4 (better than 6) --> update
Updated Router B Table:
Destination Cost Next Hop A 2 A B 0 - C 1 C D 4 C Router C updates using tables from B and D:
- C to A via B: cost(C,B) + cost(B,A) = 1 + 2 = 3 (better than inf) --> update
- C to A via D: cost(C,D) + cost(D,A) = 3 + 4 = 7 --> ignore
Updated Router C Table:
Destination Cost Next Hop A 3 B B 1 B C 0 - D 3 D Router D updates using tables from A and C:
- D to B via A: cost(D,A) + cost(A,B) = 4 + 2 = 6 (better than inf) --> update
- D to B via C: cost(D,C) + cost(C,B) = 3 + 1 = 4 (better than 6) --> update
Updated Router D Table:
Destination Cost Next Hop A 4 - 45 marksOverview of Network TopologiesHideAnswer
Why do we need network topology? Explain star topology along with its merits and demerits. [5]
--- Network Topology refers to the physical or logical layout of a network. It defines the way different nodes are placed and interconnected with each other, and also describes how data is transferred between these nodes. We need network...
- 55 marksOverview of Protocols and StandardsHideAnswer
Define Protocol. Why do we need standards? [5]
--- A protocol is a set of rules that governs communication between devices in a network. It defines how data is transmitted, received, and interpreted across a network. The three key elements of a protocol are: Element Description -----...
- 65 marksCircuit, Message & Packet SwitchingHideAnswer
What is circuit-switched network? Explain phases during communication in a circuit-switched network? [5]
Circuit-Switched Network
Definition
A circuit-switched network is a type of network in which a dedicated communication path (channel) is established between the sender and receiver before data transmission begins. This dedicated path remains open and reserved exclusively for the two communicating parties throughout the entire duration of the communication session, and is only released when the connection is terminated.
A common real-world example is the telephone network: when a call is made, a dedicated channel is established between the two parties and remains open until the call is disconnected.
Multiplexing in Circuit-Switched Networks
To allow multiple signals to share a single physical link, two multiplexing techniques are used:
-
Frequency Division Multiplexing (FDM): The total available bandwidth is divided into non-overlapping frequency sub-bands. Each sub-band carries a separate signal simultaneously. Used in radio and optical fiber transmission.
-
Time Division Multiplexing (TDM): The transmission time is divided into frames/slots. Each signal is assigned a specific time slot and transmitted over a shared channel using synchronized switches at both ends. Widely used for long-distance communication with heavy traffic loads.
Phases During Communication in a Circuit-Switched Network
Communication in a circuit-switched network takes place in three distinct phases:
Phase 1: Circuit Establishment (Connection Setup)
- Before any data is transmitted, a dedicated end-to-end path is established between the source and destination.
- A request signal is sent from the sender toward the receiver through intermediate switching nodes.
- Each intermediate node reserves the necessary resources (bandwidth, time slot, or frequency band) along the path.
- The connection is confirmed once the dedicated path is fully established from source to destination.
Phase 2: Data Transfer (Communication)
- Once the dedicated circuit is established, data is transmitted continuously between the sender and receiver.
- The reserved path remains exclusively available to the two parties throughout this phase.
- Data flows at a constant rate with minimal delay since the path is pre-allocated.
- No routing decisions are needed during this phase as the path is already fixed.
Phase 3: Circuit Disconnection (Connection Teardown)
- After the data transmission is complete, either party initiates a disconnection request.
- The dedicated path is released and all reserved resources (bandwidth, time slots) are freed.
- The resources become available for use by other connections.
Summary Table
Phase Activity Circuit Establishment Dedicated path reserved end-to-end Data Transfer Continuous data flow over reserved path Circuit Disconnection Path released, resources freed
Key Characteristic: In a circuit-switched network, resources are reserved for the entire duration of the session, which guarantees consistent performance but may lead to wastage of resources if no data is being sent during the reserved time.
-
- 75 marksOverview Virtual Circuit Switching, Frame HideAnswer
What is a virtual circuit network? Explain frame relay as a virtual circuit-wide area network. [5]
A virtual circuit network is a type of connection-oriented packet switching network in which a dedicated logical path (virtual circuit) is established between the source and destination before data transmission begins. Key characteristic...
- 85 marksTransport ProtocolsHideAnswer
Why TCP is called a connection-oriented and reliable protocol? Differentiate TCP with UDP. [5]
TCP is called a connection-oriented protocol because before any data is transmitted between two devices, a connection must be established between the sender and the receiver. This is done through a process known as the three-way handshak...
- 95 marksWeb &HTTPHideAnswer
Explain architecture of WWW. What is URL? [5]
The World Wide Web (WWW) is based on a Client/Server Architecture that operates over the Internet. It is a system of interlinked hypertext documents and resources accessed via the Internet using web browsers. - The client is the consumer...
- 105 marksOverview of SDN and its Features, Data andHideAnswer
Explain in brief about software defined network? What are its features? [5]
--- Software Defined Networking (SDN) is a modern network architecture approach that separates the control plane from the data plane (forwarding plane) in networking devices. In traditional networks, the control logic and data forwarding...
- 115 marksOverview of Protocols and StandardsHideAnswer
Write short notes on (any two): a. Protocol and standards b. Switch c. Checksum [5]
Short Notes (Any Two)
a. Protocol and Standards
Protocol
A protocol is a set of rules that governs data communication between devices in a network. Without a protocol, two devices may be connected but cannot communicate meaningfully.
The three key elements of a protocol are:
Element Description Syntax Refers to the structure and format of the data. It defines how data is arranged (e.g., which bits represent the address, which represent the data). Semantics Refers to the meaning of each section of bits. It identifies the route to be taken or the final destination of the message. Timing Refers to two characteristics: when data should be sent and how fast it should be sent. Examples of protocols: HTTP, SSH, SMS, FTP, TCP/IP.
Standards
Network standards define the rules for data communications that are needed for interoperability of networking technologies and processes. Standards:
- Help create and maintain open markets
- Allow different vendors to compete on quality while remaining compatible with existing products
- Simplify network design and operation
Example of a standards body: ITU-T (International Telecommunication Union - Telecommunication Standardization Sector), based in Geneva, Switzerland, which coordinates standards for telecommunications globally.
c. Checksum
Checksum is an error detection technique used in data communication to detect errors that may have been introduced during transmission or storage.
How Checksum Works
At the Sender Side:
- The data is divided into equal segments of a fixed number of bits (e.g., 16-bit segments).
- All segments are added together using binary addition.
- If there is a carry in the final sum, it is wrapped around (added back to the result).
- The 1's complement of the final sum is computed. This is the checksum value.
- The checksum is appended to the data and transmitted.
At the Receiver Side:
- The receiver divides the received data (including checksum) into the same fixed-size segments.
- All segments are added together.
- The 1's complement of the total sum is computed.
- If the result is all zeros (0000...0), the data is accepted as error-free.
- If the result is not zero, an error is detected and the data is discarded.
Example
Suppose we have two 8-bit segments to transmit:
Segment 1: 10011001 Segment 2: 11100110Step 1 - Add the segments:
10011001 + 11100110 ---------- 101111111 (9-bit result, carry occurs)Step 2 - Wrap around the carry:
01111111 + 1 ---------- 10000000Step 3 - Take 1's complement (flip all bits):
Checksum = 01111111This checksum is sent along with the data. At the receiver, all three values (segment 1 + segment 2 + checksum) are added, and the 1's complement of the result should be 00000000, confirming no error.
Key Points
- Checksum is used in protocols such as TCP, UDP, and IP.
- It is noted in the Data Plane layer (IP header checksum).
- It is more powerful than simple parity checking but less powerful than CRC.
- It can detect burst errors but may miss some error combinations.
- 125 marksNumericalIPv4 Addressing & Sub-nettingHideAnswer
Write the subnet ID and broadcast address of each subnet if you divide a class C network (192.168.3.0 – 192.168.3.255) into 4 different subnets. What is the new subnet mask? [5]
Subnetting Class C Network (192.168.3.0 - 192.168.3.255) into 4 Subnets
Step 1: Given Data
- Network: 192.168.3.0 - 192.168.3.255 (Class C, default mask /24 = 255.255.255.0)
- Required subnets: 4
Step 2: Bits to Borrow
To create 4 subnets:
$$2^n \geq 4 \implies 2^2 = 4 \implies n = 2 \text{ bits}$$
Borrow 2 bits from the host portion.
Step 3: New Subnet Mask
Original:
11111111.11111111.11111111.00000000 = 255.255.255.0 (/24)Borrow 2 host bits:
11111111.11111111.11111111.11000000 = 255.255.255.192 (/26)New Subnet Mask = 255.255.255.192 (/26)
Step 4: Block Size
$$\text{Block Size} = 256 - 192 = 64$$
Remaining host bits $= 8 - 2 = 6 \Rightarrow 2^6 = 64$ addresses per subnet (62 usable).
Step 5: Subnet Table
Subnet Subnet ID (Network Address) Broadcast Address Usable Host Range 1 192.168.3.0 192.168.3.63 192.168.3.1 - 192.168.3.62 2 192.168.3.64 192.168.3.127 192.168.3.65 - 192.168.3.126 3 192.168.3.128 192.168.3.191 192.168.3.129 - 192.168.3.190 4 192.168.3.192 192.168.3.255 192.168.3.193 - 192.168.3.254
Step 6: Rule
- Subnet ID = first address of each block (host bits all 0).
- Broadcast = last address of each block (host bits all 1).
Summary
Parameter Value Original Network 192.168.3.0/24 Subnets 4 Bits Borrowed 2 New Subnet Mask 255.255.255.192 (/26) Addresses / Subnet 64 (62 usable)