ipsec.txt 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. Here documents known IPsec corner cases which need to be keep in mind when
  2. deploy various IPsec configuration in real world production environment.
  3. 1. IPcomp: Small IP packet won't get compressed at sender, and failed on
  4. policy check on receiver.
  5. Quote from RFC3173:
  6. 2.2. Non-Expansion Policy
  7. If the total size of a compressed payload and the IPComp header, as
  8. defined in section 3, is not smaller than the size of the original
  9. payload, the IP datagram MUST be sent in the original non-compressed
  10. form. To clarify: If an IP datagram is sent non-compressed, no
  11. IPComp header is added to the datagram. This policy ensures saving
  12. the decompression processing cycles and avoiding incurring IP
  13. datagram fragmentation when the expanded datagram is larger than the
  14. MTU.
  15. Small IP datagrams are likely to expand as a result of compression.
  16. Therefore, a numeric threshold should be applied before compression,
  17. where IP datagrams of size smaller than the threshold are sent in the
  18. original form without attempting compression. The numeric threshold
  19. is implementation dependent.
  20. Current IPComp implementation is indeed by the book, while as in practice
  21. when sending non-compressed packet to the peer(whether or not packet len
  22. is smaller than the threshold or the compressed len is large than original
  23. packet len), the packet is dropped when checking the policy as this packet
  24. matches the selector but not coming from any XFRM layer, i.e., with no
  25. security path. Such naked packet will not eventually make it to upper layer.
  26. The result is much more wired to the user when ping peer with different
  27. payload length.
  28. One workaround is try to set "level use" for each policy if user observed
  29. above scenario. The consequence of doing so is small packet(uncompressed)
  30. will skip policy checking on receiver side.