Go Back   UNIX Socket FAQ > UNIX Platforms > Networking

Reply
 
Thread Tools Display Modes
  #1  
Old 05-19-2003, 08:24 AM
vonaldinjo vonaldinjo is offline
 
Join Date: May 2003
Posts: 42
Default How to find out ethernet frame size?

I am using Gigabit ethernet between two linux computers. How can I find out the ethernet frame size being used? Is it fixed or is it dynamic according to the message size being used? How can I change the used frame size, if at all ?
Reply With Quote
  #2  
Old 05-19-2003, 11:50 AM
RobSeace RobSeace is offline
Administrator
 
Join Date: Jun 2002
Location: Boston, MA
Posts: 3,380
Default

Easiest way would be to setup a packet sniffer, and take a look
at the captured Ethernet frames... But, yes, the size should be
variable, depending on the amount of data being transfered in
each frame... However, I believe there's some minimum frame
size (I forget now what it is), and data below that will get padded
out...

If you're talking about increasing the max possible frame size
used (eg: to increase throughput), then you'd need to increase
your interface MTU (via "ifconfig", or similar)...
Reply With Quote
  #3  
Old 05-19-2003, 12:49 PM
vonaldinjo vonaldinjo is offline
 
Join Date: May 2003
Posts: 42
Default

thankyou for the reply.

My question about changing the frame size was - how to make the system use only one frame size only regardless of the message size. In a way make it fixed.
Reply With Quote
  #4  
Old 05-19-2003, 05:57 PM
RobSeace RobSeace is offline
Administrator
 
Join Date: Jun 2002
Location: Boston, MA
Posts: 3,380
Default

Hmmmm... I'm not sure that's possible... I'm also not sure
why on Earth you'd possibly WANT to... ;-) Why send a larger
frame than is necessary for the job??
Reply With Quote
  #5  
Old 05-19-2003, 08:27 PM
mlampkin's Avatar
mlampkin mlampkin is offline
Administrative Lurker
 
Join Date: Jun 2002
Location: Sol 3
Posts: 910
Default Variable frame size...

TCP will only negotiate the max frame size during the initial phase of the connection... and does not allow you to specify a lower bound... so you're kinda stuck with a variable frame size no matter what...

The only solution I know of is to switch to another protocol... e.g. something like ATM since it uses a set frame (or cell in ATM terminology) size... and then do a pure ATM to ATM connection (since encapsulating something like ATM in TCP again results in variable frames)...

Michael
__________________
"The only difference between me and a madman is that I'm not mad."

Salvador Dali (1904-1989)
Reply With Quote
  #6  
Old 05-20-2003, 07:08 AM
vonaldinjo vonaldinjo is offline
 
Join Date: May 2003
Posts: 42
Default

Thankyou.

My intention was to find out throughput vs message size as a function of frame size , ie, for different frame sizes. was simply curious, have seen similar works. If it is not possible within TCP, then i can forget it.
Reply With Quote
  #7  
Old 05-20-2003, 07:36 PM
mlampkin's Avatar
mlampkin mlampkin is offline
Administrative Lurker
 
Join Date: Jun 2002
Location: Sol 3
Posts: 910
Default In that case...

If you are simply doing testing...

What is the OS (both ends) you are using? Someone may be able to give you the commands to set the max frame sizes on both sides (so they are equal)... and then if you are pumping data at full speed between the machines you should be (mostly) assured of all the frames being transmitted at the maximum (and known) size...

Of course, for a real life test it doesn't work... since you app wouldn't be pushing the tcp stack at 100% (at least I would hope not) for 100% of the time...

Michael
__________________
"The only difference between me and a madman is that I'm not mad."

Salvador Dali (1904-1989)
Reply With Quote
  #8  
Old 05-21-2003, 07:00 AM
vonaldinjo vonaldinjo is offline
 
Join Date: May 2003
Posts: 42
Default

I am using Linux. I did not fully understand what you said. I will use a wide range of message sizes, so for small messages, the frame size would not be the max, if that is what u meant by pushing the TCP stack to the max. But if I can set the frame size to a known maximum, then at least I would know what it is.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:45 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.