Resetting The Network Adaptor

S

Saucer Man

Sometimes I have a problem with my NIC losing connection after resuming from
Sleep. The first thing I do is a "diagnose and repair". After that runs a
while, I get the option to "reset the adaptor". This fixes the issue. How
can I reset the adaptor directly without running "diagnose and repair"
first?
 
N

Nil

Sometimes I have a problem with my NIC losing connection after
resuming from Sleep. The first thing I do is a "diagnose and
repair". After that runs a while, I get the option to "reset the
adaptor". This fixes the issue. How can I reset the adaptor
directly without running "diagnose and repair" first?

According to this:

<http://www.windowsreference.com/general/network-repair-in-windows-xp-2003-and-later/>

The Repair Network Connection button does the following operations:

=============

Clear ARP Cache - Flushes the Address Resolution Protocol (ARP)
cache which is equivalent to the command:

C:\> arp -d *

Clear & Refresh NetBIOS Cache - Flushes and refreshes the NetBIOS
Cache which is equivalent to the commands:

C:\> nbtstat -R
Successful purge and preload of the NBT Remote Cache
Name Table.

C:\>nbtstat -RR
Successful purge and preload of the NBT Remote Cache
Name Table.

Clear DNS Cache, Refresh DHCP leases & Register DNS - Flushes the
DNS cache and then refreshes the DHCP leases and then re-register
the DNS. This is equivalent to running the commands

C:\>ipconfig /flushdns

Windows IP Configuration

Successfully flushed the DNS Resolver Cache.

C:\>ipconfig /renew

C:\>ipconfig /registerdns

Windows IP Configuration

Registration of the DNS resource records for all adapters of
this computer has been initiated. Any errors will be reported in
the Event Viewer in 15 minutes..

=============

You could just put the commands into a batch file and run that
directly, instead of hunting down the Repair button every time.
Something like this:

arp -d *
nbtstat -R
nbtstat -RR
ipconfig /flushdns
ipconfig /renew
ipconfig /registerdns
 
S

Saucer Man

Nil said:
According to this:

<http://www.windowsreference.com/general/network-repair-in-windows-xp-2003-and-later/>

The Repair Network Connection button does the following operations:

=============

Clear ARP Cache - Flushes the Address Resolution Protocol (ARP)
cache which is equivalent to the command:

C:\> arp -d *

Clear & Refresh NetBIOS Cache - Flushes and refreshes the NetBIOS
Cache which is equivalent to the commands:

C:\> nbtstat -R
Successful purge and preload of the NBT Remote Cache
Name Table.

C:\>nbtstat -RR
Successful purge and preload of the NBT Remote Cache
Name Table.

Clear DNS Cache, Refresh DHCP leases & Register DNS - Flushes the
DNS cache and then refreshes the DHCP leases and then re-register
the DNS. This is equivalent to running the commands

C:\>ipconfig /flushdns

Windows IP Configuration

Successfully flushed the DNS Resolver Cache.

C:\>ipconfig /renew

C:\>ipconfig /registerdns

Windows IP Configuration

Registration of the DNS resource records for all adapters of
this computer has been initiated. Any errors will be reported in
the Event Viewer in 15 minutes..

=============

You could just put the commands into a batch file and run that
directly, instead of hunting down the Repair button every time.
Something like this:

arp -d *
nbtstat -R
nbtstat -RR
ipconfig /flushdns
ipconfig /renew
ipconfig /registerdns


Yes, I believe that's what is happening when you choose "detect and repair"
in Vista. But this doesn't resolve it. An ipconfig /release from a command
prompt won't even work. After "detect and repair" does what it has to
do...which takes some time...another option is offered. This option is
called "reset the adaptor" or "reset the network adaptor". This is the
option that resolves it.
 
N

Nil

Yes, I believe that's what is happening when you choose "detect
and repair" in Vista. But this doesn't resolve it. An ipconfig
/release from a command prompt won't even work. After "detect and
repair" does what it has to do...which takes some time...another
option is offered. This option is called "reset the adaptor" or
"reset the network adaptor". This is the option that resolves it.

So, it sounds like you want a way to disable/enable the network adapter
from the command line. A quick google search finds some mentions that
the netsh command can do it, but I can't seem to make that work.

You've got me curious. I'll think about this some more.
 
S

Saucer Man

Nil said:
So, it sounds like you want a way to disable/enable the network adapter
from the command line. A quick google search finds some mentions that
the netsh command can do it, but I can't seem to make that work.

You've got me curious. I'll think about this some more.

Nil, I found a tool from Microsoft called devcon which can disable and
re-enable the NIC. This works but I see that it is doing much more than
"reset the adaptor" does. I'm currently using devcon until I find out what
"reset the adaptor" does.
 
N

Nil

Nil, I found a tool from Microsoft called devcon which can disable
and re-enable the NIC. This works but I see that it is doing much
more than "reset the adaptor" does. I'm currently using devcon
until I find out what "reset the adaptor" does.

I saw that one, but haven't had a chance to look at it closely. I
gather that it's a command-line version of Device Manager, and it lets
you can enable/disable the NIC like in DM.

I have a feeling, though, that you're trying to fix the symptom, but
you should be looking for the root cause. The NIC shouldn't lose its
connection like that. Are you using its most recent drivers? Maybe it
has a power-saving setting that's not working right.
 
S

Saucer Man

Nil said:
I have a feeling, though, that you're trying to fix the symptom, but
you should be looking for the root cause. The NIC shouldn't lose its
connection like that. Are you using its most recent drivers? Maybe it
has a power-saving setting that's not working right.

I tried looking for the symptom for months and months. Many users
experience it after their PCs wake from sleep and no one has figured it out
yet. I tried new drivers and everything I can think of and it happens with
two different NICs. Now I'm focusing on the workaround. Thanks.
 
J

Joe Morris

I saw that one, but haven't had a chance to look at it closely. I
gather that it's a command-line version of Device Manager, and it lets
you can enable/disable the NIC like in DM.

If you do want to use devcon make sure you get the current version (the one
from DDK version 7.1) which will reportedly work with all Windows client and
server systems currently supported, including x64 flavors).

http://social.technet.microsoft.com...ion-of-device-console-utility-devcon-exe.aspx
I have a feeling, though, that you're trying to fix the symptom, but
you should be looking for the root cause. The NIC shouldn't lose its
connection like that. Are you using its most recent drivers? Maybe it
has a power-saving setting that's not working right.

I'll agree that having to reset the adapter is putting a band-aid on an
infected wound. Have you looked at the possibility that a power control
application is involved? Dell's QuickSet application, for example, by
default quietly turns off the Ethernet adapter whenever the AC power plug is
removed, and at times I've had problems trying to convince it to retain the
change I make to the options to have it not turn the adapter off.

Joe
 

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