[sr-dev] [kamailio/kamailio] Path MTU discovery for IPv6 (PR #3141)

Henning Westerholt notifications at github.com
Thu Aug 18 16:19:14 CEST 2022


Thank you. I am trying to summarize it

1. core option pmtu_discovery for IPv4
  - exists a long time
  - sets socket option IP_PMTUDISC_DO 
  - sets do not fragment bit in outgoing packets
  - kernel will implement PMTU discovery, initial UDP packets might be dropped while the kernel tries to figure out the MTU
  - if MTU is found, UDP will be delivered and kernel will store the discovered MTU internally
  - further packets will use this value
  - this is probably not really efficient, but probably works
 
2. core option pmtu_discovery for IPv6
  - new introduced in this PR
  - set socket option IP_PMTUDISC_DO 
  - will not set do not fragment bit in outgoing packets
  - the kernel will refuse larger packets with EMSGSIZE
  - no discovery will take place, Kamailio will probably just stop sending the packet

3. suggestion in this PR for IPv6
  - use IPV6_PMTUDISC_WANT as socket option
  - will fragment a datagram if needed according to the path MTU for IPv6
  - probably could be set by adding a new core option

4. suggestion in this PR for IPv4
  - use IP_PMTUDISC_WANT as socket option
  - will fragment a datagram if needed according to the path MTU, or will set the don't-fragment flag otherwise
  - probably could be set by adding a new core option 

5. Additionally Kamailio provide options to manually manage the MTU with usual sockets
  - core setting udp_mtu and udp_mtu_try_proto
  - will try another protocol if MTU exceeded internally 

6. Additionally Kamailio provide options to manually manage the MTU with RAW sockets
  - core option udp4_raw_mtu
  - will fragment the packets internally

My suggestion would be add a new value **2** to the pmtu_discovery core parameter, which sets then the _WANT socket option for IPv4 and IPv6.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3141#issuecomment-1219552551
You are receiving this because you are subscribed to this thread.

Message ID: <kamailio/kamailio/pull/3141/c1219552551 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20220818/c2ae014f/attachment.htm>


More information about the sr-dev mailing list