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 !!!
Who is Participating?
AkinsdConnect With a Mentor Network AdministratorCommented:
If speed is being auto negotiated, both laptop and switch will agree on a mutually supported speed with best performance. Prior to resetting your speed, they both are agreeing to 100Mbps

You can try resetting the NIC by running
netsh int ip reset
netsh winsock reset

But I'll recommend hardcoding your speed on the adapter properties.

Just go to device management (devmgmt.msc)
Network Adapters
Right-click on your NIC adapter, select properties
Go to Advanced tab
Look for Speed & Duplex (Name Varies with Adapter but you can't miss it)
By default, it should be set to autonegotiation
Hard code it to 1.0Gbps Full Duplex

You may want to disable the "Auto disable gigabit" feature also if your NIC supports it
Go to your switch if managed.
example on a cisco
- Conf t
- int gi5/1
- speed 1000
- duplex full.
JohnBusiness Consultant (Owner)Commented:
Try resetting TCP/IP and see if that helps.  Here is a Microsoft Support article to do that:

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 RhodeIT DirectorCommented:
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.
Protect Your Employees from Wi-Fi Threats

As Wi-Fi growth and popularity continues to climb, not everyone understands the risks that come with connecting to public Wi-Fi or even offering Wi-Fi to employees, visitors and guests. Download the resource kit to make sure your safe wherever business takes you!

AkinsdNetwork AdministratorCommented:
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
rberkeConsultantAuthor Commented:
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.
rberkeConsultantAuthor Commented:
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
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?
JohnBusiness Consultant (Owner)Commented:
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
AkinsdNetwork AdministratorCommented:
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.
rberkeConsultantAuthor Commented:
masnrock:  Power saving has always been disabled.

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.


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.
rberkeConsultantAuthor Commented:
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.