DCCN Assignment 4

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

CSC339- Data Communication and Computer

Networks

ASSIGNMENT NO 04

Submitted to:
DR. MARIYAM

Submitted by:
MOHSIN IDREES
SP21-BAI-014
Question No 1:

i. In CSMA/CD, after the fifth collision, what is the probability that a node
chooses K = 4? The result K = 4 corresponds to a delay of how many seconds
on a 10 Mbps Ethernet?

After the fifth collision in CSMA/CD, the adapter chooses from the set {0, 1, 2, ..., 31} for the value of
K. In this case, the probability that it chooses K = 4 is indeed 1/32.

The adapter waits for a specific amount of time before retransmitting the frame. This delay is
calculated using the slot time. For a 10 Mbps Ethernet network, the slot time is 51.2 microseconds.

To determine the actual delay in seconds, we multiply the slot time by the chosen value of K. In this
case, K = 4.

Delay = Slot time * K = 51.2 microseconds * 4 = 204.8 microseconds

So, the delay for K = 4 after the fifth collision is 204.8 microseconds.

ii. What is the maximum number of VLANs that can be configured on a switch
supporting the 802.1Q protocol? Why?

In the 802.1Q protocol, a 12-bit VLAN identifier is used to identify VLANs. Since the VLAN identifier is
12 bits long, it can have 2^12 (2 raised to the power of 12) different values.

Calculating 2^12 gives us 4,096. Therefore, the maximum number of VLANs that can be configured
on a switch supporting the 802.1Q protocol is 4,096.

Question No 2:

i. Why is an ARP query sent within a broadcast frame? Why is an ARP?

An ARP query is initially sent in a broadcast frame because the querying host does not know which
specific adapter address corresponds to the IP address it is trying to resolve. The broadcast ensures
that the query is received by all devices on the LAN. However, once the responding node receives the
query and knows its own adapter address, it can directly send the ARP response to the querying host
without using a broadcast frame, as the querying host's adapter address is already known. This
avoids unnecessary processing by other nodes on the LAN.

ii. Distinguish between baseband transmission and broadband transmission.

Baseband transmission: In baseband transmission, a single digital signal is directly transmitted over
a communication channel without any modulation. The entire bandwidth of the channel is used to
transmit the signal. This method is commonly used in digital communication systems, such as
Ethernet, where the signal occupies the entire available bandwidth.
Broadband transmission: Broadband transmission involves the simultaneous transmission of
multiple signals over a channel. This is achieved by modulating each signal onto a different carrier
frequency within the available bandwidth. The channel is divided into multiple frequency channels,
each carrying a separate signal. Broadband transmission is used in technologies like cable TV, DSL,
and fiber optic networks to support the transmission of multiple data, voice, and video signals
concurrently.

Question No 3:

Suppose that SNRdB = 45 the channel bandwidth is 6 MHz Please compute the
theoretical channel capacity.

C is the channel capacity in bits per second,


B is the channel bandwidth in Hz,
SNR is the signal-to-noise ratio (in linear scale).
Given that SNRdB = 45 and the channel bandwidth is 6 MHz (6 * 10^6 Hz), we need to convert SNR
from decibels to linear scale:

SNR = 10^(SNRdB / 10)


SNR = 10^(45 / 10)
SNR ≈ 177.8279

C = B * log2(1 + SNR)
C = (6 * 106) * log2(1 + 177.8279)
C ≈ (6 * 106) * log2(178.8279)
C ≈ (6 * 106) * 7.4771
C ≈ 44.8626 Mbps

Question No 4:

i. What is the bandwidth of a signal that can be decomposed into five sine
waves with frequencies at 0, 20, 50, 100, and 200 Hz? All peak amplitudes are
the same. Draw the bandwidth.

Bandwidth of a signal that can be decomposed into five sine waves with frequencies at 0, 20, 50, 100,
and 200 Hz, we need to find the maximum and minimum frequencies among these sine waves.
The maximum frequency (fmax) is 200 Hz, and the minimum frequency (fmin) is 0 Hz (since one of
the sine waves has a frequency of 0 Hz).

