Sample Header Ad - 728x90

How to properly trigger path mtu discovery

1 vote
1 answer
1010 views
I've activate the pmtu attribute in my machine.
sysctl net.inet.tcp.path_mtu_discovery
net.inet.tcp.path_mtu_discovery: 1
then I've used /usr/bin/nscurl to send messages to a remote gateway with mtu=1000, in hope that it will trigger the pmtu automatically. However, I still witness packet fragmentation. > I Used nscurl since In Apple forum https://developer.apple.com/forums/thread/710848 it looks that if I use NSURLSession framework, it also perform pmtu discover behind the scenes. My question is how can I read the pmtu cache and check what is the selected mtu for a specific path (i've tried netstat -rn but it mtu is missing there) Also, what is the best way to trigger pmtu discovery? UPDATE : after analyzing nscurl traffic, it looks like the pmtu is being calculated on each message passing. However, once the connection is closed, I pmtu is removed and it's being re-calculated all over again. the following packet dump show that first, we try mtu size packets (size 1500) with DF bit set. the rest of the message is sent with ~1000 bytes sized packets (i've deliberately set the mtu of one of the hops to 1000). The problem is that if I try nscurl again, it re-calulate the mtu all over again. I want to be able to read the calculated pmtu and use it elsewhere. enter image description here Thanks
Asked by Zohar81 (641 rep)
Aug 9, 2023, 06:47 AM
Last activity: Aug 9, 2023, 12:17 PM