Netsh is a command-line utility in Windows that allows users to configure and monitor network settings. It stands for Network Shell and provides a powerful way to manage various aspects of network configuration.
Netsh can be used to perform a wide range of tasks, including:
- Configuring network interfaces
- Managing firewall settings
- Creating and managing DHCP servers
- Monitoring network traffic
- Diagnosing network issues
To use Netsh, open the Command Prompt as an administrator and type ‘netsh’ followed by the desired command. Here are a few examples:
1. Configuring network interfaces:
To view the list of available network interfaces, use the command:
netsh interface show interface
To enable or disable a network interface, use the commands:
netsh interface set interface name="InterfaceName" admin=enabled/disabled
2. Managing firewall settings:
To view the current firewall configuration, use the command:
netsh advfirewall show currentprofile
To allow or block a specific port, use the commands:
netsh advfirewall firewall add rule name="RuleName" dir=in/out action=allow/block protocol=TCP/UDP localport=PortNumber
3. Creating and managing DHCP servers:
To create a new DHCP server, use the command:
netsh dhcp server add
To configure DHCP options, use the command:
netsh dhcp server set optionvalue OptionID OptionValue
4. Monitoring network traffic:
To monitor network traffic in real-time, use the command:
netsh trace start capture=yes report=yes
To stop the network trace, use the command:
netsh trace stop
5. Diagnosing network issues:
To diagnose network connectivity issues, use the command:
netsh int ip reset
Netsh is a powerful tool that can be used by network administrators and advanced users to configure and troubleshoot network settings. It provides a command-line interface for managing various aspects of the network, making it a valuable utility for network management.