0% found this document useful (0 votes)
484 views

CN Problem Solutions

The document describes calculating the total delay for a frame being sent over a link with 10 routers. It finds that the propagation time is dominant at 10 ms, while the queuing and processing times are negligible at 20 μs and 10 μs respectively. The total delay is calculated to be 1.01003 seconds.

Uploaded by

amruthabharga
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
484 views

CN Problem Solutions

The document describes calculating the total delay for a frame being sent over a link with 10 routers. It finds that the propagation time is dominant at 10 ms, while the queuing and processing times are negligible at 20 μs and 10 μs respectively. The total delay is calculated to be 1.01003 seconds.

Uploaded by

amruthabharga
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

What is the total delay (latency) for a frame of size 5 million bits that is being sent on a link

with 10 routers each having a queuing time of 2 µs and a processing time of 1 µs. The length
of the link is 2000 Km. The speed of light inside the link is 2 x 108 m/s. The link has a bandwidth
of 5 Mbps. Which component of the total delay is dominant? Which one is negligible?

Solution:
Propagation time = distance / propagation speed

= 2000 Km / 2 x 108 m/s = 10 ms

Transmission time = Message size / Bandwidth

= 5 x 106 bits/ 5 Mbps = 1 s

Queuing time = 10 routers * 2 µs = 20 µs

Processing Delay = 10 routers * 1 µs = 10 µs

Total delay (latency) = 10 ms + 1 s + 20 µs + 10 µs

= 1010.03 ms = 1.01003 s / 1 s

The propagation speed is 2*108 m/s. Calculate the length of bits for bandwidth of a) 1 Mbps
b) 10 Mbps c) 100 Mbps.

Solution:
propagation speed
length of bits =
bandwidth

a) For 1 Mbps
2 x 108 𝑚/𝑠 2 x 108
length of bits = 1 x 106 𝑏𝑝𝑠 = 1 x 106 = 200 𝑚

b) For 10 Mbps
2 x 108 𝑚/𝑠 2 x 108
length of bits = 10 x 106 𝑏𝑝𝑠 = 10 x 106 = 20 𝑚

c) For 100 Mbps


2 x 108 𝑚/𝑠 2 x 108
length of bits = 100 x 106 𝑏𝑝𝑠 = 100 x 106 = 2 𝑚

Calculate the number of bits can fit on a link with 2 ms delay and bandwidth of 1 Mbps, 10
Mbps and 100 Mbps

Solution:
The formula to calculate the number of bits that can be transmitted over a link, given the
round-trip time (RTT) or delay (D) and the bandwidth (B), is:

Number of bits=B×D

where:
B is the bandwidth in bits per second (bps),
D is the round-trip time or delay in seconds.

Let us calculate the number of bits for the given values:

a) For a bandwidth of 1 Mbps (1,000,000 bps) and a delay of 2 ms (0.002 seconds):


Number of bits = 1,000,000 × 0.002 = 2000 bits

b) For a bandwidth of 10 Mbps (10,000,000 bps) and a delay of 2 ms (0.002 seconds):


Number of bits = 10,000,000 × 0.002 = 20,000 bits

c) For a bandwidth of 100 Mbps (100,000,000 bps) and a delay of 2 ms (0.002 seconds):
Number of bits = 100,000,000 × 0.002 = 200,000 bits

So, the number of bits that can fit on a link with a 2 ms delay for bandwidths of 1 Mbps, 10
Mbps, and 100 Mbps are 2000 bits, 20,000 bits, and 200,000 bits, respectively.

Consider a bus LAN with several equally spaced stations with a data rate of 9 Mbps and a bus
length of 1 km. What is the mean time to send a frame of 500 bits to another station, measured
from the beginning of transmission to the end of reception? Assume a propagation speed of
150 m/s. If two stations begin to monitor and transmit at the same time, how long does it need
to wait before an interference is noticed?

Solution:
To calculate the mean time to send a frame from the beginning of transmission to the end of
reception, we can use the formula:

Transmission time=Frame size / Data rate

The mean time to send a frame also includes the propagation time along the length of the bus.
The formula for propagation time (tprop) is:

tprop=Propagation speed / Bus length

The total time (T) is the sum of the transmission time and the propagation time:

T = Transmission time + 2 × tprop

Given that the data rate (Data rate) is 9Mbps, the frame size is 500bits, the bus length is
1 km, and the propagation speed is 150m/s, we can plug in these values to find T.

Transmission time=500 / 9×106 s

tprop=1000 / 150 s

T = 500 / (9 x 106) + 2× (1000 / 150)

Now, calculate T:
T ≈ 5.6×10-5+2 × (1000/150) ≈ 0.0133s

So, the mean time to send a frame from the beginning of transmission to the end of reception
is approximately 0.0133 seconds.

To find out how long it takes for an interference to be noticed when two stations begin to
transmit at the same time, we need to consider the round-trip time (2×tprop):

Interference notice time=2×tprop

Interference notice time=2×1501000≈0.0267s

So, the time it takes for an interference to be noticed is approximately 0.0267 seconds.

An organisation is granted a block of addresses with the beginning address


