zoukankan      html  css  js  c++  java
  • 2019 SDN上机第三次作业

    1. 利用Mininet仿真平台构建如下图所示的网络拓扑,配置主机h1和h2的IP地址(h1:10.0.0.1,h2:10.0.0.2),测试两台主机之间的网络连通性

    2. 利用Wireshark工具,捕获拓扑中交换机与控制器之间的通信数据,对OpenFlow协议类型的各类报文(hello, features_request, features_reply, set_config, packet_in, packet_out等)进行分析

    hello

    控制器6633端口 ---> 交换机56694端口

    Features Request

    控制器6633端口 ---> 交换机56694端口

    Set Config

    控制器6633端口 ---> 交换机56694端口

    Features Reply

    交换机56694端口--- 控制器6633端口

    Packet_in

    交换机56694端口--- 控制器6633端口

    //结合Packet_in的结构
    struct ofp_packet_in {
        struct ofp_header header;
        uint32_t buffer_id; /*Packet-in消息所携带的数据包在交换机缓存区中的ID*/
        uint16_t total_len; /*data字段的长度*/
        uint16_t in_port; /*数据包进入交换机时的端口号*/
        uint8_t reason; /*发送Packet-in消息的原因,具体见 ofp_packet_in_reason*/
        uint8_t pad;
        uint8_t data[0]; /*携带的数据包*/
    };
    

    Packet_out

    交换机6633端口--- 控制器56694端口

    接下来是另一台交换机(端口35536)与控制器(端口6633)的交互过程

    h1 ping h2

    Packet_in

    Flow_mod

    
    ```c++
    //结合flow_mod结构
    struct ofp_flow_mod {
    struct ofp_header header;
    struct ofp_match match; /流表的匹配域/
    uint64_t cookie; /流表项标识符/
    uint16_t command; /可以是ADD,DELETE,DELETE-STRICT,MODIFY,MODIFY-STRICT/
    uint16_t idle_timeout; /空闲超时时间/
    uint16_t hard_timeout; /最大生存时间/
    uint16_t priority; /优先级,优先级高的流表项优先匹配/
    uint32_t buffer_id; /缓存区ID ,用于指定缓存区中的一个数据包按这个消息的action列表处理/
    uint16_t out_port; /如果这条消息是用于删除流表则需要提供额外的匹配参数/
    uint16_t flags; /标志位,可以用来指示流表删除后是否发送flow‐removed消息,添加流表时是否检查流表重复项,添加的流表项是否为应急流表项。/
    struct ofp_action_header actions[0]; /action列表/
    };
    

    https://img2018.cnblogs.com/blog/1791976/201911/1791976-20191119000229014-1797307140.png)


    把控制器从openflow reference改成ovs controller

  • 相关阅读:
    调试技术能够让新技术的学习事半功倍
    世界500强绩效考核(KPI) [11]
    .NET 4.0新功能介绍:In Process Side By Side
    What's New in the .NET Framework Version 4
    Production Debugging for .NET Framework Applications
    Project 2007下的自动计算问题
    SQL操作全集
    WPF1.1 理解Windows图形
    .NET Framework Version 4 Application Compatibility Walkthrough
    Fixing BizTalk ENTSSO Failure on Windows 7, Vista or Server 2008 after .NET 4.0 Installation
  • 原文地址:https://www.cnblogs.com/cmsimple/p/11886271.html
Copyright © 2011-2022 走看看