Exceeding MTU which serialized tcp messages

  • Thread starter Thread starter M4tt
  • Start date Start date
M

M4tt

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
 
Hi Matthew,
Sounds like you might have a "black hole router" problem. You might
want to read this:
http://groups.google.com/group/micr...rosoft.public.*&rnum=8&hl=en#45c02620cf76eb2a

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

1) Run Regedit
2) Navigate to:
HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ 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
 
Thanks John. We will try this out.

John said:
Hi Matthew,
Sounds like you might have a "black hole router" problem. You might
want to read this:
http://groups.google.com/group/micr...rosoft.public.*&rnum=8&hl=en#45c02620cf76eb2a

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

1) Run Regedit
2) Navigate to:
HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ 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
 
Back
Top