0

Suppose sender sending some data to receiver and there are 3 routers between them. R1, R2, R3 are routers.

enter image description here

Now sender starts sending data packet D through it's AL, TL, N/W L, DLL,PL to router R1 through router R3 to different layer of receiver.

I have an couple of confusions:

Question:1 Suppose the data is lost between the link R1 and R2. Then R1 will not get acknowledgement at data link layer from R2 until the time out timer expires at R1. My question is then data is retransmitted from data link layer of R1 or sender data link layer? And R1 save the data in buffer until get acknowledgement from R2?

Question:2 Suppose data is lost in between the link R3 and data link layer of receiver side. Then if R3 didn't get acknowledgement from data link layer of receiver until the time out expires at R3 then retransmission will happen from physical layer of receiver or R3 or data link layer of sender?

Question:3 Now data reach at DLL at receiver side. My question is data travelling travelling through DLL to TL data loss is possible? If DLL didn't get acknowledgement from transport layer at receiver side then data is resend from DLL to transport layer at receiver side or data is resend from sender DLL or sender transport layer to the receiver DLL through TL?

Question:4 If reordering is happen in DLL at receiver side then transport layer always also get in-order data, there is no necessity of sorting at transport layer?

N. B: R1, R2, T3 has L1, L2, L3 layers.

6
  • R1, R2, R3 are what? Repeaters? Where's the physical layer?
    – Zac67
    Feb 5, 2022 at 10:43
  • @Zac67 R1, R2, R3 are routers. Physical link between any two decive.
    – Sahitto
    Feb 5, 2022 at 10:50
  • 2
    Then your diagram is seriously flawed. Routers work on the network layer, so you'll need an L1, L2, L3 stack for each of them. Also, routers do not acknowledge any packets and any loss will go unnoticed at that layer. The only layer optionally tracking data loss is the transport layer (with rare exceptions like IEEE 802.11).
    – Zac67
    Feb 5, 2022 at 11:03
  • @Zac67 image is corrected. And router has L1, L2, L3 stack for each of them.
    – Sahitto
    Feb 5, 2022 at 11:05
  • @Zac67 the data link layer in routers does not tracking the data loss?
    – Sahitto
    Feb 5, 2022 at 11:09

2 Answers 2

2

Let's review the Internet.

Internet is a packet-switched network, where layer 3, aka IP, is packet-based best effort delivery service. There is no such thing as layer 3 acknowledgements in the Internet. So, routers do not acknowledge. There are ICMP messages that can be sent to the sender in case of failures, but they do not affect what happens to the packet in question.

In Internet, reliable packet delivery, if necessary is usually done by transport layer (layer 4). Transport layer (at least in theory) only works on two end-points, and all transport layer ACKs and retransmissions only happen on the sender and on the receiver, not on the systems in between. You can read the paper End-to-End Argument in System Design, if you want to know why does it work like this.

Now, the data link layer. Best-effort packet service can work on top of any data link layer, so the data link layer can be either reliable or unreliabe/best effort. As a rule of thumb, it makes sense to have a reliable layer 2 if packet errors (any event that causes the packet to not be delivered correctly) are too frequent. This usually translates into - wired layer 2 is best effort and wireless layer 2 is reliable. Also note, that wireless layer 2 usually only occure on the edge, i.e., between end-points and their first routers. If layer 2 is reliable, then acknowledgements and retransmissions happen between two layer 2 end-points. Note that, layer 2 has its own acknowledgements, which are independent of the acknowledgements of the transport layer. So, if data link layer between R3 and receiver is reliable, then data link layer of R3 will have to store the packet untill it receives an ACK and retransmit it several times if necessary. The same would happen between R2 and R3, but unless we are in a wireless mesh network, it is highly unlikely that data link layer is reliable.

Now to host issues, checksums and co.

Question:3 Now data reach at DLL at receiver side. My question is data travelling travelling through DLL to TL data loss is possible?

Yes. Every layer at the receiver has processing queues with finite space in them. If there is no space to the packet it could be dropped.

Examples:

On reliable layer 2 you would probably employ some form of flow control. On unreliable layer 2, network card can drop packets, if its queue is full and the host system did not pick packets up in time.

I came across a situation where linux TCP receiver has dropped packets, despite having advertised space in receiver window. It takes too much to explain and is out of scope here, but, importantly it does not violate the specification.

If DLL didn't get acknowledgement from transport layer at receiver side then data is resend from DLL to transport layer at receiver side or data is resend from sender DLL or sender transport layer to the receiver DLL through TL?

In theory, DLL does not get or process acknowledgements from transport layer. Reliable layer 2 will employ its own acknowledgements. Acknowledgements from transport layer are treated as abstract packets with content. So, missing DLL acknowledgments are processed by DLL peer, which is R3 in your examples. Missing transport layer acknowledgments are processed by TL at the sender.

In practice, it is not quite this simple. TCP performance on networks with losses is quite suboptimal (mostly due to reasons that have something to do with congestion control). This is why wireless is usually reliable. Also wireless access points will most likely employ some kind of optimizations that monitor TCP flows. I would say that this optimization does not really fit in the OSI model. Also this is performance optimization. Network is supposed to work if you turn it off.

