Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have two debian servers located on the same subnet. They are connected by a switch. I am aware the UDP is unreliable.

Question 1: I assume the link layer is ethernet. And MTU from a standard Ethernet is 1500 bytes. So the maximum datagram not being fragramented is 1500- 20 -8 = 1472 bytes? Can I say, because there's no router in between these two servers, therefore, the IP datagram will not be fragmented.

Question 2: Because two servers are directly connected with a switch, can I assume that all datagrams arrives in order and no loss on the path?

Question 3: How can I determine that the chances of datagram dropped at the server because of buffer overflow. What size to set the receive buffer so that datagram will not overflow receive buffer.

share|improve this question

2 Answers 2

  1. The IP packet can certainly be fragmented by the devices sending them; they know that their media's MTU is lower than the packet that they're sending, so they'll split the IP packet accordingly. In this day and age, many hosts implement path MTU discovery, which explicitly tells routers not to handle fragmentation at all, but to tell the host to adjust its effective MTU for that path instead, so that it's handling any necessary fragmentation.

  2. No - with a single switch topology you can probably assume that they'll arrive in order, but you cannot assume no loss.

  3. This completely depends on the devices in use, their performance, and the amount of data in transit.

share|improve this answer

1) No. In practice, even setting the don't fragment (DF) bit won't guarantee to the layer above UDP that there's no fragmentation. UDP simply doesn't provide this guarantee to layers above it. Layers above UDP are not supposed to care.

2) No. UDP simply doesn't provide this guarantee to layers above it.

3) The only reliable way to tell is to measure under the actual conditions you plan to use.

Fundamentally, what you are trying to do is synthesize a guarantee by reasoning that you can't think of any way the guarantee could be violated. You can't synthesize a guarantee that way. You only get the guarantees the protocol actually provides. Though in practice, it will happen most of the time this way, it just isn't guaranteed, period.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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