Re: How do i avoid packet segmentation?



Bernhard Agthe wrote:
Hi,

I'm writing a program that sends 1500 bytes of data at once, from the
client to the server. However, the packet is broken down into 3
different segments of 500 each before getting to the server. This is
detrimental to the program i'm writing as I need the server to receive
the entire 1500 bytes at once. How do I avoid this segmentation. Is it
a linux setting which I can change or is it a TCP setting? either way,
what can I do? I'm sending the packets using the C send() function.

I thought that There is something relation on MTU(Maximum Transfer
Unit)

The network may do segmentation at any point during transmission - you cannot rely on any given MTU. The fact that you have three segments of 500B each indicates you have a MTU of 500B somewhere along the path - if you go for backbone networks you'll get segments of 56B or so - which will be put into a single 500B package on the backbone exit point. But usually fragmentation is transparent to the user and fragmented packages get reassembled?
It also depends on what he means by segmentation. If it's the IP
packets that's segmented, it does not matter - they're automatically
reassembled.
If it's TCP breaking up the data from the user, 1 send() results
in many mackets or vice versa - that's how TCP works, it tries to
figure out how big and when it makes sense to send data.
.



Relevant Pages

  • Re: Broken TCP/IP packets
    ... it a single transaction. ... packets are broken in parts. ... You cannot expect TCP to give you pakets on the remote end the way you ... segments to what ever degree seems good to get a good performance. ...
    (comp.arch.embedded)
  • Re: Broken TCP/IP packets
    ... it a single transaction. ... packets are broken in parts. ... You cannot expect TCP to give you pakets on the remote end the way you ... segments to what ever degree seems good to get a good performance. ...
    (comp.arch.embedded)
  • Re: Broken TCP/IP packets
    ... it a single transaction. ... packets are broken in parts. ... You cannot expect TCP to give you pakets on the remote end the way you ... segments to what ever degree seems good to get a good performance. ...
    (comp.arch.embedded)
  • RE: [fw-wiz] segmentation of DMZs
    ... Internet will be able to try to compromise your front-end web server. ... different segments: ...
    (Firewall-Wizards)
  • Re: Confused engine: No SHM segments but thinks it is quiescent
    ... That tidbit about not running ipcs -m as root was an interesting one; ... I have never encountered an informix server with invisible SHM ... Normally, even when owned by root, I can see the segments in ...
    (comp.databases.informix)