14.24.74.0/24. The organisation needs to have 3 sub blocks of addresses to use in its
three subnets: one sub block of 10 addresses, one sub block of 60 addresses, and
one sub block of 120 addresses. Design the sub blocks.

Solution:
To design subnets for the given block of addresses (14.24.74.0/24) with the
requirement of three subnets (10 addresses, 60 addresses, and 120 addresses), you
can use the following approach. We'll divide the original /24 block into three subnets
of sizes 128 (2^7), 64 (2^6), and 32 (2^5) addresses respectively to accommodate
the requested sizes.

1. Subnet 1: 120 addresses


• Subnet Size: 128 addresses (27)
• Subnet Mask: /25 (because 27 = 128)
• Address Range: 14.24.74.0/25 to 14.24.74.127/25
• Usable Addresses: 14.24.74.1 to 14.24.74.126 (Total 126 usable
addresses, excluding network and broadcast addresses)
2. Subnet 2: 60 addresses
• Subnet Size: 64 addresses (26)
• Subnet Mask: /26 (because 26 = 64)
• Address Range: 14.24.74.128/26 to 14.24.74.191/26
• Usable Addresses: 14.24.74.129 to 14.24.74.190 (Total 62 usable
addresses)
3. Subnet 3: 10 addresses
• Subnet Size: 32 addresses (25)
• Subnet Mask: /27 (because 25 = 32)
• Address Range: 14.24.74.192/27 to 14.24.74.223/27
• Usable Addresses: 14.24.74.193 to 14.24.74.222 (Total 30 usable
addresses)

These subnets meet the organization's requirements for three sub-blocks of


addresses with sizes of 120, 60, and 10 addresses respectively, and they fit within the
original /24 block (14.24.74.0/24). Adjustments can be made based on specific
network requirements and future scalability needs.

A message that is to be transmitted is represented by the polynomial M(x) = x5 + x4 + x with


a generating prime polynomial G(x) = x3 + x2 + 1. Generate a 3 bit CRC code, C(x) which is
to be appended to M(x).

Solution:

Step 1 - Multiply the message M(x) by x3, where 3 is the number of bits in the CRC
as given by the degree of P(x).

Add 3 three zeros to the binary M(x).

Step 2 - Divide the product M(x) x3 by the generating polynomial P(x).

We wish to find "the remainder, modulo P(x)"

Compute the following:

100100 (ignore this quotient)


------------
1101 ) 110010000
1101
----
1100
1101
----
100 = remainder = R(x)

Observe that if R(x) were in place of the appended zeros, the remainder would
become 000.

Let CRC(x) = R(x).

Step 3 - Add the remainder CRC(x) to the product M(x) x3 to give the code message
polynomial C(x):

C(x) = M(x) x3 + CRC(x)

Put the remainder CRC(x)=100 in place of the three zeros added in Step 1.
110010 100

The message may now be transmitted

The transmission C(x) = (110010100) is now an exact multiple of P(x) = (1101);


division C(x)/P(x) gives zero remainder, or C(x) ≡ 0 mod P(x). Upon reception, it is
expected that an errored message will no longer be a multiple of P(x).

CRC Error Checking - No Errors

Upon reception, an entire received codeword R(x) = "message + crc" can be


checked simply by dividing R(x)/P(x) using the same generating polynomial. If the
remainder after division equals zero, then no error was found.

100100 (ignore this quotient)


------------
1101 ) 110010100
1101
----
1101
1101
----
000 = remainder (no error)

Two hosts are in a CSMA/CD network and the medium has a data transfer capacity of
1Gbps. The minimum frame length is fixed to 1,000 bits and the propagation speed is
2 ×108 m/s (i) What will be the distance between the hosts ? (7) ii) If it is an Ethernet
network, what is the efficiency when the hosts have a maximum distance between
them? (8)

Solution:
To calculate the distance between the hosts in a CSMA/CD network, we can use the
following formula:

Distance=Propagation speed×Round-
trip timeDistance=Propagation speed×Round-trip time

The round-trip time (round-triptround-trip) can be calculated using the formula:

round-trip=Frame lengthData ratetround-trip=Data rateFrame length

Given:

• Data transfer capacity ( Data rate) = 1 Gbps = 109bps


• Minimum frame length (Frame length ) = 1,000 bits
• Propagation speed = 2×108 m/s

(i) Distance between the hosts:

tround-trip=1,000 / 109

tround-trip≈1μs

Distance=(2×108)×(1×10-6)

Distance=200 meters

So, the distance between the hosts is approximately 200 meters.

(ii) Efficiency in an Ethernet network:

The efficiency (E) of a CSMA/CD network can be calculated using the formula:

1
𝐸= 𝑡𝑝𝑟𝑜𝑝
1 + 5 (𝑡 )
𝑡𝑟𝑎𝑛𝑠

where:

• tprop is the propagation delay


• ttrans is the transmission time

The transmission time ( ttrans) can be calculated as the time it takes to transmit a
frame:

𝐹𝑟𝑎𝑚𝑒 𝐿𝑒𝑛𝑔𝑡ℎ
𝐸=
𝐷𝑎𝑡𝑎 𝑟𝑎𝑡𝑒

Using the minimum frame length:

1000
𝑡𝑡𝑟𝑎𝑛𝑠 =
109

ttrans=1μs

Now, let's calculate the efficiency:


1
𝐸= 𝑡𝑝𝑟𝑜𝑝
1 + 5 (𝑡 )
𝑡𝑟𝑎𝑛𝑠

1
𝐸=
1 µ𝑠
1 + 5 (1 µ𝑠)

1
𝐸=
6

So, the efficiency of the Ethernet network with hosts at the maximum distance is 1/6
or approximately 16.67%.

Consider sending a 3500-byte datagram that has arrived at a router R1 that needs to
be sent over a link that has an MTU size of 1000 bytes to R2. Then it has to traverse a
link with a MTU of 600 bytes. Let the identification number of the original datagram
be 465. How many fragments are delivered at the destination? Analyse the
parameters associated with each of these fragments.

Solution:
When a large datagram needs to be sent over a network with varying Maximum
Transmission Unit (MTU) sizes, it needs to be fragmented into smaller fragments.
Each fragment will have its own header information. Let's calculate the number of
fragments and analyze the parameters associated with each fragment in this
scenario.

Given:

• Original datagram size = 3500 bytes


• MTU size of the link from R1 to R2 = 1000 bytes
• MTU size of the link from R2 to the destination = 600 bytes
• Identification number of the original datagram = 465
1. Fragmentation from R1 to R2 (MTU = 1000 bytes):
• Original datagram size = 3500 bytes
• MTU size = 1000 bytes
Number of fragments=⌈Original datagram size / MTU size⌉
Number of fragments=⌈3500 / 1000⌉=4 fragments
The size of each fragment will be 1000 bytes except for the last fragment,
which will be smaller.
2. Fragmentation from R2 to the destination (MTU = 600 bytes):
• The fragments from the previous step will now be further fragmented
to fit the MTU size of 600 bytes.
For each fragment from the previous step, calculate the number of fragments:
Number of fragments=⌈Fragment size / MTU size⌉
Analyze the parameters for each fragment, including:
• Identification number (same as the original datagram)
• Fragment offset
• More fragments flag
The last fragment in each set will have the More fragments flag set to 0.

Here's a simplified example:

For the first fragment from R1 to R2 (1000 bytes):

• It needs to be further fragmented for the 600-byte MTU.


• Number of fragments=⌈1000 / 600⌉=2 fragments
• Fragment 1 (offset 0, More fragments flag = 1)
• Fragment 2 (offset 1, More fragments flag = 0)

Repeat this process for each of the 4 fragments from R1 to R2.

In summary, there will be a total of more than 4 fragments delivered at the


destination, and each fragment will have its own parameters including identification
number, fragment offset, and the more fragments flag. The specific values will
depend on the exact sizes and offsets, and they will need to be calculated
accordingly.

Suppose we want to transmit the message 11001001 (P(x) = x 7 + X6 +x 3 + 1) and protect it


from errors using the CRC polynomial C(x) = x 3 + 1. a) Use polynomial long division to
determine the message that should be transmitted.
Answer:
• We take the message 1100 1001, append 000 to it, and divide by 1001.
• The quotient is 1101 0011 and the remainder is 011.
• Therefore, what we transmit is the original message with the remainder appended:
1100 1001 011.

A TCP machine is sending full windows of 65,535 bytes over a 1-Gbps network that has a
10-ms one-way delay. What is the throughput achievable? What is the efficiency of
transmission? How many bits are needed in the Advertised window field of a proposed
reliable byte stream protocol (like TCP) running over the above network, for achieving
maximum efficiency?

Solution:
To calculate the throughput, efficiency, and the number of bits needed in the
Advertised Window field, we'll use the following formulas and information:
1. Throughput (TP):TP=W/RTT where:
• W is the window size (maximum number of unacknowledged bytes in
flight),
• RTT is the Round Trip Time.
2. Efficiency (E):E=TP / Link Capacity
3. Advertised Window (AW): The Advertised Window field in a TCP header
represents the size of the receiver's buffer. It's the maximum amount of data
(in bytes) that the receiver is willing to accept.
For maximum efficiency, we need the Advertised Window to be equal to the
window size (W).

Given:

• Window size (W) = 65,535 bytes


• Network capacity (Link Capacity) = 1 Gbps
• One-way delay ( RTT) = 10 ms

Let's calculate:

1. Throughput (TP): =65,535 / 10×10−3


TP=6,553,5 / 0.01 bps
TP=6,553,500bps
2. Efficiency (E): E=6,553,500 / 1×10 9

E=0.0065535
3. Number of Bits in Advertised Window (AW): For maximum efficiency, AW
should be equal to W.
AW=W=65,535 To represent this value in bits, you need ⌈log2(65535+1)⌉
bits. The "+1" is because the window size includes 0 as a valid size.
AWbits=⌈log2(65536)⌉
AWbits=16bits

So, the throughput achievable is 6,553,5006,553,500 bps, the efficiency of


transmission is 0.00655350.0065535, and the number of bits needed in the
Advertised Window field for maximum efficiency is 1616 bits.

You might also like