Created
August 27, 2014 14:51
-
-
Save tyru/9d911c1b68c1e56086a9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM @echo off | |
REM ==================================================================== | |
REM 複数NICでのデフォルトゲートウェイ設定方法 | |
REM http://www.maruko2.com/mw/%E8%A4%87%E6%95%B0NIC%E3%81%A7%E3%81%AE%E3%83%87%E3%83%95%E3%82%A9%E3%83%AB%E3%83%88%E3%82%B2%E3%83%BC%E3%83%88%E3%82%A6%E3%82%A7%E3%82%A4%E8%A8%AD%E5%AE%9A%E6%96%B9%E6%B3%95 | |
REM ==================================================================== | |
REM set PERSISTENT=-p | |
REM From "route print" | |
REM 15...74 2f 68 af c8 52 ......Atheros AR9002WB-1NG Wireless Network Adapter | |
REM 11...00 01 2e 3a d9 94 ......Realtek PCIe GBE Family Controller | |
REM | |
set WIRELESS_IF=15 | |
set CABLE_IF=11 | |
REM Release AutoIP | |
ipconfig /renew | |
REM Wireless(192.168.1.1) -> WAN | |
route delete 0.0.0.0 | |
route add 0.0.0.0 mask 0.0.0.0 192.168.1.1 if %WIRELESS_IF% | |
REM Cable(192.168.2.0/24) | |
route delete 192.168.2.0 | |
route add 192.168.2.0 mask 255.255.255.0 192.168.2.1 if %CABLE_IF% | |
ping 192.168.1.1 | |
ping google.com | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment