Skip to main content

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).

FieldSizeDescription
Version4 bitsIP version (4)
HLEN (IHL)4 bitsHeader length in 4-byte words (min 5, max 15)
Service type (DS/TOS)8 bitsPrecedence / priority and quality of service
Total length16 bitsHeader plus data, in bytes (max 65,535)
Identification16 bitsIdentifies the datagram; used to reassemble fragments
Flags3 bitsReserved, DF (do not fragment), MF (more fragments)
Fragment offset13 bitsPosition of the fragment in the original datagram, in units of 8 bytes
Time to live (TTL)8 bitsMaximum hop count; decremented by each router, discarded at 0
Protocol8 bitsUpper-layer protocol (1 ICMP, 6 TCP, 17 UDP)
Header checksum16 bitsError detection on the header only
Source address32 bitsIP address of the sender
Destination address32 bitsIP address of the receiver
Options0 - 40 bytesRecord 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 OK or 404 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:

  1. Attenuation: Loss of signal energy as it travels through the medium because of resistance and absorption. It is measured in decibels (dB=10log⁡10(P2/P1)dB = 10\log_{10}(P_2/P_1)). Amplifiers or repeaters are used to restore the strength.
  2. 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.
  3. 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, SNR=signal powernoise powerSNR = \dfrac{\text{signal power}}{\text{noise power}}; 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:

FieldSizePurpose
Flag8 bits (01111110)Marks start and end of frame
Address8 bitsIdentifies the secondary station
Control8 or 16 bitsFrame type, sequence numbers, poll/final bit
InformationVariableUser data (only in I-frames and some U-frames)
FCS16 or 32 bitsCRC for error detection
Flag8 bitsEnd 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:

ClassFirst bitsFirst octet rangeDefault maskUse
A00 - 127 (usable 1 - 126)255.0.0.0Very large networks
B10128 - 191255.255.0.0Medium networks
C110192 - 223255.255.255.0Small networks
D1110224 - 239-Multicasting
E1111240 - 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 255.255.255.240255.255.255.240: last octet 240=111100002240 = 11110000_2, so 4 bits are borrowed for the subnet and 4 bits remain for hosts. The mask is /28.

  • Number of subnets =24=16= 2^{4} = 16
  • Hosts per subnet =24−2=14= 2^{4} - 2 = 14 (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.

LayerMain function
7 ApplicationNetwork services to user applications (email, file transfer, web)
6 PresentationTranslation, encryption, compression
5 SessionDialog control, synchronization, session setup and teardown
4 TransportEnd-to-end delivery, segmentation, flow and error control
3 NetworkLogical addressing, routing
2 Data linkFraming, physical addressing, error and flow control, media access
1 PhysicalTransmission 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.

  1. 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 =2Tfr=2T_{fr}. Throughput S=Ge−2GS = Ge^{-2G}, maximum =0.184=0.184 (18.4%) at G=0.5G=0.5.
  2. Slotted ALOHA: Time is divided into slots equal to the frame time; a station may start only at a slot boundary. Vulnerable time is TfrT_{fr}. Throughput S=Ge−GS = Ge^{-G}, maximum =0.368=0.368 (36.8%) at G=1G=1.
  3. 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.
  4. 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 Tfr≥2TpT_{fr} \ge 2T_p.
  5. 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).

  1. 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.
  2. 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.
  3. Internet layer: Logical addressing and routing of packets across networks. Protocols: IP, ICMP, ARP, RARP, IGMP, routing protocols.
  4. 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 2Tfr2T_{fr}.

In slotted ALOHA, time is divided into slots of length TfrT_{fr} 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 TfrT_{fr}.

With GG the average number of frames generated per frame time:

  • Pure ALOHA: S=Ge−2GS = Ge^{-2G}, maximum S=12e≈0.184S = \dfrac{1}{2e} \approx 0.184 at G=0.5G = 0.5.
  • Slotted ALOHA: S=Ge−GS = Ge^{-G}, maximum S=1e≈0.368S = \dfrac{1}{e} \approx 0.368 at G=1G = 1.

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

BasisReliable (connection-oriented)Unreliable (connectionless)
ConnectionConnection is established before data transfer (e.g. three-way handshake)No connection setup
Delivery guaranteeAcknowledgements, retransmission, sequencing and duplicate removal ensure data arrives correctly and in orderBest effort; packets may be lost, duplicated or reordered
Flow/congestion controlPresentAbsent
Overhead and speedHigh overhead, slowerLow overhead, faster
Example protocolTCPUDP, IP
ApplicationsWeb (HTTP), email (SMTP), file transfer (FTP), remote loginDNS 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):

  1. The user types a name; the application asks the local resolver (stub resolver in the OS), which first checks its cache.
  2. If not cached, the request goes to the local (recursive) DNS server of the ISP.
  3. This server queries a root server, which returns the address of the TLD server (e.g. .com).
  4. The TLD server returns the address of the authoritative name server of the domain.
  5. The authoritative server returns the IP address (A record).
  6. 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):

  1. Confidentiality: Only the intended receiver can read the message; achieved by encryption.
  2. Integrity: The message is not altered in transit; achieved with hash functions and message authentication codes.
  3. Authentication: The identity of the sender (or receiver) is verified, using passwords, certificates or digital signatures.
  4. Non-repudiation: The sender cannot later deny having sent the message; provided by digital signatures.
  5. 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):

FieldSizePurpose
Source port16 bitsSending process
Destination port16 bitsReceiving process
Sequence number32 bitsNumber of the first data byte in the segment
Acknowledgement number32 bitsNext byte expected by the receiver
Header length4 bitsIn 4-byte words
Reserved6 bitsFuture use
Control flags6 bitsURG, ACK, PSH, RST, SYN, FIN
Window size16 bitsReceive buffer space available (flow control)
Checksum16 bitsError detection over header, data and pseudo-header
Urgent pointer16 bitsOffset of urgent data when URG is set
Options and paddingup to 40 bytesMSS, 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: 27=1282^{7} = 128 (126 usable, since 0 and 127 are reserved)
  • Hosts per network: 224−2=16,777,2142^{24} - 2 = 16{,}777{,}214

Class B (16 network bits, 16 host bits; first two bits 10)

  • Networks: 214=16,3842^{14} = 16{,}384
  • Hosts per network: 216−2=65,5342^{16} - 2 = 65{,}534

Class C (24 network bits, 8 host bits; first three bits 110)

  • Networks: 221=2,097,1522^{21} = 2{,}097{,}152
  • Hosts per network: 28−2=2542^{8} - 2 = 254

Class D and E: 2282^{28} multicast addresses (D) and 2282^{28} 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 232=4,294,967,2962^{32} = 4{,}294{,}967{,}296.

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:

  1. 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.
  2. 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.
  3. 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:

  1. 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.
  2. The resolver asks a root server, which refers it to the server for the .np country-code TLD.
  3. The .np server refers it to the server for .edu.np (the second-level domain).
  4. The .edu.np server refers it to the authoritative name server of tribhuvan-university.edu.np.
  5. The authoritative server returns the A record (IP address) for www.
  6. 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:

  1. Attenuation: The signal loses energy (as heat) while overcoming the resistance of the medium; the loss increases with distance and frequency. Measured in decibels, dB=10log⁡10P2P1dB = 10\log_{10}\dfrac{P_2}{P_1}. Amplifiers and repeaters compensate for it.
  2. 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).
  3. 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, SNRdB=10log⁡10PsignalPnoiseSNR_{dB} = 10\log_{10}\dfrac{P_{signal}}{P_{noise}}. These impairments cause bit errors and limit the achievable data rate (Shannon capacity C=Blog⁡2(1+SNR)C = B\log_2(1+SNR)).

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 N=2m−1N = 2^m - 1 frames (window size) without waiting for acknowledgement, where mm 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 0,1,2,…0, 1, 2, \ldots 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)

FieldSizePurpose
Global routing prefix48 bitsAssigned by the RIR/ISP to the organisation
Subnet ID16 bitsIdentifies the subnet inside the site
Interface ID64 bitsIdentifies 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

