Ritesh S
Ritesh S

Reputation: 11

Packet size more than 1500

I'm trying to send more than 2000 bytes of data using SharpPcap and PacketDotNet. But, the MTU (1500 bytes) is less than the size of the data. I tried to set MTU (to 5000) using https://support.zen.co.uk/kb/Knowledgebase/Changing-the-MTU-size-in-Windows-Vista-7-or-8, but still it is throwing error as follows :

SharpPcap.PcapException: Can't send packet: send error: PacketSendPacket failed
at SharpPcap.LibPcap.LibPcapLiveDevice.SendPacket(Byte[] p, Int32 size)
at SharpPcap.LibPcap.PcapDevice.SendPacket(Byte[] p)
at SharpPcap.LibPcap.PcapDevice.SendPacket(Packet p)

Can anyone help me out here...

Upvotes: 1

Views: 751

Answers (1)

Ayoub Kaanich
Ayoub Kaanich

Reputation: 1021

You need 2 things in order to send Ethernet packets larger than 1500 bytes in Windows:

  • Change the MTU (you already got that covered)
    netsh interface ipv4 set subinterface "Your Interface Name" mtu=2000 store=persistent
  • You need to activate Jumbo Frames in the Device Manager enter image description here

Note that this has to be done on both the device sending the packet, and the device receiving it.

Upvotes: 1

Related Questions