Exceeding MTU which serialized tcp messages

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • M4tt

    Exceeding MTU which serialized tcp messages

    Hi, I am writing a client/server application that has quite complex
    messages that can only reasonably be handled by parsing serialized
    message class objects using a networkstream and binaryformatter . when
    the message objects are less than the MTU (1500b) then message is
    correctly deserialized at the recieving end. when the message exceeds
    1500b the packet is completely dropped and only 1byte is received at
    the other end. Ethereal confirms the dropped packet.

    i would have thought .Net sockets class would hand splitting the data
    transmittion into packets that do not exceed the MTU but it doesn't by
    default. is there anything i need to set to make this happen because
    the application works beautifully when client and server run on the
    same machine and it would be a lot of work to re-write the messages to
    make them less than 1500b.

    Thanks in advance for any help with this.

    Regards,
    Matthew

  • John Duval

    #2
    Re: Exceeding MTU which serialized tcp messages

    Hi Matthew,
    Sounds like you might have a "black hole router" problem. You might
    want to read this:


    Another option is to try this (this worked for me in a similar
    situation):

    1) Run Regedit
    2) Navigate to:
    HKEY_LOCAL_MACH INE \ SYSTEM \ CurrentControlS et \ Services \ TCPIP \
    Parameters \ Interfaces \

    Highlight the correct interface by looking for the active IP Address,
    add a REG_DWORD with value MTU and add decimal data 1492

    Reboot after change. Depending on the type of network connection, you
    might need to do smaller MTU values (e.g. 1472).

    You can test the MTU along a path by using PING to see how low you have
    to go:
    ping -f -l 1472 x.x.x.x

    This is not a .NET problem, it's lower down.

    Hope that helps,
    John

    M4tt wrote:[color=blue]
    > Hi, I am writing a client/server application that has quite complex
    > messages that can only reasonably be handled by parsing serialized
    > message class objects using a networkstream and binaryformatter . when
    > the message objects are less than the MTU (1500b) then message is
    > correctly deserialized at the recieving end. when the message exceeds
    > 1500b the packet is completely dropped and only 1byte is received at
    > the other end. Ethereal confirms the dropped packet.
    >
    > i would have thought .Net sockets class would hand splitting the data
    > transmittion into packets that do not exceed the MTU but it doesn't by
    > default. is there anything i need to set to make this happen because
    > the application works beautifully when client and server run on the
    > same machine and it would be a lot of work to re-write the messages to
    > make them less than 1500b.
    >
    > Thanks in advance for any help with this.
    >
    > Regards,
    > Matthew[/color]

    Comment

    • M4tt

      #3
      Re: Exceeding MTU with serialized tcp messages

      Thanks John. We will try this out.

      John Duval wrote:[color=blue]
      > Hi Matthew,
      > Sounds like you might have a "black hole router" problem. You might
      > want to read this:
      > http://groups.google.com/group/micro...c02620cf76eb2a
      >
      > Another option is to try this (this worked for me in a similar
      > situation):
      >
      > 1) Run Regedit
      > 2) Navigate to:
      > HKEY_LOCAL_MACH INE \ SYSTEM \ CurrentControlS et \ Services \ TCPIP \
      > Parameters \ Interfaces \
      >
      > Highlight the correct interface by looking for the active IP Address,
      > add a REG_DWORD with value MTU and add decimal data 1492
      >
      > Reboot after change. Depending on the type of network connection, you
      > might need to do smaller MTU values (e.g. 1472).
      >
      > You can test the MTU along a path by using PING to see how low you have
      > to go:
      > ping -f -l 1472 x.x.x.x
      >
      > This is not a .NET problem, it's lower down.
      >
      > Hope that helps,
      > John
      >
      > M4tt wrote:[color=green]
      > > Hi, I am writing a client/server application that has quite complex
      > > messages that can only reasonably be handled by parsing serialized
      > > message class objects using a networkstream and binaryformatter . when
      > > the message objects are less than the MTU (1500b) then message is
      > > correctly deserialized at the recieving end. when the message exceeds
      > > 1500b the packet is completely dropped and only 1byte is received at
      > > the other end. Ethereal confirms the dropped packet.
      > >
      > > i would have thought .Net sockets class would hand splitting the data
      > > transmittion into packets that do not exceed the MTU but it doesn't by
      > > default. is there anything i need to set to make this happen because
      > > the application works beautifully when client and server run on the
      > > same machine and it would be a lot of work to re-write the messages to
      > > make them less than 1500b.
      > >
      > > Thanks in advance for any help with this.
      > >
      > > Regards,
      > > Matthew[/color][/color]

      Comment

      Working...