一、windows 路由表解释

route print -
===========================================================================
Interface List
19...78 dd 08 a4 40 f4 ......Bluetooth Device (Personal Area Network)
11...00 27 10 5b 26 fc ......Intel(R) Centrino(R) Advanced-N AGN
13...f0 de f1 08 f4 ......Intel(R) 82577LM Gigabit Network Connection
15...00 50 56 c0 00 01 ......VMware Virtual Ethernet Adapter for VMnet1
16...00 50 56 c0 00 08 ......VMware Virtual Ethernet Adapter for VMnet8
1...........................Software Loopback Interface 1
23...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
12...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface
21...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #2
17...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #4
20...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #5
22...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #6
=========================================================================== IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.0.1 192.168.1.12 26
10.108.0.0 255.255.0.0 10.108.58.1 10.108.58.18 21
10.108.58.0 255.255.255.0 On-link 10.108.58.18 276
10.108.58.18 255.255.255.255 On-link 10.108.58.18 276
10.108.58.255 255.255.255.255 On-link 10.108.58.18 276
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
172.16.0.0 255.255.0.0 10.108.58.1 10.108.58.18 21
192.168.0.0 255.255.252.0 On-link 192.168.1.12 281
192.168.1.12 255.255.255.255 On-link 192.168.1.12 281
192.168.3.255 255.255.255.255 On-link 192.168.1.12 281
192.168.10.0 255.255.255.0 On-link 192.168.10.1 276
192.168.10.1 255.255.255.255 On-link 192.168.10.1 276
192.168.10.255 255.255.255.255 On-link 192.168.10.1 276
192.168.159.0 255.255.255.0 On-link 192.168.159.1 276
192.168.159.1 255.255.255.255 On-link 192.168.159.1 276
192.168.159.255 255.255.255.255 On-link 192.168.159.1 276
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 10.108.58.18 276
224.0.0.0 240.0.0.0 On-link 192.168.159.1 276
224.0.0.0 240.0.0.0 On-link 192.168.10.1 276
224.0.0.0 240.0.0.0 On-link 192.168.1.12 281
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 10.108.58.18 276
255.255.255.255 255.255.255.255 On-link 192.168.159.1 276
255.255.255.255 255.255.255.255 On-link 192.168.10.1 276
255.255.255.255 255.255.255.255 On-link 192.168.1.12 281
===========================================================================
Persistent Routes:
Network Address Netmask Gateway Address Metric
172.21.10.0 255.255.255.0 172.16.56.190 1
10.108.0.0 255.255.0.0 10.108.58.1 1
172.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 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. -4 Force using IPv4. -6 Force using IPv6. 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*. 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 1
The 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 2
destination^ ^mask ^gateway metric^ ^
Interface^
If IF is not given, it tries to find the best interface for a given
gateway.
> route ADD 3ffe::/32 3ffe::1 > 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 DELETE 157.0.0.0
> route DELETE 3ffe::/

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下试试

