操作系统:

Ubuntu 14.04

前言

在之前,我直接从P4.org给的GitHub网址上下载了p4factory,但是在根据ReadMe的内容进行QuickStart的时候,发生了shell脚本cd错误。

在得到了国际友人的帮助之下,我发现首先要把这个仓库fork过来,然后在自己的fork分支下进行修改。

询问及解答的地址:When I fellow the step in ReadMe: ./autogen.sh, I found a problem

PS:不知道怎么感谢人家,于是点了他的关注。

准备过程:Git操作

参考我的前一篇博文:Git 使用ssh密钥

在文章的最后,顺便把GitHub上的P4factory内容clone了下来。

实际操作过程(参考ReadMe)

Important: git submodules

We often update the submodules for this repo. This is why we recommend that you run the following command whenever pulling the latest version of master:

git submodule update --init --recursive

在之前的尝试中,我直接拷贝了原master的zip,但是并没有从git中下载下来submodules的内容,导致文件夹为空。

在cd进p4factory之后,执行该操作:

Quickstart

To install all the Ubuntu 14.04 dependencies, run

./install_deps.sh

Before running the simulator, you need to create veth interfaces that the simulator can connect to. To create them, you need to run:

sudo p4factory/tools/veth_setup.sh

We use autoconf tools to generate makefiles. Run the following commands to prepare your workspace.

cd p4factory
./autogen.sh
./configure

注意:上述各步结束之后,都会返回p4factory目录。

To validate your installation and test the simulator on a simple P4 target, do the following:

cd p4factory/targets/basic_routing/
make bm
sudo ./behavioral-model

To run a simple test, run this in a different terminal:

cd p4factory/targets/basic_routing/
sudo python run_tests.py --test-dir tests/ptf-tests/

大概的意思是,在Ubuntu上安装依赖关系,然后安装配置工具balabala,最后跑了一个例子,按照顺序一步步下来即可。

注意,命令所提到的文件名称p4factory是和ReadMe一样的,如果你是直接从原仓库下下来的话,名称是p4factory-master。

2016/9/24

P4factory ReadMe Quickstart 安装p4factory的更多相关文章

  1. P4factory ReadMe 剩余部分

    Building and Running a Target Each P4 program (called a 'target') is set up in a directory under tar ...

  2. p4factory 解决“g++: internal compiler error: Killed (program cc1plus)” make error问题

    参考:解决: g++: internal compiler error: Killed (program cc1plus) 在安装p4factory的时候,执行: ./install_deps.sh ...

  3. P4行为模型BMV2依赖关系安装:thrift nanomsg nnpy安装

    由于安装p4factory的步骤需要OF的支持,我需要下载p4的行为模型BMV2: thrift是支持BMV2的软件框架:nanomsg是一个实现了几种"可扩展协议"的高性能通信库 ...

  4. PTF 安装及简单测试 Packet Testing Framework

    PTF PTF is a Python based dataplane test framework. It is based on unittest, which is included in th ...

  5. 安装配置dradis

    github:https://github.com/dradis/dradis-ce/blob/master/README.md安装出现错误:== Copying sample files == == ...

  6. windows下安装KeystoneJS

    安装参考: http://keystonejs.com/zh/getting-started/ http://jsnoder.com/kjs/quickstart 安装前提条件: 安装 Node.JS ...

  7. dubbo与zookeeper安装手册

    原文 示例提供者安装 (+) (#) 安装: wget http://code.alibabatech.com/mvn/releases/com/alibaba/dubbo-demo-provider ...

  8. linux —— ubuntu 初次安装问题

    本文收集了我自己安装ubuntu系统时的一些想法和遇到的一些问题,以及一些我自己感兴趣的软件的安装方法等 1. 50G ubuntu 分区方案 <plan> <key> / & ...

  9. CentOS 如何安装git server + Gitolite 【配置不成功需要再测试2015-8-20】

    安装git 关于安装git  可以参考 http://gitolite.com/gitolite/install.html 里面有官方的介绍 1. Git 的工作需要调用 curl,zlib,open ...

随机推荐

  1. CCNP

    CCNP全称是:Cisco Certified Network Professional——思科认证网络高级工程师.CCNP专业人员表示通过认证的人员具有丰富的网络知识.获得CCNP认证的专业人员可以 ...

  2. 1296: [SCOI2009]粉刷匠[多重dp]

    1296: [SCOI2009]粉刷匠 Time Limit: 10 Sec  Memory Limit: 162 MBSubmit: 1919  Solved: 1099[Submit][Statu ...

  3. 音频的录制和播放功能(audio) ---- HTML5+

    模块:audio Audio模块用于提供音频的录制和播放功能,可调用系统的麦克风设备进行录音操作,也可调用系统的扬声器设备播放音频文件.通过plus.audio获取音频管理对象. 应用场景:音频录制, ...

  4. [面经] 南京SAP面试(下)

    上一篇讲到了一面结束,这一篇说说剩下的事情. 周三上午一面完了之后回去上班,本以为要等几天才会二面,结果那个经理M下午就打电话给我,约了第二天(周四)下午过去面试,会有Boss从上海过来面,办事效率还 ...

  5. yii 表单如何写,action指向哪里?

    文本框:textInput(); 密码框:passwordInput(); 单选框:radio(),radioList(); 复选框:checkbox(),checkboxList(); 下拉框:dr ...

  6. Pentaho Report Designer 数据大于某值显示红色

    在细节栏中的字段的属性, 在样式的text-color,右边的表达式 输入下面表达式即可! =IF( [ALL_VALUE] > 50 ; "black" ; IF([ALL ...

  7. 热力图实现-heatmap.js 代码示例

    Heatmap.js  – 最强大的 Web 动态热图 最新公司项目需要用到热力图,在百度上搜下,了解到heatmap.js这款神器.然后搜了下例子,却很难搜到马上出效果的例子,特此写一篇heatma ...

  8. 使用DBMS_SUPPORT包

    DBMS_SUPPORT包从Oracle7.2引入,主要功能用以提供更完整的用户session跟踪信息,这个包可以通过运行 dbmssupp.sql 和 prvtsupp.plb 两个脚本来创建.该脚 ...

  9. Puppet学习:Augeas的怪问题

    今天测试部署Zabbix,本来以前是正常的,今天莫名其妙报错.测试后发现是Augeas出现问题,无论如何都不执行.于是采用调试模式: puppet agent --test --verbose --d ...

  10. mysql 数据操作 单表查询 查询排序: order by

    如果不指定排序 默认是按照id字段 从小到大排序的  升序 mysql> select * from employee; +----+------------+--------+-----+-- ...