×
Create a new article
Write your page title here:
We currently have 3,189 articles on s23. Type your article name above or create one of the articles listed here!



    s23
    3,189Articles

    HowTo/ChangeIpSettingsInWindows

    Ok..so..I've encountered this problem over and over again.. How do you change network configurations to a "windows2k/NT/XP" machine.

    found some stuff online which was sort of informative specifically [HowTo/ChangeIpSettingsInWindows#netsh how to use netsh.exe] to change net configs. I will try to find numerous examples of netsh.exe scripts. Feel free to add your own netsh examples aswell.

    The content immediately below is snipped off some forum, the M$ link is just a manual page for netsh.exe [#netsh]

    Changing Windows IP Address via Command Line 
    ------------------------------------------------------------------------
    In the past I posted a question asking about a Windows script 
    to change my IP Address on the fly. I received a great response 
    directing me to this program, http://www.mobilenetswitch.com/, 
    that works great but I like to first try doing things for free. :-)
    
    To create a small program to change my IP Address 
    I used the ônetshö utility for windows. Snipped from 
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;q242468: 
    --------------------------------------------------------
    ò	You can use the Netsh.exe tool to perform the following tasks: 
    o	Configure interfaces. 
    o	Configure routing protocols. 
    o	Configure filters. 
    o	Configure routes. 
    o	Configure remote access behavior for Windows-based remote access 
       routers that are running the Routing and Remote Access Server 
       (RRAS) Service. 
    o	Display the configuration of a currently running router on any computer. 
    o	Use the scripting feature to run a collection of commands in batch 
       mode against a specified router.
    --------------------------------------------------------
    
    Here are some basic steps to make this workàI used Windows2k.
    --------------------------------------------------------
    1) I kept script VERY simple since I only have a few possible addresses that 
    I use and the same DNS is ok as well. 
    I opened a basic notepad and added the following lines:
    ----
     netsh interface ip set address "<NAME OF YOUR NIC>" static 192.168.1.100 255.255.255.0 192.168.1.1 1
     exit 
    -----
    
    2) I then saved the file as a Home-IP.bat. 
    
    3) Next, I moved this file into ôStart>Programs>My Scripts>Home-IP.batö.
    
    4) When clicked, this script changes the IP of the NIC defined to 
    192.168.1.100/24 with a default gateway of 192.168.1.1 and a metric of 1.
    
    5) Finally, I repeated the steps for the rest of my remote locations. 
    You can also define a NIC as DHCP if you like as well covering any of those locations.
    
    á
    
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.