Windows路由表配置:双网卡路由分流的更多相关文章

  1. 转-Windows路由表配置:双网卡路由分流

    原文链接:http://www.cnblogs.com/lightnear/archive/2013/02/03/2890835.html 一.windows 路由表解释 route print -4 ...

  2. Linux系统运维笔记(6),CentOS 7.6双网卡路由配置

    Linux系统运维笔记(6),CentOS 7.6双网卡路由配置. 一,先确认系统版本: [root@localhost ~]# cat /etc/redhat-releaseCentOS Linux ...

  3. centos7.5配置双网卡上网

    一.环境及说明 当初有这个需求,主要是帮一个高校的客户搭建一个大数据集群,使用的是校园网,交换机上一个端口只能连接一部电脑上网,不能通过路由组建子网,确保集群中的服务器有子网ip的同时,也能够通过公网 ...

  4. linux中配置双网卡的目的?如何实现双网卡绑定,以实现负载均衡?

    配置双网卡的目的:========================== 1.你想做路由器,网关 2.实现冗余 3.负载均衡     linux 主机安装双网卡,共享一个IP地址,对外提供访问,实际 同 ...

  5. ubuntu16.04 配置双网卡机器

    本文介绍一台具有双有线网卡的机器在Linux下如何配置双网卡 系统平台:Ubuntu16.04 1:查看机器网卡信息,是否双网卡都能正确被机器pci识别 可以通过以下命令查看设备网卡,若果看到两条网卡 ...

  6. 在 Virtual Box 中为 CentOS7 mini 配置双网卡

    1. 配置过程 1.1 需求分析 要同时满足虚拟机访问互联网和远程连接,需要配置两块网卡. 一块为 NAT 网络,这块用来访问互联网. 另一块为 Host-Only 网络,进行远程连接.   1.2 ...

  7. virtualbox 最小化安装centos7 配置双网卡(nat和桥接)记录----已经过期

    该文章已经过期   请参考另一篇文章:virtualbox 安装centos7 配置桥接网卡,实现主机和虚拟机互通,虚拟机可以访问外网,解决无法上网问题   先说明一下为什么要配置双网卡? 配置nat ...

  8. Debian 16.04 配置双网卡绑定bond

    Debian 16.04 配置双网卡绑定bond Debian 16.04 bonding多网卡配置 安装负载均衡软件 fenslave root@ubuntu:~# apt-get install ...

  9. windows server 2012 双网卡配置

    别用route 命令!!!!!! 在使用最新版的windows server 2012的时候,当存在两个或者多个网段的时候,就可以采用双网卡的方式来添加和配置路由.具体的设置方法如下: 网段1  19 ...

随机推荐

  1. 实用JS系列——面向对象中的类和继承

    背景: 在最开始学习JavaScript时,我们就知道,它是一种脚本语言,也有面向对象机制.但它的面向对象继承机制是基于原型的,即Prototype.今天,我们就来找一下JS中OO的影子. 创建类 1 ...

  2. 【POJ 2752 Seek the Name, Seek the Fame】

    Time Limit: 2000MSMemory Limit: 65536K Description The little cat is so famous, that many couples tr ...

  3. sql优化 in 和 not in 语句

    WHY? IN 和 NOT IN 是比较常用的关键字,为什么要尽量避免呢? 1.效率低 可以参看我之前遇到的一个例子([小问题笔记(九)] SQL语句Not IN 效率低,用 NOT EXISTS试试 ...

  4. 转: listview异步图片加载之优化篇(android)

    Listview异步加载之优化篇 关于listview的异步加载,网上其实很多示例了,总体思想差不多,不过很多版本或是有bug,或是有性能问题有待优化.有鉴于此,本人在网上找了个相对理想的版本并在此基 ...

  5. spring boot 2.0之后默认的连接池 HIkariCP介绍

    HIkariCP链接池比之传统的Tomcat JDBC datasource .c3p0 datasource 等传统链接池优势太大,在获取链接释放链接,执行效率上面高出很多,这个产品的口号是“快速. ...

  6. 【ZOJ4062】Plants vs. Zombies(二分)

    题意:有n个植物排成一排,标号为1-n,每株植物有自己的生长速度ai,每对植物浇一次水,该株植物就长高ai, 现在机器人从第0个格子出发,每次走一步,不能停留,每一步浇一次水,总共可以走m步,问最矮的 ...

  7. SpringBoot程序启动时执行初始化代码

    因项目集成了Redis缓存部分数据,需要在程序启动时将数据加载到Redis中,即初始化数据到Redis. 在SpringBoot项目下,即在容器初始化完毕后执行我们自己的初始化代码. 第一步:创建实现 ...

  8. 信息传递(NOIP2015)(寻找最小环。。)

    原题传送门 这是一道寻找最小环的题目. 在做的时候给每一个点染色.. 防止再做已经搜过的点(优化) v[]表示是否访问的过,以及第一次访问该点的时间. u[]表示染色.. 这道题还可以用拓补排序做. ...

  9. 掌握 Linux 调试技术【转】

    转自:https://www.ibm.com/developerworks/cn/linux/sdk/l-debug/index.html 您可以用各种方法来监控运行着的用户空间程序:可以为其运行调试 ...

  10. 关于java1.7集合源码阅读

    工作中每天都会和java集合打交道,虽然以前也看过jdk源码的实现,但有些东西时间长了还是会遗忘,或者有些实现在新版本中有了新的变化,俗话说"温故而知新",所以打算再阅读一下相关源 ...