Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

for some reason, when a machine of mine first starts up from a fresh boot, the network doesn't work properly. I usually fix this by enabling and disabling the 'local area connection'. These are the steps that I take to do the enabling and disabling:

  1. control panel
  2. View network connections
  3. Right click 'local area connection', select 'disable'.
  4. Right click 'local area connection', select 'enable'.

This fixes the problem, but I'm looking for a faster way to do it: is their a command that I can run from cmd.exe to perform the same action?

share|improve this question

3 Answers 3

up vote 5 down vote accepted
netsh interface set interface "Local Area Connection" DISABLE
netsh interface set interface "Local Area Connection" ENABLE

Syntax may depend and vary a bit between different versions of Windows...

share|improve this answer

You could try ipconfig /renew

share|improve this answer
    
you could put a batch file in the startup menu with ipconfig /release ipconfig /renew. This is more of a work-around though. What is causing the issue? –  cop1152 Dec 28 '09 at 3:03

Is this a laptop? On many laptops, your NIC will be disabled if you are running on battery power. On my Dell for example, there is an item in Control Panel called "Internal NIC Configuration" which controls this behavior. You may have something similar, or it may be in your power settings.
Other place to check would be in the BIOS settings - see if there is any setting that would disable the NIC.

share|improve this answer
    
It's not a laptop. I thought it was an issue with Vista, but I've since installed win7 and the issue is still present. After reading your advice, I'm going to play with the power management options and see if that addresses the root cause. I'll keep you updated, thanks! –  Bradford Dec 28 '09 at 15:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.