使用windows route命令來控制雙網卡,雙網路訪問

來源:互聯網
上載者:User

目前我的筆記本使用無線網路訪問互連網,使用有線網路訪問辦公網路

無線網路的網關是117.128.108.1

辦公網路的網關是10.16.30.254

在命令列下,輸入route print可查看到所有的route 列表

要設定,首先刪除掉原來的0.0.0.0的路由。

C:\Documents and Settings\Administrator>route delete 0.0.0.0

然後添加如下:

C:\Documents and Settings\Administrator>route add 10.0.13.0 mask 255.255.255.0 1

0.16.30.254 -p

C:\Documents and Settings\Administrator>route add 0.0.0.0 mask 0.0.0.0 117.128.1

08.1 -p

這時候查看路由表,-p的參數可以保證機器在重啟後設定仍然生效.

===========================================================================

Persistent Routes:

  Network Address          Netmask  Gateway Address  Metric

       10.16.30.0    255.255.255.0     10.16.30.254       1

        10.0.13.0    255.255.255.0     10.16.30.254       1

          0.0.0.0          0.0.0.0    117.128.108.1       1

我們來測試一下:

訪問辦公網路

C:\Documents and Settings\Administrator>tracert 10.0.13.24

 

Tracing route to localhost [10.0.13.24]

over a maximum of 30 hops:

 

  1     2 ms     1 ms     1 ms  localhost [10.16.30.253]

  2     9 ms     9 ms    10 ms  localhost [10.3.255.33]

  3    12 ms     9 ms    11 ms  localhost [10.0.13.24]

 

Trace complete.

 

訪問互連網:

C:\Documents and Settings\Administrator>tracert www.163.com

 

Tracing route to 163.xdwscache.glb0.lxdns.com [60.28.236.112]

over a maximum of 30 hops:

 

  1     2 ms     1 ms     2 ms  117.128.108.1

  2    23 ms     4 ms     6 ms  117.128.12.165

  3     6 ms     8 ms     4 ms  117.128.8.4

  4    17 ms     5 ms     5 ms  117.128.8.193

 

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.