Oops! It appears that you have disabled your Javascript. In order for you to see this page as it is meant to appear, we ask that you please re-enable your Javascript!

寫了一個修改route的batch檔 for Windows O.S

在windows寫一個batch檔控制route table路由

我會將電腦連接到另一外網, 而原本預設的gateway 要清掉
改成 10.x.x.x 與 110.x.x.x 的IP網址才經由 gateway出去
其他預設則皆由外網出去 (未加入batch裡)

  • echo off 是將這個 把bat位置和指令暴露出來的設定 取消
  • echo on 則是把這個設定開啟
  • CLS : Clears the video display screen, setting the cursor in the upper left-hand corner.
  • pause 是用來暫停程式,不然沒指令後程式會自我關閉 (PAUSE : Pauses the running of a batch file and displays the message “Press any key to continue …” on the screen. If the optional message is included, it will be displayed first. Use pause to optionally terminate the batch file with at a safe place. The optional message is not displayed when echo is OFF, so the message must be echoed on the preceding line.)