Question:4 If reordering is happen in DLL at receiver side then transport layer always also get in-order data, there is no necessity of sorting at transport layer?

No. Again, layer 3 is best effort, and can reorder packets. This means layer 4 should be prepared to receive out-of-order packets and sort them out. Whatever layer 2 can guarantee, layer 3 will not guarantee this, and transport layer has to deal with this.

Example:

Packets can travel different routes. This can happen if the route changes. This can also happen if one of the routers does some sort of load balancing along multiple paths (e.g., (equal cost)-multiple paths). Recall, that in packet switched networks each packet is routed independently of what happened with the previous packet.

In practice, again, since everyone is using TCP it is desirable to design layer 3 and layer 2 to avoid reordering of packets of the same transport layer flow. Routers usually do load balancing so that packets of the same flow (identified by ip addresses/ports/protocol tuple) are routed on the same path. Again, this is an optimization that affects performance. Transport layer is supposed to be fully functional if this is not done.

Another quite bizzare example are receivers with multi-core processors, aka almost any end-point right now. Packets are processed by cores in parallel, and two packets processed by two different cores can arrive in arbitrary order at the receiver transport layer. Again, usually network cards inspect transport flows and ensure that packets of the same flow are processed by the same core, but I saw situations where it did not happen.

41
  • you don't understand question 4, where I said at receiver side, there is no router is involved, only host(receiver) is present, so how out of order possible in transport layer if data already sorted in DLL?
    – Sahitto
    Feb 5, 2022 at 18:15
  • (1) see updated answer (2) who said that they are sorted? there is no guarantee that they are sorted. Also, i don't know of any layer 2 which actually sorts the packets.
    – Effie
    Feb 5, 2022 at 18:17
  • ok, actually, maybe on satelite networks. on wireless edge networks you usually send one packet at a time.
    – Effie
    Feb 5, 2022 at 18:19
  • 1
    i would say that it is highly unlikely, but not completely impossible. FIrst, CRC is not cryptographic checksum, so it might fail. Not sure if Internet checksum won't fail as well. Second, it is still theoretically possible, that there is a memory corruption and packets actually gets corrupted inside the host.
    – Effie
    Feb 5, 2022 at 18:30
  • 1
    When we say reliable we mean the data Is acknowledged, and retransmitted if it isn’t. Wi-fi works that way. Ethernet is not reliable because there’s no guarantee that the data is received. Reliable in this sense has nothing to do with the probability of errors.
    – Ron Trunk
    Feb 5, 2022 at 20:59
2

Then R1 will not get acknowledgement at data link layer from R2 until the time out timer expires at R1.

There is no acknowledgement on OSI's data link layer or network layer in general (there may be exceptions). The only layer that - optionally - tracks data loss and retransmits lost data is the transport layer (L4). Some L4 protocols track delivery and ensure transmission (like TCP), some don't (like UDP). Since that layer is only implemented on the host level, it's the source host that retransmits unacknowledged data.

When a PDU fails integrity check, it is silently dropped by the checking entity. Switches, routers, hosts drop L2 frames failing FCS. Routers, hosts drop L3 IP packets failing header checksum check. Hosts drop L4 segments failing data checksum check. Any forwarding node suffering from congestion also silently drops PDUs spilling over its queueing limit. Silently dropped PDUs may go completely unnoticed unless the transport-layer (L4) protocol tracks delivery. If it does it's the source's L4 that retransmits the lost segment.

Another function that might be misunderstood is retransmission after a collision on a half-duplex link. These collisions happen on the physical layer (L1) and retransmission is done by the buffering device interfacing the collision domain - a switch, a router, or the source host. This isn't a retransmission for lost data (due to checksum failure) but for not succeeding on the physical layer. Checksum failures are not detected on this layer.

15
  • "Switches, routers, hosts drop L2 frames failing FCS. "--- the dropped L2 frame don't forward to network layer. So how network layer got corrupted packet?
    – Sahitto
    Feb 5, 2022 at 12:38
  • please reply if corrupted packet discarded so how network layer get corrupted packet?
    – Sahitto
    Feb 5, 2022 at 12:54
  • if I check data there is no error in DLL, then there is possibility of error in L3? How? Because L3 header is also data in DLL? So it possible error packet in L3?
    – Sahitto
    Feb 5, 2022 at 13:29
  • Are you asking for OSI-layer protocols in general (then that question cannot be answered in general), or about specific protocols like Ethernet, IPv4, IPv6 (IPv4: unlikely yet possible, IPv6 doesn't use checksum)?
    – Zac67
    Feb 5, 2022 at 13:52
  • if I am using Ethernet in DLL and ipv4 in network layer , then if I check data there is no error in DLL, then there is possibility of error in L3? How? Because L3 header is also data in DLL? So it possible error packet in L3?
    – Sahitto
    Feb 5, 2022 at 13:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.