Skip to content

Instantly share code, notes, and snippets.

@mtsukamoto
Created February 4, 2013 04:47
Show Gist options
  • Save mtsukamoto/4705073 to your computer and use it in GitHub Desktop.
Save mtsukamoto/4705073 to your computer and use it in GitHub Desktop.
WindowsコマンドラインでのIPアドレス、ルーティングの設定。とくにrouteコマンドを忘れるので、備忘録として。
set IFNAME="ローカル エリア接続"
set IFIP="10.0.1.2"
set IFMASK="255.255.255.0"
set IFGW="none"
set ROUTEDEST="10.0.2.0"
set ROUTEMASK="255.255.255.0"
set ROUTEGW="10.0.1.254"
netsh interface ip set address name=%IFNAME% source=static addr=%IFIP% mask=%IFMASK% %IFGW%
route add %ROUTEDEST% mask %ROUTEMASK% %ROUTEGW%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment