2019 SDN-on third operation

1. The use of the network topology to build simulation platform Mininet shown below, the configuration and the IP address of the host h1 and h2 (h1: 10.0.0.1, h2: 10.0.0.2), the test network connectivity between two hosts




2. Use tools Wireshark captured communication data between the switch and the controller topology, type of OpenFlow protocol packets that (hello, features_request, features_reply, set_config, packet_in, packet_out etc.) is analyzed, a control write wireshark screenshot your analysis of the content.

  • hello

6633 controller port (I can support up to OpenFlow 1.0) ---> 34786 switch port

switch port 34786 (the highest I can support OpenFlow 1.3) ---> 6633 controller ports

so the two sides to establish a connection, and the use of OpenFlow 1.0

  • features_request

6633 controller port (I need your feature information) ---> switch port 34786

  • features_reply

34786 switch port (this is my feature information, please check) ---> 6633 controller port

Features message comprising the Reply OpenFlow Header and the Message Features
Features the Reply the Message Structure

struct ofp_switch_features
{
    struct ofp_header header;
    uint64_t datapath_id; /*唯一标识 id 号*/
    uint32_t n_buffers; /*交缓冲区可以缓存的最大数据包个数*/
    uint8_t n_tables; /*流表数量*/
    uint8_t pad[3]; /*align to 64 bits*/
    uint32_t capabilities; /*支持的特殊功能,具体见 ofp_capabilities*/
    uint32_t actions; /*支持的动作,具体见 ofp_actions_type*/
    struct ofp_phy_port ports[0]; /*物理端口描述列表,具体见 ofp_phy_port*/
};
  • set_config

6633 controller port (follow me give you a flag and max bytes of packet configuration) ---> switch port 34786

  • packet_in

Switch Port 34786 (a packet is coming in, instruct) 6633 port controller ---

Packet_in structure

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 controller port (please solve them following me give you action) ---> switch port 34786

Packet_out structure

struct ofp_packet_out 
{
    struct ofp_header header;
    uint32_t buffer_id; /*交换机缓存区id,如果为-1则指定的为packet-out消息携带的data字段*/
    uint16_t in_port; /*如果buffer_id为‐1,并且action列表中指定了Output=TABLE的动作,in_port将作为data段数据包的额外匹配信息进行流表查询*/
    uint16_t actions_len; /*action列表的长度,可以用来区分actions和data段*/
    struct ofp_action_header actions[0]; /*动作列表*/
    uint8_t data[0]; /*数据缓存区,可以存储一个以太网帧,可选*/
};

Guess you like

Origin www.cnblogs.com/wuyahong/p/11881848.html