4.2k views

Assume that source S and destination D are connected through two intermediate routers labeled R. Determine how many times each packet has to visit the network layer and the data link layer during a transmission from S to D.

1. Network layer – $4$ times and Data link layer – $4$ times
2. Network layer – $4$ times and Data link layer – $3$ times
3. Network layer – $4$ times and Data link layer – $6$ times
4. Network layer – $2$ times and Data link layer – $6$ times
edited | 4.2k views
0
any good explanation ?

edited
0
@Mithlesh Can u plz elaborate on why in the router the protocol stack is visited twice.
0
Ok thanks :)
0
As the packet visits the network layer in the routers too, why it is not counted ??
+2
Answer to this needs more explaination.
0
give more explanation broooo diagram is clear but why didn't u addd network at routers and why did u count two two times at thr router why can't it be once
+4
both side of router may have different ethernet network or different frame mtu so it has 2 -2 layer of datalink and physical while network layer can handle mtu ,frame size so only 1 network layer
+15

At source: Application layer transmit the message. TCP adds the header to the message and sends this segment to IP.

Network layer now adds IP header, puts TTL value, checksum and then, passes IP packet down to data link layer.

Data link layer puts this IP packet into ethernet frame, adds the preamble and Starting Frame delimiter and transmits the frame with CRC.

Physical layer encodes the frame from DLL into 0's and 1's.

Now What happens at each Router:

Physical layer decodes the bitstream, data link layer checks the frame for errors using CRC, passes to the network layer, the network layer sees the destination address as D and decides to route it to another router, decrements the TTL, recomputes the checksum and sends the packet down to the data link layer.

The data link layer changes the destination MAC address to the MAC address of the next router (or destination D if the router is the second one), recalculates CRC and sends the frame.

The physical layer again passes the frame as sequence of 1's and 0's.

At Destination: The physical layer decodes the message and passes it to the data link layer. Data link layer checks for errors and passes the IP packet to the network layer. The network layer checks the destination address and accepts it.

Here confusion is why network layer at routers R1 and R2 is visited only once?

Because the routers R1 and R2 don't have to consume the information present in the message, otherwise, this should have been passed on to the transport layer and application layer and then back to network layer again.

Data link layer will be visited twice per router because the routing decision is involved and this will be made only by the network layer.

In source,

it is $1$ data link and $1$ network .. now as routers are in network layer
So in

$\text{Router1:}$At first, it goes to network layer like physical$\Rightarrow$DLL$\Rightarrow$network
(then again comes to physical like)$\Rightarrow$DLL$\Rightarrow$physical

$\text{Router2}:$
Physical$\Rightarrow$DLL$\Rightarrow$network$\Rightarrow$Dll$\Rightarrow$physical

Destination:

Physical$\Rightarrow$DLL$\Rightarrow$Network$\Rightarrow$TCP$\Rightarrow$Application

In both routers after computation in Network layer, it is coming back to physical again...
the reason is signals can only be transmitted with physical layer.

So, Network Layer$=4 \text{ Visit}.$

DLL$=6\text{ Visit}.$

edited
(C) Network layer – 4 times and Data link layer – 6 times

Sender Has one network layer and data link layer as receiver but router have 1NL,2DL and 2PL;

Option given as

(C) Network layer – 4 times and Data link layer – 6 times

(C) is the correct option!
For detailed explanation:

0
Good Explanation
ans c)

1
2