原文来自:http://www.cnblogs.com/lightnear/archive/2013/02/03/2890835.html

一、windows 路由表解释

route print -4

===========================================================================
Interface List19...78 dd 08 a4 40 f4 ......Bluetooth Device (Personal Area Network)
11...00 27 10 5b 26 fc ......Intel(R) Centrino(R) Advanced-N 6200 AGN13...f0 de f1 08 58 f4 ......Intel(R) 82577LM Gigabit Network Connection15...00 50 56 c0 00 01 ......VMware Virtual Ethernet Adapter for VMnet116...00 50 56 c0 00 08 ......VMware Virtual Ethernet Adapter for VMnet81...........................Software Loopback Interface 123...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter12...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface21...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #217...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #420...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #522...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #6
===========================================================================IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric0.0.0.0          0.0.0.0      192.168.0.1     192.168.1.12     2610.108.0.0      255.255.0.0      10.108.58.1     10.108.58.18     2110.108.58.0    255.255.255.0         On-link      10.108.58.18    27610.108.58.18  255.255.255.255         On-link      10.108.58.18    27610.108.58.255  255.255.255.255         On-link      10.108.58.18    276127.0.0.0        255.0.0.0         On-link         127.0.0.1    306127.0.0.1  255.255.255.255         On-link         127.0.0.1    306127.255.255.255  255.255.255.255         On-link         127.0.0.1    306172.16.0.0      255.255.0.0      10.108.58.1     10.108.58.18     21192.168.0.0    255.255.252.0         On-link      192.168.1.12    281192.168.1.12  255.255.255.255         On-link      192.168.1.12    281192.168.3.255  255.255.255.255         On-link      192.168.1.12    281192.168.10.0    255.255.255.0         On-link      192.168.10.1    276192.168.10.1  255.255.255.255         On-link      192.168.10.1    276192.168.10.255  255.255.255.255         On-link      192.168.10.1    276192.168.159.0    255.255.255.0         On-link     192.168.159.1    276192.168.159.1  255.255.255.255         On-link     192.168.159.1    276192.168.159.255  255.255.255.255         On-link     192.168.159.1    276224.0.0.0        240.0.0.0         On-link         127.0.0.1    306224.0.0.0        240.0.0.0         On-link      10.108.58.18    276224.0.0.0        240.0.0.0         On-link     192.168.159.1    276224.0.0.0        240.0.0.0         On-link      192.168.10.1    276224.0.0.0        240.0.0.0         On-link      192.168.1.12    281255.255.255.255  255.255.255.255         On-link         127.0.0.1    306255.255.255.255  255.255.255.255         On-link      10.108.58.18    276255.255.255.255  255.255.255.255         On-link     192.168.159.1    276255.255.255.255  255.255.255.255         On-link      192.168.10.1    276255.255.255.255  255.255.255.255         On-link      192.168.1.12    281
===========================================================================
Persistent Routes:Network Address          Netmask  Gateway Address  Metric172.21.10.0    255.255.255.0    172.16.56.190       110.108.0.0      255.255.0.0      10.108.58.1       1172.16.0.0      255.255.0.0      10.108.58.1       1
===========================================================================

Interface List: 网络卡列表

Active Routes: 活动路由

Network Destination: 目的网段

Netmask: 子网掩码,与目的网段共同定义了此条路由适用的网络地址

Gateway: 网关,又称下一跳路由器,在发送IP数据包时,网关定义了针对特定的网络目的地址,数据包发送到的下一跳服务器

Interface: 接口,接口定义了针对特定的网络目的地址,本地计算机用于发送数据包的网络接口

Metric: 跳数,跳数用于指出路由的成本,通常情况下代表到达目标地址所需要经过的跳跃数量,一个跳数代表经过一个路由器。跳数越低,代表路由成本越低,优先级越高

Persistent Routes: 手动配置静态路由

二、windows 路由命令

Manipulates network routing tables.ROUTE [-f] [-p] [-4|-6] command [destination][MASK netmask]  [gateway] [METRIC metric]  [IF interface]-f           Clears the routing tables of all gateway entries.  If this isused in conjunction with one of the commands, the tables arecleared prior to running the command.-p           When used with the ADD command, makes a route persistent acrossboots of the system. By default, routes are not preservedwhen the system is restarted. Ignored for all other commands,which always affect the appropriate persistent routes. Thisoption is not supported in Windows 95.-4           Force using IPv4.-6           Force using IPv6.command      One of these:PRINT     Prints  a routeADD       Adds    a routeDELETE    Deletes a routeCHANGE    Modifies an existing routedestination  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*.Pattern match is only allowed in PRINT command.
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 1The route addition failed: The specified mask parameter is invalid.(Destination & Mask) != Destination.Examples:> route PRINT> route PRINT -4> route PRINT -6> route PRINT 157*          .... Only prints those matching 157*> route ADD 157.0.0.0 MASK 255.0.0.0  157.55.80.1 METRIC 3 IF 2destination^      ^mask      ^gateway     metric^    ^Interface^If IF is not given, it tries to find the best interface for a givengateway.> route ADD 3ffe::/32 3ffe::1> route CHANGE 157.0.0.0 MASK 255.0.0.0 157.55.80.5 METRIC 2 IF 2CHANGE is used to modify gateway and/or metric only.> route DELETE 157.0.0.0> route DELETE 3ffe::/32

route print: 打印当前的路由表

route delete:删除一条路由

route add: 增加一条路由, 如果最后加上 –p 选项,表示永久增加静态路由,重启后不会失效

