您好,欢迎访问三七文档
当前位置:首页 > 办公文档 > 工作范文 > OpenFlow协议1.0讲解
YOURLOGOOpenflow1.0.0报告余显2013年7月11日目录1、SDN简介2、openflow介绍一、SDN简介1、SDN是一种新型网络架构,核心思想:1、数据与控制平面相结合;2、统一的厂商无关控制和数据平面开放接口;3、逻辑集中的控制平面;4、顶层服务或网络控制应用通过物理资源的抽象构建逻辑的全网视图;5、通过分片和虚拟化底层网络实现资源的优化利用和调度。2、SDN结构:二、OpenFlow宏观介绍:OpenFlow网络结构图OpenFlow交换机进行数据层的转发FlowVisor对网络进行虚拟化Controller对网络进行集中控制,实现控制层的功能二、OpenFlow宏观介绍:OF结构和组成1、OpenFlow是SDN重要的实现方式,是SDN中的一部分2、OpenFlow结构:OpenFlow协议和OpenFlow交换机3、OpenFlow交换机组成:二、OpenFlow宏观介绍:交换机流处理过程1、OpenFlow交换机流处理过程:二、OpenFlow宏观介绍:数据流量的匹配过程1、流的匹配过程:二、OpenFlow宏观介绍:包头解析的匹配流程1、流的匹配过程:三、OF协议:消息类型•1、controller-to-switch消息•2、asynchronous(异步)消息•3、symmetric(对称)消息其中每一类消息又有多个子消息类型。三、OF协议:协议头数据结构OF协议头部:/*HeaderonallOpenFlowpackets.*/structofp_header{uint8_tversion;/*OFP_VERSION.*/uint8_ttype;/*OneoftheOFPT_constants.*/uint16_tlength;/*Lengthincludingthisofp_header.*/uint32_txid;/*Transactionidassociatedwiththispacket.Repliesusethesameidaswasintherequesttofacilitatepairing.*/};OFP_ASSERT(sizeof(structofp_header)==8);三、OF协议:端口数据结构端口结构:/*Descriptionofaphysicalport*/structofp_phy_port{uint16_tport_no;uint8_thw_addr[OFP_ETH_ALEN];charname[OFP_MAX_PORT_NAME_LEN];/*Null-terminated*/uint32_tconfig;/*BitmapofOFPPC_*flags.*/uint32_tstate;/*BitmapofOFPPS_*flags.*//*BitmapsofOFPPF_*thatdescribefeatures.Allbitszeroedif*unsupportedorunavailable.*/uint32_tcurr;/*Currentfeatures.*/uint32_tadvertised;/*Featuresbeingadvertisedbytheport.*/uint32_tsupported;/*Featuressupportedbytheport.*/uint32_tpeer;/*Featuresadvertisedbypeer.*/};OFP_ASSERT(sizeof(structofp_phy_port)==48);三、OF协议:流匹配数据结构•structofp_match{•uint32_twildcards;/*Wildcardfields.*/•uint16_tin_port;/*Inputswitchport.*/•uint8_tdl_src[OFP_ETH_ALEN];/*Ethernetsourceaddress.*/•uint8_tdl_dst[OFP_ETH_ALEN];/*Ethernetdestinationaddress.*/•uint16_tdl_vlan;/*InputVLANid.*/•uint8_tdl_vlan_pcp;/*InputVLANpriority.*/•uint8_tpad1[1];/*Alignto64-bits*/•uint16_tdl_type;/*Ethernetframetype.*/•uint8_tnw_tos;/*IPToS(actuallyDSCPfield,6bits).*/•uint8_tnw_proto;/*IPprotocolorlower8bitsof•*ARPopcode.*/•uint8_tpad2[2];/*Alignto64-bits*/•uint32_tnw_src;/*IPsourceaddress.*/•uint32_tnw_dst;/*IPdestinationaddress.*/•uint16_ttp_src;/*TCP/UDPsourceport.*/•uint16_ttp_dst;/*TCP/UDPdestinationport.*/•};•OFP_ASSERT(sizeof(structofp_match)==40);三、OF协议:控制器控制流表修改的数据结构•/*Flowsetupandteardown(controller-datapath).*/•structofp_flow_mod{•structofp_headerheader;•structofp_matchmatch;/*Fieldstomatch*/•uint64_tcookie;/*Opaquecontroller-issuedidentifier.*/••/*Flowactions.*/•uint16_tcommand;/*OneofOFPFC_*.*/•uint16_tidle_timeout;/*Idletimebeforediscarding(seconds).*/•uint16_thard_timeout;/*Maxtimebeforediscarding(seconds).*/•uint16_tpriority;/*Prioritylevelofflowentry.*/•uint32_tbuffer_id;/*Bufferedpackettoapplyto(or-1).•NotmeaningfulforOFPFC_DELETE*.*/•uint16_tout_port;/*ForOFPFC_DELETE*commands,require•matchingentriestoincludethisasan•outputport.AvalueofOFPP_NONE•indicatesnorestriction.*/•uint16_tflags;/*OneofOFPFF_*.*/•structofp_action_headeractions[0];/*Theactionlengthisinferred•fromthelengthfieldinthe•header.*/•};•OFP_ASSERT(sizeof(structofp_flow_mod)==72);三、OF协议:控制器控制流表修改的数据结构•1、控制修改命令:•enumofp_flow_mod_command{••OFPFC_ADD,/*Newflow.*/•OFPFC_MODIFY,/*Modifyallmatchingflows.*/•OFPFC_MODIFY_STRICT,/*Modifyentrystrictlymatchingwildcards*/•OFPFC_DELETE,/*Deleteallmatchingflows.*/•OFPFC_DELETE_STRICT/*Strictlymatchwildcardsandpriority.*/•};•2、flags域的取值:•enumofp_flow_mod_flags{•OFPFF_SEND_FLOW_REM=10,/*Sendflowremovedmessagewhenflow•*expiresorisdeleted.*/•OFPFF_CHECK_OVERLAP=11,/*Checkforoverlappingentriesfirst.*/•OFPFF_EMERG=12/*Remarkthisisforemergency.*/•};1.3版本结束
本文标题:OpenFlow协议1.0讲解
链接地址:https://www.777doc.com/doc-4010225 .html