0% found this document useful (0 votes)
67 views4 pages

Link Layer Practice Problem and Solution

Uploaded by

pratyay.adri
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)
67 views4 pages

Link Layer Practice Problem and Solution

Uploaded by

pratyay.adri
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

Suppose two nodes start to transmit at the same time a packet of length, L,

over a broadcast channel of rate, R. Denote the propagation delay


between the two nodes as dprop. Will there be a collision if dprop>L/R? Why
or why not?
A:
No collision, since the other node is able to finish transmission before
new packet arrives.
Otherwise if dprop< L/R, there will be a collision. Before one node finishes
transmitting, it will start receiving the packet from the other node.

Why does collision occur in CSMA, if all nodes perform carrier


sensing before transmission?
A:
When a node transmits a frame, the node has to wait for the frame
to propagate. Because of this propagation latency, collisions cannot be
detected immediately by the nodes.

Suppose nodes A, B, and C each attach to the same broadcast


LAN (through their adapters). If A sends thousands of IP
datagrams to B with each encapsulating frame addressed to the
MAC address of B, will C’s adapter process these frames? If so, will
C’s adapter pass the IP datagrams in these frames to the network
layer C? How would your answers change if A sends frames with the
MAC broadcast address?
A:
C’s adapter will process the frames, but the adapter will not pass the
datagrams up the protocol stack. If the LAN broadcast address is
used, then C’s adapter will both process the frames and pass the
datagrams up the protocol stack.

Consider two subnets which are interconnected by a router. The router has
two ARP modules, each with its own ARP table. Is it possible that
the same MAC address appears in both tables? Explain.
A:
No it is not possible. Each LAN has its own distinct set of adapters
attached to it, with each adapter having a unique LAN address,
Consider a broadcast channel with N nodes and a transmission rate
of R bps. Suppose the broadcast channel uses polling for multiple
access. Suppose the amount of time from when a node completes
transmission until the subsequent node is permitted to transmit (polling
delay) is dpoll. Suppose that within a polling round, a given node is allowed
to transmit at most Q bits. What is the maximum throughput of the
broadcast channel?
A:
The length of a polling round is

The number of bits transmitted in a polling round is


NQ. The maximum throughput therefore is

Computers A, B, and C and one router are connected


to an Ethernet bus 100 metres apart
to make a LAN using the CSMA/CD protocol.
Assume that signal propagates on the Ethernet bus at a
speed of 2 x 108 m/sec, and all nodes can transmit data
at the rate of 100 Mbps .
A B C Router
100 m 100 m 100 m
• After finding the bus to be idle for a little while, A
and the router
start transmitting their frames exactly at the same
time. How many
bits of data can node A transmit before detecting
collision?
• What is the maximum time gap between the start
of transmission and
detection of collision by A?
• What is the length of the smallest frame that A
can transmit while
knowing whether or not it collided with a
transmission from the
router?
To answer these questions, we can use the following information:

1. The signal propagation speed on the Ethernet bus is 2 x 10^8 m/s.


2. All nodes can transmit data at a rate of 100 Mbps.
3. The length of the Ethernet bus between each node and the router is 100
meters.

Now, let's calculate the answers to the questions:

**1. How many bits of data can node A transmit before detecting a
collision?**

In CSMA/CD (Carrier Sense Multiple Access with Collision Detection), a


transmitting node listens to the bus while transmitting to detect any
collision. It can transmit until the first bit of its frame reaches the farthest
point on the bus and returns back. This round-trip time is the time it takes
for a signal to travel from node A to the router (or vice versa) and back.

The round-trip time (RTT) can be calculated as follows:

RTT = 2 * (Distance / Propagation Speed)


RTT = 2 * (100 m / (2 x 10^8 m/s)) = 1 microsecond (μs)

Now, we need to calculate how many bits can be transmitted in 1 μs at a


rate of 100 Mbps:

Bits = (Time * Data Rate)


Bits = (1 μs * 100 Mbps) = 100 bits

So, node A can transmit 100 bits of data before detecting a collision.
**2. What is the maximum time gap between the start of transmission and
detection of a collision by A?**

The maximum time gap between the start of transmission and the detection
of a collision is half of the round-trip time (RTT) because the collision must
be detected after the signal has traveled to the far end and back to the
transmitting node.

Maximum Time Gap = RTT / 2


Maximum Time Gap = (1 μs) / 2 = 0.5 μs

So, the maximum time gap between the start of transmission and collision
detection by node A is 0.5 μs.

**3. What is the length of the smallest frame that A can transmit while
knowing whether or not it collided with a transmission from the router?**

To ensure that node A can detect whether or not it collided with a


transmission from the router, its frame must be long enough to cover the
entire round-trip time (RTT). We already calculated the RTT as 1 μs.

Now, we need to calculate the minimum frame length in bits:

Minimum Frame Length = (RTT * Data Rate)


Minimum Frame Length = (1 μs * 100 Mbps) = 100 bits

So, the length of the smallest frame that node A can transmit while knowing
whether or not it collided with a transmission from the router is 100 bits.

You might also like