route.exe操縱網(wǎng)絡(luò)路由表(顯示和修改有關(guān)由 IPX協(xié)議使用的路由表的信息)
route.exe is a MS-DOS executable from Windows. It is used to block IP connections to the system by added IP addresses to a routing table. This process should not be terminated unless it is causing problems.
參數(shù)
-f 清除所有網(wǎng)關(guān)入口的路由表。如果該參數(shù)與某個(gè)命令組合使用,路由表將在運(yùn)行命令前清除。
-p 該參數(shù)與 add 命令一起使用時(shí),將使路由在系統(tǒng)引導(dǎo)程序之間持久存在。默認(rèn)情況下,系統(tǒng)重新啟動時(shí)不保留路由。與 print 命令一起使用時(shí),顯示已注冊的持久路由列表。忽略其他所有總是影響相應(yīng)持久路由的命令。
Command 指定下列的一個(gè)命令。
命令目的
print 打印路由
add 添加路由
delete 刪除路由
change 更改現(xiàn)存路由
destination 指定發(fā)送 command 的計(jì)算機(jī)。
mask subnetmask 指定與該路由條目關(guān)聯(lián)的子網(wǎng)掩碼。如果沒有指定,將使用 255.255.255.255。
gateway 指定網(wǎng)關(guān)。
metric costmetric 指派整數(shù)躍點(diǎn)數(shù)(從 1 到 9999)在計(jì)算最快速、最可靠和(或)最便宜的路由時(shí)使用。
例如:本機(jī)ip為10.111.142.71,缺省網(wǎng)關(guān)是10.111.142.1,假設(shè)此網(wǎng)段上另有一網(wǎng)關(guān)10.111.142.254,現(xiàn)在想添加一項(xiàng)路由,使得當(dāng)訪問10.13.0.0子網(wǎng)絡(luò)時(shí)通過這一個(gè)網(wǎng)關(guān),那么可以加入如下命令:
C:>route add 10.13.0.0 mask 255.255.0.0 10.111.142.1
C:>route print (鍵入此命令查看路由表,看是否已經(jīng)添加了)
C:>route delete 10.13.0.0
C:>route print (此時(shí)可以看見已經(jīng)沒了添加的項(xiàng))