Welcome to my site. Please CLICK HERE to give your opinions regarding this new look of "PCTipsbyAnu". Thanks for visiting.

Friday, January 7, 2011

Browse » Home » , , , , , , » How to configure IP address n DNS via command line?

How to configure IP address n DNS via command line?


You know that command line interface is better thn graphical user interface.... so, configuring IP address n DNS through command line is much easier n faster thn configuring through GUI


The IP address of your computer can be set from the command promptby running the following commands at an administrative level prompt:
netsh interface ip set address name="PC Tips by Anu" static 123.123.123.123 255.255.255.0 123.123.123.1 1
PC Tips by Anu is the name of the adapteryou want to modify.

In single NIC systems it is normally called LocalArea Connection.
123.123.123.123 is the IP address you want to set.
255.255.255.0 is the subnet mask.
123.123.123.1 is the gateway.
 1 is the gateway metric. You can leave this as 1 for almost all cases. 

If you want to enable DHCP you can run:
netsh interface ip set address name="PC Tips by Anu" dhcp
There are two commands for DNS since administrators typically configure a primary and secondary DNS server. 

For the primary DNS run:
netsh interface ip set dns name="PC Tips by Anu" static 208.67.222.222
For the secondary run:
netsh interface ip add dns name="PC Tips by Anu" 208.67.220.220 index=2
If you want to configure the computer to use DNS from DHCP run:

netsh interface ip set dnsservers name="PC Tips by Anu" source=dhcp
When you are finished with all of your IP and DNS changes run ipconfig -all to review the new settings.

Thanks...
You can leave a response, or trackback from your own site.

About 'Anu': My name is 'Anu' also Known as 'ANU 007 TIGER' .I'm administrator of 'PC Tips by Anu' blog .This blog was opened for sharing contents about hacking n cracking.
Thanks YAHOO OR GMAIL

0 comments:

Post a Comment

 
Back to Top