Reset network settings in Windows.

Resetting network settings in Windows is usually the last resort worth trying to resolve complex problems with accessing a local network or the Internet. This resets the network adapter settings on the computer, the TCP / IP stack settings to the standard settings in clean Windows, removes and reinstalls all network adapters on the computer. In this article, we will look at the features of resetting network settings in Windows from the graphical interface and using the command line.

Before resorting to resetting network settings, make sure that you have tried all the standard network diagnostic tools: checked the IP settings, the operation of the router / router / provider, updated network adapter drivers, restarted the computer, used the built-in Windows Network Troubleshooter (command msdt.exe /id NetworkDiagnosticsNetworkAdapter ), etc. .d. If none of the tools helped to fix the network problem, you can try resetting the network settings.

Save your current Windows network settings.

When resetting the network in Windows, all the settings that you set manually will be lost: IP addresses, DNS servers, static routes, network driver settings, saved Wi-Fi networks, etc. will be cleared. Therefore, it is important to save the current settings before resetting.

List network adapters:

Get-NetAdapter|select name,InterfaceIndex,InterfaceDescription,InterfaceOperationalStatus,MediaConnectionState,DriverInformation|ft

For all connected network adapters, check if they receive settings automatically (via DHCP) or manually:

Get-NetIPInterface -InterfaceIndex 7

If the value for the interface is Dhcp=Disabled , then the IP settings for the adapter are set manually and you need to save the current settings to a file:

Get-NetIPConfiguration -InterfaceIndex 7 >>c:\network_settings.txt

Multiple IPs (aliases) can be assigned to one interface in Windows.

Display and record all static routes in the routing table (from the Persistent Routes section):

Route print

Use PowerShell to list VPN connections, write down their settings:

Get-VpnConnection
In my case, the settings for saved VPN connections were not reset. Also, the OpenVPN Wintun virtual adapter (adapter for connecting to an OpenVPN server) was not removed.

Output WLAN profiles and save wireless network settings to a file:
netsh wlan show profile
netsh wlan export profile name="Xiaomi_20F5" key=clear folder=c:\ps
Save your Winsock settings:
netsh winsock show catalog > c:\winsock-backup.txt

After resetting the network, the saved information will help you restore all manually configured network settings.

Reset network settings from the Windows Control Panel.

On Windows 10 (1607+), Windows 11 and Windows Server 2019/2022, you can reset network settings from the Settings panel. Go to Settings -> Network (or run the ms-settings shortcut: ms-settings:network). Click the Network reset -> Reset now button.

Confirm network settings reset. Windows will clear all network settings and remove network cards (network adapters will not show up in the Control Panel). The network settings will be reset to factory defaults. Windows will automatically restart after 5 minutes.

After booting, Windows will detect all connected network adapters and install the drivers. It remains to configure the network connection settings and check if the problem is fixed.

Reset network settings from the Windows command line.

All the same actions that the network reset procedure performed from the Settings panel can be performed from the command line.

Flush the DNS cache:
ipconfig /flushdns
Reset your WinSock settings:
netsh winsock reset
Successfully reset the Winsock Catalog. You must restart the computer in order to complete the reset.

The command resets the settings in the registry branch HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters . At the same time, the old settings are saved to the Protocol_Catalog_Before_Reset branch.

Resetting the TCP/IP stack:
netsh int ip reset
To reset TCP/IPv6 settings:
netsh int ipv6 reset

Resetting Compartment Forwarding, OK!
Resetting Compartment, OK!
Resetting Control Protocol, OK!
Resetting Echo Sequence Request, OK!
Resetting Global, OK! Resetting Interface, OK!
Resetting Anycast Address, OK!
Resetting Multicast Address, OK!
Resetting Unicast Address, OK!
Resetting Neighbor, OK!
Resetting Path, OK!
Resetting Potential, OK!
Resetting Prefix Policy, OK!
Resetting Proxy Neighbor, OK!
Resetting Route, OK!
Resetting Site Prefix, OK!
Resetting Subinterface, OK!
Resetting Wakeup Pattern, OK!
Resetting Resolve Neighbor, OK!
Resetting , OK!
Restart the computer to complete this action.

The settings in the HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters and \SYSTEM\CurrentControlSet\Services\DHCP\Parameters registry branches are reset.

Remove all network adapters:
netcfg -d
Successfully removed all MUX Objects.
Removing device "Intel(R) 82574L Gigabit Network Connection"
Removing device "WAN Miniport (PPPOE)"
Skipping the removal of "Wintun Userspace Tunnel"
Removing device "WAN Miniport (PPTP)"
Removing device "WAN Miniport (IKEv2)"
Check to see if the "Microsoft Kernel Debug Network Adapter" bindings should be reset "Microsoft Kernel Debug Network Adapter" binding check complete
Removing device "WAN Miniport (Network Monitor)"
Removing device "WAN Miniport (IP)"
Removing device "WAN Miniport (SSTP)"
Removing device "WAN Miniport (IPv6)"
Removing device "WAN Miniport (L2TP)"
Please reboot the computer...

Removed including virtual network adapters WAN Miniport (if not working correctly, there may be VPN connection errors), as well as virtual Microsoft Wi-Fi Direct Virtual Adapter.

Reset all Windows Defender Firewall rules:

netsh advfirewall reset

PowerShell also has a separate command to reset advanced settings for a specific network adapter. First you can get the current adapter settings:

Get-NetAdapterAdvancedProperty -Name Ethernet0|ft -AutoSize
Name DisplayName DisplayValue RegistryKeyword RegistryValue ----
Ethernet0 Flow Control Rx & Tx Enabled *FlowControl {3}
Ethernet0 Interrupt Moderation Enabled *InterruptModeration {1}
Ethernet0 IPv4 Checksum Offload Rx & Tx Enabled *IPChecksumOffloadIPv4 {3}
Ethernet0 Jumbo Packet Disabled *JumboPacket {1514}
Ethernet0 Large Send Offload V2 (IPv4) Enabled *LsoV2IPv4 {1}
Ethernet0 Large Send Offload V2 (IPv6) Enabled *LsoV2IPv6 {1}
Ethernet0 Maximum Number of RSS Queues 2 Queues *NumRssQueues {2}
Ethernet0 Packet Priority & VLAN Packet Priority & VLAN Enabled *PriorityVLANTag {3}
Ethernet0 Receive Buffers 256 *ReceiveBuffers {256}
Ethernet0 Receive Side Scaling Enabled *RSS {1}
Ethernet0 Speed & Duplex Auto Negotiation *SpeedDuplex {0}
Ethernet0 TCP Checksum Offload (IPv4) Rx & Tx Enabled *TCPChecksumOffloadIPv4 {3}
Ethernet0 TCP Checksum Offload (IPv6) Rx & Tx Enabled *TCPChecksumOffloadIPv6 {3}
Ethernet0 Transmit Buffers 512 *TransmitBuffers {512}
Ethernet0 UDP Checksum Offload (IPv4) Rx & Tx Enabled *UDPChecksumOffloadIPv4 {3}
Ethernet0 UDP Checksum Offload (IPv6) Rx & Tx Enabled *UDPChecksumOffloadIPv6 {3}
Ethernet0 Adaptive Inter-Frame Spacing Disabled AdaptiveIFS {0}
Ethernet0 Interrupt Moderation Rate Adaptive ITR {65535}
Ethernet0 Log Link State Event Enabled LogLinkStateEvent {51}
Ethernet0 Gigabit Master Slave Mode Auto Detect MasterSlave {0}
Ethernet0 Locally Administered Address -- NetworkAddress {--}
Ethernet0 Wait for Link Auto Detect WaitAutoNegComplete {2}

Here you can display Jumbo Packet settings, VLAN settings, buffer settings, etc.

To reset these settings, run:

Reset-NetAdapterAdvancedProperty -Name Ethernet0

Restart your computer and set all network settings again. If the computer is configured to automatically obtain an IP address and network settings from a DHCP server, nothing else needs to be configured.

Отправить комментарий

Добавлять новые комментарии запрещено.*

Новые Старые