CSC263 · TU past paper
Computer Networks 2080 question paper
The complete TU 2080 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 marksClass-full and Classless AddressingHideAnswer
What is classless addressing? Explain distance vector routing with a suitable example.[10]
--- Classless Inter-Domain Routing (CIDR) is a method used by Internet Service Providers (ISPs) to allocate IP addresses in variable-sized blocks, without being restricted to the traditional Class A, B, or C boundaries. It replaces the o...
- 210 marksFraming and Flow Control MechanismsHideAnswer
What is flow control? How does stop-and-wait ARQ protocol handle error? Where does this protocol reside in OSI layer?[10]
--- Flow control is a mechanism used in data communication to manage the rate of data transmission between a sender and a receiver so that the receiver is not overwhelmed by data faster than it can process. As one of the functions of the...
- 310 marksTransport ProtocolsHideAnswer
Explain TCP header with a neat diagram. Highlight on its uses.[10]
TCP Header - Explanation with Diagram
Introduction
TCP (Transmission Control Protocol) is a connection-oriented, reliable transport layer protocol defined in RFC 793. It provides end-to-end reliable data delivery, flow control, error control, and congestion control between two communicating hosts. The TCP header is attached to the data segment before passing it down to the network layer.
TCP Header Diagram
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Source Port | Destination Port | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Acknowledgment Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | HLEN | Resv |U|A|P|R|S|F| Window Size | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Checksum | Urgent Pointer | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Options (if any) | Padding | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Flags: U=URG, A=ACK, P=PSH, R=RST, S=SYN, F=FIN Minimum Header Size = 20 bytes
Detailed Explanation of Each Field
1. Source Port (16 bits)
- Identifies the port number of the sending application on the source host.
- Port numbers range from 0 to 65535.
- Example: A web browser may use ephemeral port 49200 as source port.
- Use: Helps the receiving end identify which application sent the data, enabling multiplexing.
2. Destination Port (16 bits)
- Identifies the port number of the receiving application on the destination host.
- Example: Port 80 for HTTP, Port 443 for HTTPS, Port 21 for FTP.
- Use: Directs the incoming segment to the correct application process (demultiplexing).
3. Sequence Number (32 bits)
- Indicates the byte number of the first byte of data in the current segment.
- During connection establishment (SYN), it carries the Initial Sequence Number (ISN).
- Use: Ensures ordered delivery of data. The receiver uses this to reassemble segments in the correct order.
4. Acknowledgment Number (32 bits)
- Valid only when the ACK flag is set.
- Contains the sequence number of the next byte the receiver expects to receive.
- Use: Confirms receipt of data and provides reliable, error-free delivery. Supports cumulative acknowledgment.
5. Header Length / HLEN (4 bits)
- Specifies the length of the TCP header in 32-bit words.
- Minimum value = 5 (20 bytes), Maximum value = 15 (60 bytes).
- Use: Tells the receiver where the header ends and the actual data begins, since the Options field makes the header variable in length.
6. Reserved (6 bits)
- These bits are reserved for future use and must be set to zero.
- Use: Ensures backward compatibility for future protocol extensions.
7. Control Flags (6 bits)
Each flag is 1 bit and serves a specific purpose:
Flag Name Use URG Urgent Indicates urgent data is present; Urgent Pointer field is valid ACK Acknowledgment Acknowledgment Number field is valid PSH Push Receiver should pass data to application immediately without buffering RST Reset Abruptly terminates/resets the connection SYN Synchronize Used during connection establishment (3-way handshake) to synchronize sequence numbers FIN Finish Used during connection termination; sender has no more data to send
8. Window Size (16 bits)
- Specifies the number of bytes the sender is willing to accept from the receiver (receive buffer size).
- Maximum window size = 65535 bytes.
- Use: Implements flow control using the sliding window mechanism. Prevents the sender from overwhelming the receiver with too much data.
9. Checksum (16 bits)
- Covers the entire TCP segment (header + data) plus a pseudo-header (source IP, destination IP, protocol, TCP length).
- Calculated by the sender and verified by the receiver.
- Use: Provides error detection. If the checksum does not match, the segment is discarded.
10. Urgent Pointer (16 bits)
- Valid only when the URG flag is set.
- Points to the last byte of urgent data within the segment.
- Use: Allows TCP to send out-of-band urgent data (e.g., interrupt signals) that must be processed immediately by the receiving application.
11. Options (Variable, 0 to 40 bytes)
- Carries optional parameters negotiated when the connection is opened, such as the maximum segment size, the window scale factor, selective acknowledgment permission and timestamps.
- Present only when HLEN is greater than 5, which is how the header grows from 20 bytes to at most 60 bytes.
- Use: Lets TCP extend its behaviour beyond the fixed part of the header, for example by agreeing on a larger window or on a segment size that avoids fragmentation.
12. Padding (Variable)
- Zero bits appended after the options so that the header ends on a 32-bit word boundary.
- Use: Keeps the header length an exact multiple of 4 bytes so that the value in HLEN remains meaningful.
Uses of the TCP Header
Purpose Fields that provide it Process to process delivery Source Port, Destination Port Ordered delivery and reassembly Sequence Number Reliability and retransmission Acknowledgment Number, ACK flag Connection setup and release SYN, ACK, FIN, RST flags Flow control Window Size Error detection Checksum Priority (out-of-band) data URG flag, Urgent Pointer Header extension HLEN, Options, Padding
Conclusion
Every field in the TCP header exists to support one of the guarantees TCP makes. The port numbers deliver the segment to the correct process, the sequence and acknowledgment numbers together with the checksum make delivery reliable and in order, the control flags manage the life of the connection, and the window size keeps a fast sender from overwhelming a slow receiver. This is why the header is 20 bytes at minimum and can reach 60 bytes once options are negotiated.
- 45 marksCircuit, Message & Packet SwitchingHideAnswer
What do you understand by packet switching? Explain. What are its advantages and disadvantages? [5]
Packet switching is a data transmission technique in which the data to be sent is broken down into smaller units called packets. These packets are individually routed through the network from source to destination. At the destination, th...
- 55 marksOverview of Network TypesHideAnswer
Explain different types of network types. [5]
A network is a collection of interconnected devices that can communicate and share resources with each other. Networks are classified based on their size, geographic coverage, and purpose. The main types of networks are described below: ...
- 65 marksTypes of RoutingHideAnswer
Differentiate between link state and distance vector routing. [5]
Distance Vector Routing: Each router maintains a table (vector) of minimum distances to every destination and shares this table only with its directly connected neighbors. It uses the Bellman-Ford algorithm to compute shortest paths. Lin...
- 75 marksTraffic Shaping AlgorithmsHideAnswer
What is socket programming? Explain token bucket algorithm with an example. [5]
--- Socket programming is a way of connecting two nodes on a network to communicate with each other. One socket (node) listens on a particular port at an IP address, while the other socket reaches out to form a connection. - The server c...
- 85 marksFile Transfer and Email ProtocolsHideAnswer
Differentiate between IMAP and POP3. Explain SNMP. [5]
--- Both IMAP and POP3 are email retrieval protocols used at the Application Layer to receive emails from a mail server. Feature IMAP (Internet Message Access Protocol) POP3 (Post Office Protocol v3) --------- Full Form Internet Message ...
- 95 marksOverview of NGNHideAnswer
Explain the architecture of NGN. [5]
--- NGN is a packet-based network architecture that is capable of providing telecommunication services and able to make use of multiple broadband, Quality of Service (QoS)-enabled transport technologies. It is defined by ITU-T as a netwo...
- 105 marksDLL ProtocolHideAnswer
Highlight on the use of PPP. What are the functions of Media Access Control. [5]
--- PPP (Point-to-Point Protocol) is a data link layer protocol used to establish a direct connection between two nodes over a serial link. It is widely used for transmitting network layer data over point-to-point connections such as dia...
- 115 marksIPv6 Addressing and its FeaturesHideAnswer
Write short notes on: a. IPV6 b. Microwave [5]
--- IPv6 is the most recent version of the Internet Protocol (IP), developed to replace IPv4 due to the exhaustion of IPv4 address space. Feature Description ------ Address Size 128-bit address (compared to 32-bit in IPv4) Address Format...
- 125 marksNumericalIPv4 Addressing & Sub-nettingHideAnswer
Suppose you are given an IP address 172.16.0.0, perform subnetting and divide the given network into 2 subnets. Calculate total number of hosts that can be configured, range of the IP addresses. [5]
- IP address: 172.16.0.0 - Required number of subnets: 2 First octet = 172, which lies in the range 128 to 191, so this is a Class B address. - Default subnet mask = 255.255.0.0 (/16) - Network bits = 16, Host bits = 16 To get 2 subnets,...