BasisIPv4IPv6
Address length32 bits128 bits
NotationDotted decimal (192.168.1.1)Colon-separated hexadecimal
Address spaceAbout 4.3×1094.3\times10^9About 3.4×10383.4\times10^{38}
HeaderVariable (20-60 bytes), has checksumFixed 40 bytes, no checksum, extension headers
FragmentationBy routers and senderOnly by the sender
BroadcastSupportedNot supported (multicast used)
ConfigurationManual or DHCPAuto-configuration (SLAAC) and DHCPv6
SecurityIPsec optionalIPsec built in to the design
QoSType of Service fieldTraffic 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 2T2T and throughput is

S=Ge−2G,Smax=12e≈0.184 at G=0.5S = G e^{-2G}, \quad S_{max} = \frac{1}{2e} \approx 0.184 \text{ at } G = 0.5

In slotted ALOHA time is divided into slots equal to one frame time TT, 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 TT:

S=Ge−G,Smax=1e≈0.368 at G=1S = G e^{-G}, \quad S_{max} = \frac{1}{e} \approx 0.368 \text{ at } G = 1

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 x3+1x^3+1 = 1001 (degree 3, so append 3 zeros).

Dividend: 100101010000

Modulo-2 division by 1001:

  • 1001 ⊕\oplus 1001 = 0000, giving 000001010000
  • At bit 5: 1010 ⊕\oplus 1001 = 0011, giving 000000011000
  • At bit 7: 1100 ⊕\oplus 1001 = 0101, giving 000000001010
  • At bit 8: 1010 ⊕\oplus 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 2n≥42^n \ge 4, so n=2n = 2 borrowed host bits.

New prefix = 24+2=2624 + 2 = 26.

New subnet mask = 255.255.255.192 (/26)

Block size = 256−192=64256 - 192 = 64. Hosts per subnet = 26−2=622^6 - 2 = 62.

SubnetSubnet IDUsable host rangeBroadcast address
1192.6.3.0192.6.3.1 - 192.6.3.62192.6.3.63
2192.6.3.64192.6.3.65 - 192.6.3.126192.6.3.127
3192.6.3.128192.6.3.129 - 192.6.3.190192.6.3.191
4192.6.3.192192.6.3.193 - 192.6.3.254192.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 2×2 \times propagation delay.
  • If no ACK arrives, the station assumes a collision, waits a random back-off time and retransmits.
  • A frame of duration TT collides with any frame starting within TT before or after it, so the vulnerable time is 2T2T.

S=Ge−2GS = G e^{-2G}

where GG is the average number of frames generated per frame time and SS is the throughput. Maximum throughput is at G=0.5G = 0.5: Smax=12e≈0.184S_{max} = \frac{1}{2e} \approx 0.184 (18.4%).

Slotted ALOHA

  • Time is divided into slots of length TT and stations may transmit only at the start of a slot (synchronised clocks).
  • Collisions are complete or absent, so the vulnerable time is TT.

S=Ge−GS = G e^{-G}

Maximum throughput is at G=1G = 1: Smax=1e≈0.368S_{max} = \frac{1}{e} \approx 0.368 (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)

ClassFirst octet rangeLeading bitsDefault maskNetwork/Host bitsUse
A1 - 1260255.0.0.08 / 24Very large networks (224−22^{24}-2 hosts)
B128 - 19110255.255.0.016 / 16Medium networks (65,534 hosts)
C192 - 223110255.255.255.024 / 8Small networks (254 hosts)
D224 - 2391110--Multicast
E240 - 2551111--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.

BasisTCPUDP
Full formTransmission Control ProtocolUser Datagram Protocol
ConnectionConnection-oriented (three-way handshake)Connectionless
ReliabilityReliable: acknowledgements, retransmission, ordered deliveryUnreliable: no ACK, no retransmission
Flow and congestion controlYes (sliding window)No
Error checkingChecksum plus recoveryChecksum only (optional in IPv4), no recovery
Data unitByte stream segmented into segmentsMessage-oriented datagrams
Header size20-60 bytes8 bytes
SpeedSlower, higher overheadFaster, low overhead
Broadcast/multicastNot supportedSupported
Typical usesHTTP, FTP, SMTP, SSHDNS, 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:

  1. Choose two large primes pp and qq.
  2. Compute n=p×qn = p \times q and ϕ(n)=(p−1)(q−1)\phi(n) = (p-1)(q-1).
  3. Choose ee with 1<e<ϕ(n)1 < e < \phi(n) and gcd⁡(e,ϕ(n))=1\gcd(e,\phi(n)) = 1.
  4. Compute dd such that de≡1(modϕ(n))d e \equiv 1 \pmod{\phi(n)}.

