Home | Troubleshooting |  Quick Setup  |  Cisco How to  |  Data Recovery  |  Forums   | Blog | IT Exam Practice | Services  | About Us | Chicagotech MVP  | Search  | Contact Us  |                 

 

Netsh

How to Reset the Winsock Catalog

Use netsh configure remote computer

Netsh is a command-line scripting utility that allows you to, either locally or remotely, display, modify or script the network configuration of a computer that is currently running. The following examples based on XP SP2.

How to run netsh

To run a netsh command, you can start netsh from the Cmd.exe prompt and change to the context that contains the command you want to use. Or you can do netsh -c option. If the contexts that are not available to you, you may receive an error message. For example, if you type netsh -c firewall at the Netsh command prompt, you change to the firewall context, but if you do not have firewall installed the following message appears:

The following command was not found: firewall.

How to open port 8080 using netsh

1) netsh -c firewall
2) set portopening tcp 8080

How to check the connection and opened port
netsh -c diag
netsh diag>connect iphost chicagotech.net 80
Result:
IPHost (chicagotech.net)
IPHost = chicagotech.net
Port = 80
Server appears to be running on port(s) [80]

How to configure the TCP/IP protocol

The following command configures the interface named chicagotechnet with the static IP address 10.0.5.99, the subnet mask of 255.255.255.0, and a default gateway of 10.0.5.1:

set address name="chicagotechnet" source=static addr=10.0.5.99 mask=255.255.255.0 gateway=10.0.5.1 

How to switch between static ip and DHCP

To switch the specified adapter from a static address to DHCP, type the following command:
netsh interface ip set address "chicagotechnet" dhcp

To change to a static address, type the following command:
netsh interface ip set address "chicagotechnet" static ipaddr subnetmask gateway metric
 

 


Hit Counter   This web is provided "AS IS" with no warranties.
Copyright © 2002-2018 ChicagoTech.net, All rights reserved. Unauthorized reproduction forbidden.