none
Enable J Frame RRS feed

  • Question

  • Hi ,

    does anyone know the command to enable jumbo frame? The below command doesn't work for me.

    Set-NetAdapterAdvancedProperty -Name "Ethernet" -RegistryKeyword “*JumboPacket” -Registryvalue 9014  ( here network adapter name is ethernet)

    The error I am getting is below. I am even tried MTU behalf of JumboPacket, but no luck

    PS C:\> Set-NetAdapterAdvancedProperty -Name "Ethernet" -RegistryKeyword "*JumboPacket" -Registryvalue 9014
    Set-NetAdapterAdvancedProperty : No matching MSFT_NetAdapterAdvancedPropertySettingData objects found by CIM query for
    instances of the ROOT/StandardCimv2/MSFT_NetAdapterAdvancedPropertySettingData class on the  CIM server: SELECT * FROM
    MSFT_NetAdapterAdvancedPropertySettingData  WHERE ((Name LIKE 'Ethernet')) AND ((RegistryKeyword = '*JumboPacket')).
    Verify query parameters and retry.
    At line:1 char:1
    + Set-NetAdapterAdvancedProperty -Name "Ethernet" -RegistryKeyword "*Ju ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (MSFT_NetAdapter...ertySettingData:String) [Set-NetAdapterAdvancedProper
       ty], CimJobException
        + FullyQualifiedErrorId : CmdletizationQuery_NotFound,Set-NetAdapterAdvancedProperty

    PS C:\>

    Note : Here in the network adapter, I can see "Init.MTUSize" behalf of Jumbo Frame.



    • Edited by Shimith Friday, September 22, 2017 12:14 PM
    Thursday, September 21, 2017 12:25 PM

Answers

  • Is this what you are trying to ask?

    $splat = @{
    	Name = 'Ethernet'
    	RegistryKeyword = '*JumboPacket'
    }
    Get-NetAdapterAdvancedProperty @splat | 
    	Where-Object{ $_.RegistryValue -ne 9014 } |
    	Set-NetAdapterAdvancedProperty @splat -RegistryValue 9014


    \_(ツ)_/

    • Marked as answer by Shimith Friday, September 22, 2017 12:13 PM
    Friday, September 22, 2017 3:59 AM

