Questions

netsh command static ip assign

+
0 Votes
Locked

netsh command static ip assign

spesse
Hi I cant get this to work...
---------------------------
@echo off
SET /P IP= IPADRESS:
SET /P MASK= SUBNET:
SET /p GW= GATEWAY:
netsh interface ip set address "Local Area Connection" static %IP% %MASK% %GW%
pause
----------------------------
Why?? i would like to have a small batfile just doit..
aia have tryed with vbs very messy
  • +
    0 Votes
    fwang

    netsh interface ip set address local static IP Mask Gateway GWmetric

    For example:
    netsh interface ip set address local static 10.0.0.5 255.255.255.0 10.0.0.1 1

    for gwmetric: The metric for the default gateway. This field should not be set if gateway is set to "none".

    +
    0 Votes
    pritam.patil

    Does NETSH works on Blade server??

  • +
    0 Votes
    fwang

    netsh interface ip set address local static IP Mask Gateway GWmetric

    For example:
    netsh interface ip set address local static 10.0.0.5 255.255.255.0 10.0.0.1 1

    for gwmetric: The metric for the default gateway. This field should not be set if gateway is set to "none".

    +
    0 Votes
    pritam.patil

    Does NETSH works on Blade server??