Chapter 1
Computer Networking
TU BCA past exam questions
Past questions and answers
59 questions set from this chapter, 1 of them more than once. Most repeated first.
- Asked 2 times
- 2020 · 10 marks
- 2021 · 10 marks
Explain the IPv4 Header format in detail.
Answer
IPv4 datagram header: The IPv4 header has a fixed part of 20 bytes and an optional part of up to 40 bytes (header length 20 - 60 bytes).
| Field | Size | Description |
|---|---|---|
| Version | 4 bits | IP version (4) |
| HLEN (IHL) | 4 bits | Header length in 4-byte words (min 5, max 15) |
| Service type (DS/TOS) | 8 bits | Precedence / priority and quality of service |
| Total length | 16 bits | Header plus data, in bytes (max 65,535) |
| Identification | 16 bits | Identifies the datagram; used to reassemble fragments |
| Flags | 3 bits | Reserved, DF (do not fragment), MF (more fragments) |
| Fragment offset | 13 bits | Position of the fragment in the original datagram, in units of 8 bytes |
| Time to live (TTL) | 8 bits | Maximum hop count; decremented by each router, discarded at 0 |
| Protocol | 8 bits | Upper-layer protocol (1 ICMP, 6 TCP, 17 UDP) |
| Header checksum | 16 bits | Error detection on the header only |
| Source address | 32 bits | IP address of the sender |
| Destination address | 32 bits | IP address of the receiver |
| Options | 0 - 40 bytes | Record route, timestamp, source routing, padding |
The checksum is recomputed at every router because TTL changes. The payload follows the header and carries the transport-layer segment.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2020 · 5 marks
Define protocols. Explain WWW and HTTP protocol.
Answer
Protocol: A protocol is a set of rules that defines the format, order and meaning of messages exchanged between communicating entities, and the actions taken when messages are sent or received. Its three key elements are syntax (format of data), semantics (meaning of each field) and timing (when and how fast data is sent).
World Wide Web (WWW): The WWW is a distributed information system of interlinked hypertext documents (web pages) stored on web servers around the world and accessed through the Internet. Each resource is identified by a URL (e.g. http://www.example.com/index.html). A browser (client) requests a page, the web server returns it, and the browser renders the HTML, images and scripts. Pages are linked by hyperlinks, so users can move from one document to another.
HTTP (HyperText Transfer Protocol): HTTP is the application-layer protocol of the Web, using the client-server model over TCP (default port 80; HTTPS uses 443).
- The client opens a TCP connection, sends a request message (request line with method such as GET, POST, PUT, DELETE, HEAD; headers; optional body).
- The server replies with a response message (status line such as
200 OKor404 Not Found; headers; body). - HTTP is stateless: the server keeps no memory of earlier requests (cookies are used to maintain state).
- HTTP/1.0 uses non-persistent connections; HTTP/1.1 uses persistent connections by default.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2020 · 5 marks
Define transmission impairment. Explain the causes of impairments.
Answer
Transmission impairment: When a signal travels through a transmission medium, the received signal is not identical to the transmitted signal. The changes in the signal that cause errors or loss of quality are called transmission impairments.
Causes of impairment:
- Attenuation: Loss of signal energy as it travels through the medium because of resistance and absorption. It is measured in decibels (). Amplifiers or repeaters are used to restore the strength.
- Distortion: The signal changes its shape because different frequency components travel at different speeds, so they arrive at different times (delay distortion). It affects composite signals mainly.
- Noise: Unwanted signals added to the original signal. Types include:
- Thermal noise (random motion of electrons),
- Induced noise (from motors and appliances),
- Crosstalk (effect of one wire on another),
- Impulse noise (sudden spikes from lightning or power surges).
The quality of a signal is expressed by the signal-to-noise ratio, ; a high SNR means a good signal.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2020 · 5 marks
Define HDLC. Explain the HDLC frame formats.
Answer
HDLC (High-level Data Link Control): HDLC is a bit-oriented, synchronous data link layer protocol for point-to-point and multipoint links. It provides reliable, flow-controlled transmission using sliding window and ARQ, with error detection by CRC and bit stuffing for transparency.
HDLC frame format: Every frame has the fields:
| Field | Size | Purpose |
|---|---|---|
| Flag | 8 bits (01111110) | Marks start and end of frame |
| Address | 8 bits | Identifies the secondary station |
| Control | 8 or 16 bits | Frame type, sequence numbers, poll/final bit |
| Information | Variable | User data (only in I-frames and some U-frames) |
| FCS | 16 or 32 bits | CRC for error detection |
| Flag | 8 bits | End of frame |
Types of frames (by control field):
- I-frame (Information): Control begins with
0. Carries user data with send sequence number N(S), receive sequence number N(R) (piggybacked acknowledgement) and the P/F bit. - S-frame (Supervisory): Control begins with
10. Used for flow and error control, with no information field. Types: RR (receive ready), RNR (receive not ready), REJ (reject), SREJ (selective reject). - U-frame (Unnumbered): Control begins with
11. Used for link management such as connection setup and disconnection (SABM, UA, DISC, DM, FRMR).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2020 · 5 marks
Define IP Address. Specify IPv4 address classes with their address ranges.
Answer
IP address: An IP address is a logical address assigned to each host interface on a network. An IPv4 address is 32 bits long, written in dotted decimal form (e.g. 192.168.1.10) and has a network ID part and a host ID part. It uniquely identifies a device on the Internet.
IPv4 classes:
| Class | First bits | First octet range | Default mask | Use |
|---|---|---|---|---|
| A | 0 | 0 - 127 (usable 1 - 126) | 255.0.0.0 | Very large networks |
| B | 10 | 128 - 191 | 255.255.0.0 | Medium networks |
| C | 110 | 192 - 223 | 255.255.255.0 | Small networks |
| D | 1110 | 224 - 239 | - | Multicasting |
| E | 1111 | 240 - 255 | - | Reserved/experimental |
Address ranges: Class A 1.0.0.0 - 126.255.255.255, Class B 128.0.0.0 - 191.255.255.255, Class C 192.0.0.0 - 223.255.255.255, Class D 224.0.0.0 - 239.255.255.255, Class E 240.0.0.0 - 255.255.255.255. The range 127.x.x.x is reserved for loopback.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2020 · 5 marks
Define Subnetting. Suppose you are given network address: 192.168.10.0 and subnet mask 255.255.255.240 then calculate total number of subnets and number of hosts per subnet.
Answer
Subnetting: Subnetting is the process of dividing a single large network into smaller sub-networks (subnets) by borrowing bits from the host part of the IP address. It reduces broadcast traffic, uses addresses efficiently and improves security and management.
Calculation: Network 192.168.10.0 is Class C (default mask 255.255.255.0 = /24).
Subnet mask : last octet , so 4 bits are borrowed for the subnet and 4 bits remain for hosts. The mask is /28.
- Number of subnets
- Hosts per subnet (block size 16; the network and broadcast addresses are reserved)
For example, the first subnet is 192.168.10.0 with usable hosts 192.168.10.1 - 192.168.10.14 and broadcast 192.168.10.15.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2020 · 5 marks
Draw a User Datagram format. Explain UDP operations.
Answer
UDP (User Datagram Protocol) is a connectionless, unreliable, transport-layer protocol that provides process-to-process delivery with minimal overhead.
User datagram format: The header is 8 bytes (64 bits), followed by data.
0 16 31
+-----------------+-----------------+
| Source port | Destination port|
| (16 bits) | (16 bits) |
+-----------------+-----------------+
| Total length | Checksum |
| (16 bits) | (16 bits) |
+-----------------+-----------------+
| Data |
+-----------------------------------+
- Source port / destination port: identify the sending and receiving application processes.
- Length: total length of header plus data in bytes.
- Checksum: optional error detection over header, data and a pseudo-header.
UDP operations:
- Connectionless service: each datagram is independent; there is no connection setup, sequencing, acknowledgement or retransmission.
- Encapsulation and decapsulation: data from a process is encapsulated in a user datagram and passed to IP; the receiver removes the header and delivers the data to the process.
- Queuing: ports have incoming and outgoing queues. If a queue overflows, datagrams are discarded.
- Multiplexing and demultiplexing: one UDP serves many processes; the destination port selects the process.
- Uses: DNS, DHCP, SNMP, VoIP, streaming and online games, where speed matters more than reliability.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2020 · 5 marks
Write short notes on (Any Two):
a) DNS
b) Public Key Cryptography
c) VPN
Answer
(a) DNS (Domain Name System): DNS is a distributed hierarchical database that maps human-friendly domain names (e.g. www.tu.edu.np) to IP addresses and vice versa. The name space is a tree (root, top-level domains such as .com and .np, second-level domains, etc.). Resolution is done by name servers (root, TLD, authoritative); the resolver contacts them recursively or iteratively and caches the results. It uses UDP port 53 (TCP for zone transfers). DNS record types include A, AAAA, MX, CNAME and NS.
(c) VPN (Virtual Private Network): A VPN creates a secure, private connection over a public network such as the Internet. Data is encrypted and encapsulated (tunnelled) so that remote users or branch offices can access a private network as if directly connected. Common technologies are IPsec, SSL/TLS VPN, L2TP and PPTP. Advantages: low cost compared with leased lines, confidentiality, authentication and integrity of data, and remote access. Disadvantage: encryption overhead and dependence on Internet quality.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2020 · 10 marks
Critically analyze the OSI reference model.
Answer
OSI reference model: The Open Systems Interconnection model, developed by ISO, divides network communication into seven layers. Each layer provides services to the layer above and uses services of the layer below.
| Layer | Main function |
|---|---|
| 7 Application | Network services to user applications (email, file transfer, web) |
| 6 Presentation | Translation, encryption, compression |
| 5 Session | Dialog control, synchronization, session setup and teardown |
| 4 Transport | End-to-end delivery, segmentation, flow and error control |
| 3 Network | Logical addressing, routing |
| 2 Data link | Framing, physical addressing, error and flow control, media access |
| 1 Physical | Transmission of raw bits, signals, connectors |
Critical analysis
Strengths:
- Clear separation of functions makes the design modular; a layer can change without affecting others.
- Standard terminology: service, interface and protocol are clearly distinguished.
- Simplifies troubleshooting and teaching, and supports interoperability between vendors.
Weaknesses:
- It arrived after the protocols (TCP/IP) were already widely deployed, so it was never implemented widely ("bad timing").
- It is complex; the session and presentation layers are rarely needed, while data link and network layers are overloaded ("bad technology").
- Some functions (flow control, error control) are duplicated in several layers.
- Initial implementations were large and slow, and the model was poorly suited to connectionless service at the network layer.
- Because of this, the Internet uses the simpler four- or five-layer TCP/IP model.
Conclusion: the OSI model is not used as a working protocol stack, but it remains a valuable conceptual reference for understanding and designing networks.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2020 · 10 marks
Explain the random-access protocols under the multiple access taxonomy.
Answer
Multiple access taxonomy: Multiple access protocols (medium access control) decide how many stations share a common channel. They are of three kinds: random access, controlled access (reservation, polling, token passing) and channelization (FDMA, TDMA, CDMA).
Random-access protocols: No station is controlled by another; any station with data may transmit when it wants. If two stations transmit at once a collision occurs and the frames are lost, so each protocol defines how to resolve collisions.
- Pure ALOHA: A station sends a frame whenever it has data. If no acknowledgement arrives within a timeout, it waits a random back-off time and retransmits. Vulnerable time . Throughput , maximum (18.4%) at .
- Slotted ALOHA: Time is divided into slots equal to the frame time; a station may start only at a slot boundary. Vulnerable time is . Throughput , maximum (36.8%) at .
- CSMA (Carrier Sense Multiple Access): "Listen before talk": a station senses the channel and sends only if idle, reducing collisions (which can still happen due to propagation delay). Persistence methods: 1-persistent, non-persistent, p-persistent.
- CSMA/CD (Collision Detection): Used in wired Ethernet. The station keeps listening while sending; on detecting a collision it stops, sends a jam signal and retries after binary exponential back-off. The minimum frame size must satisfy .
- CSMA/CA (Collision Avoidance): Used in wireless LANs (802.11), where collisions cannot be detected. It uses interframe space (IFS), contention window with random back-off, acknowledgements and optional RTS/CTS handshake.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 · 5 marks
Explain TCP/IP Reference model.
Answer
TCP/IP reference model: The TCP/IP model is the protocol suite on which the Internet is built. It has four layers (some texts show five by splitting the lowest layer).
- Application layer: Provides services directly to user applications and combines the OSI application, presentation and session layers. Protocols: HTTP, FTP, SMTP, DNS, DHCP, Telnet, SNMP.
- Transport layer: End-to-end (process-to-process) communication. TCP gives reliable, connection-oriented delivery with flow and congestion control; UDP gives unreliable, connectionless delivery.
- Internet layer: Logical addressing and routing of packets across networks. Protocols: IP, ICMP, ARP, RARP, IGMP, routing protocols.
- Network access (host-to-network) layer: Physical transmission and framing over the local network; covers the OSI data link and physical layers (Ethernet, Wi-Fi, PPP).
Data is encapsulated downward: data, segment/datagram, packet, frame, bits. TCP/IP is simpler than OSI and is the de facto Internet standard.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 · 5 marks
"Slotted ALOHA improves the performance of system over pure ALOHA". Justify.
Answer
Justification: In pure ALOHA a station sends whenever it likes, so a frame collides with any other frame that starts within one frame time before it or one frame time after it. The vulnerable time is therefore .
In slotted ALOHA, time is divided into slots of length and a station may transmit only at the beginning of a slot. Frames either overlap completely or not at all, so the vulnerable time is reduced to .
With the average number of frames generated per frame time:
- Pure ALOHA: , maximum at .
- Slotted ALOHA: , maximum at .
Since halving the vulnerable period halves the collision probability, the maximum throughput doubles from about 18.4% to 36.8%. The cost is that stations must be synchronized to slot boundaries.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 · 5 marks
Differentiate between Reliable & Unreliable connection with their application.
Answer
| Basis | Reliable (connection-oriented) | Unreliable (connectionless) |
|---|---|---|
| Connection | Connection is established before data transfer (e.g. three-way handshake) | No connection setup |
| Delivery guarantee | Acknowledgements, retransmission, sequencing and duplicate removal ensure data arrives correctly and in order | Best effort; packets may be lost, duplicated or reordered |
| Flow/congestion control | Present | Absent |
| Overhead and speed | High overhead, slower | Low overhead, faster |
| Example protocol | TCP | UDP, IP |
| Applications | Web (HTTP), email (SMTP), file transfer (FTP), remote login | DNS queries, VoIP, video streaming, online games, DHCP, SNMP |
Reliable service suits applications that cannot tolerate data loss; unreliable service suits real-time applications where delay matters more than occasional loss.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 · 5 marks
What is DNS? How it works?
Answer
DNS (Domain Name System): DNS is a distributed, hierarchical naming system that translates domain names (e.g. www.example.com) into IP addresses, so users need not remember numeric addresses. It runs on UDP/TCP port 53.
How it works (resolution):
- The user types a name; the application asks the local resolver (stub resolver in the OS), which first checks its cache.
- If not cached, the request goes to the local (recursive) DNS server of the ISP.
- This server queries a root server, which returns the address of the TLD server (e.g.
.com). - The TLD server returns the address of the authoritative name server of the domain.
- The authoritative server returns the IP address (A record).
- The local server caches the answer (for the TTL) and returns it to the client, which then connects to the IP address.
Queries can be recursive (the server resolves fully on behalf of the client) or iterative (the server returns a referral to another server). Caching reduces delay and traffic.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 · 5 marks
What is cryptography? Explain the principles of cryptography.
Answer
Cryptography: Cryptography is the science of securing information by transforming it into an unreadable form (ciphertext) so that only authorized parties can recover the original plaintext. Encryption converts plaintext to ciphertext using an algorithm and a key; decryption reverses it.
Principles (security goals):
- Confidentiality: Only the intended receiver can read the message; achieved by encryption.
- Integrity: The message is not altered in transit; achieved with hash functions and message authentication codes.
- Authentication: The identity of the sender (or receiver) is verified, using passwords, certificates or digital signatures.
- Non-repudiation: The sender cannot later deny having sent the message; provided by digital signatures.
- Availability (sometimes added): services remain accessible to authorized users.
Types: Symmetric-key cryptography uses one shared secret key (DES, AES). Asymmetric (public-key) cryptography uses a public/private key pair (RSA). The security of a good cipher depends on the secrecy of the key, not of the algorithm (Kerckhoffs' principle).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 · 5 marks
What is TCP? Describe TCP segment header.
Answer
TCP (Transmission Control Protocol): TCP is a connection-oriented, reliable, byte-stream transport protocol. It provides process-to-process delivery with connection establishment (three-way handshake), sequencing, acknowledgements, retransmission, flow control (sliding window) and congestion control.
TCP segment header (20 - 60 bytes):
| Field | Size | Purpose |
|---|---|---|
| Source port | 16 bits | Sending process |
| Destination port | 16 bits | Receiving process |
| Sequence number | 32 bits | Number of the first data byte in the segment |
| Acknowledgement number | 32 bits | Next byte expected by the receiver |
| Header length | 4 bits | In 4-byte words |
| Reserved | 6 bits | Future use |
| Control flags | 6 bits | URG, ACK, PSH, RST, SYN, FIN |
| Window size | 16 bits | Receive buffer space available (flow control) |
| Checksum | 16 bits | Error detection over header, data and pseudo-header |
| Urgent pointer | 16 bits | Offset of urgent data when URG is set |
| Options and padding | up to 40 bytes | MSS, window scale, timestamps, etc. |
The data follows the header.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 · 5 marks
Write short note on (Any Two):
a) Fragmentation
b) Channelization
c) VPN
Answer
(a) Fragmentation: Each physical network has a maximum transmission unit (MTU), the largest frame payload it can carry (e.g. 1500 bytes for Ethernet). When an IP datagram larger than the MTU of the next network must be forwarded, a router divides it into smaller fragments, each with its own IP header. The identification field is copied to all fragments, the fragment offset gives the position (in 8-byte units) and the MF flag is 1 for all but the last fragment. Reassembly is done only at the final destination. If the DF flag is set, the datagram is dropped and an ICMP error is returned. Fragmentation adds overhead and the loss of one fragment loses the whole datagram.
(c) VPN (Virtual Private Network): A VPN extends a private network across a public network (the Internet) using encryption and tunnelling (IPsec, SSL/TLS, L2TP). Remote users and branch offices get secure access to organizational resources with confidentiality, integrity and authentication, at lower cost than leased lines. Types: remote-access VPN and site-to-site VPN.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 · 10 marks
Classify and calculate the total number of Networks and Hosts per network in IPV4.
Answer
Classification of IPv4 addresses: IPv4 addresses are 32 bits and divided into five classes by the leading bits: A (0), B (10), C (110), D (1110, multicast) and E (1111, reserved). Classes A, B and C are used for hosts, with a different split between network ID and host ID.
Class A (8 network bits, 24 host bits; first bit fixed 0)
- Networks: (126 usable, since 0 and 127 are reserved)
- Hosts per network:
Class B (16 network bits, 16 host bits; first two bits 10)
- Networks:
- Hosts per network:
Class C (24 network bits, 8 host bits; first three bits 110)
- Networks:
- Hosts per network:
Class D and E: multicast addresses (D) and reserved addresses (E), with no network/host division.
Two host addresses per network are subtracted for the network address (all host bits 0) and the broadcast address (all host bits 1). The total address space is .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2021 · 10 marks
What is switching? Describe the types of switching with their advantages and disadvantages.
Answer
Switching: Switching is the technique of moving data from a source to a destination through intermediate nodes (switches), so that a direct link between every pair of devices is not needed. The three methods are circuit switching, message switching and packet switching.
1. Circuit switching: A dedicated end-to-end path is established (setup), used for the whole conversation, and released (teardown). Example: the telephone network.
- Advantages: fixed bandwidth, constant low delay, no reordering, suitable for real-time voice.
- Disadvantages: setup delay, unused capacity is wasted, inefficient for bursty data, one failure breaks the call.
2. Message switching: The whole message is stored at each node and forwarded when the next link is free (store-and-forward). Example: early telegraph/email relays.
- Advantages: no setup, better line utilization, messages can be queued, priorities possible.
- Disadvantages: nodes need large storage, long delays, unsuitable for interactive or real-time traffic.
3. Packet switching: The message is divided into small packets sent independently (store-and-forward). Datagram approach: each packet is routed separately and may arrive out of order (Internet). Virtual circuit approach: a logical path is set up first and all packets follow it (X.25, Frame Relay, ATM).
- Advantages: efficient bandwidth sharing, no dedicated path, robust to failures, lower storage than message switching.
- Disadvantages: variable delay and jitter, packets may be lost or reordered, header overhead, congestion possible.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2022 · 5 marks
What is digital signature and how it works?
Answer
Digital signature: A digital signature is an electronic equivalent of a handwritten signature that provides authentication (who sent the message), integrity (not altered) and non-repudiation (sender cannot deny). It uses public-key cryptography and a hash function.
How it works:
- Signing (sender): The sender computes a hash (message digest) of the message, e.g. with SHA-256. The digest is encrypted with the sender's private key; the result is the digital signature. The message and signature are sent together.
- Verification (receiver): The receiver decrypts the signature with the sender's public key to get the original digest, and independently computes the hash of the received message.
- If both digests match, the message is authentic and unchanged; otherwise it was tampered with or not signed by that sender.
Only the sender holds the private key, so only the sender could have produced the signature. Confidentiality is not provided unless the message itself is also encrypted (e.g. with the receiver's public key). Public keys are certified by a certificate authority.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2022 · 5 marks
Why do we need DNS when we can directly use an IP address? Explain the process to resolve the domain www.tribhuvan-university.edu.np?
Answer
Why DNS is needed: IP addresses (e.g. 103.69.126.10) are hard for people to remember and can change when a server moves or its provider changes, whereas names are meaningful and stable. DNS maps names to addresses, allows one name to map to several servers (load balancing), allows addresses to change without users noticing, and gives a scalable, distributed database for the whole Internet.
Resolving www.tribhuvan-university.edu.np:
- The browser checks its cache and the OS hosts file; if not found, it asks the local resolver (ISP DNS server), which checks its own cache.
- The resolver asks a root server, which refers it to the server for the
.npcountry-code TLD. - The
.npserver refers it to the server for.edu.np(the second-level domain). - The
.edu.npserver refers it to the authoritative name server oftribhuvan-university.edu.np. - The authoritative server returns the A record (IP address) for
www. - The resolver caches the result and returns the IP to the browser, which opens a TCP connection to it and sends the HTTP request.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2022 · 5 marks
What do you mean by IP datagram fragmentation?
Answer
IP datagram fragmentation: Each link-layer technology has a maximum transmission unit (MTU), e.g. 1500 bytes for Ethernet. If an IP datagram is larger than the MTU of the outgoing link, the router splits it into smaller fragments, each of which is a valid IP datagram with its own header, so that it can pass through the network.
Header fields involved:
- Identification: same value in all fragments of a datagram.
- Flags: DF (don't fragment) and MF (more fragments = 1 for all but the last fragment).
- Fragment offset: position of the fragment's data in the original datagram, in units of 8 bytes.
- Total length: length of each fragment.
Example: A 4000-byte datagram (20-byte header, 3980 data bytes) crossing an MTU of 1500 gives data per fragment of 1480 bytes (a multiple of 8): fragments with 1480, 1480 and 1020 data bytes, offsets 0, 185 and 370, MF = 1, 1, 0.
Fragments are reassembled only at the destination host. If any fragment is lost, the whole datagram must be retransmitted. If DF = 1 and fragmentation is needed, the router drops the datagram and sends an ICMP "fragmentation needed" message.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2022 · 5 marks
Explain the mechanism of bit and byte stuffing with suitable example.
Answer
Framing needs a way to mark frame boundaries even if the data contains the same pattern as the delimiter. Stuffing inserts extra bits/bytes so the receiver is not confused.
Bit stuffing (bit-oriented protocols, e.g. HDLC): The flag is 01111110. Whenever the sender sees five consecutive 1s in the data, it inserts a 0 after them. The receiver removes any 0 that follows five consecutive 1s.
Example: Data 0110111111011111
After stuffing (a 0 inserted after every run of five 1s): 011011111010111110.
The receiver, on seeing five 1s followed by a 0, deletes that 0 and recovers the original data. A real flag 01111110 has six 1s, so it cannot appear inside the stuffed data.
Byte (character) stuffing (byte-oriented protocols, e.g. PPP): Frames begin and end with a flag byte (e.g. FLAG). If the flag or the escape byte ESC appears in the data, the sender inserts an ESC byte before it. The receiver removes the ESC and treats the next byte as data.
Example: Data A FLAG B ESC C becomes A ESC FLAG B ESC ESC C; the receiver strips each escape and recovers A FLAG B ESC C.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2022 · 5 marks
Explain the causes of transmission impairment in data communication.
Answer
Transmission impairment is the degradation of a signal as it passes through a medium, so that the received signal differs from the transmitted one. The main causes are:
- Attenuation: The signal loses energy (as heat) while overcoming the resistance of the medium; the loss increases with distance and frequency. Measured in decibels, . Amplifiers and repeaters compensate for it.
- Distortion: The shape of a composite signal changes because its frequency components have different propagation speeds in the medium and arrive with different delays (delay distortion).
- Noise: Extra unwanted signals added during transmission:
- Thermal noise: random electron motion in conductors.
- Induced noise: from motors and appliances acting as antennas.
- Crosstalk: coupling between neighbouring wires.
- Impulse noise: short spikes from lightning or switching.
The effect of noise is judged by the signal-to-noise ratio, . These impairments cause bit errors and limit the achievable data rate (Shannon capacity ).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2022 · 5 marks
What is flow control? Explain Go-Back-N ARQ with suitable diagram.
Answer
Flow control: Flow control is a set of procedures that restricts the amount of data a sender may transmit before waiting for an acknowledgement, so that a fast sender does not overwhelm a slow receiver. Methods: stop-and-wait and sliding window.
Go-Back-N ARQ: A sliding-window protocol in which the sender may transmit up to frames (window size) without waiting for acknowledgement, where is the number of bits in the sequence number. The receiver window size is 1: it accepts only the frame in the expected order.
Operation:
- The sender sends frames continuously and keeps copies until they are acknowledged.
- The receiver sends cumulative ACKs (ACK n means all frames up to n-1 received).
- If a frame is lost or damaged, the receiver discards it and all following frames (it sends a NAK or stays silent).
- The sender's timer expires (or NAK arrives) and it goes back and retransmits that frame and all frames after it.
Diagram (window = 4, frame 2 lost):
Sender Receiver
Send 0 ------> accept, ACK 1
Send 1 ------> accept, ACK 2
Send 2 --X (lost)
Send 3 ------> discard (out of order)
Timeout for 2
Send 2 ------> accept, ACK 3
Send 3 ------> accept, ACK 4
Advantage: simple receiver, efficient pipelining. Disadvantage: one error causes retransmission of many good frames, wasting bandwidth.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2022 · 5 marks
Explain in detail about the structure of IPv6 address. Differentiate between IPv4 and IPv6 address.
Answer
Structure of an IPv6 address
An IPv6 address is 128 bits long. It is written as eight groups of four hexadecimal digits (16 bits each) separated by colons, for example:
2001:0DB8:0000:0000:0000:FF00:0042:8329
Abbreviation rules
- Leading zeros in a group may be dropped:
2001:DB8:0:0:0:FF00:42:8329. - One run of consecutive all-zero groups may be replaced by
::(only once):2001:DB8::FF00:42:8329.
Logical structure (global unicast address)
| Field | Size | Purpose |
|---|---|---|
| Global routing prefix | 48 bits | Assigned by the RIR/ISP to the organisation |
| Subnet ID | 16 bits | Identifies the subnet inside the site |
| Interface ID | 64 bits | Identifies the host (often derived from the MAC address, EUI-64) |
The prefix is written in CIDR style, e.g. 2001:DB8:1::/48. IPv6 has three address types: unicast (one interface), multicast (a group, prefix FF00::/8) and anycast (nearest member of a group). There is no broadcast. Special addresses include ::1 (loopback) and FE80::/10 (link-local).
Difference between IPv4 and IPv6
| Basis | IPv4 | IPv6 |
|---|---|---|
| Address length | 32 bits | 128 bits |
| Notation | Dotted decimal (192.168.1.1) | Colon-separated hexadecimal |
| Address space | About | About |
| Header | Variable (20-60 bytes), has checksum | Fixed 40 bytes, no checksum, extension headers |
| Fragmentation | By routers and sender | Only by the sender |
| Broadcast | Supported | Not supported (multicast used) |
| Configuration | Manual or DHCP | Auto-configuration (SLAAC) and DHCPv6 |
| Security | IPsec optional | IPsec built in to the design |
| QoS | Type of Service field | Traffic Class and Flow Label |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2022 · 10 marks
Explain how slotted Aloha improves the performance of system over pure Aloha. A bit stream of 100101010 is transmitted using CRC method. The generator polynomial is x³ + 1. Show the actual bit string transmitted and if fourth bit from LSB is altered, show the error detection in receiver side.
Answer
How slotted ALOHA improves on pure ALOHA
In pure ALOHA a station sends a frame whenever it has one, so a frame collides with any other frame that starts within one frame time before or after it. The vulnerable period is and throughput is
In slotted ALOHA time is divided into slots equal to one frame time , and a station may transmit only at the start of a slot. Frames either collide completely or not at all, so the vulnerable period shrinks to :
So the maximum throughput is doubled (18.4% to 36.8%), at the cost of needing clock synchronisation.
CRC problem
Data = 100101010 (9 bits). Generator = 1001 (degree 3, so append 3 zeros).
Dividend: 100101010000
Modulo-2 division by 1001:
- 1001 1001 = 0000, giving 000001010000
- At bit 5: 1010 1001 = 0011, giving 000000011000
- At bit 7: 1100 1001 = 0101, giving 000000001010
- At bit 8: 1010 1001 = 0011, giving 000000000011
Remainder (CRC) = 011.
Transmitted bit string = 100101010 011 = 100101010011
Check: dividing 100101010011 by 1001 leaves remainder 000, so it is valid.
Error case. Counting from the LSB (right end) the bits of 100101010011 are: position 1 = 1, position 2 = 1, position 3 = 0, position 4 = 0. Position 4 is 0 and is flipped to 1, so the received string is
100101011011
Dividing 100101011011 by 1001 gives remainder 001, which is non-zero. The receiver therefore detects that an error has occurred and discards the frame (asking for retransmission).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2022 · 10 marks
Why do we need layered protocol architecture? Discuss each layer of TCP/IP architecture along with function of each layer. Write the protocols used in each layer of TCP/IP.
Answer
Need for layered protocol architecture
- It breaks a complex communication task into smaller, manageable parts.
- Each layer offers a defined service to the layer above and uses the service of the layer below, so layers can be designed and tested independently.
- A layer's implementation can be changed (e.g. Ethernet to Wi-Fi) without affecting the others.
- It allows standardisation and interoperability between vendors.
- It makes troubleshooting and teaching easier.
Layers of the TCP/IP model
1. Application layer. Provides network services directly to user applications and combines the OSI application, presentation and session functions: data formatting, encoding, encryption, dialog control. Protocols: HTTP, HTTPS, FTP, SMTP, POP3, IMAP, DNS, DHCP, Telnet, SSH, SNMP, TFTP.
2. Transport layer. Gives end-to-end (process-to-process) delivery using port numbers: segmentation and reassembly, flow control, error control and connection management. Protocols: TCP (reliable, connection-oriented) and UDP (unreliable, connectionless).
3. Internet (network) layer. Logical addressing and routing of packets across networks, fragmentation, and error reporting. Protocols: IP (IPv4/IPv6), ICMP, ARP, RARP, IGMP, routing protocols (RIP, OSPF, BGP).
4. Network access (link + physical) layer. Handles physical addressing, framing, access to the medium, error detection and the actual transmission of bits. Protocols/technologies: Ethernet, Wi-Fi (IEEE 802.11), PPP, HDLC, Frame Relay, ATM, token ring.
Data is encapsulated as it moves down: data, segment/datagram, packet, frame, bits.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2022 · 10 marks
Why do we need subnetting? What is the new subnet mask? Write subnet ID and broadcast address of each subnet if you divide a class C network (192.6.3.0–192.6.3.255) into 4 different subnets?
Answer
Need for subnetting
- Reduces broadcast traffic by splitting one large broadcast domain into smaller ones.
- Uses IP addresses efficiently, avoiding waste of a whole class block.
- Improves security and administration, since each department or location gets its own subnet.
- Improves performance and makes fault isolation easier.
Dividing 192.6.3.0/24 into 4 subnets
This is a Class C network with default mask 255.255.255.0 (/24). Four subnets need , so borrowed host bits.
New prefix = .
New subnet mask = 255.255.255.192 (/26)
Block size = . Hosts per subnet = .
| Subnet | Subnet ID | Usable host range | Broadcast address |
|---|---|---|---|
| 1 | 192.6.3.0 | 192.6.3.1 - 192.6.3.62 | 192.6.3.63 |
| 2 | 192.6.3.64 | 192.6.3.65 - 192.6.3.126 | 192.6.3.127 |
| 3 | 192.6.3.128 | 192.6.3.129 - 192.6.3.190 | 192.6.3.191 |
| 4 | 192.6.3.192 | 192.6.3.193 - 192.6.3.254 | 192.6.3.255 |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 · 5 marks
Explain the features of TCP/IP reference model.
Answer
The TCP/IP reference model is the four-layer model on which the Internet is built (Application, Transport, Internet, Network access).
Features
- Four layers: application, transport, internet and network access, each with defined functions; it is simpler than the seven-layer OSI model.
- Protocol-oriented: the protocols (TCP, IP, etc.) were designed first and the model describes them.
- Open and vendor independent: it works on any hardware and operating system, and its standards are publicly available.
- Internetworking: IP connects different physical networks into one logical network using hierarchical addressing.
- End-to-end reliability: TCP provides reliable, ordered delivery with flow and congestion control, while UDP gives fast, connectionless delivery.
- Packet switching and connectionless internet layer: each datagram is routed independently, giving robustness (the network survives failure of links or nodes).
- Scalability and flexibility: supports a huge number of hosts, with new applications added easily.
- Client-server support: standard application protocols such as HTTP, FTP, SMTP and DNS run over it.
- Standard routing and naming: routing protocols and DNS provide global reachability and name resolution.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 · 5 marks
Define switching. Explain the types of switching.
Answer
Switching is the technique of moving data from a source to a destination through intermediate nodes (switches) of a network, selecting a path so that many devices can share the network resources without direct links between every pair.
Types of switching
1. Circuit switching. A dedicated physical path is set up between sender and receiver before data transfer (setup, data transfer, teardown), and the path is reserved for the whole call. It gives constant delay and guaranteed bandwidth but wastes capacity when idle and has a connection set-up delay. Example: traditional telephone network.
2. Message switching. The whole message is stored at each node and then forwarded (store-and-forward). No dedicated path is needed, but there are large delays and big buffers are needed.
3. Packet switching. The message is divided into small packets which are sent independently and reassembled at the destination. Bandwidth is shared efficiently. It has two forms:
- Datagram: each packet is routed independently, with no set-up; packets may arrive out of order (the Internet/IP).
- Virtual circuit: a logical path is set up first and all packets follow it, carrying a virtual-circuit identifier (X.25, Frame Relay, ATM).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 · 5 marks
Explain the ALOHA with its performance.
Answer
ALOHA is a random-access multiple-access protocol, developed at the University of Hawaii, in which any station may transmit whenever it has data. There is no carrier sensing.
Pure ALOHA
- A station sends a frame at any time and waits for an acknowledgement for a time-out of about propagation delay.
- If no ACK arrives, the station assumes a collision, waits a random back-off time and retransmits.
- A frame of duration collides with any frame starting within before or after it, so the vulnerable time is .
where is the average number of frames generated per frame time and is the throughput. Maximum throughput is at : (18.4%).
Slotted ALOHA
- Time is divided into slots of length and stations may transmit only at the start of a slot (synchronised clocks).
- Collisions are complete or absent, so the vulnerable time is .
Maximum throughput is at : (36.8%).
Performance: ALOHA is simple but inefficient, since at best only 18.4% (pure) or 36.8% (slotted) of the channel capacity is used. At heavy load collisions increase and throughput falls.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 · 5 marks
Define IP Address. Explain the classes of IPv4.
Answer
IP address: An IP address is a unique logical address assigned to each host interface in a TCP/IP network to identify it and to allow routing of packets. IPv4 uses 32 bits, written as four decimal octets (dotted decimal), e.g. 192.168.10.5. It has two parts: network ID and host ID.
Classes of IPv4 (classful addressing)
| Class | First octet range | Leading bits | Default mask | Network/Host bits | Use |
|---|---|---|---|---|---|
| A | 1 - 126 | 0 | 255.0.0.0 | 8 / 24 | Very large networks ( hosts) |
| B | 128 - 191 | 10 | 255.255.0.0 | 16 / 16 | Medium networks (65,534 hosts) |
| C | 192 - 223 | 110 | 255.255.255.0 | 24 / 8 | Small networks (254 hosts) |
| D | 224 - 239 | 1110 | - | - | Multicast |
| E | 240 - 255 | 1111 | - | - | Reserved / experimental |
Class A has about 126 networks, Class B 16,384 and Class C about 2 million. The address 127.x.x.x is reserved for loopback. Private ranges are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 · 5 marks
Differentiate between the functions of TCP and UDP.
Answer
TCP and UDP are the two transport-layer protocols of the TCP/IP suite. Both use port numbers to deliver data to the correct process.
| Basis | TCP | UDP |
|---|---|---|
| Full form | Transmission Control Protocol | User Datagram Protocol |
| Connection | Connection-oriented (three-way handshake) | Connectionless |
| Reliability | Reliable: acknowledgements, retransmission, ordered delivery | Unreliable: no ACK, no retransmission |
| Flow and congestion control | Yes (sliding window) | No |
| Error checking | Checksum plus recovery | Checksum only (optional in IPv4), no recovery |
| Data unit | Byte stream segmented into segments | Message-oriented datagrams |
| Header size | 20-60 bytes | 8 bytes |
| Speed | Slower, higher overhead | Faster, low overhead |
| Broadcast/multicast | Not supported | Supported |
| Typical uses | HTTP, FTP, SMTP, SSH | DNS, DHCP, VoIP, video streaming, TFTP, SNMP |
TCP is chosen where accuracy matters, UDP where speed and low delay matter more than perfect delivery.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 · 5 marks
Explain the role of DHCP, FTP and HTTP Protocols.
Answer
DHCP (Dynamic Host Configuration Protocol). An application-layer protocol (UDP ports 67 server and 68 client) that automatically gives hosts an IP address, subnet mask, default gateway and DNS server. It uses the four-step DORA process: Discover, Offer, Request, Acknowledge. Addresses are leased for a fixed time and may be renewed. This avoids manual configuration and IP conflicts and makes administration of large networks easy.
FTP (File Transfer Protocol). An application-layer protocol that transfers files between a client and a server over TCP. It uses two connections: a control connection (port 21) for commands and replies, and a data connection (port 20) for the file itself. It supports authentication with username and password, upload (put), download (get), directory listing and transfer modes (ASCII/binary, active/passive). It is reliable because it runs over TCP, but sends data in plain text unless FTPS/SFTP is used.
HTTP (HyperText Transfer Protocol). The protocol of the World Wide Web. A browser (client) sends a request (GET, POST, PUT, DELETE) to a web server over TCP (port 80; HTTPS on 443 adds TLS encryption) and the server returns a response with a status code (e.g. 200 OK, 404 Not Found) and the web page or resource. HTTP is stateless; cookies and sessions are used to keep state.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 · 5 marks
Write short notes on (any two):
a) RSA
b) CRC
c) Firewall
Answer
(a) RSA
RSA (Rivest-Shamir-Adleman) is a public-key (asymmetric) cryptosystem. Its security rests on the difficulty of factoring the product of two large primes. It uses a public key to encrypt and a private key to decrypt, and is also used for digital signatures.
Key generation:
- Choose two large primes and .
- Compute and .
- Choose with and .
- Compute such that .
Public key = , private key = .
Example: , so , , , . For : , and .
(b) CRC
Cyclic Redundancy Check is an error-detecting code used at the data link layer. The sender and receiver agree on a generator polynomial of degree . The sender appends zeros to the data, divides by the generator using modulo-2 division, and appends the remainder (CRC) to the data. The receiver divides the received frame by the same generator: a zero remainder means no error, otherwise the frame is discarded. CRC detects all single-bit errors, all burst errors shorter than bits and most longer bursts, and is easy to implement in hardware (shift registers with XOR).
(c) Firewall
A firewall is a hardware or software system placed between a trusted internal network and an untrusted network (the Internet) that filters traffic according to security rules. Types: packet-filter firewall (checks IP addresses, ports, protocol), stateful inspection firewall (tracks connection state), application-level/proxy firewall (inspects application data) and next-generation firewalls. It protects against unauthorised access, hides internal addresses (with NAT), and logs traffic, but it cannot protect against attacks that bypass it or against insider threats.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 · 10 marks
Explain transmission media with their major characteristics.
Answer
Transmission media are the physical paths over which signals travel from sender to receiver. They are of two types: guided (wired) and unguided (wireless).
A. Guided media
1. Twisted pair cable. Two insulated copper wires twisted together to reduce interference. UTP (unshielded) is cheap and used in LANs (Cat5e/Cat6, up to 100 m, 100 Mbps to 10 Gbps); STP (shielded) has better noise immunity but is costlier. Easy to install, but limited distance and bandwidth and susceptible to noise.
2. Coaxial cable. A central copper conductor, insulator, metal shield and outer jacket. It has higher bandwidth and better noise immunity than twisted pair and is used in cable TV and older Ethernet (10Base2/10Base5). It is bulkier and costlier.
3. Optical fibre. Data is sent as light pulses through a glass or plastic core with cladding using total internal reflection. Types: single-mode (long distance, tens of km) and multi-mode (shorter). It has very high bandwidth (Gbps-Tbps), low attenuation, immunity to electromagnetic interference and high security, but is expensive and harder to install and splice.
B. Unguided media
1. Radio waves (3 kHz - 1 GHz): omnidirectional, penetrate walls, used in radio, FM/TV broadcasting, mobile phones, Wi-Fi.
2. Microwaves (1 - 300 GHz): unidirectional and line-of-sight, need towers every 40-50 km, used for point-to-point links, satellite and cellular systems. Affected by rain and obstacles.
3. Infrared (300 GHz - 400 THz): short range, cannot pass through walls, used in remote controls and short-range device links.
4. Satellite. Uses microwaves via geostationary or low-orbit satellites for wide area coverage, but has a high propagation delay (about 250 ms for GEO).
Major characteristics for comparison: bandwidth/data rate, attenuation and maximum distance, immunity to noise, cost, ease of installation, security and reliability.
| Medium | Speed | Distance | Cost | Noise immunity |
|---|---|---|---|---|
| UTP | up to 10 Gbps | 100 m | Low | Low |
| Coaxial | up to ~1 Gbps | hundreds of m | Medium | Medium |
| Fibre | Tbps | many km | High | Very high |
| Wireless | varies | varies | Medium | Low |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 · 10 marks
a) Differentiate between static and dynamic routing with suitable example.
b) Define Subnetting. Calculate total number of subnets and hosts per subnet for Network Address 192.168.20.0 and subnet mask is 255.255.255.128
Answer
(a) Static vs dynamic routing
| Basis | Static routing | Dynamic routing |
|---|---|---|
| Configuration | Routes entered manually by the administrator | Routes learned automatically using routing protocols |
| Adaptation to change | Does not adapt to link failure or topology change | Updates automatically when the topology changes |
| Overhead | No routing traffic, little CPU/memory | Routing updates use bandwidth, CPU and memory |
| Scalability | Suitable for small networks | Suitable for large, complex networks |
| Security | More secure, no route exchange | Less secure unless authenticated |
| Cost/complexity | Simple to set up | More complex; needs knowledge of protocols |
| Example | ip route 192.168.2.0 255.255.255.0 10.0.0.2 on a stub network or default route | RIP, OSPF, EIGRP, BGP |
Example: a small office with one connection to an ISP uses a static default route. A large company with many routers uses OSPF so that if a link fails traffic is rerouted automatically.
(b) Subnetting
Subnetting is dividing a single IP network into smaller sub-networks by borrowing bits from the host part, using a longer subnet mask.
Network 192.168.20.0 with mask 255.255.255.128: 128 = 10000000, so one bit is borrowed from the host part of a Class C (/24), giving /25.
- Number of subnets = (192.168.20.0 and 192.168.20.128).
- Host bits remaining = , so hosts per subnet = .
| Subnet | Hosts | Broadcast |
|---|---|---|
| 192.168.20.0 | .1 - .126 | .127 |
| 192.168.20.128 | .129 - .254 | .255 |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 · 10 marks
Write the services provided by Transmission Control Protocol. Explain the TCP header segment in detail.
Answer
Services provided by TCP
- Process-to-process communication using port numbers.
- Stream delivery: the application data is treated as a stream of bytes, segmented by TCP.
- Connection-oriented service: a connection is established (three-way handshake) and closed (FIN exchange).
- Reliable delivery: sequence numbers, acknowledgements, checksum and retransmission of lost segments.
- Ordered delivery of data to the application.
- Flow control using the sliding window (receiver window size).
- Congestion control (slow start, congestion avoidance, fast retransmit).
- Full-duplex communication, with multiplexing and demultiplexing.
TCP segment header (minimum 20 bytes, maximum 60 bytes)
| Field | Size | Purpose |
|---|---|---|
| Source port | 16 bits | Port of sending process |
| Destination port | 16 bits | Port of receiving process |
| Sequence number | 32 bits | Number of the first data byte in the segment |
| Acknowledgement number | 32 bits | Next byte expected by the receiver |
| Header length (HLEN) | 4 bits | Header size in 32-bit words (5 to 15) |
| Reserved | 6 bits | For future use |
| Control flags | 6 bits | URG, ACK, PSH, RST, SYN, FIN |
| Window size | 16 bits | Bytes the receiver is willing to accept (flow control) |
| Checksum | 16 bits | Error detection over header, data and pseudo-header |
| Urgent pointer | 16 bits | Offset of urgent data when URG is set |
| Options and padding | up to 40 bytes | MSS, window scale, timestamps, etc. |
Flags: URG urgent data, ACK acknowledgement field valid, PSH push data immediately, RST reset the connection, SYN synchronise sequence numbers (connection set-up), FIN terminate the connection. The data (payload) follows the header.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2024 · 5 marks
Why layered architecture is required in Computer Network?
Answer
Layered architecture divides the huge task of network communication into a set of smaller, well-defined layers. It is required for the following reasons.
- Reduces complexity: each layer solves one specific problem, so the system is easier to design, understand and implement.
- Modularity and independence: a layer only uses the services of the layer below and provides services to the layer above, so changes in one layer (e.g. replacing the physical medium) do not affect the others.
- Standardisation and interoperability: standard interfaces let products of different vendors work together.
- Easier troubleshooting and testing: faults can be located to a particular layer.
- Easier development and upgrades: new protocols can be developed for a single layer independently.
- Encapsulation: each layer adds its own header, so it only needs to know its own protocol.
- Teaching and learning: a common reference such as the OSI or TCP/IP model makes networks easier to describe.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2024 · 5 marks
What is switching? Explain different switching technology.
Answer
Switching is the method of forwarding data from a source to a destination through a network of intermediate nodes so that communication links can be shared by many users instead of connecting every pair of devices directly.
Switching technologies
1. Circuit switching. A dedicated end-to-end path is established before communication (set-up, data transfer, release). Bandwidth is reserved for the whole call, so delay is constant and there is no reordering, but resources are wasted during idle periods and set-up takes time. Used in the telephone network (PSTN).
2. Packet switching. Data is broken into packets that are sent independently and share links (statistical multiplexing). It is efficient and robust but has variable delay.
- Datagram approach: each packet carries full destination address and may take a different route (IP).
- Virtual-circuit approach: a logical path is set up first and packets carry a short VC identifier and follow the same route (ATM, Frame Relay, X.25, MPLS).
3. Message switching. The complete message is stored and forwarded node to node; no dedicated path but long delays and large storage are needed. It is rarely used today (e.g. early telegraph and email relays).
| Basis | Circuit | Packet |
|---|---|---|
| Path | Dedicated | Shared |
| Set-up | Required | Not needed (datagram) |
| Efficiency | Low | High |
| Delay | Constant | Variable |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2024 · 5 marks
Define point to point protocol. Explain the PPP frame formats.
Answer
Point-to-Point Protocol (PPP) is a data link layer protocol (byte-oriented, derived from HDLC) used to connect two nodes directly, as in dial-up, DSL or leased lines to an ISP. It provides framing, error detection, link configuration through LCP (Link Control Protocol), authentication (PAP, CHAP) and network-layer configuration through NCPs (e.g. IPCP for IP address assignment). It supports multiple network protocols over the same link, but it provides no flow control and no error correction.
PPP frame format
| Flag | Address | Control | Protocol | Payload | FCS | Flag |
|---|---|---|---|---|---|---|
| 1 byte | 1 byte | 1 byte | 1-2 bytes | variable | 2 or 4 bytes | 1 byte |
- Flag (01111110): marks the start and end of the frame.
- Address (11111111): broadcast address, since there is only one receiver.
- Control (00000011): indicates an unnumbered frame (no sequence or flow control).
- Protocol: identifies what the payload carries (e.g. 0x0021 for IP, 0xC021 for LCP, 0xC023 for PAP, 0xC223 for CHAP).
- Payload: user data or control information, default maximum 1500 bytes.
- FCS: frame check sequence, CRC for error detection.
Byte stuffing is used: if the flag pattern or escape byte (01111101) appears in the data, an escape byte is inserted before it.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2024 · 5 marks
Suppose you are given an IP address 193.169.0.0, perform subnetting and divide the given network in 5 subnets. What is the new subnet mask? Calculate broadcast, network address, range of IP address that can be assigned to the host in each subnet.
Answer
Given: 193.169.0.0. The first octet 193 makes this a Class C address with default mask 255.255.255.0 (/24).
Number of subnet bits: 5 subnets need , so (giving 8 possible subnets, of which 5 are used).
New prefix = .
New subnet mask = 255.255.255.224 (/27)
Block size = . Host bits = , so usable hosts per subnet = .
| Subnet | Network address | Usable host range | Broadcast address |
|---|---|---|---|
| 1 | 193.169.0.0 | 193.169.0.1 - 193.169.0.30 | 193.169.0.31 |
| 2 | 193.169.0.32 | 193.169.0.33 - 193.169.0.62 | 193.169.0.63 |
| 3 | 193.169.0.64 | 193.169.0.65 - 193.169.0.94 | 193.169.0.95 |
| 4 | 193.169.0.96 | 193.169.0.97 - 193.169.0.126 | 193.169.0.127 |
| 5 | 193.169.0.128 | 193.169.0.129 - 193.169.0.158 | 193.169.0.159 |
The remaining three subnets (193.169.0.160, .192 and .224) are unused and available for future growth.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2024 · 5 marks
Explain the working mechanism of Digital Signature algorithm with suitable diagram.
Answer
A digital signature provides authentication of the sender, integrity of the message and non-repudiation. The Digital Signature Algorithm (DSA) (standard DSS) is a public-key scheme used only for signing, not for encryption.
Parameters and keys
- Global parameters: a prime , a prime that divides , and a generator .
- Private key: a random with .
- Public key: .
Signature generation (sender)
- Compute the hash of the message (e.g. SHA-256).
- Choose a random per-message secret , .
- Compute .
- Compute .
- The signature is the pair , sent together with .
Signature verification (receiver)
- Compute .
- and .
- .
- If the signature is valid; otherwise the message or signature has been altered.
Diagram
SENDER RECEIVER
Message M --> Hash H(M) --+ Message M --> Hash H(M) --+
v v
private key x, k --> [ Sign ] --> (r,s) --> public key y --> [ Verify ] --> v = r ?
M + (r,s) --------- network ---------> M + (r,s) yes: valid / no: reject
Only the owner of the private key can create a valid , while anyone with the public key can verify it. A change of even one bit of changes the hash, so verification fails.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2024 · 5 marks
Explain the various congestion control approaches.
Answer
Congestion occurs when the load offered to a network exceeds its capacity, causing queues to build, packets to be delayed or dropped, and throughput to fall. Congestion control approaches fall into two broad groups.
1. Open-loop (prevention) policies. They try to avoid congestion before it happens, by good design, with no feedback from the network.
- Retransmission policy (timers set appropriately), window policy (selective repeat instead of go-back-N), acknowledgement policy.
- Discard policy at routers (drop less important packets first).
- Admission policy (virtual-circuit admission control).
- Traffic shaping: smoothing bursty traffic with the leaky bucket (output at a constant rate, extra packets queued or dropped) and token bucket (tokens accumulate so that bursts up to the bucket size are allowed).
2. Closed-loop (removal) policies. They react after congestion is detected, using feedback.
- Backpressure: a congested node tells the upstream node to slow down, hop by hop.
- Choke packet: a congested router sends a choke packet directly to the source asking it to reduce its rate.
- Implicit signalling: the source infers congestion from delays or lost packets (used by TCP).
- Explicit signalling: a router sets bits in packets (e.g. ECN, FECN/BECN in Frame Relay) to notify the source or destination.
- TCP congestion control: slow start, congestion avoidance (additive increase) and multiplicative decrease on loss, fast retransmit and fast recovery.
- Load shedding: routers drop packets when overloaded (e.g. Random Early Detection, RED).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2024 · 5 marks
Write short notes on :
a) FDDI
b) IPSEC
Answer
(a) FDDI (Fiber Distributed Data Interface)
FDDI is a high-speed LAN/MAN standard (ANSI X3T9.5) using optical fibre at 100 Mbps over distances up to 100 km, with up to 500 stations and 2 km between stations.
- Topology: a dual counter-rotating ring (primary and secondary). The secondary ring is a backup: if a link or station fails the ring wraps and keeps working.
- Access method: token passing. A station that captures the token sends frames, then releases the token (early token release), giving deterministic access.
- Station types: Class A (dual attached, connected to both rings) and Class B (single attached, via a concentrator).
- Uses 4B/5B encoding with NRZI.
- Advantages: high speed, fault tolerance, immunity to noise and security. Disadvantages: costly, and largely replaced by Fast and Gigabit Ethernet.
(b) IPsec (IP Security)
IPsec is a suite of protocols that secures communication at the network layer by authenticating and/or encrypting IP packets. It is the basis of VPNs.
- AH (Authentication Header): provides integrity, data origin authentication and anti-replay (no encryption).
- ESP (Encapsulating Security Payload): provides confidentiality (encryption) as well as integrity and authentication.
- IKE (Internet Key Exchange): negotiates keys and sets up Security Associations (SAs).
- Modes: transport mode (protects only the payload, host to host) and tunnel mode (protects the entire original IP packet inside a new IP packet, gateway to gateway).
- It is transparent to applications and works with both IPv4 and IPv6.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2024 · 10 marks
Define flow control and explain the Go-Back-N ARQ protocol with an appropriate example. How does it differ from the Stop-and-Wait ARQ protocol?
Answer
Flow control is the set of procedures that restrict the amount of data a sender may transmit before it must wait for an acknowledgement, so that a fast sender does not overwhelm a slow receiver. It is implemented at the data link and transport layers using sliding window protocols and ARQ.
Go-Back-N ARQ
It is a sliding-window protocol in which the sender may send up to frames (window size) without waiting for acknowledgement, while the receiver has a window of size 1.
- Frames are numbered with sequence numbers using bits; the sender window size is at most .
- The sender keeps all unacknowledged frames in a buffer and starts a timer.
- The receiver accepts only the frame it expects in order. If a frame is lost or damaged, it discards that frame and all later frames and sends no ACK for them.
- ACKs are cumulative: ACK means all frames before have been received.
- On time-out (or NAK) the sender goes back and retransmits the lost frame and all frames after it.
Example (, window = 4, frames 0 to 5, frame 2 is lost):
- The sender sends frames 0, 1, 2, 3. The receiver gets 0 and 1 and sends ACK 1 and ACK 2 (next expected).
- Frame 2 is lost. Frame 3 arrives out of order and is discarded.
- The sender's timer for frame 2 expires, so it goes back and resends 2, 3, 4, 5.
- The receiver accepts them in order and sends ACKs, completing the transfer. Frame 3 was transmitted twice although it was received correctly.
Difference from Stop-and-Wait ARQ
| Basis | Stop-and-Wait ARQ | Go-Back-N ARQ |
|---|---|---|
| Sender window | 1 frame | Up to frames |
| Receiver window | 1 | 1 |
| Channel utilisation | Low, especially with long delay | High; pipelined transmission |
| Retransmission | Only the lost frame | The lost frame and all following frames |
| Sequence numbers | 1 bit (0/1) | bits |
| Buffer at sender | One frame | frames |
| Complexity | Simple | More complex |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2024 · 10 marks
Explain how slotted Aloha improves over pure Aloha. What do you mean by multiple access protocol? Explain channelization protocol in detail.
Answer
Slotted ALOHA over pure ALOHA
In pure ALOHA a station may transmit at any instant, so a frame of duration is vulnerable to collision from frames that start in the interval of length around it:
In slotted ALOHA time is divided into slots of length and transmission begins only at slot boundaries. The vulnerable period falls to and collisions are total or none:
So slotted ALOHA doubles the maximum throughput, but requires synchronised clocks.
Multiple access protocol
When several stations share a single broadcast channel, the data link layer needs rules to decide who may transmit and when, to avoid or resolve collisions. These rules are called multiple access protocols (MAC protocols). They are of three kinds: random access (ALOHA, CSMA, CSMA/CD, CSMA/CA), controlled access (reservation, polling, token passing) and channelization.
Channelization protocols
Channelization divides the available bandwidth of the link among the stations in time, frequency or code, so that every station has its own share and there are no collisions.
1. FDMA (Frequency Division Multiple Access). The bandwidth is divided into frequency bands, one per station, which transmits continuously in its own band. Guard bands separate the channels to prevent interference. Used in analog radio and first-generation cellular systems.
2. TDMA (Time Division Multiple Access). The channel is divided into time slots grouped into frames, and each station transmits only in its own slot, using the full bandwidth. Needs synchronisation and guard times. Used in GSM.
3. CDMA (Code Division Multiple Access). All stations transmit at the same time over the same frequency band, each using a unique orthogonal code (chip sequence). The receiver recovers the data by taking the inner product of the received signal with the sender's code. Orthogonality means
Example: with codes and , if station 1 sends bit 1 and station 2 sends bit 0, the channel carries ; multiplying by gives (bit 1) and by gives (bit 0). CDMA offers soft capacity and resistance to jamming and is used in 3G systems.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2024 · 10 marks
Explain the importance of routing algorithm. Explain Distance Vector Routing algorithm with example and compare it with link state routing.
Answer
Importance of routing algorithms
The routing algorithm is the part of the network layer that decides the output line on which an incoming packet should be forwarded to reach its destination. It is important because it:
- finds the best (least cost, shortest or fastest) path;
- adapts to topology changes and link or router failures;
- balances load and avoids congestion;
- ensures delivery of packets and prevents loops;
- scales a network with many routers.
Distance Vector routing
Each router keeps a table (vector) giving the best known distance to every destination and the next hop. Periodically each router sends its entire table to its directly connected neighbours only. A router updates its table using the Bellman-Ford equation:
Example. Routers A, B, C, D with link costs A-B = 2, A-C = 5, B-C = 1, B-D = 4, C-D = 2.
Initially A knows only neighbours: B = 2, C = 5, D = .
After A receives B's vector (B-C = 1, B-D = 4), it computes C via B = and D via B = . After receiving C's vector (C-D = 2, now C is at distance 3 from A) it improves D to .
Final table at A:
| Destination | Cost | Next hop |
|---|---|---|
| B | 2 | B |
| C | 3 | B |
| D | 5 | B |
The tables converge after a few exchanges. DV suffers from slow convergence and the count-to-infinity problem, reduced by split horizon, poison reverse and hold-down timers. Example protocol: RIP.
Comparison with link state routing
| Basis | Distance Vector | Link State |
|---|---|---|
| Information shared | Whole routing table | Only link-state of own links |
| Sent to | Neighbours only | All routers (flooding) |
| Knowledge | Knows only distance and direction | Complete topology map |
| Algorithm | Bellman-Ford | Dijkstra shortest path first |
| Convergence | Slow, count-to-infinity problem | Fast, loop-free |
| Overhead | Periodic updates, more bandwidth | Updates only on change, but more CPU and memory |
| Suitable for | Small networks | Large networks |
| Protocols | RIP, IGRP | OSPF, IS-IS |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 · 5 marks
What is a computer network? Explain network architecture with an example.
Answer
Computer network
A computer network is a collection of two or more interconnected computing devices (computers, printers, servers, phones) that can exchange data and share resources such as files, printers and an Internet connection, using wired or wireless links and agreed protocols. Its main goals are resource sharing, communication, reliability and cost saving.
Network architecture
Network architecture is the design of a network: how its components are arranged and what rules govern communication. It has three aspects.
1. Logical architecture (layered protocol model): the communication task is divided into layers such as OSI (7 layers) or TCP/IP (4 layers), each providing services to the layer above.
2. Structural architecture (how hosts relate):
- Client-server: dedicated servers provide services (web, files, e-mail) to many clients. It gives centralised control and security.
- Peer-to-peer (P2P): every computer acts as both client and server and shares resources directly. It is cheap and simple but less secure.
3. Physical architecture (topology and scale): bus, star, ring, mesh or hybrid layout, and classification by size: PAN, LAN, MAN and WAN.
Example. A college LAN has computers connected in a star topology to a switch. A file server and a web server provide services to the student PCs (client-server). The switch connects to a router, which connects the campus to the ISP and the Internet. The devices communicate using TCP/IP: a student opens a web page with HTTP (application layer), carried by TCP (transport), addressed with IP (network), and sent as Ethernet frames over twisted-pair cable (link/physical).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 · 5 marks
Compare and write about the OSI model and TCP/IP models.
Answer
OSI model: The Open Systems Interconnection (OSI) model is a seven-layer reference model by ISO that describes how data moves from one host to another. From top to bottom the layers are:
- Application - network services to the user (HTTP, FTP, SMTP).
- Presentation - translation, encryption and compression of data.
- Session - establishes, manages and terminates sessions, with synchronisation.
- Transport - end-to-end delivery, segmentation, flow and error control (TCP, UDP).
- Network - logical addressing and routing (IP).
- Data link - framing, MAC addressing, error detection, access control.
- Physical - transmission of raw bits over the medium.
TCP/IP model: A four-layer practical model on which the Internet is built: Application (covers OSI application, presentation and session), Transport (TCP/UDP), Internet (IP, ICMP, ARP, routing) and Network access / Link (covers OSI data link and physical).
Comparison:
| Basis | OSI model | TCP/IP model |
|---|---|---|
| Layers | 7 | 4 (some texts use 5) |
| Development | Developed by ISO as a general reference model | Developed by DARPA for the ARPANET/Internet |
| Approach | Protocol independent; model came first, protocols later | Protocols came first, model described them |
| Session/presentation | Separate layers | Merged into the application layer |
| Transport service | Connection-oriented only at the transport layer | Both TCP (connection-oriented) and UDP (connectionless) |
| Network layer | Supports both connection-oriented and connectionless | Connectionless (IP) only |
| Use | Mainly a teaching and reference tool | Actually used in practice |
| Strictness | Strict layering | Less strict, more flexible |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 · 5 marks
What is multiplexing? Explain different types of multiplexing.
Answer
Multiplexing: Multiplexing is the technique of combining several signals or data streams from different sources into one signal that is sent over a single shared link or medium. At the receiver a demultiplexer (DEMUX) separates the combined signal back into the original streams. It uses the bandwidth of an expensive link efficiently and reduces cabling cost.
Types of multiplexing:
1. Frequency Division Multiplexing (FDM) - An analog technique. The total bandwidth of the link is divided into non-overlapping frequency bands; each signal modulates a different carrier and occupies its own band. Guard bands separate adjacent channels to avoid interference. All signals are transmitted simultaneously. Examples: radio and television broadcasting, cable TV.
2. Wavelength Division Multiplexing (WDM) - FDM applied to optical fibre. Light signals of different wavelengths (colours) are combined onto one fibre using a prism-like multiplexer and separated at the receiver. Dense WDM (DWDM) packs many channels into one fibre.
3. Time Division Multiplexing (TDM) - A digital technique. The time on the link is divided into slots, and each source gets a slot in turn; the whole bandwidth is used by one source at a time.
- Synchronous TDM: each source has a fixed slot in every frame, even if it has nothing to send, so capacity can be wasted. Used in T-1 lines.
- Statistical (asynchronous) TDM: slots are given only to sources that have data, with an address added to each slot, so the link is used more efficiently.
4. Code Division Multiplexing (CDM/CDMA) - All users transmit at the same time over the same frequency band, each using a unique spreading code. The receiver recovers a signal by correlating with the corresponding code. Used in mobile networks.
| FDM | TDM |
|---|---|
| Analog signals, frequency shared | Digital signals, time shared |
| Signals sent simultaneously | Signals sent one after another in slots |
| Needs guard bands | Needs guard times and synchronisation |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 · 5 marks
What are the different types of error detection codes? Write about Hamming code.
Answer
Error detection codes: Errors in transmitted data are detected by adding redundant bits to the data. The main techniques are:
- Parity check (VRC) - one parity bit is added so that the number of 1s is even (even parity) or odd (odd parity). It detects all single-bit errors but fails if an even number of bits change.
- Longitudinal Redundancy Check (LRC / two-dimensional parity) - data is arranged in rows and columns and a parity bit is calculated for each row and each column. It detects more burst errors than simple parity.
- Checksum - the data is divided into equal-sized segments, summed using one's complement arithmetic, and the complement of the sum is sent as the checksum. The receiver adds all segments plus the checksum; the result must be all 1s. Used in IP, TCP and UDP.
- Cyclic Redundancy Check (CRC) - the data is divided (modulo-2) by an agreed generator polynomial and the remainder is appended. It detects burst errors very reliably.
- Hamming code - a code that can detect and also correct errors.
Hamming code: Developed by R. W. Hamming, it adds parity (redundant) bits to data bits so that single-bit errors can be located and corrected. The number of parity bits must satisfy
Parity bits are placed at positions that are powers of 2 (1, 2, 4, 8, ...). Parity bit checks all positions whose binary representation has bit set (for example checks 1, 3, 5, 7; checks 2, 3, 6, 7; checks 4, 5, 6, 7).
Example (even parity, 4 data bits 1011): , so and the code is 7 bits: with .
- covers positions 1,3,5,7: gives
- covers 2,3,6,7: gives
- covers 4,5,6,7: gives
Transmitted codeword: 0110011.
Error correction: Suppose bit 6 flips and 0110001 is received. The receiver recomputes the checks: over (1,3,5,7) = 0, over (2,3,6,7) = 1, over (4,5,6,7) = 1. The syndrome gives the position of the erroneous bit, which is then inverted to restore the data.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 · 5 marks
Write the difference between CSMA/CD and CSMA/CA.
Answer
Both CSMA/CD and CSMA/CA are carrier sense multiple access methods used by the MAC sublayer so that stations can share a common channel, but they handle collisions differently.
- CSMA/CD (Collision Detection) - a station listens before sending; if the channel is idle it transmits and keeps listening. If a collision is detected, it stops, sends a jam signal and retries after a random back-off time. Used in wired Ethernet (IEEE 802.3).
- CSMA/CA (Collision Avoidance) - a station tries to avoid collisions before they happen, using inter-frame spacing, random back-off, and optionally RTS/CTS handshaking and acknowledgements. Used in wireless LAN (IEEE 802.11).
| Basis | CSMA/CD | CSMA/CA |
|---|---|---|
| Full form | Carrier Sense Multiple Access with Collision Detection | Carrier Sense Multiple Access with Collision Avoidance |
| Strategy | Detects a collision after it occurs and recovers | Avoids a collision before it occurs |
| Network type | Wired (Ethernet) | Wireless (Wi-Fi) |
| Collision detection | Possible, since a station can listen while sending | Not possible in wireless, since a transmitter cannot sense collisions while sending |
| Mechanism | Jam signal and binary exponential back-off | Inter-frame space, contention window, RTS/CTS, ACK |
| Acknowledgement | Not needed | Required for each frame |
| Overhead | Lower | Higher |
| Standard | IEEE 802.3 | IEEE 802.11 |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 · 5 marks
Write the function of the network layer. Write about the TCP header.
Answer
Functions of the network layer: The network layer (layer 3) delivers packets from the source host to the destination host, possibly across many networks.
- Logical addressing: adds the IP addresses of the sender and receiver to each packet.
- Routing: chooses the best path from source to destination using routers and routing algorithms/protocols (RIP, OSPF, BGP).
- Packetisation and forwarding: encapsulates data from the upper layer into packets and forwards them hop by hop.
- Fragmentation and reassembly: splits packets when the next network has a smaller MTU and reassembles them at the destination.
- Congestion control: reduces congestion in the subnet by controlling the number of packets entering it.
- Internetworking: connects heterogeneous networks.
- Error reporting and diagnostics: through ICMP.
TCP header: A TCP segment header is at least 20 bytes (up to 60 bytes with options). Its fields are:
| Field | Size | Purpose |
|---|---|---|
| Source port | 16 bits | Port of the sending application |
| Destination port | 16 bits | Port of the receiving application |
| Sequence number | 32 bits | Number of the first data byte in the segment |
| Acknowledgement number | 32 bits | Next byte expected by the receiver |
| Header length (data offset) | 4 bits | Header size in 32-bit words |
| Reserved | 3-6 bits | Kept for future use |
| Control flags | 6 bits | URG, ACK, PSH, RST, SYN, FIN |
| Window size | 16 bits | Receive buffer space, used for flow control |
| Checksum | 16 bits | Error detection of header and data |
| Urgent pointer | 16 bits | Offset of urgent data when URG is set |
| Options and padding | variable | MSS, window scale, timestamps etc. |
The sequence and acknowledgement numbers give reliable, ordered delivery, the flags manage connection setup (SYN), acknowledgement (ACK) and termination (FIN), and the window field provides flow control.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 · 5 marks
What are the differents security measures used in computer networking?
Answer
Network security protects data, devices and services from unauthorised access, misuse and attack, preserving confidentiality, integrity and availability. The main security measures used are:
- Cryptography / encryption - data is converted to ciphertext so only holders of the key can read it. Symmetric (AES, DES) uses one shared key; asymmetric (RSA) uses a public/private key pair. It gives confidentiality.
- Authentication - verifying the identity of users or hosts with passwords, biometrics, smart cards, digital certificates and multi-factor authentication.
- Authorisation and access control - limiting which resources an authenticated user may use (access control lists, role-based access).
- Firewalls - hardware or software that filters incoming and outgoing traffic by rules (packet filter, stateful inspection, application gateway) and separates a trusted network from an untrusted one.
- Digital signatures and message digests (hashing) - ensure integrity and non-repudiation of messages (MD5, SHA).
- Antivirus and anti-malware software - detect and remove viruses, worms, trojans and spyware.
- Intrusion detection and prevention systems (IDS/IPS) - monitor traffic for suspicious activity and raise alarms or block it.
- Virtual Private Network (VPN) - encrypted tunnel over a public network (IPsec, SSL/TLS) for safe remote access.
- Secure protocols - HTTPS (TLS), SSH, SFTP, IPsec in place of plain HTTP, Telnet and FTP.
- Physical security and policies - locked server rooms, backups, regular patching, user training and a security policy.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 · 5+5 marks
Write and compare the differences between IPV4 and IPV6 frame format.
Answer
IPv4 header (20-60 bytes):
| Field | Size | Purpose |
|---|---|---|
| Version | 4 bits | Value 4 |
| IHL (header length) | 4 bits | Header length in 32-bit words |
| Type of service | 8 bits | Priority/QoS |
| Total length | 16 bits | Header plus data in bytes |
| Identification | 16 bits | Identifies fragments of one datagram |
| Flags | 3 bits | DF, MF fragmentation flags |
| Fragment offset | 13 bits | Position of the fragment |
| Time to live | 8 bits | Hop limit |
| Protocol | 8 bits | Upper-layer protocol (TCP=6, UDP=17) |
| Header checksum | 16 bits | Error detection of header |
| Source address | 32 bits | Sender's IP |
| Destination address | 32 bits | Receiver's IP |
| Options + padding | variable | Optional |
IPv6 header (fixed 40 bytes):
| Field | Size | Purpose |
|---|---|---|
| Version | 4 bits | Value 6 |
| Traffic class | 8 bits | Priority/QoS |
| Flow label | 20 bits | Identifies a flow for special handling |
| Payload length | 16 bits | Length of data after the header |
| Next header | 8 bits | Type of next header (like Protocol) |
| Hop limit | 8 bits | Like TTL |
| Source address | 128 bits | Sender's IP |
| Destination address | 128 bits | Receiver's IP |
Comparison:
| Basis | IPv4 | IPv6 |
|---|---|---|
| Address size | 32 bits | 128 bits |
| Header size | Variable, 20-60 bytes | Fixed, 40 bytes |
| Header checksum | Present | Removed (left to upper layers) |
| Fragmentation | By routers and sender | Only by the sender; routers do not fragment |
| Options | In the header | Extension headers via Next header |
| Header fields | 12 fixed fields | 8 fields |
| Address notation | Dotted decimal | Hexadecimal, colon separated |
| Address configuration | Manual or DHCP | Auto-configuration plus DHCPv6 |
| Security | IPsec optional | IPsec built in |
| QoS | Type of service | Traffic class and flow label |
| Broadcast | Supported | Not supported; uses multicast and anycast |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 · 5+5 marks
Differentiate error detection from error correction. Explain with CRC (Cyclic Redundancy Check) method for error detection with suitable example.
Answer
Error detection vs error correction:
| Basis | Error detection | Error correction |
|---|---|---|
| Aim | Only finds out that an error occurred | Finds the error and also fixes it |
| Redundancy | Few redundant bits | Many more redundant bits |
| Action | Receiver asks for retransmission (ARQ) | Receiver corrects the data itself (FEC) |
| Complexity | Simple | Complex |
| Examples | Parity, checksum, CRC | Hamming code, Reed-Solomon |
| Suited to | Links with low error rate | Links where retransmission is costly (satellite) |
Cyclic Redundancy Check (CRC): The sender and receiver agree on a generator polynomial (divisor) of bits. The sender appends zeros to the data, divides it by the generator using modulo-2 (XOR) division and appends the -bit remainder to the data. The receiver divides the received codeword by the same generator; a zero remainder means no error is detected, otherwise the frame is rejected.
Example: Data = 1001, generator = 1011 ().
Append three zeros: dividend = 1001000.
- 1001 XOR 1011 = 0010, bring down next bit: 0100, quotient bit 0, so remainder 100
- Bring down next bit: 1000 XOR 1011 = 0011, remainder 011
- Bring down last bit: 0110, leading 0, so remainder 110
CRC = 110. Transmitted codeword = data + CRC = 1001110.
Check at the receiver: divide 1001110 by 1011:
- 1001 XOR 1011 = 010; bring down 1: 0101, remainder 101
- bring down 1: 1011 XOR 1011 = 000
- bring down 0: 0000, remainder 000
The remainder is zero, so the data is accepted. If a bit were flipped in transit, the remainder would be non-zero and the error would be detected.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 · 10 marks
What is IP routing? Find the total number of usable hosts, the network ID, and broadcast ID of each subnet from the given IP 192.100.78.23/26
Answer
IP routing: IP routing is the process by which a router (or host) selects the path along which an IP packet travels from the source network to the destination network. A router examines the destination IP address, finds the longest matching prefix in its routing table (built statically or by protocols such as RIP, OSPF and BGP), and forwards the packet to the next hop or the directly connected network. Packets are forwarded hop by hop until delivered.
Subnetting of 192.100.78.23/26:
- The address is Class C (default /24). The mask /26 gives subnet mask .
- Borrowed bits = , so number of subnets .
- Host bits , so addresses per subnet and usable hosts .
- Block size .
| Subnet | Network ID | Usable host range | Broadcast ID |
|---|---|---|---|
| 1 | 192.100.78.0 | 192.100.78.1 - 192.100.78.62 | 192.100.78.63 |
| 2 | 192.100.78.64 | 192.100.78.65 - 192.100.78.126 | 192.100.78.127 |
| 3 | 192.100.78.128 | 192.100.78.129 - 192.100.78.190 | 192.100.78.191 |
| 4 | 192.100.78.192 | 192.100.78.193 - 192.100.78.254 | 192.100.78.255 |
The given address 192.100.78.23 has last octet 23, which lies between 0 and 63, so it belongs to subnet 1: network ID 192.100.78.0, broadcast ID 192.100.78.63, with 62 usable hosts.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
Questions from TU BCA 2020 Fifth Semester Computer Networking (TU board exam, 2020), TU BCA 2021 Fifth Semester Computer Networking (TU board exam, 2021), TU BCA 2022 Fifth Semester Computer Networking (TU board exam, 2022), TU BCA 2023 Fifth Semester Computer Networking (TU board exam, 2023), TU BCA 2024 Fifth Semester Computer Networking (TU board exam, 2024), TU BCA 2025 Fifth Semester Computer Networking (TU board exam, 2025), TU BCA 2020 Fifth Semester Computer Graphics and Animation (TU board exam, 2020), TU BCA 2021 Fifth Semester Computer Graphics and Animation (TU board exam, 2021), TU BCA 2022 Fifth Semester Computer Graphics and Animation (TU board exam, 2022), TU BCA 2023 Fifth Semester Computer Graphics and Animation (TU board exam, 2023), TU BCA 2024 Fifth Semester Computer Graphics and Animation (TU board exam, 2024), TU BCA 2025 Fifth Semester Computer Graphics and Animation (TU board exam, 2025), TU BCA 2020 Fifth Semester .NET Technology (TU board exam, 2020), TU BCA 2021 Fifth Semester .NET Technology (TU board exam, 2021), TU BCA 2022 Fifth Semester .NET Technology (TU board exam, 2022), TU BCA 2023 Fifth Semester .NET Technology (TU board exam, 2023), TU BCA 2024 Fifth Semester .NET Technology (TU board exam, 2024), TU BCA 2025 Fifth Semester .NET Technology (TU board exam, 2025), TU BCA 2020 Fifth Semester Introduction to Management (TU board exam, 2020), TU BCA 2021 Fifth Semester Introduction to Management (TU board exam, 2021), TU BCA 2022 Fifth Semester Introduction to Management (TU board exam, 2022), TU BCA 2023 Fifth Semester Introduction to Management (TU board exam, 2023), TU BCA 2024 Fifth Semester Introduction to Management (TU board exam, 2024), TU BCA 2025 Fifth Semester Introduction to Management (TU board exam, 2025), TU BCA 2020 Fifth Semester MIS and E-Business (TU board exam, 2020), TU BCA 2021 Fifth Semester MIS and E-Business (TU board exam, 2021), TU BCA 2022 Fifth Semester MIS and E-Business (TU board exam, 2022), TU BCA 2023 Fifth Semester MIS and E-Business (TU board exam, 2023), TU BCA 2024 Fifth Semester MIS and E-Business (TU board exam, 2024) and TU BCA 2025 Fifth Semester MIS and E-Business (TU board exam, 2025). Answers are written for this site; check them against your class notes.