In case of GRE encapsulation, Fragmentation required due to exceeding 1514 Bytes

Home Forums Discussions General Discussion In case of GRE encapsulation, Fragmentation required due to exceeding 1514 Bytes

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #12027
    dattran
    Participant

    Hi Smirnov,

    I noticed that the MAX_ETHER_FRAME is hardcoded with size of 1514. In other words, the array m_IBuffer of struct INTERMEDIATE_BUFFER is limited to 1514 bytes.

    In my case, I added 24-bytes header for GRE encapsulation. Therefore, the total size is increased to 1538 bytes (1514+24). In this case, fragmentation must be done.

    My question is, does winpkfilter driver already support fragmentation? In other words, just by replacing the constant MAX_ETHER_FRAME to 1538 will solve my problem?

    Best Regards,
    Dat

    #12028
    Vadim Smirnov
    Keymaster

    Hi Dat,

    No, the driver won’t do packet fragmentation for you. If, after attaching extra headers, your packet size exceeds MTU (typically Internet MTU never exceeds 1514 bytes, in LAN jumbo frames can reach 9014 bytes size), then you have to fragment it into two INTERMEDIATE_BUFFER structures and inject two packets instead of one. However, I would recommend avoiding fragmentation (fragmented packets are often silently dropped by firewalls/routers) at all. For example, for TCP protocol, you could manipulate the TCP MSS option to limit the maximum packet size and thus reserve space for your extra headers.

    Hope it helps.
    Vadim

    #12033
    dattran
    Participant

    Hi Vadim,

    Thank you very much for your quick response :). Yes, you are right. Using two INTERMEDIATE_BUFFER  will solve the problem.

    Best Regards

    Dat

     

     

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.