Windowsのルーティング情報を確認






DOSプロンプトにて
route print

あるいは

netstat -rn
出力結果はどちらも同じ
UNIXなどでも使えるのでnetstatコマンドの方がおすすめ

○実行結果
C:\>netstat -rn

Route Table
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...00 02 55 17 0e 1e ...... Intel(R) PRO/100 VE Network Connection - パケッ
ト スケジューラ ミニポート
===========================================================================
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0        2.2.2.190        2.2.2.27       20
        127.0.0.0        255.0.0.0        127.0.0.1       127.0.0.1       1
          5.5.5.0    255.255.255.0        2.2.2.148        2.2.2.27       1
         4.4.4.27  255.255.255.255        2.2.2.131        2.2.2.27       1
         4.4.4.17  255.255.255.255        2.2.2.131        2.2.2.27       1
          2.2.2.0    255.255.255.0         2.2.2.27        2.2.2.27       20
         2.2.2.27  255.255.255.255        127.0.0.1       127.0.0.1       20
        2.2.2.255  255.255.255.255         2.2.2.27        2.2.2.27       20
        224.0.0.0        240.0.0.0         2.2.2.27        2.2.2.27       20
  255.255.255.255  255.255.255.255         2.2.2.27        2.2.2.27       1
Default Gateway:   2.2.2.190
===========================================================================
Persistent Routes:
  Network Address          Netmask  Gateway Address  Metric
         4.4.4.17  255.255.255.255        2.2.2.131       1
         4.4.4.27  255.255.255.255        2.2.2.131       1
          5.5.5.0    255.255.255.0        2.2.2.148       1

「Active Routes」に記載されている情報が現在使われているルーティング情報
「Persistent Routes」に記載されているルーティング情報は再起動しても「Active Routes」に読み込まれて有効になる

Windowsでスタティックルートを追加する方法
↑の中で、スタティックルートを追加する際に「-p」オプションを付けた場合に、
「Persistent Routes」に追加される