September 8, 2024

Computer Networks 2024 Q&A

Computer Network
Share :

Computer Networks Question and Answer


(Suggest Find the question by search page and keep refreshing the page for updated content)

Q.1) Sixteen-bit messages are transmitted using a hamming code. How many check bits are needed to ensure that the receiver can detect and correct single-bit errors? Show the bit pattern transmitted for the message 1001101100110011. Assume that even parity is used in the Hamming code

Answer.

To determine the number of check bits needed for a Hamming code to detect and correct single-bit errors, we need to find the smallest value of ‘r’ such that 2^r >= m + r + 1, where ‘m’ is the number of message bits and ‘r’ is the number of check bits.

Given that we have a 16-bit message, m = 16.
Let’s plug this value into the formula:

2^r >= 16 + r + 1

Now, we’ll find the smallest ‘r’ that satisfies this condition.

Starting with r = 1:
2^1 = 2
2 is not greater than or equal to 16 + 1 + 1 = 18

Moving to r = 2:
2^2 = 4
4 is not greater than or equal to 16 + 2 + 1 = 19

Proceeding to r = 3:
2^3 = 8
8 is greater than or equal to 16 + 3 + 1 = 20

So, we need at least 4 check bits to ensure that the receiver can detect and correct single-bit errors.

Now, let’s show the bit pattern transmitted for the message 1001101100110011 using even parity in a Hamming code.

The message bits are placed at positions that are powers of 2 (1, 2, 4, 8, etc.), while the check bits are placed at other positions (positions not powers of 2).

The positions of the check bits (C) are determined by the powers of 2: 1, 2, 4, 8, etc. So, the message bits (M) will occupy the remaining positions.

The transmitted bit pattern will have 20 bits in total (16 message bits + 4 check bits).

Using even parity, the check bits are calculated based on parity checks of certain combinations of message bits.

Here’s how the message 1001101100110011 would be transmitted with Hamming code:

1 (C) 0 0 (C) 1 0 0 (C) 1 1 0 0 1 1 0 0 1 (M)

The check bits are inserted in positions 1, 2, 4, and 8. The bit values at these positions are chosen to make the parity (even) correct for the relevant combinations of message bits.


Q.2) A bit stream 1001110011 is transmitted using the standard CRC method. The generator polynomial is x3+x+1 Show the actual bit string transmitted Suppose the third from the left is inverted during transmission Show that this error is detected at the receiver’s end

Answer.

To solve this problem, we’ll go through the steps of CRC encoding and then show how the error introduced during transmission is detected at the receiver’s end.

1. CRC Encoding:
Given bit stream: 1001110011
Generator polynomial: \(x^3 + x + 1\)

The CRC encoding involves appending a CRC checksum to the original data. The checksum is computed based on the polynomial division of the original bit stream (with appended zeros to match the degree of the generator polynomial) by the generator polynomial. Let’s perform this division:

___________________
x^3 + x + 1 | 1001110011000
– (1001
___________
110010011000
– 1001
________
10110011000
– 1001
_______
110001100
– 1001
_______
1001100
– 1001
______
101

Remainder: 101 (3 bits)

Appending the CRC Checksum: The original data with the CRC checksum appended becomes: 1001110011101

Transmission Error: Suppose the third bit from the left (index 2) is inverted during transmission, changing 0 to 1 or 1 to 0. The transmitted string becomes: 1011110011101

Error Detection at Receiver’s End: At the receiver’s end, the received data undergoes CRC checking. If the received data is not divisible by the generator polynomial without a remainder, an error is detected.

Let’s perform CRC checking on the received data (1011110011101):

___________________
x^3 + x + 1 | 1011110011101
– (1001
___________
110011001101
– 1001
________
1010011101
– 1001
_______
100001101
– 1001
_______
00001101
– 1001
______
001101
– 1001
______
101

Since there is a non-zero remainder (101), an error is detected during CRC checking. This error indicates that the received data has been corrupted during transmission.


Q.3) A 64Kb packet is to be transmitted from source to destination with 4000 meters apart. The network limits the packet to a 4Kb and each packet has 32 byte header The transmission line has 2 Mbps and uses stop & watt ARQ Assume the signal propagates of 2×105 km/sec how long does it take to send the message from source to destination

Answer.

To calculate the time it takes to send the message from source to destination, we need to consider several factors:

  1. Packetization: The 64 Kb packet needs to be divided into smaller packets of 4 Kb each.
  2. Header Overhead: Each packet has a 32-byte header.
  3. Transmission Time: The time it takes to transmit each packet over the transmission line.
  4. Propagation Delay: The time it takes for the signal to propagate from the source to the destination.

Let’s break down each step:

  1. Packetization:
    • Original packet size: 64 Kb
    • Maximum packet size: 4 Kb
    • Number of packets = Original packet size / Maximum packet size = 64 Kb / 4 Kb = 16 packets
  2. Header Overhead:
    • Each packet has a 32-byte header.
    • Total header overhead = Number of packets * Header size per packet = 16 packets * 32 bytes/packet = 512 bytes
  3. Transmission Time:
    • Transmission line speed: 2 Mbps
    • Packet size: 4 Kb + 32 bytes (header)
    • Transmission time per packet = Packet size / Transmission line speed = (4 Kb + 32 bytes) / (2 Mbps) = (4096 bytes + 32 bytes) / (2 * 10^6 bits/sec) = 4128 bytes / (2 * 10^6 bits/sec) ≈ 2.064 milliseconds
  4. Propagation Delay:
    • Signal propagation speed: 2 * 10^5 km/sec (200,000 km/sec)
    • Distance between source and destination: 4000 meters (4 km)
    • Propagation delay = Distance / Propagation speed = 4 km / (2 * 10^5 km/sec) = 4 km / 200,000 km/sec = 0.00002 seconds

Now, let’s calculate the total time it takes to send the message from source to destination:

Total time = Transmission time per packet * Number of packets + Propagation delay

Total time = (2.064 milliseconds * 16) + 0.00002 seconds = 33.024 milliseconds + 0.00002 seconds ≈ 33.024 milliseconds

So, it takes approximately 33.024 milliseconds to send the message from source to destination.


Q.4) A 1-km-long. 10-Mbps CSMA/CD LAN (not 802.3) has a propagation speed I of 200 m/μsec. Repeaters are not allowed in this System. Data frames are 256 bits long, including 32 bits of header, checksum, and other overhead. The first bit slot after a successful transmission is reserved for the receiver to capture the channel in order to send a 32-bit acknowledgement frame. What is the effective data rate, excluding overhead, assuming that there are no collisions?

Answer.

To calculate the effective data rate excluding overhead, we need to consider the time it takes for a station to transmit a frame and receive an acknowledgment.

Given:

  • Transmission rate (R) = 10 Mbps = 10^7 bits/second
  • Length of data frames (L) = 256 bits
  • Propagation speed (I) = 200 m/μsec = 200 * 10^6 m/second
  • Time for a station to transmit a frame (T_transmit) = Length of frame / Transmission rate
  • Time for acknowledgment (T_ack) = 32 bits / Transmission rate

 


Q.5) Consider transmission delay for the packet as 2 ms, propagation delay between client and server is 30 ms. If sender’s window size is 10 then what is the ideal period for the sender in each cycle

Answer.

To calculate the ideal period for the sender in each cycle, we need to consider the time it takes to transmit a packet and the time it takes for the acknowledgment to return.

Given:

  • Transmission delay (T_transmission) = 2 ms
  • Propagation delay (T_propagation) = 30 ms
  • Window size (W) = 10 packets

The time it takes to transmit a packet and receive an acknowledgment (RTT) can be calculated as: RTT = 2 * T_propagation + T_transmission

Since the sender’s window size is 10, it means the sender can send 10 packets before waiting for acknowledgments. Therefore, the sender can fill the pipeline with 10 packets.

The ideal period for the sender in each cycle would be the time it takes to transmit 10 packets and receive acknowledgments for all of them, which is the sum of the RTT for each packet: Ideal period = 10 * RTT

Substituting the given values: RTT = 2 * 30 ms + 2 ms = 62 ms Ideal period = 10 * 62 ms = 620 ms

So, the ideal period for the sender in each cycle is 620 milliseconds.


Q.7) Organization has a class C network 200 1.1 and wants to form subnets for 4 departments, with hosts as follows:
A 72 hosts
B 35 hosts
C 20 hosts
D 18 hosts
There are 145 hosts in all
(a) Give a possible arrangement of subnet masks to make this possible
(b) Suggest what the organization might do if Department D grows to 34 hosts

Answer.

To create subnets for the four departments with the specified number of hosts, we need to determine the subnet mask that can accommodate the maximum number of hosts required by any department and then allocate subnets accordingly.

(a) Possible arrangement of subnet masks:

Given that the largest department (A) requires 72 hosts, we need a subnet mask that can accommodate at least 72 hosts. To achieve this, we can use a /25 subnet mask, which provides 128 addresses (2^7 – 2 = 126 usable addresses after subtracting network and broadcast addresses).

Subnet Mask: 255.255.255.128 (/25)

Now, let’s allocate subnets to each department:

  • Department A: 72 hosts (requires 1 subnet)
  • Department B: 35 hosts (requires 1 subnet)
  • Department C: 20 hosts (requires 1 subnet)
  • Department D: 18 hosts (requires 1 subnet)

Total hosts required: 72 + 35 + 20 + 18 = 145 hosts

We can allocate the subnets as follows:

  • Subnet 1: Department A (200.1.1.0/25) – Hosts: 200.1.1.1 to 200.1.1.126
  • Subnet 2: Department B (200.1.1.128/25) – Hosts: 200.1.1.129 to 200.1.1.254
  • Subnet 3: Department C (200.1.2.0/25) – Hosts: 200.1.2.1 to 200.1.2.126
  • Subnet 4: Department D (200.1.2.128/25) – Hosts: 200.1.2.129 to 200.1.2.254

(b) If Department D grows to 34 hosts, it will exceed the capacity of the current subnet. To accommodate this growth, the organization can:

  1. Expand the subnet for Department D: They can change the subnet mask from /25 to /26 (255.255.255.192), which will allow for 64 hosts per subnet.
  2. Allocate a new subnet: If the organization wants to keep Department D separate from other departments or anticipates further growth, they can allocate a new subnet with a /26 subnet mask to accommodate the additional hosts.

In either case, the organization will need to reconfigure the network settings for Department D to use the new subnet mask and adjust the IP addresses accordingly.

 

 


For More Updates Join Our Channels :