P4-Related Tools Installation

安装P4相关工具的步骤和说明。

本说明只适用于 Ubuntu 14.04 系统。

推荐安装的其他工具

  • mininet:SDN网络仿真工具

  • vim:编辑器

  • scapy:Python的一个功能十分强大的库,可以用于生成数据报

  • pip:Python包管理工具

P4Factory

官方README:P4 Model Repository

注意:如果你对P4已经很熟悉并且能够独立搭建环境,这个repo已经不大适合现在的P4开发了(使用bmv1软件交换机),建议是使用bmv2搭建环境并进行相关开发。

1.安装外部引用的库:

git submodule update --init --recursive

2.安装Ubuntu14.04系统下所需的所有依赖:

./install_deps.sh

3.在启动模拟器之前,需要创建虚拟的端口:

sudo p4factory/tools/veth_setup.sh

4.使用autoconf工具生成Makefile,并对工作环境进行配置:

cd p4factory
./autogen.sh
./configure

5.验证安装是否成功,并测试一个简单的P4程序:

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

同时新打开一个终端进行测试:

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

BMv2

官方README:BEHAVIORAL MODEL REPOSITORY

1.Ubuntu 14.04下要求安装的依赖:

automake
cmake
libjudy-dev
libgmp-dev
libpcap-dev
libboost-dev
libboost-test-dev
libboost-program-options-dev
libboost-system-dev
libboost-filesystem-dev
libboost-thread-dev
libevent-dev
libtool
flex
bison
pkg-config
g++
libssl-dev

2.使用脚本安装外部依赖库,如thrift。

注意:如果已经安装了P4Factory,请忽略此步,否则会有一系列的版本不匹配问题。

./install_deps.sh

3.按照以下步骤安装bmv2:

./autogen.sh

./configure

make

[sudo] make install  # if you need to install bmv2

4.更新Linux库缓存:

sudo ldconfig

5.检验:

[sudo] make check

P4c-bm

官方README:p4c-bm

1.要求安装好pip;

2.安装步骤:

sudo pip install -r requirements.txt

sudo pip install -r requirements_v1_1.txt

sudo python setup.py install

Happy Hacking

P4-Related Tools Installation的更多相关文章

  1. 【转】VMware Tools installation cannot be started manually while Easy Install is in progress.

    我HOST 是WIN7也遇到了这样的问题 我这样做的:进入系统以后在你VM的下面会有几个图标:关于1,CD DVD 2,disk 3,floppy 4,网络连接... 选择floppy--settin ...

  2. Xcode 8.X Command Line Tools

    Summary Step 1. Upgrade Your System to macOS Sierra Step 2. Open the Terminal Application Step 3. Is ...

  3. Development Tools

    Introduction Even Chris created his article of Useful Reference Books ages ago I just bumped into it ...

  4. Xcode Command Line Tools for Mac OS X 10.9 Mavericks

    by Daniel Kehoe Last updated 28 December 2013 How to install Apple Xcode Command Line Tools for Mac ...

  5. 转 How to install XenServer Tools – Linux(forward)

    本文转自: http://blog.csdn.net/zhongguoren666/article/details/7088798 比较懒....大家看图说话就行了.... 说句实在话…还是老外写的地 ...

  6. Ubuntu下手动安装VMware Tools步骤

    To mount the CD image and extract the contents: Power on the virtual machine. Log in to the virtual ...

  7. 四、VMware Tools 安装 与 问题

    解决VMware Tools无法安装的问题 虚拟机上装win2kgho版的系统,安装VMware Tools时,遇到“VMware Tools installation cannot be start ...

  8. 虚拟机 VMware Tools 安装

    Ubuntu 或具有图形用户界面的 Ubuntu Server 要挂载 CD 镜像并解压,请按以下步骤操作: 启动此虚拟机. 使用具有管理员权限或 root 用户权限的帐户登录此虚拟机. 选择:对于F ...

  9. systemtap 2.8 news

    * What's new in version 2.8, 2015-06-17 - SystemTap has improved support for probing golang programs ...

随机推荐

  1. chown 命令

    root@localhost ~]# .txt # 同时修改文件属主和属组 !chown 执行上一个chown命令

  2. 【剑指offer】用两个栈实现队列

    一.题目: 用两个栈来实现一个队列,完成队列的Push和Pop操作. 队列中的元素为int类型. 二.思路: 两个栈A,B,A负责进栈,B负责出栈,进栈很容易,A中添加即可,出栈需要从B里出,所以要先 ...

  3. vue学习之三常用命令

    一.插值 1.1 +号运用 <!DOCTYPE html> <html lang="en"> <head> <meta charset=& ...

  4. notefirst使用

    1:如果格式不正确,导入题录失败的话,可以手动添加.点击新建题录即可.输入文章的标题等信息. 2:导入word中的文献,可以使用word中notefirst的引文编辑功能,对文献进行删除,编辑等. 3 ...

  5. python中关于不执行if __name__ == '__main__':测试模块的解决

    1.新建测试脚本文件: 2.编辑测试脚本 import unittest import requests import json import HTMLTestRunner ur1 = 'http:/ ...

  6. [LeetCode] 190. Reverse Bits_Easy tag: Bit Manipulation

    Reverse bits of a given 32 bits unsigned integer. Example: Input: 43261596 Output: 964176192 Explana ...

  7. Java接口多线程并发测试 (一)

    本文为作者原创,禁止转载,违者必究法律责任!!! 本文为作者原创,禁止转载,违者必究法律责任!!! Java接口多线程并发测试 一,首先写一个接口post 请求代码: import org.apach ...

  8. docker:搭建lamp应用

    (原文http://blog.csdn.net/smallfish1983/article/details/40108999?utm_source=tuicool) LAMP 指的 Linux(操作系 ...

  9. C++编译器模板机制剖析

    思考:为什么函数模板可以和函数重载放在一块.C++编译器是如何提供函数模板机制的? 一.编译器编译原理 什么是gcc gcc(GNU C Compiler)编译器的作者是Richard Stallma ...

  10. 论文笔记:语音情感识别(二)声谱图+CRNN

    一:An Attention Pooling based Representation Learning Method for Speech Emotion Recognition(2018 Inte ...