Public key = (e,n)(e, n), private key = (d,n)(d, n).

C=Me mod n,M=Cd mod nC = M^e \bmod n, \qquad M = C^d \bmod n

Example: p=3, q=11p=3,\ q=11, so n=33n=33, ϕ=20\phi=20, e=3e=3, d=7d=7. For M=4M=4: C=43 mod 33=31C = 4^3 \bmod 33 = 31, and 317 mod 33=431^7 \bmod 33 = 4.

(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 rr. The sender appends rr 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 r+1r+1 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.

MediumSpeedDistanceCostNoise immunity
UTPup to 10 Gbps100 mLowLow
Coaxialup to ~1 Gbpshundreds of mMediumMedium
FibreTbpsmany kmHighVery high
WirelessvariesvariesMediumLow

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

BasisStatic routingDynamic routing
ConfigurationRoutes entered manually by the administratorRoutes learned automatically using routing protocols
Adaptation to changeDoes not adapt to link failure or topology changeUpdates automatically when the topology changes
OverheadNo routing traffic, little CPU/memoryRouting updates use bandwidth, CPU and memory
ScalabilitySuitable for small networksSuitable for large, complex networks
SecurityMore secure, no route exchangeLess secure unless authenticated
Cost/complexitySimple to set upMore complex; needs knowledge of protocols
Exampleip route 192.168.2.0 255.255.255.0 10.0.0.2 on a stub network or default routeRIP, 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 = 21=22^1 = 2 (192.168.20.0 and 192.168.20.128).
  • Host bits remaining = 8−1=78 - 1 = 7, so hosts per subnet = 27−2=1262^7 - 2 = 126.
SubnetHostsBroadcast
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)

FieldSizePurpose
Source port16 bitsPort of sending process
Destination port16 bitsPort of receiving process
Sequence number32 bitsNumber of the first data byte in the segment
Acknowledgement number32 bitsNext byte expected by the receiver
Header length (HLEN)4 bitsHeader size in 32-bit words (5 to 15)
Reserved6 bitsFor future use
Control flags6 bitsURG, ACK, PSH, RST, SYN, FIN
Window size16 bitsBytes the receiver is willing to accept (flow control)
Checksum16 bitsError detection over header, data and pseudo-header
Urgent pointer16 bitsOffset of urgent data when URG is set
Options and paddingup to 40 bytesMSS, 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).

BasisCircuitPacket
PathDedicatedShared
Set-upRequiredNot needed (datagram)
EfficiencyLowHigh
DelayConstantVariable

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

FlagAddressControlProtocolPayloadFCSFlag
1 byte1 byte1 byte1-2 bytesvariable2 or 4 bytes1 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 2n≥52^n \ge 5, so n=3n = 3 (giving 8 possible subnets, of which 5 are used).

New prefix = 24+3=2724 + 3 = 27.

New subnet mask = 255.255.255.224 (/27)

Block size = 256−224=32256 - 224 = 32. Host bits = 8−3=58 - 3 = 5, so usable hosts per subnet = 25−2=302^5 - 2 = 30.

SubnetNetwork addressUsable host rangeBroadcast address
1193.169.0.0193.169.0.1 - 193.169.0.30193.169.0.31
2193.169.0.32193.169.0.33 - 193.169.0.62193.169.0.63
3193.169.0.64193.169.0.65 - 193.169.0.94193.169.0.95
4193.169.0.96193.169.0.97 - 193.169.0.126193.169.0.127
5193.169.0.128193.169.0.129 - 193.169.0.158193.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 pp, a prime qq that divides p−1p-1, and a generator g=h(p−1)/q mod pg = h^{(p-1)/q} \bmod p.
  • Private key: a random xx with 0<x<q0 < x < q.
  • Public key: y=gx mod py = g^x \bmod p.

Signature generation (sender)

  1. Compute the hash H(M)H(M) of the message (e.g. SHA-256).
  2. Choose a random per-message secret kk, 0<k<q0<k<q.
  3. Compute r=(gk mod p) mod qr = (g^k \bmod p) \bmod q.
  4. Compute s=k−1 (H(M)+xr) mod qs = k^{-1}\,(H(M) + x r) \bmod q.
  5. The signature is the pair (r,s)(r, s), sent together with MM.

Signature verification (receiver)

  1. Compute w=s−1 mod qw = s^{-1} \bmod q.
  2. u1=H(M) w mod qu_1 = H(M)\, w \bmod q and u2=r w mod qu_2 = r\, w \bmod q.
  3. v=(gu1yu2 mod p) mod qv = (g^{u_1} y^{u_2} \bmod p) \bmod q.
  4. If v=rv = r 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 (r,s)(r,s), while anyone with the public key can verify it. A change of even one bit of MM 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 NN frames (window size) without waiting for acknowledgement, while the receiver has a window of size 1.

  • Frames are numbered with sequence numbers using mm bits; the sender window size is at most 2m−12^m - 1.
  • 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 nn means all frames before nn have been received.
  • On time-out (or NAK) the sender goes back and retransmits the lost frame and all frames after it.

Example (m=3m=3, window = 4, frames 0 to 5, frame 2 is lost):

  1. The sender sends frames 0, 1, 2, 3. The receiver gets 0 and 1 and sends ACK 1 and ACK 2 (next expected).
  2. Frame 2 is lost. Frame 3 arrives out of order and is discarded.
  3. The sender's timer for frame 2 expires, so it goes back and resends 2, 3, 4, 5.
  4. 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

BasisStop-and-Wait ARQGo-Back-N ARQ
Sender window1 frameUp to 2m−12^m-1 frames
Receiver window11
Channel utilisationLow, especially with long delayHigh; pipelined transmission
RetransmissionOnly the lost frameThe lost frame and all following frames
Sequence numbers1 bit (0/1)mm bits
Buffer at senderOne frameNN frames
ComplexitySimpleMore 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 TT is vulnerable to collision from frames that start in the interval of length 2T2T around it:

S=Ge−2G,Smax=12e≈18.4%S = G e^{-2G}, \quad S_{max} = \frac{1}{2e} \approx 18.4\%

In slotted ALOHA time is divided into slots of length TT and transmission begins only at slot boundaries. The vulnerable period falls to TT and collisions are total or none:

S=Ge−G,Smax=1e≈36.8%S = G e^{-G}, \quad S_{max} = \frac{1}{e} \approx 36.8\%

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

Si⋅Sj=0 (i≠j),Si⋅Si=NS_i \cdot S_j = 0 \ (i \ne j), \qquad S_i \cdot S_i = N

Example: with codes c1=[+1,+1,+1,+1]c_1 = [+1,+1,+1,+1] and c2=[+1,−1,+1,−1]c_2 = [+1,-1,+1,-1], if station 1 sends bit 1 and station 2 sends bit 0, the channel carries c1−c2=[0,+2,0,+2]c_1 - c_2 = [0,+2,0,+2]; multiplying by c1c_1 gives 4/4=+14/4 = +1 (bit 1) and by c2c_2 gives −4/4=−1-4/4 = -1 (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:

Dx(y)=min⁡v{ c(x,v)+Dv(y) }D_x(y) = \min_v \{\, c(x,v) + D_v(y) \,\}

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 = ∞\infty.

After A receives B's vector (B-C = 1, B-D = 4), it computes C via B = 2+1=3<52+1 = 3 < 5 and D via B = 2+4=62+4 = 6. After receiving C's vector (C-D = 2, now C is at distance 3 from A) it improves D to 3+2=53+2 = 5.

Final table at A:

DestinationCostNext hop
B2B
C3B
D5B

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

BasisDistance VectorLink State
Information sharedWhole routing tableOnly link-state of own links
Sent toNeighbours onlyAll routers (flooding)
KnowledgeKnows only distance and directionComplete topology map
AlgorithmBellman-FordDijkstra shortest path first
ConvergenceSlow, count-to-infinity problemFast, loop-free
OverheadPeriodic updates, more bandwidthUpdates only on change, but more CPU and memory
Suitable forSmall networksLarge networks
ProtocolsRIP, IGRPOSPF, 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:

  1. Application - network services to the user (HTTP, FTP, SMTP).
  2. Presentation - translation, encryption and compression of data.
  3. Session - establishes, manages and terminates sessions, with synchronisation.
  4. Transport - end-to-end delivery, segmentation, flow and error control (TCP, UDP).
  5. Network - logical addressing and routing (IP).
  6. Data link - framing, MAC addressing, error detection, access control.
  7. 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:

BasisOSI modelTCP/IP model
Layers74 (some texts use 5)
DevelopmentDeveloped by ISO as a general reference modelDeveloped by DARPA for the ARPANET/Internet
ApproachProtocol independent; model came first, protocols laterProtocols came first, model described them
Session/presentationSeparate layersMerged into the application layer
Transport serviceConnection-oriented only at the transport layerBoth TCP (connection-oriented) and UDP (connectionless)
Network layerSupports both connection-oriented and connectionlessConnectionless (IP) only
UseMainly a teaching and reference toolActually used in practice
StrictnessStrict layeringLess 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.

FDMTDM
Analog signals, frequency sharedDigital signals, time shared
Signals sent simultaneouslySignals sent one after another in slots
Needs guard bandsNeeds 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:

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. Hamming code - a code that can detect and also correct errors.

Hamming code: Developed by R. W. Hamming, it adds rr parity (redundant) bits to mm data bits so that single-bit errors can be located and corrected. The number of parity bits must satisfy

2r≥m+r+12^r \ge m + r + 1

Parity bits are placed at positions that are powers of 2 (1, 2, 4, 8, ...). Parity bit pip_i checks all positions whose binary representation has bit ii set (for example p1p_1 checks 1, 3, 5, 7; p2p_2 checks 2, 3, 6, 7; p4p_4 checks 4, 5, 6, 7).

Example (even parity, 4 data bits 1011): m=4m=4, so r=3r=3 and the code is 7 bits: p1 p2 d3 p4 d5 d6 d7p_1\,p_2\,d_3\,p_4\,d_5\,d_6\,d_7 with d3=1,d5=0,d6=1,d7=1d_3=1, d_5=0, d_6=1, d_7=1.

  • p1p_1 covers positions 1,3,5,7: 1,0,11,0,1 gives p1=0p_1=0
  • p2p_2 covers 2,3,6,7: 1,1,11,1,1 gives p2=1p_2=1
  • p4p_4 covers 4,5,6,7: 0,1,10,1,1 gives p4=0p_4=0

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 c4c2c1=1102=6c_4c_2c_1 = 110_2 = 6 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).
BasisCSMA/CDCSMA/CA
Full formCarrier Sense Multiple Access with Collision DetectionCarrier Sense Multiple Access with Collision Avoidance
StrategyDetects a collision after it occurs and recoversAvoids a collision before it occurs
Network typeWired (Ethernet)Wireless (Wi-Fi)
Collision detectionPossible, since a station can listen while sendingNot possible in wireless, since a transmitter cannot sense collisions while sending
MechanismJam signal and binary exponential back-offInter-frame space, contention window, RTS/CTS, ACK
AcknowledgementNot neededRequired for each frame
OverheadLowerHigher
StandardIEEE 802.3IEEE 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:

FieldSizePurpose
Source port16 bitsPort of the sending application
Destination port16 bitsPort of the receiving application
Sequence number32 bitsNumber of the first data byte in the segment
Acknowledgement number32 bitsNext byte expected by the receiver
Header length (data offset)4 bitsHeader size in 32-bit words
Reserved3-6 bitsKept for future use
Control flags6 bitsURG, ACK, PSH, RST, SYN, FIN
Window size16 bitsReceive buffer space, used for flow control
Checksum16 bitsError detection of header and data
Urgent pointer16 bitsOffset of urgent data when URG is set
Options and paddingvariableMSS, 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:

  1. 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.
  2. Authentication - verifying the identity of users or hosts with passwords, biometrics, smart cards, digital certificates and multi-factor authentication.
  3. Authorisation and access control - limiting which resources an authenticated user may use (access control lists, role-based access).
  4. 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.
  5. Digital signatures and message digests (hashing) - ensure integrity and non-repudiation of messages (MD5, SHA).
  6. Antivirus and anti-malware software - detect and remove viruses, worms, trojans and spyware.
  7. Intrusion detection and prevention systems (IDS/IPS) - monitor traffic for suspicious activity and raise alarms or block it.
  8. Virtual Private Network (VPN) - encrypted tunnel over a public network (IPsec, SSL/TLS) for safe remote access.
  9. Secure protocols - HTTPS (TLS), SSH, SFTP, IPsec in place of plain HTTP, Telnet and FTP.
  10. 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):

FieldSizePurpose
Version4 bitsValue 4
IHL (header length)4 bitsHeader length in 32-bit words
Type of service8 bitsPriority/QoS
Total length16 bitsHeader plus data in bytes
Identification16 bitsIdentifies fragments of one datagram
Flags3 bitsDF, MF fragmentation flags
Fragment offset13 bitsPosition of the fragment
Time to live8 bitsHop limit
Protocol8 bitsUpper-layer protocol (TCP=6, UDP=17)
Header checksum16 bitsError detection of header
Source address32 bitsSender's IP
Destination address32 bitsReceiver's IP
Options + paddingvariableOptional

IPv6 header (fixed 40 bytes):

FieldSizePurpose
Version4 bitsValue 6
Traffic class8 bitsPriority/QoS
Flow label20 bitsIdentifies a flow for special handling
Payload length16 bitsLength of data after the header
Next header8 bitsType of next header (like Protocol)
Hop limit8 bitsLike TTL
Source address128 bitsSender's IP
Destination address128 bitsReceiver's IP

Comparison:

BasisIPv4IPv6
Address size32 bits128 bits
Header sizeVariable, 20-60 bytesFixed, 40 bytes
Header checksumPresentRemoved (left to upper layers)
FragmentationBy routers and senderOnly by the sender; routers do not fragment
OptionsIn the headerExtension headers via Next header
Header fields12 fixed fields8 fields
Address notationDotted decimalHexadecimal, colon separated
Address configurationManual or DHCPAuto-configuration plus DHCPv6
SecurityIPsec optionalIPsec built in
QoSType of serviceTraffic class and flow label
BroadcastSupportedNot 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:

BasisError detectionError correction
AimOnly finds out that an error occurredFinds the error and also fixes it
RedundancyFew redundant bitsMany more redundant bits
ActionReceiver asks for retransmission (ARQ)Receiver corrects the data itself (FEC)
ComplexitySimpleComplex
ExamplesParity, checksum, CRCHamming code, Reed-Solomon
Suited toLinks with low error rateLinks where retransmission is costly (satellite)

Cyclic Redundancy Check (CRC): The sender and receiver agree on a generator polynomial (divisor) of k+1k+1 bits. The sender appends kk zeros to the data, divides it by the generator using modulo-2 (XOR) division and appends the kk-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 x3+x+1x^3+x+1 = 1011 (k=3k=3).

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 255.255.255.192255.255.255.192.
  • Borrowed bits = 26−24=226-24 = 2, so number of subnets =22=4= 2^2 = 4.
  • Host bits =32−26=6= 32-26 = 6, so addresses per subnet =26=64= 2^6 = 64 and usable hosts =26−2=62= 2^6-2 = \mathbf{62}.
  • Block size =256−192=64= 256-192 = 64.
SubnetNetwork IDUsable host rangeBroadcast ID
1192.100.78.0192.100.78.1 - 192.100.78.62192.100.78.63
2192.100.78.64192.100.78.65 - 192.100.78.126192.100.78.127
3192.100.78.128192.100.78.129 - 192.100.78.190192.100.78.191
4192.100.78.192192.100.78.193 - 192.100.78.254192.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.