Home  >  Article  >  Detailed explanation of netsh command usage

Detailed explanation of netsh command usage

zbt
zbtOriginal
2023-12-08 11:11:332834browse

The netsh command can view help documents, manage network adapters, configure IP addresses and DNS, manage wireless networks, manage firewalls, manage network forwarding, set QoS and reset network settings. Detailed introduction: 1. View the help document by entering "netsh /?" or "netsh /help" in the command prompt; 2. Managing network adapters includes viewing the network adapter list and enabling or disabling network adapters; 3. Configuration IP address and DNS etc.

Detailed explanation of netsh command usage

Netsh is a command line utility in Windows operating systems used to manage network interfaces, configure network parameters, and diagnose network connections. It can help users perform various network-related operations, such as configuring network adapters, viewing network connection status, setting firewall rules, etc. The use of Netsh commands will be introduced in detail below.

1. View the help document

  • You can enter "netsh /?" or "netsh in the command prompt /help" to view the help documentation for the Netsh command. This will list the commands and options supported by Netsh, as well as the usage and parameter description of each command.

2. Management Network adapter

  • #View the network adapter list: use "netsh interface show interface" command can list all network adapters on the system, including name, type, status and other information.

  • Enable or disable network adapters: use "netsh interface set interface name=adapter name The admin=enabled|disabled" command can enable or disable the network adapter with the specified name.

3. Configure IP address and DNS

  • View current network settings: use "netsh interface ip show config" command can view the current network adapter's IP address, subnet mask, gateway, DNS and other configuration information.

  • Static setting of IP address and DNS: use "netsh interface ip set address name=adapter name source=static address=IP address mask=subnet mask gateway=gateway" and "netsh interface ip set dns name=adapter name The source=static address=DNS address" command can statically configure the IP address and DNS of the network adapter.

4. Manage wireless network

  • List wireless network configuration: Use the "netsh wlan show profiles" command to list all wireless network configuration files saved in the system.

  • Export wireless network configuration: use "netsh wlan export profile name=wireless network name folder=save path" command can export the specified wireless network configuration file to the specified path.

  • #Delete wireless network configuration: Use the "netsh wlan delete profile name=wireless network name" command to delete it Specified wireless network configuration file.

5. Management firewall

  • View the firewall configuration: use "netsh advfirewall show currentprofile" command can view the rules and settings of the current firewall configuration.

  • Enable or disable the firewall: use "netsh advfirewall set allprofiles state on|off" command can enable or disable all firewall configurations.

6. Manage network forwarding

  • Enable or Disable network forwarding: use "netsh interface portproxy add v4tov4 listenport=localport listenaddress=local IP connectport=remote port connectaddress=remote IP" command can add port mapping rules.

7. Set QoS (Quality of Service)

  • View QoS configuration: Use the "netsh qos show" command to view the QoS configuration information in the system.

  • Configure QoS parameters: use "netsh qos set "Command can set QoS parameters, such as bandwidth limit, flow control, etc.

8. Reset network settings

  • Reset Winsock: Use the "netsh winsock reset" command to reset all sockets in the Winsock directory.

  • Reset the TCP/IP protocol stack: use "netsh int ip reset "The command can reset the parameters of the TCP/IP protocol stack to the default values.

In short, the Netsh command is a powerful network management tool in Windows systems that can help users control network adapters. Perform configuration, diagnose network problems, manage firewalls, etc. By learning and using Netsh commands, users can more conveniently conduct network management and troubleshooting. I hope the above introduction can help you better understand and use Netsh commands.

The above is the detailed content of Detailed explanation of netsh command usage. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn