LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 01-08-2010, 06:23 AM   #1
kingston
Member
 
Registered: Mar 2008
Location: Bengaluru, India
Distribution: RHEL 5.5, Solaris 5.10
Posts: 199
Blog Entries: 1

Rep: Reputation: 21
how to determine a mtu size for a nic?


Hi all,
i want to change the mtu size of my ethernet controller. I have done successfully set the mtu size 9000 for broadcom net xtreme PCI: 66 Mhz 64 bit 1 gigabit card. (fibre)
Part model no: BCM95703A31
[root@lux08 ~]# ethtool eth0Settings for eth0:
Supported ports: [ FIBRE ]
Supported link modes: 1000baseT/Half 1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 1000baseT/Half 1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: FIBRE
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: g
Wake-on: d
Current message level: 0x000000ff (255)
Link detected: yes

dmesg |grep eth
skge eth0: addr 00:21:91:8c:f4:99
eth1: Tigon3 [partno(BCM95703A31) rev 1002 PHY(serdes)] (PCI:66MHz:64-bit) 10/100/1000BaseT Ethernet 00:0c:46:ce:ba:1b
eth1: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] Split[0] WireSpeed[0] TSOcap[1]
eth1: dma_rwctrl[763f0000] dma_mask[64-bit]
eth2: Tigon3 [partno(BCM95754) rev b002 PHY(5787)] (PCI Express) 10/100/1000BaseT Ethernet 00:23:ae:58:bd:d2

[root@lux08 ~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0C:46:CE:BA:1B
inet addr:10.205.17.238 Bcast:10.205.17.255 Mask:255.255.255.0
inet6 addr: fe80::20c:46ff:fece:ba1b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:9000 Metric:1
RX packets:741560 errors:0 dropped:0 overruns:0 frame:0
TX packets:40298 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:85879535 (81.9 MiB) TX bytes:8085442 (7.7 MiB)
Interrupt:154
but when i tried to change the mtu size an another machine which has a different model card, it says the size 9000 is a invalid argument. But that is also a 1 gigabit card. The details as below
[root@lux15 ~]# ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:23:7D:53:4E:CA
inet addr:10.205.17.245 Bcast:10.205.17.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:504259 errors:0 dropped:0 overruns:0 frame:0
TX packets:9374 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:42121938 (40.1 MiB) TX bytes:1289677 (1.2 MiB)
Interrupt:217
dmesg |grep eth
eth0: Broadcom NetXtreme II BCM5708 1000Base-SX (B2) PCI-X 64-bit 133MHz found at mem f0000000, IRQ 169, node addr 001e0bd8adca
eth1: Tigon3 [partno(BCM95755) rev a002 PHY(5755)] (PCI Express) 10/100/1000BaseT Ethernet 00:23:7d:53:4e:cb
[root@lux15 ~]# ethtool eth1
Settings for eth1:
Supported ports: [ MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: g
Wake-on: d
Current message level: 0x000000ff (255)
Link detected: yes

how to change the mtu size for this NIC?

thanks in advance
 
Old 01-08-2010, 08:22 AM   #2
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
Example

#ifconfig eth0 mtu 1412
 
Old 01-08-2010, 08:25 AM   #3
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
Addendum: The default value will be the maximum possible on a card
 
Old 01-08-2010, 05:21 PM   #4
jcliburn
Member
 
Registered: Dec 2003
Location: Mississippi, USA
Distribution: Fedora
Posts: 435

Rep: Reputation: 33
Quote:
Originally Posted by amani View Post
Addendum: The default value will be the maximum possible on a card
The MTU size is handed to the NIC driver from higher in the network stack upon driver initialization. It's typically 1500 bytes, but it's configurable (using, for example, ifconfig or ip).

The driver doesn't default to the largest MTU size the device can handle.
 
Old 01-14-2010, 12:35 AM   #5
kingston
Member
 
Registered: Mar 2008
Location: Bengaluru, India
Distribution: RHEL 5.5, Solaris 5.10
Posts: 199
Blog Entries: 1

Original Poster
Rep: Reputation: 21
is there anything related with ports. Bcoz the previous one is fibre and the next one is mii (RJ45 cable). For a gigabit ethernet card we can set the mtu size upto 9000. In my case both of my cards are gigabit card but the medium is different. Still i am waiting for assistance?
 
Old 01-14-2010, 12:42 AM   #6
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by kingston View Post
is there anything related with ports. Bcoz the previous one is fibre and the next one is mii (RJ45 cable). For a gigabit ethernet card we can set the mtu size upto 9000. In my case both of my cards are gigabit card but the medium is different. Still i am waiting for assistance?
So, what is the problem exactly? You want to set the MTU based on what medium (fibre, mii) that the card is using?

Why not parse the output of `ethtool` to determine whether it's fibre or mii, and based on that test, set the MTU accordingly?

Or am I missing something..

Sasha
 
Old 01-14-2010, 12:50 AM   #7
kingston
Member
 
Registered: Mar 2008
Location: Bengaluru, India
Distribution: RHEL 5.5, Solaris 5.10
Posts: 199
Blog Entries: 1

Original Poster
Rep: Reputation: 21
hi sasha...
I hope u have seen my first post. I have some 20 number of machines and has fibre and mii gigabit ethernet cards. I set the mtu size 9000 in all the machines which has fibre gigabit eth cards. But i could not do the same in the other machines which has mii gigabit eth cards. But i need to achieve this then only i can go for nfs tuning. I am poor in networking as well as in english. Sorry for that. Plz try to understand and help.
 
Old 01-14-2010, 12:58 AM   #8
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Hi,

Your English is not bad, don't worry, I understand you, but I did not read anywhere that there were 20 machines or so

So, what you need to do, by the sounds of things, is to log into each machine, find out what type(s) of network card are on each machine, and set the MTU accordingly for each network card. Is this correct?

If so, it would likely be simpler to have one of the boot scripts on each machine configured to perform this operation upon boot, but if you want to do it this way, it can be done.

Last edited by GrapefruiTgirl; 01-14-2010 at 01:00 AM.
 
Old 01-14-2010, 01:09 AM   #9
kingston
Member
 
Registered: Mar 2008
Location: Bengaluru, India
Distribution: RHEL 5.5, Solaris 5.10
Posts: 199
Blog Entries: 1

Original Poster
Rep: Reputation: 21
No No...i tried to set 9000 in the mii gigabit eth card i am getting the following error.

[root@lux15 ~]# ifconfig eth0 mtu 9000
SIOCSIFMTU: Invalid argument
[root@lux15 ~]# ifconfig eth0 mtu 1501
SIOCSIFMTU: Invalid argument
here i am hanging. But i can reduce the mtu size. I could not increase even a single byte more than the default (1500) value. Some more details are as follows.

[root@lux15 ~]# ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:23:7D:53:4E:CA
inet addr:10.205.17.245 Bcast:10.205.17.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:435998 errors:0 dropped:0 overruns:0 frame:0
TX packets:10200 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:40961662 (39.0 MiB) TX bytes:1273871 (1.2 MiB)
Interrupt:217

[root@lux15 ~]# ethtool eth1
Settings for eth1:
Supported ports: [ MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: g
Wake-on: d
Current message level: 0x000000ff (255)
Link detected: yes
[root@lux15 ~]# ifconfig eth0 mtu 1499
[root@lux15 ~]#
 
Old 01-14-2010, 01:13 AM   #10
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
You are trying to set an MTU that the card does not support, yes?

It cannot be done.

I thought you wanted to determine the maximum MTU and then set a value of that amount or less. But you are trying to set an MTU larger than the hardware will allow.

I'm afraid that if 1500 is the largest MTU the card allows, you cannot exceed that.

I hope I have understood everything well.

Sasha
 
Old 01-14-2010, 01:29 AM   #11
kingston
Member
 
Registered: Mar 2008
Location: Bengaluru, India
Distribution: RHEL 5.5, Solaris 5.10
Posts: 199
Blog Entries: 1

Original Poster
Rep: Reputation: 21
i dont know exactly whether the card will support or not. i have read some documents before 4 or 5 days and in that it was mentioned that we can set upto 9000 bytes for a gigabit ethernet card. I want to set the maximum value. Because my file systems are little bit bigger ( 5 TB of loacl filesystems and 2 TB is there as a nfs). So this TCP tuning as well as NFS tuning is very important for me to get the better performance.

If u have any details to check the jumbo frame of my gigabit ethernet card plz suggest me. u helped me a lot. Thanks if u can do anything further plz do that.
 
Old 01-14-2010, 01:40 AM   #12
kingston
Member
 
Registered: Mar 2008
Location: Bengaluru, India
Distribution: RHEL 5.5, Solaris 5.10
Posts: 199
Blog Entries: 1

Original Poster
Rep: Reputation: 21
hi sasha...
i got one point. Just have a look at the following details.

[root@lux08 ~]# ethtool eth0
Settings for eth0:
Supported ports: [ FIBRE ]
Supported link modes: 1000baseT/Half 1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 1000baseT/Half 1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: FIBRE
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: g
Wake-on: d
Current message level: 0x000000ff (255)
Link detected: yes

Here the supported link modes and Advertised link modes are 1000baseT/Half and Full

But if u see in the mii gigabit ethernet card. There are three options as follows

[root@lux15 ~]# ethtool eth1
Settings for eth1:
Supported ports: [ MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: g
Wake-on: d
Current message level: 0x000000ff (255)
Link detected: yes

Here Supported and advertised link modes optional. Am i right? We can use 10baseT, 100baseT and 1000baseT. It may cause the problem. If i set this for 1000baseT/Full, i may obtain my maximum mtu size. But how to change this?

R U there? I hope u will get some good point and help me.
 
Old 01-14-2010, 07:16 AM   #13
jcliburn
Member
 
Registered: Dec 2003
Location: Mississippi, USA
Distribution: Fedora
Posts: 435

Rep: Reputation: 33
Quote:
Originally Posted by kingston View Post
If u have any details to check the jumbo frame of my gigabit ethernet card plz suggest me. u helped me a lot. Thanks if u can do anything further plz do that.
Please post the output of 'lspci -nn' and 'lsmod' for one of the machines containing the NIC that won't allow an MTU change.

Also, please post the output of 'uname -a'.

Last edited by jcliburn; 01-14-2010 at 07:19 AM.
 
Old 01-14-2010, 11:29 PM   #14
kingston
Member
 
Registered: Mar 2008
Location: Bengaluru, India
Distribution: RHEL 5.5, Solaris 5.10
Posts: 199
Blog Entries: 1

Original Poster
Rep: Reputation: 21
Hi as you asked i have attached the details:
[root@lux15 ~]# lsmod
Module Size Used by
vfat 46401 0
fat 85105 1 vfat
usb_storage 116769 0
nfsd 281897 17
exportfs 38849 1 nfsd
autofs4 56393 2
hidp 83649 2
nfs 286093 3
lockd 96209 3 nfsd,nfs
fscache 52385 1 nfs
nfs_acl 36673 2 nfsd,nfs
rfcomm 104809 0
l2cap 89281 10 hidp,rfcomm
bluetooth 118725 5 hidp,rfcomm,l2cap
sunrpc 195977 13 nfsd,nfs,lockd,nfs_acl
ib_iser 66745 0
rdma_cm 57553 1 ib_iser
ib_addr 40392 1 rdma_cm
ib_cm 66025 1 rdma_cm
ib_sa 47693 2 rdma_cm,ib_cm
ib_mad 69605 2 ib_cm,ib_sa
ib_core 86721 5 ib_iser,rdma_cm,ib_cm,ib_sa,ib_mad
iscsi_tcp 56897 0
libiscsi 59329 2 ib_iser,iscsi_tcp
scsi_transport_iscsi 63569 4 ib_iser,iscsi_tcp,libiscsi
cpufreq_ondemand 40401 8
dm_mirror 60993 0
dm_multipath 52433 0
dm_mod 93841 2 dm_mirror,dm_multipath
video 51273 0
sbs 49921 0
i2c_ec 38593 1 sbs
button 40545 0
battery 43849 0
asus_acpi 50917 0
acpi_memhotplug 40133 0
ac 38729 0
ipv6 410913 90
parport_pc 62313 0
lp 47121 0
parport 73165 2 parport_pc,lp
floppy 95465 0
snd_hda_intel 52189 1
snd_hda_codec 215233 1 snd_hda_intel
snd_seq_dummy 37061 0
snd_seq_oss 65601 0
snd_seq_midi_event 41025 1 snd_seq_oss
snd_seq 87905 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
sr_mod 50789 0
snd_seq_device 41813 3 snd_seq_dummy,snd_seq_oss,snd_seq
cdrom 68713 1 sr_mod
st 72037 0
snd_pcm_oss 77409 0
snd_mixer_oss 50113 1 snd_pcm_oss
snd_pcm 116553 3 snd_hda_intel,snd_hda_codec,snd_pcm_oss
snd_timer 57417 2 snd_seq,snd_pcm
snd 95081 11 snd_hda_intel,snd_hda_codec,snd_seq_oss,snd_seq ,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer
soundcore 43873 1 snd
shpchp 70765 0
snd_page_alloc 43345 2 snd_hda_intel,snd_pcm
sg 69737 0
pcspkr 36289 0
nvidia 7827096 26
tg3 137157 0
bnx2 119057 0
i2c_core 56128 2 i2c_ec,nvidia
serio_raw 40517 0
ahci 53061 0
libata 139369 1 ahci
megaraid_sas 67453 1
mptspi 51153 0
scsi_transport_spi 59713 1 mptspi
mptsas 59857 4
mptscsih 57793 2 mptspi,mptsas
mptbase 87905 3 mptspi,mptsas,mptscsih
scsi_transport_sas 64833 1 mptsas
ext3 166609 7
jbd 93873 1 ext3
ehci_hcd 65229 0
ohci_hcd 54493 0
uhci_hcd 57433 0
qla2xxx 1013292 7
sd_mod 54081 13
scsi_mod 184057 18 usb_storage,ib_iser,iscsi_tcp,libiscsi,scsi_tra nsport_iscsi,sr_mod,st,sg,ahci,libata,megaraid_sas,mptspi,scsi_transport_spi,mpt sas,mptscsih,scsi_transport_sas,qla2xxx,sd_mod
qla2xxx_conf 334984 1
intermodule 37508 2 qla2xxx,qla2xxx_conf


the output of uname -a:
[root@lux15 ~]# uname -a
Linux lux15 2.6.18-8.el5 #1 SMP Fri Jan 26 14:15:14 EST 2007 x86_64 x86_64 x86_64 GNU/Linux

[root@lux15 ~]# lspci -nn
00:00.0 0600: 8086:4003 (rev 20)
00:01.0 0604: 8086:4021 (rev 20)
00:03.0 0604: 8086:4023 (rev 20)
00:05.0 0604: 8086:4025 (rev 20)
00:09.0 0604: 8086:4029 (rev 20)
00:10.0 0600: 8086:4030 (rev 20)
00:10.1 0600: 8086:4030 (rev 20)
00:10.2 0600: 8086:4030 (rev 20)
00:10.3 0600: 8086:4030 (rev 20)
00:10.4 0600: 8086:4030 (rev 20)
00:11.0 0600: 8086:4031 (rev 20)
00:15.0 0600: 8086:4035 (rev 20)
00:15.1 0600: 8086:4035 (rev 20)
00:16.0 0600: 8086:4036 (rev 20)
00:16.1 0600: 8086:4036 (rev 20)
00:1b.0 0403: 8086:269a (rev 09)
00:1c.0 0604: 8086:2690 (rev 09)
00:1c.1 0604: 8086:2692 (rev 09)
00:1d.0 0c03: 8086:2688 (rev 09)
00:1d.1 0c03: 8086:2689 (rev 09)
00:1d.2 0c03: 8086:268a (rev 09)
00:1d.3 0c03: 8086:268b (rev 09)
00:1d.7 0c03: 8086:268c (rev 09)
00:1e.0 0604: 8086:244e (rev d9)
00:1f.0 0601: 8086:2670 (rev 09)
00:1f.1 0101: 8086:269e (rev 09)
00:1f.2 0104: 8086:2682 (rev 09)
01:05.0 0c00: 104c:8023
0e:00.0 0200: 14e4:167b (rev 02)
0f:00.0 0200: 14e4:167b (rev 02)
10:00.0 0604: 8086:3500 (rev 01)
10:00.3 0604: 8086:350c (rev 01)
11:06.0 0100: 1000:0054 (rev 02)
11:09.0 0100: 1000:0030 (rev c1)
1e:00.0 0604: 8086:3510 (rev 01)
1e:01.0 0604: 8086:3514 (rev 01)
20:00.0 0104: 1000:0060 (rev 04)
60:00.0 0300: 10de:019d (rev a2)
80:00.0 0604: 1166:0103 (rev c3)
81:00.0 0200: 14e4:16ac (rev 12)
a0:00.0 0c04: 1077:2432 (rev 03)
a0:00.1 0c04: 1077:2432 (rev 03)
 
Old 01-17-2010, 08:36 PM   #15
jcliburn
Member
 
Registered: Dec 2003
Location: Mississippi, USA
Distribution: Fedora
Posts: 435

Rep: Reputation: 33
eth1 is a Broadcom NetXtreme2 BCM5708S (PCI ID 14e4:16ac). According to the product brief, this device does support jumbo frames. http://www.broadcom.com/collateral/pb/5708S-PB08-R.pdf

eth0 is a Broadcom Tigon3 BCM5755 (PCI ID 14e4:167b). According to the programming guide, this device does not support jumbo frames. http://www.broadcom.com/collateral/pg/5722-PG101-R.pdf
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 size 1400 invader44 Slackware 6 01-10-2010 07:50 AM
NIC SPEED and MTU metallica1973 Linux - Networking 2 08-26-2005 04:15 PM
MTU size, slow webpages jorisb Linux - Software 2 03-12-2004 04:04 PM
MTU size B_Krishnakumar Linux - Networking 21 08-02-2003 11:58 AM
How to determine maximum MTU rickenbacherus Linux - Networking 4 04-21-2003 12:49 AM


All times are GMT -5. The time now is 06:21 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration