Description
During the War of Resistance Against Japan, tunnel warfare was carried out extensively in the vast areas of north China Plain. Generally speaking, villages connected by tunnels lay in a...
分类:
其他好文 时间:
2014-07-08 16:51:42
阅读次数:
506
题目大意:
三个操作
D pos 将pos位置摧毁,让它和周围不相连。
Q pos 问和pos 相连的有多少个村庄。
R 修复最近摧毁的村庄。
思路分析:
树状数组记录这个区间有多少个1。
如果 [s-e] 有e-s+1个1 的话。那么这个区间是相连的。
这样的话,我们就可以用二分的办法求出与某个位置最大相连的数量。
还有这里二分
while(l
{
i...
分类:
其他好文 时间:
2014-06-27 09:54:14
阅读次数:
183
1、简单通信拓扑:
将Windows 平台 作为一个网关,同时开启IPsec 和NAT来支持private和public的通信。
注意:IPSEC Gateway 和 Client1 Ipsec 之间没有存在NAT ,否则是另外一种情况,和本文描述无关。本文只是工作笔记,不代表任何官方声明。
2、现象描述:
a. Enable NAT,but Disbale...
Posted in Linux Application at November 13th, 2012 如果你是用 openvswitch 内置的 GRE tunnel,那么配置很简单,基本上就一条命令: ovs-vsctl add-port br0 gre0 -- set interface gre...
分类:
其他好文 时间:
2014-06-21 15:49:06
阅读次数:
305
Posted in Linux Kernel at November 8th, 2012 / 1 Comment » 我以前写过一篇介绍 tunnel 的文章,只是做了大体的介绍。里面多数 tunnel 是很容易理解的,因为它们多是一对一的,换句话说,是直接从一端到另一端。比如 IPv6 over ...
分类:
其他好文 时间:
2014-06-21 15:36:55
阅读次数:
210
Creating an IP Tunnel using GRE on Linux Contents[hide] · 1 IP Tunelling · 2 Starting Configuration · 3 Tunnelling Objective ...
分类:
系统相关 时间:
2014-06-21 15:27:26
阅读次数:
598
我以前写过一篇介绍 tunnel 的文章,只是做了大体的介绍。里面多数 tunnel 是很容易理解的,因为它们多是一对一的,换句话说,是直接从一端到另一端。比如 IPv6 over IPv4 的 tunnel,也就是 SIT,它的原理如下图所示: 显然,除了端点的 host A 和 host B之外...
分类:
其他好文 时间:
2014-06-21 15:16:31
阅读次数:
228
VXLAN 是非常新的一个 tunnel 技术,它是一个 L2 tunnel。Linux 内核的 upstream 中也刚刚加入 VXLAN 的实现。相比 GRE tunnel 它有着很的扩展性,同时解决了很多其它问题。 一,GRE tunnel 的不足 网络很多介绍 VXLAN 的文章都没有直接告...
分类:
其他好文 时间:
2014-06-21 14:40:01
阅读次数:
354
Posted in Linux Kernel at November 8th, 2012 /
1 Comment ? 我以前写过一篇介绍 tunnel 的文章,只是做了大体的介绍。里面多数 tunnel
是很容易理解的,因为它们多是一对一的,换句话说,是直接从一端到另一端。比如 IPv6 over ...
分类:
其他好文 时间:
2014-06-09 17:35:09
阅读次数:
211
Posted in Linux Application at November 13th,
2012 如果你是用 openvswitch 内置的 GRE tunnel,那么配置很简单,基本上就一条命令: ovs-vsctl add-port br0
gre0 -- set interface gre...
分类:
其他好文 时间:
2014-06-09 17:11:23
阅读次数:
304