All replies

  • The error message tells you exactly what's wrong. It is very specific and helpful.

    No matching MSFT_NetAdapterAdvancedPropertySettingData objects found by CIM query for instances of the ROOT/StandardCimv2/MSFT_NetAdapterAdvancedPropertySettingData class on the CIM server: SELECT * FROM MSFT_NetAdapterAdvancedPropertySettingData WHERE ((Name LIKE 'Ethernet')) AND ((RegistryKeyword = '*JumboPacket')). Verify query parameters and retry.

    -- Bill Stewart [Bill_Stewart]

    Thursday, September 21, 2017 2:27 PM
    Moderator
  • I Got the command ready and manually I am able to change MTU value, But I am not able to write the powershell condition for the same.From the below command I am first finding the active network card , then trying to find the MTU value of that NIC and if I found MTU value is not 9000 I need that to be changed to 9000.

    PS C:\> **wmic nic where "netconnectionid like '%'" get netconnectionid**
    NetConnectionID
    Ethernet
    
    PS C:\> **netsh.exe int ipv4 show subint**
    
       MTU  MediaSenseState   Bytes In  Bytes Out  Interface
    ------  ---------------  ---------  ---------  -------------
    4294967295                1          0       1400  Loopback Pseudo-Interface 1
      1200                1  1335974344    5867793  Ethernet
    
    PS C:\> **netsh int ipv4 set subint "Ethernet" mtu=9000 store=persistent**

    How we can write this as a condition , so that when I ran the script it will automatically find the current MTU value if it is not 9000 and query the network adapter name to change the MTU value ?

    Any help is much appreciated




    • Edited by Shimith Friday, September 22, 2017 3:19 AM
    Thursday, September 21, 2017 4:18 PM
  • Sorry, but I am not able to understand your question due to the language barrier.

    -- Bill Stewart [Bill_Stewart]

    Thursday, September 21, 2017 4:20 PM
    Moderator
  • Basically my question is, how can I convert the above command in a script format, so that the script will automatically get the active NIC and update the MTU value if the value is less than 9000
    Friday, September 22, 2017 3:21 AM
  • Is this what you are trying to ask?

    $splat = @{
    	Name = 'Ethernet'
    	RegistryKeyword = '*JumboPacket'
    }
    Get-NetAdapterAdvancedProperty @splat | 
    	Where-Object{ $_.RegistryValue -ne 9014 } |
    	Set-NetAdapterAdvancedProperty @splat -RegistryValue 9014


    \_(ツ)_/

    • Marked as answer by Shimith Friday, September 22, 2017 12:13 PM
    Friday, September 22, 2017 3:59 AM
  • MTUs are automatically set to the router and network when possible.  Setting a "Jumbo Frame" can cause dropped connections across public networks.  The IETF maximum MTU is 1500 which is actually 1530 over wired Ethernet or 1514 on Windows Toredo which is likely due to some issues with packet tracking used by many routers.  Each Interface will dynamically adjust to the router if possible.

    Jumbo Frames are almost always limited to 9000 bytes.  Some adapters may allow larger frames but this should only be used if you are sure all or you network can adjust to this.  Connections asking for a jumbo frame may fail if the routers MTU fragments the packet.  Older hardware is very problematic when jumbo frames are received or when fragmented frames are received.

    The MTU setting by NETSH sets the global frame size.  The Jumbo Frame is set per adapter.  Many adapters do not support JFs and no wireless adapters that I have found support Jumbo Frames.

    Either you adapter is old or it is a wireless adapter.

    See: https://en.wikipedia.org/wiki/Jumbo_frame


    \_(ツ)_/


    • Edited by jrv Friday, September 22, 2017 4:17 AM
    Friday, September 22, 2017 4:16 AM
  • Thanks JRV , as I am running the command on KVM based windows machine the above command doesn't work for me. I have managed to write something like below. But here the problem is, $enabledAdapterNames (which I marked in bold)is not getting correct network details assigned to set MTU .If I give Local Area Connection/Ethernet manaulybehalf of $enabledAdapterNames it works perfect.

    $enabledAdapterNames = wmic nic where "netconnectionid like '%'" get netconnectionid | Select -Skip 1 | ? {$_.trim() -ne "" } 

    netsh.exe int ipv4 show subint |? { $enabledAdapterNames -contains $_.Interface -and $_.MTU -lt 1600} | netsh int ipv4 set subinterface $enabledAdapterNames mtu=9014 store=active 

    Can you please help me with that ?

    Friday, September 22, 2017 4:48 AM
  • What you are trying to do cannot be done and will not work.  Please try to understand my previous post.

    If the registry key is not there then the value cannot be set even if you set the global MTU.


    \_(ツ)_/

    Friday, September 22, 2017 5:36 AM
  • Few of my machine adapter name is Local area connection and few of them it is Ethernet.so when I gave the script like below it is not working

    $splat = @{Name= 'Ethernet' -or 'Local Area Connection'} -and {registryKeyword = 'MTU'}
    Get-NetAdapterAdvancedProperty @splat | 
    Where-Object{ $_.RegistryValue -ne 9014 } |
    Set-NetAdapterAdvancedProperty @splat -RegistryValue 9014

    getting the error like below

    Get-NetAdapterAdvancedProperty : No MSFT_NetAdapterAdvancedPropertySettingData objects found with property 'Name' equal to 'True'.  Verify the value of the property and 
    retry.
    At line:1 char:1
    + Get-NetAdapterAdvancedProperty @splat |
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (True:String) [Get-NetAdapterAdvancedProperty], CimJobException
        + FullyQualifiedErrorId : CmdletizationQuery_NotFound_Name,Get-NetAdapterAdvancedProperty


    • Edited by Shimith Friday, September 22, 2017 7:09 AM
    Friday, September 22, 2017 7:08 AM
  • I recommend taking the time to learn PowerShell.  As I noted above, what you are trying to do won't work because your adapters do not support Jumbo Frame.

    Learn PowerShell: https://mva.microsoft.com/en-us/training-courses/getting-started-with-microsoft-powershell-8276<o:p></o:p>



    \_(ツ)_/

    Friday, September 22, 2017 7:18 AM
  • Get-NetAdapterAdvancedProperty -Name $nicname.Name -RegistryKeyword "*jumbopacket" | Set-NetAdapterAdvancedProperty -RegistryValue 9014

    Where $nickname is: $nicname= Get-NetAdapter -ifindex "your_ifIndex" | Select-Object Name
    Friday, September 22, 2017 5:19 PM
  • Get-NetAdapterAdvancedProperty -Name $nicname.Name -RegistryKeyword "*jumbopacket" | Set-NetAdapterAdvancedProperty -RegistryValue 9014

    Where $nickname is: $nicname= Get-NetAdapter -ifindex "your_ifIndex" | Select-Object Name
    That was answered. See the answer. It is the same as yours and was marked. Try reading the whole thread before posting.

    \_(ツ)_/

    Friday, September 22, 2017 8:13 PM