LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-16-2003, 04:14 PM   #1
B_Krishnakumar
LQ Newbie
 
Registered: Jun 2003
Posts: 3

Rep: Reputation: 0
MTU size


Is there any way to change the MTU size for an ethernet
adapter to a value higher than 1500? (the default).
If I have to change the source, can someone point me to
where should I look for this?

Thanks
 
Old 06-16-2003, 05:38 PM   #2
gruger
Member
 
Registered: May 2003
Location: Belgium
Distribution: RedHat 8.0
Posts: 51

Rep: Reputation: 15
Can't really answer to your q but I ca say one thing.

Most routers on the net cannot handle packet's with an higher MTU than 1500... So if you wanna change it, use it internal...


 
Old 06-17-2003, 12:57 AM   #3
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
yes, you can change it easily using ifconfig
something like
ifconfig eth0 mtu 1492
however your computer will need to fragment your packets, so you might experiment some problem (since some router drops fragmented packets to do not waste ressource reassembling them)

a tips : use 1492.
 
Old 06-17-2003, 01:38 AM   #4
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
just to further solidify the point:


anything higher than 1500 is pointless.
 
Old 06-17-2003, 02:10 AM   #5
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
And now that the question is answered... What is MTU, more importantly, why would I want to change it?



Cool
 
Old 06-17-2003, 02:19 AM   #6
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
MasterC,

MTU = maximun tranfer unit, its the maximum packet size that can pass
through that doesnt require fragmenting. to go into details would require a long lecture on TCP/IP (because i know no other way to give details about it) but i'll try anyway:


the short:

if i send a packet that has a size of say... 8000 bytes, when it hits the 1st router, the MTU will more than likey be 1500 bytes, so the packets get chopped into pieces, i think usually they get cut into the largest slices that are divisible by 8. Each piece is sent and re-assembled at the reciever, an offset gets put on each packet based on the fragment size and what not and the MORE flag gets set in the TCP header meaning (more pieces are comming). The last packet sent will be whats left over that was under the MTU and teh MORE flag will be unset to let the recieve know that the last fragment has been sent. This was a sketchy tutorial and parts of it may be a tad bit off but that's the gist. MTU of 1500 is like an unwritten standard. My DSL router is actually set at 1492 and cant go any higher. It is possible for a packet to be fragmented twice, 3 or more times as it passed through the internet.

if for some reason u are wondering how i know this.....i took a class on networking...cleared so much stuff up for me. i know all about how the internet works (or i should say i SHOULD know....i actually missed that lecture but i read the slides and understood it....lol).
 
Old 06-17-2003, 02:20 AM   #7
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
i guess that wasnt really 2 short, should have said "the medium"
 
Old 06-17-2003, 02:25 AM   #8
Muddy
Member
 
Registered: May 2002
Location: Ohio
Distribution: Mandrake 9.2 Custom Kernel & Mythtv!
Posts: 256

Rep: Reputation: 30
MTU or the Maximum Transmission Unit is the max sixe packet a network device (ie. nic card, router etc..) will send.
So when sending a 5mb song to your friend your nic will break it into 1500 byte packets. Everything in the public internet (routers, swtiches, mux's etc..) uses 1500 as the default. If you change this your not only screwing yourself but whatever network element your connecting too that has to readjust your packets back to 1500.
 
Old 06-17-2003, 03:22 AM   #9
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Wow, cool, thanks both of you!

Cool
 
Old 06-17-2003, 08:02 AM   #10
B_Krishnakumar
LQ Newbie
 
Registered: Jun 2003
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks all! This was my first post and am really impressed at
the quantity and quality of responses.

Pursuing this a little further, the reason I want to make the MTU
size bigger than 1500 is this: this is an internal application where
an Ethernet network is connected to a Fiber Channel network
through a storage switch. Since the maximum transmit size of
the Fiber channel network is 2148, when data passes from the
Fiber channel side to the Ethernet side, it gets fragmented to
1500-byte pieces. In order to avoid this (and to improve the
performance), I would like to change the Linux kernel code to
accept MTU sizes greater than 1500.

Thanks again,
 
Old 06-17-2003, 09:05 AM   #11
Muddy
Member
 
Registered: May 2002
Location: Ohio
Distribution: Mandrake 9.2 Custom Kernel & Mythtv!
Posts: 256

Rep: Reputation: 30
You could do that, if Every, and I mean every device used 2148 as it's MTU then it would be fine. However even on fiber there are switches and routers between it and you that do use 1500.
 
Old 06-17-2003, 09:17 AM   #12
B_Krishnakumar
LQ Newbie
 
Registered: Jun 2003
Posts: 3

Original Poster
Rep: Reputation: 0
Assuming this is going to be just for performance benchmarking
between a single Ethernet node and a single Fiber Channel node,
how would I do it? As I mentioned, this is for an internal
application only and not intended for a production network.
 
Old 07-30-2003, 09:15 AM   #13
the_anti_pat
LQ Newbie
 
Registered: Jul 2003
Distribution: RedHat 8.0 (Debian soon)
Posts: 21

Rep: Reputation: 15
I got a friend to port scan my ip and he said my MTU was 3!!!!!!! I'm using a 512kb/s (it's gone up to about 300 BYTES/sec in windows after I tweaked my tcp/ip settings [MTU=1500 can't remember what mt recieve window was but it was big!]) so I'm not sure about the cap!) Anyway, I tried "ifconfig eth0 mtu 1492" and i got:-

"[alistair@localhost alistair]$ ifconfig eth0 mtu 1492
bash: ifconfig: command not found"

Is it not standard in RH 8.0? PS How do you set the Rwin in RH 8.0?? Is it still called a recieve window in linux, a friend using Mandrake and FreeBSD said it was something else! Any gui based tcp/ip configuration tools anyone knows of would be very useful!
 
Old 07-30-2003, 03:35 PM   #14
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
it's not possible
there is around 400bits in MTU that are used by TCP heading.
your friend is wrong.


and about the "command not found" try to do it at ROOT.
 
Old 07-30-2003, 03:56 PM   #15
the_anti_pat
LQ Newbie
 
Registered: Jul 2003
Distribution: RedHat 8.0 (Debian soon)
Posts: 21

Rep: Reputation: 15
Thanks

Thanks for the feedback...I just checked Speedguide.net which says I'm running at 1500 but the problem is my recieve window but I have no idea how to change it:-

"Default Receive Window (RWIN) = 5840
RWIN Scaling (RFC1323) = 0 bits
Unscaled Receive Window = 5840

RWIN is a multiple of MSS
Other values for RWIN that might work well with your current MTU/MSS:
513920 (MSS x 44 * scale factor of 8)
256960 (MSS x 44 * scale factor of 4)
128480 (MSS x 44 * scale factor of 2)
64240 (MSS x 44)"

So I want to change my RWin to 513920 unless it causes packet loss...how would I go about doing this?

I tried ifconfig as root but it makes no difference! I also searched for both source and rpm of 'ifconfig' but to no results. Thanks anyway!
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MTU setting!!! webwally Linux - Newbie 3 12-01-2005 07:20 PM
mtu with dhcp rubella Linux - Newbie 4 10-10-2005 01:36 PM
MTU size, slow webpages jorisb Linux - Software 2 03-12-2004 04:04 PM
Resetting the MTU Cichlid Linux - Networking 1 03-28-2002 12:50 PM
Mtu Jase Linux - Networking 1 12-06-2001 05:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration