Avatar of Robert Berke
Robert Berke
Flag for United States of America asked on

How to Reset NIC to 1000mbps automatically at login

When I bring my sleeping laptop from home into work, my local network interface card connects at 100mbps instead of 1000mbps. Logging off and back on does not resolve the problem, but a reboot does.

After a bit of playing, I discovered I can fix things by using ncpa.cpl to disable, then enable the NIC.

Is there any way to automate things so the reset happen automatically?


For instance, I already running a daily reset batch macro. Are there .bat command that can reset the NIC?  

---- here are more details, but they are not very interesting ---------------

My Lenovo t500 laptop has
 
NIC1: a gigabit Intel 82567LM Gigabit Network Connection and
NIC2: a Intel(R) WiFi Link 5100 AGN wireless

At work, I connect NIC1 to a Trendnet switch which has 8 1-Gigabit ports, then boot and everything works at 1gigabit -- the Trendnet switch shows all green lights, and NCPA.CPL status shows 1 gpbs.

At home or on the road, I use NIC2 which has a much lower connection speed depending on the access point.

Often when I am working at home, I put my computer into Sleep mode before heading to work.
At the office, I connect NIC1 to the switch, then wake up my computer (instead of booting it).

On these occasions, the trendnet switch shows a YELLOW light and NCPA.CPL shows NIC1 status is 100 mbps !!!
Networking Hardware-OtherWindows 7Networking

Avatar of undefined
Last Comment
Robert Berke

8/22/2022 - Mon
John

Try resetting TCP/IP and see if that helps.  Here is a Microsoft Support article to do that:

http://support.microsoft.com/kb/299357

There is a FixIt in the link you may be able try.

If that does not work, find the driver for the NIC, uninstall the NIC (remove it) and re-install the driver.

.... Thinkpads_User
Nick Rhode

What is the cable type that is being plugged in at the office (CAT5, CAT5e, CAT6?)  CAT6 is certified gigabit while CAT5e is uncertified gigabit and CAT5 would not give you gigabit speeds.
Akinsd

Change the Adapter properties from auto to 1000. If it is a wired connection, log on to the switch it connects to and hard code that port to 1000 also
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Robert Berke

ASKER
NRhode: The switch is right next to my laptop, so I connect using cat5e 350mhz blackbox patch cables.  I have tried 3 different cables.  Yeah, I know cat5e is not certified for 1 gigabit, but a good quality cat5e turns the LED green on all 10 of our gigabit devices. I am sure the problem is not the cable.

Thinkpads_user.  I suppose it could be a defective NIC or an old driver on my thinkpad, but I don't want to do that kind of trouble shooting for a relatively minor problem.

And the TCP/IP reset code requires a reboot to be effective.

I was hoping for a command line to simply disable the NIC.
Robert Berke

ASKER
My daily reset already runs in administrator mode, so the following does the job


netsh interface set interface name="Local Area Connection" admin=disabled
netsh interface set interface name="Local Area Connection" admin=enabled
masnrock

Have you made sure that NIC1 is not set to let the computer turn it off in order to save power? And are the NIC1 drivers up to date?
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
Akinsd

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
John

There have been a number of suggestions going back here to do a TCP/IP reset with netsh and rberke  is doing that now.

@rberke - You may wish to hard code your NIC as per above. I have not needed to do that.

Also, why not try a new driver? Getting new drivers for a ThinkPad is very easy.

Replacing the NIC is a little more complicated, but if you reach that decision, we can help you with that.


... Thinkpads_User
Akinsd

I didn't see that in the forum and just saw the link posted. Setting and resetting the NIC are a little similar in function but contradistinctive.

a number of suggestions
is a little hyperbolical.

The NIC works, it only negotiates wrong speed occasionally. Yes, that may be a driver issue but a simple hardcoding will take care of that without incurring additional cost especially for a trivial issue as the author described it - Just something to get by I guess.
Robert Berke

ASKER
masnrock:  Power saving has always been disabled.

everybody:
Just to be clear, I am NOT doing either of these because they require a reboot:
   netsh int ip reset
   netsh winsock reset


Instead, I added the following to my daily batch file:(The batch file must now run as an administrator for this commands to work.)
    netsh interface set interface name="Local Area Connection" admin=disabled
    netsh interface set interface name="Local Area Connection" admin=disabled

Changing my batch file fixes one problem, but introduces another:  The batch file now temporarily breaks the current connection.  That is OK if I run it at the beginning of the day, but if I run it in the middle of the day, it causes MS Access to vomit.

So, if Akinsd's simple "hardcoding" suggestion works, it would be ideal. The only way to test it is to take my laptop home, then bring it back to work, so I won't be able to report the results until Monday.

rberke

P.S. the switch is a TRENDNet s80g which does not appear to have any management functionality.

P.P.S.  When I use device manager to update the driver, it goes to the internet and eventually reports that the driver was already up to date.
Your help has saved me hundreds of hours of internet surfing.
fblack61
Robert Berke

ASKER
After configuring the laptop's local port to 1gbps, I took it home, used it, then put it to sleep. When I came in this morning I attached it to the network and woke it up.

In the past, this would always auto configure the local connection to 100mbps and the 8 port switch's LED would be green/yellow (there are two LEDs, one for link status and the other for speed).
In the new configuration, the local port does not connect and both LEDs remain off.

When I used NCPA.CPL to disable the port and reenable, both LEDs turned green and all was well.

So, Akinsd's solution is not perfect, but I am keeping it in my configuration and awarding him the "Best Solution".  I like it because in the past I often did not notice the yellow light and would spend half the day with a slow connection. I would often have a dozen things open when I finally realized they were all running very slowly.  With all that stuff open I was reluctant to run the daily reset.bat with the netsh disable/enable commands.

At least Akinsd's solution makes the problem obvious from the beginning because it causes the connection to be totally broken. And, my daily reset.bat program fixes the connection in about 5 seconds.

Plus, with Akinsd's solution, when I do a normal shutdown at home, my laptop boots at the office with both green lights working perfectly.  No need for me to run the daily reset,bat.

Bob