Scripting: Changing MTU Size for a specific adapter.

G

Guest

Hi Guys,

I'm looking for a way to script a change to the MTU size for a specific
adapter on XP workstations. Basically we have VPN software installed on some
client machines which require an MTU size of 1300. The value in the registry
is different on each machine (mine is
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{A5C386AB-CEDE-4858-B9DC-D3F278B876B0}
for example) but all of them have a description of "Nortel IPSec Adapter"
regardless of the machine type.

Does anyone know of a way to write a script that does this? I found this:
http://www.microsoft.com/technet/scriptcenter/scripts/network/client/modify/default.mspx?mfr=true
but that changes the MTU for *all* adapters which I don't want.

Any suggestions welcome!

Andrew.
 
V

V Green

The identifier string:

{A5C386AB-CEDE-4858-B9DC-D3F278B876B0}

is probably unique to *an* adapter on a *specific* machine and probably will
be different on each and every other machine, regardless of having
identical hardware.

I don't know of any way you can get around this...
 
G

Guest

Hi there,

Precisely my problem I'm afraid! I had vague thoughts of getting adapter
information (whether that was from a vbscript or even the returned contents
of "ipconfig /all" and doing some string manipulation to create a .reg
file... but that's very messy and error prone, hence my thought that maybe
there's an easier way!

Thanks for the reply tho.
 
G

Guest

Hi there,

Precisely my problem I'm afraid! I had vague thoughts of getting adapter
information (whether that was from a vbscript or even the returned contents
of "ipconfig /all" and doing some string manipulation to create a .reg
file... but that's very messy and error prone, hence my thought that maybe
there's an easier way!

Thanks for the reply tho.
 
G

Guest

Just on the off chance that anyone is interested in this one, I was able to
change the MTU on the specific adapter. In the end I wrote a program in VB
which would do an "ipconfig /all" and take the info, search thru for a start
and end tag in the string based on the adapter name and strip out the unique
identifier string.

Taking this string I then inserted a reg key via an inbuilt VB function. The
good part was that I can have a textbox allowing any MTU size as specified by
the user (good for testing).

Anyway it works! :)
 
A

Alec S.

Andrew McC. said:
Just on the off chance that anyone is interested in this one, I was able to
change the MTU on the specific adapter. In the end I wrote a program in VB
which would do an "ipconfig /all" and take the info, search thru for a start
and end tag in the string based on the adapter name and strip out the unique
identifier string.

Taking this string I then inserted a reg key via an inbuilt VB function. The
good part was that I can have a textbox allowing any MTU size as specified by
the user (good for testing).

Anyway it works! :)


Nice. I thought you would have to resort to something like that because no matter where I searched, I was unable to find any other
connection between the GUID and the adapter name; it seems that a brute-force reg search is the only way.

Glad you worked it out.
 
V

V Green

Good strategy.

And possibly useful for other similar situations.

Thx., for letting us know how you solved it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top