flow

2019 SDN上机第4次作业

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-05 03:22:27
1.作业要求: 解压安装OpenDayLight控制器(本次实验统一使用Beryllium版本) 启动并安装插件 用Python脚本搭建给定的拓扑,并连接OpenDayLight控制器 在控制器提供的WEB UI中下发流表使h2 在20s内ping不通h3,20s后恢复 借助Postman通过OpenDayLight的北向接口下发流表,再利用OpenDayLight北向接口查看已下发的流表 作业博客链接: http://edu.cnblogs.com/campus/fzu/fzusdn2019/homework/10017 2.具体操作步骤与截图说明: 实验环境:VMware Workstation Pro14.1、ubuntu-16.04 (1)解压安装OpenDayLight控制器(本次实验统一使用Beryllium版本) a.先下载OpenDayLight、Postman的安装包,由于OpenDayLight是java实现的,需要配置java环境,因此要去下载jdk软件开发工具包,相应的下载链接如下: OpenDayLightBeryllium版本下载链接: https://nexus.opendaylight.org/content/repositories/public/org/opendaylight/integration/distribution-karaf/

Best graph algorithm/implementation for dynamic max-flow computation

你。 提交于 2019-12-05 00:51:40
问题 I have to write a program which requires to maintain some data in a directed flow graph. I need to compute the maximum-flow at runtime. I know that there exist several libraries for handling graphs, implementing almost every classical algorithm, but my problem is that my graph is dynamic, meaning it evolves at runtime. After every evolution, I need to recompute the new maximum-flow. An evolution is, either: adding an edge increasing the capacity of an edge and what I need to re-compute is the

mitmproxy 使用mitmdump 过滤请求

别来无恙 提交于 2019-12-05 00:06:54
mitmproxy 抓包工具,优点可以使用python进行二次开发,或者进行接口的mock 官网地址: https://www.mitmproxy.org/ 打算用这个最初的需求是,想对app做接口测试,但是app的接口有200多个,这么多接口,如果人工的的抓包或者获取,很浪费人力,那能不能自动的抓取到所有的请求呢? 答案是可以,使用mitmdump -s xx.py 可以过滤我们想要的数据,比如存到数据库之类的 from mitmproxy import ctx # 所有的请求都会经过request def request(flow): info = ctx.log.info d = {} if flow.request.host == 'xxxxx': # 过滤请求,如果host是xxx则写入请求相关信息 d['url'] = flow.request.url d['host'] = flow.request.host d['headers'] = flow.request.headers d['method'] = flow.request.method if flow.request.method == 'POST': d['body'] = flow.request.get_text() fp = open("/Users/dcc/Desktop/aaaa.txt",'a

SDN实验---OVS了解(转载)

倖福魔咒の 提交于 2019-12-04 20:25:23
转载自: https://opengers.github.io/openstack/openstack-base-use-openvswitch/ 一:Open vSwitch介绍 (一)介绍 在过去,数据中心的服务器是直接连在硬件交换机上,后来VMware实现了服务器虚拟化技术,使虚拟服务器(VMs)能够连接在虚拟交换机上,借助这个虚拟交换机,可以为服务器上运行的VMs或容器提供逻辑的虚拟的以太网接口,这些逻辑接口都连接到虚拟交换机上,有三种比较流行的虚拟交换机: VMware virtual switch, Cisco Nexus 1000V,和Open vSwitch Open vSwitch(OVS)是运行在虚拟化平台上的虚拟交换机,其支持OpenFlow协议,也支持gre/vxlan/IPsec等隧道技术。在OVS之前,基于Linux的虚拟化平台比如KVM或Xen上,缺少一个功能丰富的虚拟交换机,因此OVS迅速崛起并开始在Xen/KVM中流行起来,并且应用于越来越多的开源项目,比如openstack neutron中的网络解决方案 在虚拟交换机的Flow控制器或管理工具方面,一些商业产品都集成有控制器或管理工具,比如Cisco 1000V的Virtual Supervisor Manager(VSM),VMware的分布式交换机中的vCenter

单片机

≡放荡痞女 提交于 2019-12-04 20:17:57
unsigned char code table[]= {0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f}; void delay(unsigned int Ms) { unsigned int k; unsigned char i, j; for(k=0; k<Ms; k++) { _nop_(); i = 32; j = 40; do { while (--j); } while (--i); } } P1 = 0xff; //消隐 flow_flag = _crol_(flow_flag,1); 来源: https://www.cnblogs.com/shuoran/p/11881394.html

How to make parallel outbound calls

大兔子大兔子 提交于 2019-12-04 16:06:19
My use case requires to enrich my input with smne data and send it to an outbound endpoint. The data for enriching is obtained by making calls to two web-services and then extract the data from the reply. This extracted data is enriched into my input XML and sent to an outbound endpoint. The two web-service calls that I need to make needs to be parallel, as they don't have dependency on another. This way I could save my processing time. Please suggest how I could achieve this parallel processing in a flow in Mule. Note: I have tried using ALL flow control, but it seems that is calling the web

Google Analytics event flow

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 14:58:33
I am trying to use Google Analytics to examine how users progress through my site. The problem is that my site operates entirely upon AJAX. I have set up "events" using: _gaq.push(['_trackEvent', category, action]) These are being recorded by Analytics, but I am unable to view how users progress through each event. In other words, currently I can see that 10 users added a post and that 7 users added a comment to a post. What I want to see is how many of the users who added a post then also added a comment. Does Analytics allow you to view/track this kind of user flow? Instead of or in addition

网络最大流 复习

眉间皱痕 提交于 2019-12-04 13:38:14
哎 打板子 调了 \(2\) h 无语了 \(EdmondKarp+Dinic(Dinitz)\) #include <set> #include <stack> #include <queue> #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; #define reg register int #define isdigit(x) ('0' <= x&&x <= '9') template<typename T> inline T Read(T Type) { T x = 0,f = 1; char a = getchar(); while(!isdigit(a)) {if(a == '-') f = -1;a = getchar();} while(isdigit(a)) {x = (x << 1) + (x << 3) + (a ^ '0');a = getchar();} return x * f; } const int MAXN = 10010,MAXM = 100010; int cnt,n,m,s,t,_ori[MAXN]; struct EDGE { int v,w,_nxt; EDGE() {v = w = _nxt

网络流24题 太空飞行计划问题

社会主义新天地 提交于 2019-12-04 10:39:19
题目传送门 这道题不是好久之前做的了 填一下网络流24题的坑 本质上是个最大权闭合图问题的模板 (话说这么多问题,我怎么记得住) 在源点 \(S\) 和每个实验之间连一条边权为实验利益的边 在每个实验和它需要的仪器之间连一条边权为 \(+\infty\) 的边 在仪器和汇点 \(t\) 之间连一条边权为仪器花费的边 然后跑最小割就好了 #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <queue> #define LL long long #define inf 0x7fffffff using namespace std; LL read() { LL k = 0, f = 1; char c = getchar(); while(c < '0' || c > '9') { if(c == '-') f = -1; c = getchar(); } while(c >= '0' && c <= '9') k = k * 10 + c - 48, c = getchar(); return k * f; } struct zzz { int t, nex, len; }e[100010 << 1]; int head[1010], tot = 1; void

网络流24题 最长不下降子序列问题

心已入冬 提交于 2019-12-04 10:28:16
题目传送门 这个建图啊,十分巧妙,我是真没看出来(我太蒟了) 首先要先跑一遍最长不下降子序列的 \(O(n^2)\) 解法,预处理出以 \(i\) 结尾的最长不下降子序列的长度 \(dp[i]\) ,然后找出最大的 \(dp[i]\) ,记为 \(cnt\) ,输出 \(cnt\) ,第一问就结束了。 从源点向长度为 \(1\) 的点连一条容量为 \(1\) 的边,长度为 \(cnt\) 的点向汇点连一条容量为 \(1\) 的边。因为每个点只能用一次,所以我们还要把一个点拆成两个,在它们之间连一条容量为 \(1\) 的边。之后 \(n^2\) 枚举每两个点,若两个点 \(i,j\) 满足 \(j{<}i\) 且 \(dp[i]=dp[j]+1\) ,则在 \(i,j\) 之间连一条容量为 \(1\) 的边。建好图后跑一边最大流,就是第二问的答案。 第三问就好办了,将源点向 \(1\) 连的边的容量改为 \(\rm{INF}\) , \(1\) 和 \(1\) 被拆之后的点 \(1'\) 之间的容量也改为 \(\rm{INF}\) 。同理, \(n\) 和 \(n'\) 之间的边、 \(n'\) 和汇点之间的边(如果存在的话)容量也要改为 \(\rm{INF}\) #include<iostream> #include<cstdio> #include<cstring>