win7系統下載
當前位置: 首頁 > 網絡技術教程 > 詳細頁面

多個IP選擇線路的處理方法之route命令

發布時間:2022-07-26 文章來源:xp下載站 瀏覽: 77

網絡技術是從1990年代中期發展起來的新技術,它把互聯網上分散的資源融為有機整體,實現資源的全面共享和有機協作,使人們能夠透明地使用資源的整體能力并按需獲取信息。資源包括高性能計算機、存儲資源、數據資源、信息資源、知識資源、專家資源、大型數據庫、網絡、傳感器等。 當前的互聯網只限于信息共享,網絡則被認為是互聯網發展的第三階段。

  一臺電腦兩條線路一個電信IP一個聯通的IP,解決訪問電信的時候自動走電信線路,訪問聯通的時候自動走聯通的線路,我們可以用到下面這個命令

  ROUTEDOS命令我們都可以在 Cmd 下用 route /? 來查看他的幫助信息

  先看一下他的幫助

  Manipulates network routing tables.

  ROUTE [-f] [-p] [command [destination]

  [MASK netmask] [gateway] [METRIC metric] [IF interface]

  -f Clears the routing tables of all gateway entries. If this is

  used in conjunction with one of the commands, the tables are

  cleared prior to running the command.

  -p When used with the ADD command, makes a route persistent across

  boots of the system. By default, routes are not preserved

  when the system is restarted. Ignored for all other commands,

  which always affect the appropriate persistent routes. This

  option is not supported in Windows 95.

  command One of these:

  PRINT Prints a route

  ADD Adds a route

  DELETE Deletes a route

  CHANGE Modifies an existing route

  destination Specifies the host.

  MASK Specifies that the next parameter is the 'netmask' value.

  netmask Specifies a subnet mask value for this route entry.

  If not specified, it defaults to 255.255.255.255.

  gateway Specifies gateway.

  interface the interface number for the specified route.

  METRIC specifies the metric, ie. cost for the destination.

  All symbolic names used for destination are looked up in the network database

  file NETWORKS. The symbolic names for gateway are looked up in the host name

  database file HOSTS.

  If the command is PRINT or DELETE. Destination or gateway can be a wildcard,

  (wildcard is specified as a star '*'), or the gateway argument may be omitted.

  If Dest contains a * or ?, it is treated as a shell pattern, and only

  matching destination routes are printed. The '*' matches any string,

  and '?' matches any one char. Examples: 157.*.1, 157.*, 127.*, *224*.

  Diagnostic Notes:

  Invalid MASK generates an error, that is when (DEST & MASK) != DEST.

  Example> route ADD 157.0.0.0 MASK 155.0.0.0 157.55.80.1 IF 1

  The route addition failed: The specified mask parameter is invalid

  (Destination & Mask) != Destination.

  Examples:

  > route PRINT

  > route ADD 157.0.0.0 MASK 255.0.0.0 157.55.80.1 METRIC 3 IF 2

  destination^ ^mask ^gateway metric^ ^

  Interface^

  If IF is not given, it tries to find the best interface for a given

  gateway.

  > route PRINT

  > route PRINT 157* .... Only prints those matching 157*

  > route CHANGE 157.0.0.0 MASK 255.0.0.0 157.55.80.5 METRIC 2 IF 2

  CHANGE is used to modify gateway and/or metric only.

  > route PRINT

  > route DELETE 157.0.0.0

  > route PRINT

  route - 顯示 / 操作IP選路表

  總覽 SYNOPSIS

  route [-CFvnee]

  route [-v] [-A family] add [-net|-host] target [netmask Nm] [gw Gw] [metric N] [mss M] [window W] [irtt I][reject] [mod] [dyn] [reinstate] [[dev] If]

  route [-v] [-A family] del [-net|-host] target [gw Gw][netmask Nm] [metric N] [[dev] If]

  route [-V] [--version] [-h] [--help]

  描述 DESCRIPTION

  route程序對內核的IP選路表進行操作。它主要用于通過已用ifconfig(8)程序配置好的接口來指定的主機或網絡設置靜態路由。

  選項 OPTIONS

  -v

  選用細節操作模式

  -A family

  用指定的地址族(如`inet',`inet6')。

  -n

  以數字形式代替解釋主機名形式來顯示地址。此項對試圖檢測對域名服務器進行路由發生故障的原因非常有用。

  -e

  用netstat(8)的格式來顯示選路表。-ee將產生包括選路表所有參數在內的大量信息。

  -net

  路由目標為網絡。

  -host

  路由目標為主機。

  -F

  顯示內核的FIB選路表。其格式可以用-e 和 -ee選項改變。

  -C

  顯示內核的路由緩存。

  del

  刪除一條路由。

  add

  添加一條路由。

  target

  指定目標網絡或主機。可以用點分十進制形式的IP地址或主機/網絡名。

  netmask Nm

  為添加的路由指定網絡掩碼。

  gw Gw

  為發往目標網絡/主機的任何分組指定網關。注意:指定的網關首先必須是可達的。也就是說必須為該網關預先指定一條靜態路由。如果你為本地接口之一指定這個網關地址的話,那么此網關地址將用于決定此接口上的分組將如何進行路由。這是BSD風格所兼容的。

  metric M

  把選路表中的路由值字段(由選路進程使用)設為M。

  mss M

  把基于此路由之上的連接的TCP最大報文段長度設為M字節。這通常只用于優化選路設置。默認值為536。

  window W

  把基于此路由之上的連接的TCP窗口長度設為W字節。這通常只用于AX.25網絡和不能處理背對背形式的幀的設備。

  irtt I

  把基于此路由之上的TCP連接的初始往返時間設為I毫秒(1-12000)。這通常也只用于AX.25網絡。如果省略此選項,則使用RFC1122的缺省值300ms。

  reject

  設置一條阻塞路由以使一條路由查找失敗。這用于在使用缺省路由前先屏蔽掉一些網絡。但這并不起到防火墻的作用。

  mod, dyn, reinstate

  設置一條動態的或更改過的路由。這些標志通常只由選路進程來設置。這只用于診斷目的,

  dev If


網絡的神奇作用吸引著越來越多的用戶加入其中,正因如此,網絡的承受能力也面臨著越來越嚴峻的考驗―從硬件上、軟件上、所用標準上......,各項技術都需要適時應勢,對應發展,這正是網絡迅速走向進步的催化劑。

本文章關鍵詞: 多個 選擇 線路 解決 辦法 route 命令 
返回網站下載首頁
0
主站蜘蛛池模板: 青青草原综合久久大伊人导航| 久久久久青草线蕉综合超碰| 一本一本久久a久久综合精品蜜桃| 人人妻人人狠人人爽天天综合网| 亚洲综合久久综合激情久久| 亚洲欧美成人久久综合中文网| 狠狠色色综合网站| 7国产欧美日韩综合天堂中文久久久久 | 亚洲精品第一国产综合精品99| 99综合电影在线视频好看| 久久99精品综合国产首页| 一本一道色欲综合网中文字幕| 激情五月激情综合网| 丁香色欲久久久久久综合网 | 久久久久一级精品亚洲国产成人综合AV区 | 日日狠狠久久偷偷色综合0| 色妞色综合久久夜夜| 久久综合亚洲色一区二区三区| 青青综合在线| 狠狠色丁香久久婷婷综合五月| 狠狠色综合网站久久久久久久高清| 久久香综合精品久久伊人| 99久久精品国产综合一区| 久久狠狠爱亚洲综合影院| 久久综合狠狠综合久久激情 | 婷婷激情综合网| 国产成人亚洲综合无码精品| 99久久伊人精品综合观看| 国产综合精品一区二区三区| 欧美亚洲另类久久综合| 人人狠狠综合久久亚洲高清| 欧美日韩亚洲乱国产综合| 亚洲国产成人久久综合碰碰动漫3d| 狠狠人妻久久久久久综合| 亚洲AV综合色区无码一区| 久久综合精品国产一区二区三区| 欧美伊香蕉久久综合类网站| 日韩综合无码一区二区| 琪琪五月天综合婷婷| 色综合久久中文综合网| 丁香五月网久久综合|