cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
14326
Views
0
Helpful
8
Replies

UDP Communication and MTU/MSS Size

169.254.X.Y
Level 1
Level 1

PC A has a 1500 byte MTU size and 1460 byte MSS size. PC A needs to send 9000 byte of data to PC B. PC B has a 1400 byte MTU(I am not 100%, but I heard MTU size can be changed) size and obviously 1360 byte MSS size. PC A will segment 9000 byte of data into 6 1460 byte and 1 240 byte,  then send all 7 segments to PC B. Since first 6 packets' size is bigger than PC B's MTU size, PC B would discard them. But since the last packet size is less than PC B's MTU size, PC B will take that last packet. If my understanding or explanation is wrong, please please let me know. 

 

P.S. If you know how to simulate that senario in the packet tracer, please let me know :) 

8 Replies 8

Hello,

  Your conclusion is missing an important information which is the SYN packet MSS negotiation. The packet exchange will do by the lowest MSS capacity.

 Well, if must exist negotiations then presumably we can say that there's no MSS for UDP, only TCP.

I mentioned PC A's and PC B's MSS so that you have an idea how PC A will segment 9000 byte data. I am just wondering that 9000 byte doesn't get segmented in UDP communication in L4? If not, how PC A sends 9000 byte of data to PC B without segmenting or fragmenting the data?

This is not a problem at all. Fragmentation is performed on the sender following the link´s MTU. UDP rely on Fragment Offset, and More Fragments (MF)  present on IP header to organized the stream. 

 

So, PC B will get only 240 byte of data out of 9000 byte since the data received from PC A is bigger than PC B's MTU size. Plus, then in this case, PC A doesn't segment the 9000 byte data in L4 and litterally pass to L3, and then fragment at L3?

Nop. 

PC A will segment the 9000 byte according to link MTU and sent this to PC B so that PC B can receive all the information. There´s no way PC sent 9000 byte cause there´s no MTU with that size. 

 We are certainly talking about Ethernet here. Ethernet has MTU of 1500 right? Then, using your scenario, PC A needs 6 packets of 1500 byte plus one more packet with 240 byte. 

 Also, we are talking about L4 only here. TCP/UDP has no idea what L3 is about. They are only a payload inside L3 packet.

 Is that making sense?

How PC A segments the 9000 byte according to link MTU? If PC A segments the 9000 byte according to MSS or fragments the 9000 byte according to MTU, I do understand. Segmentation and MTU do not match according to what I have learned from ICND 1.

IP MTU is something that's handled hop-by-hop; while TCP-MSS is something that being decided end-to-end based on the lowest MSS size identified during TCP 3-way-handshake.

So as PC A is sending 9000 bytes data, then I would assume this is 9000-bytes is Datagram Size (used in UDP). Because if it is on TCP, then PC A should be sending its data in 1360-bytes per segment already (taking MSS of PC B as the reference).

PC A then will break down this 9000-bytes data on IP level based on MTU between its own and the MTU on the next hop it deals with. as long as both ends of the hop using same MTU, fragmentation and defragmentation can work without issue.

it might be an issue if any of the hops along the path between PC A <> PC B don't have matching MTU, i.e. on 1 end it is 1500-bytes, but on the other end it's different, as each end will fragment and defragment using its own MTU as reference.

In your PC A to PC B example, it might be a situation where every hop along the way already using MTU 1500-bytes, except PC B itself. so when PC B gateway (the hop before PC B) sent those packets as 1500 bytes, PC B received them, but unable to defragmentize them properly as its reference is each packet = 1400-bytes (and yes, possibly dropped them as considered to be 'bad' packet).

 

hope this helps.

Joseph W. Doherty
Hall of Fame
Hall of Fame

As also mentioned by other posters, you're asking about MSS, which is TCP, but your heading question has UDP.  Which, or both, are you asking about?

However, as also noted by other posters, if doing TCP, TCP setup will use the lessor MSS of 1360, so there will be no MTU issue.

If using UDP, what will happen will depend on whether your too hosts are on the same media (and if they are, they should be using the same MTU) or on different media, with transient L3 hops.  For the latter, what happen will also depend if the sender is setting the DF bit, or not.

If same media, one would expect all too large MTU packets be dropped.

If different media, and DF set, L3 hop with smaller MTU will notify sender IP packet too large, and sender will adjust its transmission size to avoid dropping.  NB: since its UDP, it will also be up to the sending application to determine whether to retransmit data that was in too large, and dropped, packets.

If different media, and DF not set, L3 hop will fragment packet, so host will receive all the packets; in your example 13 in all (first 6 split into two packets, and the last one).

Review Cisco Networking for a $25 gift card