Tuesday, December 22, 2009

A Few Networking Commands To Be Run From Windows

Last day after the Internet Technology Exam, I was going through a particular site where I found some CMD PRMT commands through which we can easily check some TCP/IP configuration settings.
Here they are ::::

1. IPCONFIG

Configure IP (internet protocol configuration)

Syntax

IPCONFIG /all Display full configuration information.

IPCONFIG /release [adapter]
Release the IP address for the specified adapter.

IPCONFIG /renew [adapter]
Renew the IP address for the specified adapter.

IPCONFIG /flushdns Purge the DNS Resolver cache.

IPCONFIG /registerdns Refresh all DHCP leases and re-register DNS names.

IPCONFIG /displaydns Display the contents of the DNS Resolver Cache.

IPCONFIG /showclassid adapter
Display all the DHCP class IDs allowed for adapter.

IPCONFIG /setclassid adapter [classid]
Modify the dhcp class id.

If the Adapter name contains spaces, use quotes: "Adapter Name"
wildcard characters * and ? allowed, see the examples below


The default is to display only the IP address, subnet mask and default gateway for each adapter bound to TCP/IP.

For Release and Renew, if no adapter name is specified, then the IP address leases for all adapters bound to TCP/IP will be released or renewed.


For Setclassid, if no ClassId is specified, then the ClassId is removed.

Examples:
> ipconfig ... Show information.
> ipconfig /all ... Show detailed information
> ipconfig /renew ... renew all adapters
> ipconfig /renew EL* ... renew any connection that has its
name starting with EL



> ipconfig /release *Con* ... release all matching connections,
eg. "Local Area Connection 1" or
"Local Area Connection 2"

> ipconfig /setclassid "Local Area Connection" TEST
... set the DHCP class ID for the
named adapter to = TEST
Click and View the picture as larger and clearer.

2. Netsh.exe


With Netsh.exe you can easily view your TCP/IP settings. Type the following command in a Command Prompt window (CMD.EXE):

netsh interface ip show config


Click and View the Picture as Larger and Clearer

With Netsh.exe, you can easily configure your computer's IP address and other TCP/IP related settings. For example:

The following command configures the interface named Local Area Connection with the static IP address 192.168.0.100, the subnet mask of 255.255.255.0, and a default gateway of 192.168.0.1:


netsh interface ip set address name="Local Area Connection" static 192.168.0.100 255.255.255.0 192.168.0.1 1


Netsh.exe can be also useful in certain scenarios such as when you have a portable computer that needs to be relocated between 2 or more office locations, while still maintaining a specific and static IP address configuration. With Netsh.exe, you can easily save and restore the appropriate network configuration.

No comments:

Post a Comment