HOW TO CHANGE THE IP ADDRESS OF A COMPUTER FROM THE COMMAND LINE IN WINDOWS




HOW TO CHANGE THE IP ADDRESS OF A COMPUTER FROM THE COMMAND LINE IN WINDOWS

LETS SAY YOU WANTED TO CHANGE THE IP ADDRESS FROM THE COMMAND PROMPT IN WINDOWS
YOU WOULD USE THE NETSH COMMAND.
LETS SAY YOU WANTED TO CHANGE THE IP ADDRESS FROM 10.0.0.1 TO 10.0.0.3 WITH SAME SUBNET AND SAME GATEWAY
YOU WOULD TYPE THE FOLLOWING COMMAND WITH THE “1″ AT THE END.

netsh interface ip set address “local area connection” static 10.0.0.3 255.255.255.0 10.0.0.1 1

LETS SAY YOU WOULD LIKE TO TURN DHCP ON THEN YOU WOULD TYPE THE FOLLOWING COMMAND

netsh interface ip set address “local area connection” dhcp

YOU CAN SET DNS TO STATIC
netsh interface ip set dns “local area connection” static 192.168.0.2

YOU CAN SET DNS TO DYNAMIC
netsh interface ip set dns “local area connection” dhcp

YOU CAN SET WINNS TO STATIC
netsh interface ip set wins “local area connection” static 192.168.100.3

YOU CAN SET WINNS TO DYNAMIC
netsh interface ip set wins “local area connection” dhcp

NOW LETS SAY YOU WANT TO GENERATE A BACKUP OF YOUR CONFIGURATION
netsh interface dump > mycfg.dat

LETS SAY YOU WANT TO RESTORE YOUR CONFIGURATION
netsh exec mycfg.dat

IF YOU WANTED TO FIND THE “mycfg.dat” file you would look in C:Documents and SettingsOwner

LETS SAY YOU TYPED IN “IP CONFIG /ALL” AND YOU CAME UP WITH 2 OR THREE INTERFACES… AND YOU WANTED TO CHANGE ONE THAT WAS NOT “local area connection” THEN YOU WOULD SUBSTITUTE IT IN THE PLACE OF “local area connection” AND MAKE SURE ITS TYPED ALL IN LOWER CASE.

HOW TO DO ALL THAT I MENTIONED BEFORE REMOTELY LINK

SOME MORE NETSH INFO 1 LINK

SOMETIMES PSEXEC IS BETTER THAN JUST NETSCH I LINK

SOMETIMES PSEXEC IS BETTER THAN JUST NETSCH II LINK

SOMETIMES PSEXEX IS BETTER THAN JUST NETSCH III LINK

    This entry was posted in Network and tagged , , , , , . Bookmark the permalink.

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>