Using the formula for bandwidth:


B = fmax - fmin
B = 200 Hz - 0 Hz
B = 200 Hz
ii. A periodic composite signal with a bandwidth of 2000 Hz is composed of two
sine waves. The first one has a frequency of 100 Hz with maximum amplitude
of 20 V; the second one has maximum amplitude of 5 V. Please draw the
bandwidth.

Given Info:
• The first sine wave has a frequency of 100 Hz and a maximum amplitude of 20 V.
• The second sine wave has a maximum amplitude of 5 V.
To draw the bandwidth, we will plot the frequencies and amplitudes on a frequency spectrum.

Question No 5:
i. What is the bit rate for each of the following signals?

a. A signal in which 1 bit lasts 0.001 s.

Rate = 1/0.001
Rate = 1000
Rate = 1 Kbps

b. A signal in which 1 bit lasts 2 ms.


Rate = 1 / (2 * 10-3)
Rate = 500
Rate = 0.5 Kbps

c. A signal in which 10 bits last 20


Rate = 10 / (20 * 10-6)
Rate = 500,000
Rate = 0.5 Mbps
ii. What is the bandwidth of the composite signal shown in the below figure?

To calculate the bandwidth of the composite signal shown in the figure, we need to determine the
difference between the highest and lowest frequencies present in the signal.

In the given figure, the highest frequency is 180 Hz, and the lowest frequency is obtained by
subtracting 4(5) from 180 Hz. Therefore, the lowest frequency is 180 - 4(5) = 160 Hz.

Now we can calculate the bandwidth (B) using the formula:

B = fmax - fmin

B = 180 Hz - 160 Hz

B = 20 Hz

Question No 6:
i. A periodic composite signal contains frequencies from 10 to 30 kHz, each
with amplitude of 10 V. Draw the frequency spectrum.

Frequency spectrum:
Question No 7:
Suppose four active nodes—nodes A, B, C, and D—are competing for access
to a channel using slotted ALOHA. Assume each node has an infinite number
of packets to send. Each node attempts to transmit in each slot with
probability p. The first slot is numbered Slot 1, the second slot is numbered
Slot 2, and so on

a. What is the probability that node A succeeds for the first time in slot 5?
The probability that node A succeeds for the first time in slot 5 can be calculated as:
(1 – p(A)) * 4 p(A)
where, p(A) = probability that A succeeds in a slot
p(A) = p(A transmits and B does not and C does not and D does not)
p(A) = p(A transmits) p(B does not transmit) p(C does not transmit) p(D does not transmit)
p(A) = p(1 – p) (1 – p)(1-p) = p(1 – p)3
Hence, p(A succeeds for first time in slot 5)
p(A) = (1 – p(A)) * 4 p(A)
p(A) = (1 – p(1 – p)3) * 4 p(1 – p)3

b. What is the probability that some node (either A, B, C, or D) succeeds in slot


4?
The probability that some node (either A, B, C, or D) succeeds in slot 4 is given by:
p(either A or B or C or D succeeds in slot 4) = 4 p(1 - p)³
p(A succeeds in slot 4) = p(1-p)3
p(B succeeds in slot 4) = p(1-p)3
p(C succeeds in slot 4) = p(1-p)3
p(D succeeds in slot 4) = p(1-p)3
p(either A or B or C or D succeeds in slot 4) = 4 p(1-p)3

c. What is the probability that the first success occurs in slot 3?


The probability that the first success occurs in slot 3 can be calculated as:
p(some node succeeds in a slot) = 4 p(1-p)3
p(no node succeeds in a slot) = 1 - 4 p(1-p)3
Hence, p(first success occurs in slot 3) = p(no node succeeds in first 2 slots) p(some node succeeds
in 3rd slot) = (1 - 4 p(1-p)3)2 4 p(1-p)3

d. What is the efficiency of this four-node system?


The efficiency of the four-node system is equal to the probability of success in a slot, which can be
calculated as:
Efficiency = p(success in a slot) =4 p(1-p)3

You might also like