route change: 更改一条路由

三、双网卡配置实便

1. 网络环境:

有线:可连接公司内网,不能连接Internet

无线:可连接Internet,不能连接公司内网  默认网关为 192.168.0.1

我们的目的就是同时连接这两个网络,并自动选择路由实现内外网都可以访问。

2. 配置

:删除默认设置
route delete 0.0.0.0
:外网路由,全走无线
route add 0.0.0.0 mask 0.0.0.0 192.168.0.1 –p
:公司内网全部在10.108.*.*网段,增加此路由
route add 10.108.0.0 mask 255.255.0.0 10.108.58.1 -p

就是这么简单,结果如下(还有另外几个路由配置是做其它用途的)

PING下试试

转载于:https://www.cnblogs.com/Jim-william/p/4255293.html

Windows路由表配置:双网卡同时上内外网相关推荐

  1. 双网卡同时上内外网的方法

    作者:iamlaosong  不少公司都有内部的专网,比如银行.税务等都有自己的内部专网,日常工作中经常会碰到需要同时访问内外网的问题,比如在内网上干活,外网上查资料,或者和其他人交换信息等,这时,可 ...

  2. WIN7使用手机蓝牙共享网络,及利用蓝牙及WLAN实现双网卡同时上内外网

    步骤1:手机先打开蓝牙,并开启"蓝牙网络共享"选项(我的是小米,其它手机不清楚有没有这个选项,有就必须打开) 步骤2:笔记本win7系统电脑如何通过蓝牙连接手机上网:http:// ...

  3. win7操作系统双网卡同时上内外网

    一般的公司网络,公司的服务器在内网,员工办公在外网,两者是分开的,如笔者在银行工作,平时要连公司的测试环境就得连网线,要上外网就得连wifi,不能同时用,非常麻烦 但是也有一些公司(比如我之前的公司) ...

  4. windows使用双网卡同时上内外网

    首先你的机器需要有两块网卡,分别接到两台交换机上, internet地址:192.168.1.8,子网掩码:255.255.255.0,网关:192.168.1.1 内部网地址:172.23.1.8, ...

  5. 双网卡同时上网如何设置 双网卡同时上内外网络

    双网卡同时使用(一个上内网,一个上外网),这样即可有效的保障内网的安全,又能解决电脑访问外网的问题.可谓是一举两得,那么那么双网卡同时上内外网怎么设置?电脑上需要安装两个网卡,分别接到两个路由上.由于 ...

  6. Ubuntu 设置双网卡,实现内外网同时可用

    背景不说了,网上的教程查过之后感觉写的都挺复杂的,遂抛弃之. 在Windows下,如果要设置内外网同时可用,只需要两条命令: #内外网连接上后,此时内外网的默认网关同时存在 #1.清除两个默认网关 # ...

  7. 配置无线网卡和有线网卡分别上内外网的方法

    场景: 到机房去部署应用,需要内网才可以连接到服务器,部署的同时可能经常需要查资料,也就需要连接外网,然而同时使用wifi和有线的时候,要么都走wifi,要么都走有线,导致内外网不能同时访问,要一直切 ...

  8. mac配置双网卡 mac同时使用内网和外网

    在公司办公通常都会连内网,而连内网最大的限制就是不可以使用外网,那遇到问题也就不能google,而当连接无线的时候,内网的东西就不可以访问,也就不能正常办公,对于我这种小白来说,工作中遇到的问题数不胜 ...

  9. 单网卡同时上内外网的路由设置

    现在很多的单位有架设了内网,通常的方案是通过代理服务器上外网,这样要对每个程序逐一进行设置,很麻烦,有些程序或者根本就无法通过代理服务器上外网,为使这些程序能正常运行,所以很多单位同时布有外网和内网专 ...

最新文章

  1. 【Java】“异常”详解
  2. 异步调用方法时异常的捕获
  3. java extend 和 implements 的区别
  4. mybatis 依赖于jdbc_使用基础mybatis代替原始jdbc
  5. 网络安装Citrix XenServer
  6. KMP算法代学习之(二)代码深入学习
  7. CentOS安装之后的系统安全配置
  8. 【个人】微信小程序初体验
  9. oracle-关于分组函数的小细节
  10. 拓端tecdat|R语言结构方程模型SEM分析心理学和营销研究数据路径图可视化
  11. jdk11 及jdk8阿里云快速下载链接
  12. ESPRESSIF AT指令集
  13. html5化妆品网站源码,织梦响应式化妆美妆品类展示网站模板dedecms移动手机端HTML5自适应整站源码...
  14. arcgis10.3添加工具
  15. 总结:图像识别的机器学习方法
  16. c语言开发的cli,Package - cyy-cli
  17. 微信公众号开发——模板消息
  18. 硅藻泥行业失控真相后续 网友呼吁主管部门彻查
  19. 【瞎搞】在nas上搭建qbittorrent
  20. Docker中部署jenkins环境时,无法安装插件解决办法

热门文章

  1. 大页(Huge Page)简单介绍
  2. 查看mysql 默认端口号和修改端口号
  3. 去除行块级标签之间的默认间距
  4. JavasScript基数排序
  5. RSA加密算法原理及RES签名算法简介(转载)
  6. 零预算如何获得 620 万 PV 和 144,920 个粉丝
  7. PMcaff-干货| 产品经理应该了解的服务设计那些事儿
  8. iOS开发零碎知识点
  9. linux定时任务Crond生产规范案例精讲09
  10. leetcode 135分发糖果