openflow switch specification - open networking · pdf fileopenflow switch specification...

206
OpenFlow Switch Specification Version 1.4.0 (Wire Protocol 0x05) October 14, 2013 ONF TS-012

Upload: buithuy

Post on 11-Mar-2018

261 views

Category:

Documents


2 download

TRANSCRIPT

  • OpenFlow Switch SpecificationVersion 1.4.0 (Wire Protocol 0x05) October 14, 2013

    ONF TS-012

  • OpenFlow Switch Specification Version 1.4.0

    Disclaimer

    THIS SPECIFICATION IS PROVIDED AS IS WITH NO WARRANTIES WHATSOEVER,INCLUDING ANY WARRANTY OF MERCHANTABILITY, NONINFRINGEMENT, FIT-NESS FOR ANY PARTICULAR PURPOSE, OR ANY WARRANTY OTHERWISE ARISINGOUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. Without limitation, ONF dis-claims all liability, including liability for infringement of any proprietary rights, relating to useof information in this specification and to the implementation of this specification, and ONFdisclaims all liability for cost of procurement of substitute goods or services, lost profits, loss ofuse, loss of data or any incidental, consequential, direct, indirect, or special damages, whetherunder contract, tort, warranty or otherwise, arising in any way out of use or reliance upon thisspecification or any information herein.

    No license, express or implied, by estoppel or otherwise, to any Open Networking Foundation orOpen Networking Foundation member intellectual property rights is granted herein.

    Except that a license is hereby granted by ONF to copy and reproduce this specification forinternal use only.

    Contact the Open Networking Foundation at http://www.opennetworking.org for informationon specification licensing through membership agreements.

    Any marks and brands contained herein are the property of their respective owners.

    Contents

    1 Introduction 9

    2 Switch Components 9

    3 Glossary 10

    4 OpenFlow Ports 114.1 OpenFlow Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114.2 Standard Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124.3 Physical Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124.4 Logical Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124.5 Reserved Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

    5 OpenFlow Tables 135.1 Pipeline Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145.2 Flow Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155.3 Matching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165.4 Table-miss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175.5 Flow Removal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175.6 Group Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

    5.6.1 Group Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

    2 2013; The Open Networking Foundation

    http://www.opennetworking.org

  • OpenFlow Switch Specification Version 1.4.0

    5.7 Meter Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195.7.1 Meter Bands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

    5.8 Counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205.9 Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225.10 Action Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225.11 Action List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235.12 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

    5.12.1 Default values for fields on push . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

    6 OpenFlow Channel 266.1 OpenFlow Protocol Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

    6.1.1 Controller-to-Switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276.1.2 Asynchronous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276.1.3 Symmetric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

    6.2 Message Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286.3 OpenFlow Channel Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

    6.3.1 Connection Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306.3.2 Connection Interruption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316.3.3 Encryption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316.3.4 Multiple Controllers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316.3.5 Auxiliary Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

    6.4 Flow Table Modification Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356.5 Flow Table Synchronisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386.6 Group Table Modification Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396.7 Meter Modification Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416.8 Bundle Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

    6.8.1 Bundle overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426.8.2 Bundle example usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426.8.3 Bundle error processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436.8.4 Bundle atomic modifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436.8.5 Bundle parallelism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

    7 The OpenFlow Protocol 447.1 OpenFlow Header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

    7.1.1 Padding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467.2 Common Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

    7.2.1 Port Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467.2.1.1 Port Description Structures . . . . . . . . . . . . . . . . . . . . . . . . . 467.2.1.2 Port Description Properties . . . . . . . . . . . . . . . . . . . . . . . . . 48

    7.2.2 Flow Match Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517.2.2.1 Flow Match Header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517.2.2.2 Flow Match Field Structures . . . . . . . . . . . . . . . . . . . . . . . . 527.2.2.3 OXM classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537.2.2.4 Flow Matching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537.2.2.5 Flow Match Field Masking . . . . . . . . . . . . . . . . . . . . . . . . . 547.2.2.6 Flow Match Field Prerequisite . . . . . . . . . . . . . . . . . . . . . . . 547.2.2.7 Flow Match Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

    3 2013; The Open Networking Foundation

  • OpenFlow Switch Specification Version 1.4.0

    7.2.2.8 Experimenter Flow Match Fields . . . . . . . . . . . . . . . . . . . . . . 607.2.3 Flow Instruction Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 607.2.4 Action Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 627.2.5 Experimenter Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

    7.3 Controller-to-Switch Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697.3.1 Handshake . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697.3.2 Switch Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707.3.3 Flow Table Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 717.3.4 Modify State Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

    7.3.4.1 Modify Flow Table Message . . . . . . . . . . . . . . . . . . . . . . . . 717.3.4.2 Modify Flow Entry Message . . . . . . . . . . . . . . . . . . . . . . . . 747.3.4.3 Modify Group Entry Message . . . . . . . . . . . . . . . . . . . . . . . . 777.3.4.4 Port Modification Message . . . . . . . . . . . . . . . . . . . . . . . . . 797.3.4.5 Meter Modification Message . . . . . . . . . . . . . . . . . . . . . . . . 81

    7.3.5 Multipart Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 847.3.5.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 877.3.5.2 Individual Flow Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . 887.3.5.3 Aggregate Flow Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . 897.3.5.4 Table Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 907.3.5.5 Table Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 907.3.5.6 Table Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 917.3.5.7 Port Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 967.3.5.8 Port Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 997.3.5.9 Queue Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1007.3.5.10 Queue Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1027.3.5.11 Group Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1047.3.5.12 Group Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1057.3.5.13 Group Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .