Switch between 10Mb and 100Mb

  • Thread starter Thread starter Jason
  • Start date Start date
J

Jason

Hello

I've got a need to be able to switch, or set the speed for my NIC between
10Mb and 100Mb for parametric testing purposes.

Using C# how can I accomplish, or can it even be done?

Thanks
 
Hello

I've got a need to be able to switch, or set the speed for my NIC between
10Mb and 100Mb for parametric testing purposes.

Using C# how can I accomplish, or can it even be done?

Thanks

I'm not sure if you can do it. but if you can you have to use WMI. My
advice would be to first check if it's possible at all. then how it's
done with WMI and finally write the C# code that does it using WMI
 
Jason said:
Hello

I've got a need to be able to switch, or set the speed for my NIC
between 10Mb and 100Mb for parametric testing purposes.

Using C# how can I accomplish, or can it even be done?

One approach is to edit the appropriate registry values--whether this
will work on a particular NIC without restarting the driver you'll
have to determine by experiment.

Here's a brief description of the process for editing the registry
from C#
http://radio.weblogs.com/0111551/stories/2002/10/14/registryRwInC.html

And an example of changing the NIC speed by registry manipulation
under vbscript
http://www.eggheadcafe.com/forumarchives/scriptingVisualBasicscript/Dec2005/post24721211.asp

A description of restarting device drivers in C#, should you need to
do that with your particular NICs, can be found at
http://www.codeproject.com/KB/cs/HardwareHelper.aspx

Between them they should be enough to get you started.

As always, be _very_ careful when editing the registry.
 
I was thinking it would have to be WMI. I don't think there is any other
option through .NET

In the Configuration... Advanced tab of a network port, a person is able to
select the speed and duplex, so I'm guessing my program would be doing the
same thing. My question, is even if I set the speed of my port to 10Mb, is
that really going to send data at a 10Mb/sec rate? What happens is I
plugged into a switch that is 100Mb ?


message
Hello

I've got a need to be able to switch, or set the speed for my NIC between
10Mb and 100Mb for parametric testing purposes.

Using C# how can I accomplish, or can it even be done?

Thanks

I'm not sure if you can do it. but if you can you have to use WMI. My
advice would be to first check if it's possible at all. then how it's
done with WMI and finally write the C# code that does it using WMI
 

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

Back
Top