新增window下内外网上网方案
This commit is contained in:
parent
2e30f3a15b
commit
ae6886a06d
18
网络/2.route命令实现内外网同时使用.md
Normal file
18
网络/2.route命令实现内外网同时使用.md
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
id: "2019-04-12"
|
||||||
|
date: 2018/04/12 10:58:00
|
||||||
|
title: "windows下实现内外网同时在线"
|
||||||
|
tags: ["windows","route","内外网"]
|
||||||
|
categories:
|
||||||
|
- "网络相关"
|
||||||
|
---
|
||||||
|
|
||||||
|
  通常会有这样的需求--公司内网在一个网段,外网在一个网段,如何实现在一台机器上同时访问呢?通过route命令就能做到。
|
||||||
|
|
||||||
|
  需要两张网卡,一个连外网,一个连内网。这里假设内网网段是:192.168.0.0,内网网关为192.168.1.2,只需如下命令即可让192.168.*.*的访问全部走内网:
|
||||||
|
```bash
|
||||||
|
route add -p 192.168.0.0 mask 255.255.0.0 192.168.1.2
|
||||||
|
```
|
||||||
|
-p 永久保存,重启不失效
|
||||||
|
|
||||||
|
这样就能让指定的IP使用指定的网卡上网。
|
Loading…
x
Reference in New Issue
Block a user