Re: Creating fragmentation using sockets (on ethernet)



On Mar 27, 2:16 am, "ian...@xxxxxxxxx" <ian...@xxxxxxxxx> wrote:
And make sure Jumbo packets are switched OFF.

1) Why should this be done ?
2) How should this be done ? I don't have any experience with Jumbo
frames

Regards,
Ian

On Mar 26, 12:33 am, Janaka <jana...@xxxxxxxxxxxx> wrote:

On Mar 26, 12:14 am, pk...@xxxxxxxxxxxxx (Patrick Klos) wrote:

In article <ae18d296-bbd2-4d1c-b332-3a9fc2ad6...@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,

ian...@xxxxxxxxx <ian...@xxxxxxxxx> wrote:
Hello,

Packets which are bigger than 1500 (which is the default MTU for
ethernet) should cause
fragmentation (assuming that the machine supports it).

I want to test fragmentation issues on some system.

- Can anybody give some advice/pointers for creating a small "c"
programs using sockets API
which will cause fragmentation ?

You must be asking about IP fragmentation since ethernet doesn't have
such a notion.

The easiest way to generate fragmented IP packets is to use UDP to send
large datagrams. Simply open a SOCK_DGRAM socket and use sendto() to
send datagrams larger than 1500 bytes (well, technically, anything above
1472 bytes in a UDP datagram should do the job).

Or, if you don't want to write a program, just use ping:

ping -s 32768 10.0.0.23

Patrick
========= For LAN/WAN Protocol Analysis, check out PacketView Pro! =========
Patrick Klos Email: patr...@xxxxxxxx
Klos Technologies, Inc. Web: http://www.klos.com/
============================================================================

And make sure Jumbo packets are switched OFF.

Some Ethernet cards allow Ethernet Jumbo frames which are bigger than
the standard MTU of 1500 bytes. What this means is, if your LAN
support it, you could send Ethernet packets that are larger and hence
less fragmenting of IP or upper level packets over Ethernet. (I have
seen Jumbo frame sizes up to 9600bytes)
1) Why should you turn them off: so that you can get fragmentation of
the size you expect and so that you can emulate what happen in a
normal LAN.
2) How: It will most likely be an option for your Ethernet card
driver. If your driver does not have an Jumbo frame option, it most
likely will not support jumbo frames.
Also sniff your test run packets and see what MTU size it show.
Cheers
J
.



Relevant Pages

  • Re: Problem with writing fast UDP server
    ... it likely means you have reached your ethernet bandwidth ... frames) to achieve your desired results. ... Keep in mind TCP is stream based, not datagram based so you may need ... On your client, make the following changes. ...
    (comp.lang.python)
  • RE: Problems with BCE network adapter (Dell PE2950)
    ... passing an Ethernet frame up the stack with a length of -4. ... the driver isn't calculating the packet length correctly. ... inet 172.31.0.157 netmask 0xffffffff broadcast 172.31.0.157 ... Single Collision Frames: 0 ...
    (freebsd-net)
  • RE: Problems with BCE network adapter (Dell PE2950)
    ... There's already some debug code to watch for unusual size packets. ... passing an Ethernet frame up the stack with a length of -4. ... Is there anything unusual about your network setup like VLAN ... The network is running Jumbo frames. ...
    (freebsd-net)
  • Re: Ethernet in its most basic form
    ... frames when I tell it to, and also hands frames to me when they're ... Can anyone suggest a very simple Ethernet micrcontroller that will do ... projects that deal w/ ethernet at a basic level where you can learn ... there is plenty you can do w/ these w/o dropping big $$$. ...
    (comp.arch.embedded)
  • Re: Problems with BCE network adapter (Dell PE2950)
    ... passing an Ethernet frame up the stack with a length of -4. ... Is there anything unusual about your network setup like VLAN ... The network is running Jumbo frames. ... inet 172.31.0.157 netmask 0xffffffff broadcast 172.31.0.157 ...
    (freebsd-net)