8

I am looking to understand if Linux has the capability to do fragmentation of the outgoing packets at inner IP or outer IP level? I looked the source code in /net/ipv4/files in Linux kernel source, but do not find reference to the fragmentation level. Or should I be looking at layer 2 level files where where the decision might be made based on MTU size?

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
kishore .
  • 485
  • 1
    I'm voting to close this question as off-topic because this is a networking/TCP/IP theory question and not Linux related. – Rui F Ribeiro May 27 '16 at 18:49
  • 2
    Linux does implement fragmentation. Why is it not a Linux question?! The concept is network related but configuration and setting is linux specific :). Thanks – kishore . May 27 '16 at 19:12
  • 4
    What am I missing?  I don't see a question about networking theory; I see a question about the Linux implementation of the IP protocol.  That's on-topic. – Scott - Слава Україні May 27 '16 at 19:35

1 Answers1

2

Yes, Linux could do fragmentation, but like incoming packets, the kernel try hard not to do fragmentation on first place (e.g. with path MTU discovery before to sending, receiving data).

You can see e.g. https://github.com/torvalds/linux/blob/master/net/ipv4/ip_output.c function ip_do_fragment

  • Thanks. Looks like Linux does not have the concept of fragmentation at outer ip level. I.e it will fragment packets at inner ip level, encrypt and send the packets out ( in IPSEC environment) – kishore . Jun 14 '16 at 21:17