Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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)
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).
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.
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.
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.
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.
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!
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:-
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!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.