WO2016000362A1 - 一种配置流表项的方法、装置和系统 - Google Patents

一种配置流表项的方法、装置和系统 Download PDF

Info

Publication number
WO2016000362A1
WO2016000362A1 PCT/CN2014/089530 CN2014089530W WO2016000362A1 WO 2016000362 A1 WO2016000362 A1 WO 2016000362A1 CN 2014089530 W CN2014089530 W CN 2014089530W WO 2016000362 A1 WO2016000362 A1 WO 2016000362A1
Authority
WO
WIPO (PCT)
Prior art keywords
service
flow
target
flow entry
matching field
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2014/089530
Other languages
English (en)
French (fr)
Inventor
文白林
刘方平
沈伟锋
刘洪宽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority to CA2950206A priority Critical patent/CA2950206C/en
Priority to JP2017519755A priority patent/JP6490205B2/ja
Priority to EP14896752.4A priority patent/EP3142310B1/en
Priority to CN201480079888.0A priority patent/CN106664261B/zh
Priority to AU2014399458A priority patent/AU2014399458B2/en
Priority to KR1020167035418A priority patent/KR101886291B1/ko
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to RU2017100992A priority patent/RU2651143C1/ru
Publication of WO2016000362A1 publication Critical patent/WO2016000362A1/zh
Priority to US15/394,352 priority patent/US10305777B2/en
Anticipated expiration legal-status Critical
Priority to US16/386,655 priority patent/US10659342B2/en
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • H04L45/036Updating the topology between route computation elements, e.g. between OpenFlow controllers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/38Flow based routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/64Routing or path finding of packets in data switching networks using an overlay routing layer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/645Splitting route computation layer and forwarding layer, e.g. routing according to path computational element [PCE] or based on OpenFlow functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • H04L49/3009Header conversion, routing tables or routing tags
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/302Route determination based on requested QoS
    • H04L45/306Route determination based on the nature of the carried application

Definitions

  • the present invention relates to the field of communication network technologies, and in particular, to a method, an apparatus, and a system for configuring a flow entry.
  • the OpenFlow network implements the separation of the data forwarding layer and the control layer, including the controller of the control layer (Controller) and the switch of the forwarding layer (Switch), wherein the controller controls the switch through the OpenFlow protocol to implement the entire network.
  • the controller sends a flow entry to the switch through the OpenFlow protocol, where the sent flow entry includes a match field value and an action value, where the matching field value may be a destination MAC address,
  • the action value may be information indicating that the data packet is forwarded through the designated port
  • the switch adds the received flow entry to the hardware flow table, and then searches for the data flow table when the data packet is received.
  • the hardware flow table is configured by the following method:
  • the switch stores a one-to-one correspondence between the OpenFlow flow table (such as the T0 table, the T1 table, and the T2 table) and the hardware flow table (such as an Access Control List (ACL) 1 and ACL 2) of the switch, and generates a flow table structure.
  • the generated flow table structure includes a flow table type of each OpenFlow flow table, a matching field and an action supported by each OpenFlow flow table, and reports the generated flow table structure to the controller, where each OpenFlow flow table supports
  • the matching fields and actions include matching fields and actions of the corresponding hardware flow table.
  • the flow entry sent by the controller is generated according to the processing logic of the controller and the flow table structure reported by the switch.
  • the processing logic of the controller is: generating a flow entry of a specific table for a specific service, for example, A.
  • the service generates a flow entry of the T0 table and the T1 table, and generates a flow entry of the T2 table for the B service.
  • the switch When the switch receives the flow entry of one or some flow tables sent by the controller, the switch according to the corresponding The flow entry is stored in the hardware flow table corresponding to the OpenFlow flow table. For example, when the flow entry of the T0 table is received, the flow entry is stored in the ACL1 table, thereby implementing the hardware flow table. Supported business.
  • the table includes the first three matching fields.
  • the ACL2 table includes the last two matching fields and the output action.
  • the ACL1 table and the ACL2 table support the A service.
  • the switch stores the mapping between the T0 table and the ACL1 table, the T1 table, and the ACL2 table.
  • the matching field of the generated T0 table also includes the first three matching fields
  • the generated T1 table includes the last two matching fields, and the output action
  • the T0 table and the T1 table support the A service.
  • the processing logic of the controller is to generate a flow entry of the T0 table and the T1 table for the A service, and then send a flow entry for processing the packet of the A service to the switch.
  • the hardware forwarding chips of different types of switches are different. Different hardware forwarding chips are different for supporting the same service hardware flow table.
  • ASIC1 supports ACL1 and ACL2, and ASIC chip 2
  • the ACL3 is supported in the A service.
  • the controller When the controller generates the flow entry, if the switch is based on the ASIC chip 1, the reported T0 table and the T1 table include matching fields and actions required by the A service, the controller sends the T0 table and the T1 table to the switch. If the switch is based on the ASIC chip 2, the reported T2 table corresponding to the ACL3 can meet the above conditions, but if the reported T0 table and the T1 table fail to meet the above conditions, the controller cannot send the switch for processing. Flow entry of the packet of the A service.
  • the switch based on the ASIC chip 1 implements the A service by using the T0 table and the T1 table
  • the switch based on the ASIC chip 2 implements the A service by using the T2 table
  • the processing logic of the controller is to generate the flow of the T0 table and the T1 table for the A service.
  • the switch cannot generate and send a flow entry corresponding to the A service when the ASIC chip 2 is connected to the switch, and the switch based on the ASIC chip 2 cannot configure the flow entry of the A service. Resulting in the inability to process the A business.
  • the embodiment of the present invention provides a method, an apparatus, and a system for configuring a flow entry, which are used to solve the problem that the switch cannot be configured in the hardware flow table to process a flow entry of a certain service in the prior art, and the service processing fails. The odds are higher.
  • the first aspect provides a method for configuring a flow entry, where the method includes:
  • the switch reports the flow table structure to the controller through the OpenFlow OpenFlow protocol, where the flow table structure includes matching fields and actions supported by the multiple OpenFlow flow tables, and types of the multiple OpenFlow flow tables, the multiple OpenFlow flows.
  • the matching field and the action supported by the table have an intersection, and the intersection includes a matching field and an action for implementing the first service supported by the hardware flow table of the switch, and the types of the multiple OpenFlow flow tables are all Type
  • the switch receives the flow entry sent by the controller through the OpenFlow protocol, and configures the flow entry into a software flow table, where the flow entry is the controller according to the flow table structure and
  • the information of the data packet that is generated by the switch the information of the data packet includes information about a first data packet of the first service, and the flow entry includes a flow entry that matches the first data packet. At least one of them;
  • the switch acquires a first flow entry that matches the first data packet from the software flow table, processes the first data packet according to an action value of the first flow entry, and performs a pre-configured service path. Determining, in the first target service path that matches the first flow entry, the determined matching field of the first target service path includes an ingress port in a matching field corresponding to the matching field value of the first flow entry a matching field and a packet header matching field, where the action of the first target service path includes an action corresponding to an action value for processing the first data packet in an action value of the first flow entry;
  • the switch configures a flow entry of the first hardware flow table according to the first flow entry.
  • the matching field of the multiple OpenFlow flow table reported by the switch is all matching fields supported by the OpenFlow protocol
  • the multiple OpenFlow flow tables reported by the switch The action is all the actions supported by the OpenFlow protocol.
  • the determining, by using the pre-configured service path, the first target that matches the first flow entry specifically includes:
  • the first flow entry is aggregated to generate a merged flow entry, where the merged flow entry includes a matching field value that matches the first flow entry. a matching field value corresponding to the inbound port matching field and the packet header matching field, where the action value included in the action value of the first flow entry is used to process the first data packet.
  • the matching field in the pre-configured service path includes a matching field corresponding to the matching field value of the first flow entry, and the action includes the first flow entry.
  • the service path of the action corresponding to the action value is used as the first target service path.
  • the intersection further includes a hardware flow table for implementing the switch is not supported. a matching field and an action of the second service;
  • the information of the data packet further includes information of the second data packet of the second service, where the switch receives the flow entry from the controller, further includes the second At least one of the flow table entries matched by the packet;
  • the method further includes: the switch acquiring, from the software flow table, a second flow entry that matches the second data packet, and processing the second data packet according to an action of the second flow entry.
  • the method further includes:
  • the switch Determining, by the switch, a second target service path that matches the second flow entry in the pre-configured service path, where the determined matching field of the second target service path includes the second flow entry The inbound port matching field and the packet header matching field in the matching field corresponding to the matching field value, the action of the second target service path includes the action value of the second flow entry being used for the second data packet The action corresponding to the action value of the process;
  • the switch configures a service flow entry of the service flow table corresponding to the second target service path according to the second flow entry, where the service flow table is a fine match table, and the service flow table matches
  • the field is all the matching fields of the second target service path, and the first matching field value in the service flow entry is configured as a corresponding matching field value in the first flow entry, and the service flow entry is
  • the second matching field value is configured as a corresponding header field value in the header of the second data packet, and the action value in the service flow entry is configured as an action value of the second flow entry, where
  • the matching field corresponding to the first matching field value belongs to the matching field corresponding to the matching field value in the first flow entry, and the matching field corresponding to the second matching field value does not belong to the second flow entry.
  • the switch When the switch receives the subsequent data packet of the second service, the switch searches for the service flow entry matching the subsequent data packet in the service flow table, and processes the action according to the found service flow entry. The subsequent data packet.
  • the switch Determining, by the switch, the first physical flow table according to the correspondence between the first target service path and the corresponding first physical flow table, and according to the first physical flow table and the corresponding first hardware flow table The corresponding relationship determines the first hardware flow table.
  • a second aspect provides a method for configuring a flow entry, where the method includes:
  • the communication device reports the flow table structure to the controller through the OpenFlow OpenFlow protocol, where the flow table structure includes matching fields and actions supported by the plurality of OpenFlow flow tables, and types of the multiple OpenFlow flow tables, the multiple OpenFlows
  • the matching field and the action supported by the flow table have an intersection, and the intersection includes a matching field and an action of the first service supported by the hardware flow table of the hardware forwarding chip, and the types of the multiple OpenFlow flow table are a wild type, wherein the communication device is connected to the hardware forwarding chip;
  • the communication device receives a flow entry sent by the controller through the OpenFlow protocol, and configures the flow entry into a software flow table, where the flow entry is the controller according to the flow table structure. And generating, by the information of the data packet reported by the communication device, the information of the data packet includes information of a first data packet of the first service, where the flow entry includes a flow that matches the first data packet At least one of the entries;
  • the communication device acquires a first flow entry that matches the first data packet from the software flow table, processes the first data packet according to an action value of the first flow entry, and performs a pre-configured service Determining, in the path, a first target service path that matches the first flow entry, the determined matching field of the first target service path includes a matching word corresponding to the matching field value of the first flow entry An inbound port matching field and a packet header matching field in the segment, where the action of the first target service path includes an action corresponding to an action value for processing the first data packet in an action value of the first flow entry ;
  • the communication device configures a flow entry of the first hardware flow table according to the first flow entry.
  • the matching field of the multiple OpenFlow flow table reported by the communications device is all matching fields supported by the OpenFlow protocol, and the multiple OpenFlows reported by the communications device
  • the action of the flow table is all the actions supported by the OpenFlow protocol.
  • the determining, by the pre-configured service path, the first target that matches the first flow entry specifically includes:
  • the first flow entry is aggregated to generate a merged flow entry, where the merged flow entry includes a matching field value that matches the first flow entry. a matching field value corresponding to the inbound port matching field and the packet header matching field, where the action value included in the action value of the first flow entry is used to process the first data packet.
  • the matching field in the pre-configured service path includes a matching field corresponding to the matching field value of the first flow entry, and the action includes the first flow entry.
  • the service path of the action corresponding to the action value is used as the first target service path.
  • the intersection further includes a hardware flow for implementing the hardware forwarding chip a matching field and an action of the second service that is not supported;
  • the information of the data packet further includes information about the second data packet of the second service, where the communication device receives the flow entry from the controller, further includes At least one of the flow entry matching the second data packet;
  • the method further includes: the communication device acquiring, from the software flow table, a second flow entry that matches the second data packet, and processing the second data packet according to an action of the second flow entry .
  • the method further includes:
  • the communication device determines, in the pre-configured service path, a second target service path that matches the second flow entry, and the determined matching field of the second target service path includes the second flow table An inbound port matching field and a packet header matching field in the matching field corresponding to the matching field value of the item, where the action of the second target service path is used in the action value of the second flow entry to be used for the second data The action corresponding to the action value of the packet processing;
  • the communication device configures a service flow entry of the service flow table corresponding to the second target service path according to the second flow entry, where the service flow table is a fine match table, and the service flow table is
  • the matching field is all the matching fields of the second target service path, and the first matching field value in the service flow entry is configured as a corresponding matching field value in the first flow entry, and the service flow table is
  • the second matching field value in the item is configured as a corresponding header field value in the packet header of the second data packet, and the action value in the service flow entry is configured as an action value of the second flow entry.
  • the matching field corresponding to the first matching field value belongs to the matching field corresponding to the matching field value in the first flow entry, and the matching field corresponding to the second matching field value does not belong to the second flow entry.
  • the communication device searches for the service flow entry matching the subsequent data packet in the service flow table when the subsequent data packet of the second service is received, and performs the action according to the found service flow entry. Processing the subsequent data packet.
  • any one of the first to fourth possible implementation manners of the second aspect, in the fifth possible implementation manner, the first target service path and the first further includes: configuring a correspondence between each service path and a corresponding hardware flow table, where each service path includes the first target Business path, including:
  • the communication device Determining, by the communication device, the first physical flow table according to the correspondence between the first target service path and the corresponding first physical flow table, and according to the first physical flow table and the corresponding first hardware flow The correspondence of the tables determines the first hardware flow table.
  • a third aspect provides a communication device for implementing a configuration flow entry, where the communication device is connected to a hardware forwarding chip, and communicates with the controller through an OpenFlow OpenFlow protocol, including: an interface unit, and a software flow table. Configuration unit, packet processing unit, and hardware flow table configuration unit;
  • the interface unit is configured to report a flow table structure to the controller, where the flow table structure includes matching fields and actions supported by multiple OpenFlow flow tables, and types of the multiple OpenFlow flow tables,
  • the matching fields and actions supported by the OpenFlow flow table have an intersection, and the intersection includes a matching field and an action for implementing the first service supported by the hardware flow table of the hardware forwarding chip, the multiple OpenFlow flow table
  • the type of the packet is a wildcard type; and is used to report information of the data packet to the controller, and receive a flow entry that is sent by the controller, where the flow entry is the controller according to the flow a table structure and information of the data packet, the packet of the data packet
  • the information includes information of the first data packet of the first service, where the flow entry includes at least one of a flow entry that matches the first data packet;
  • the software flow table configuration unit is configured to configure the flow entry received by the interface unit into a software flow table
  • a packet processing unit configured to acquire, from the software flow table, a first flow entry that matches the first data packet, and process the first data packet according to an action value of the first flow entry, and Determining, in the configured service path, a first target service path that matches the first flow entry, the determined matching field of the first target service path includes a matching field corresponding to the matching field value of the first flow entry And an inbound port matching field and a packet header matching field, where the action of the first target service path includes an action corresponding to an action value for processing the first data packet in an action value of the first flow entry; And determining, according to a pre-configured correspondence between the first target service path and the first hardware flow table of the hardware forwarding chip, a first hardware flow table corresponding to the first target service path, where the first The first hardware flow table corresponding to the target service path supports the service supported by the first target service path;
  • a hardware flow table configuration unit configured to configure a flow entry of the first hardware flow table according to the first flow entry.
  • the matching field of the multiple OpenFlow flow table reported by the interface unit is all matching fields supported by the OpenFlow protocol, and the multiple OpenFlows reported by the interface unit
  • the action of the flow table is all the actions supported by the OpenFlow protocol.
  • the data packet processing unit is configured to determine, in the pre-configured service path, the first flow entry
  • the matching target business path specifically includes:
  • the data packet processing unit is configured to: when the first flow entry is more than two, aggregate the first flow entry to generate a combined flow entry, where the merged flow entry includes a matching field value And the matching field value corresponding to the inbound port matching field and the packet header matching field in the matching field value of the first flow entry, where the combined flow entry includes an action value of the action value of the first flow entry.
  • An action value for processing the first data packet determining, in the pre-configured service path, that a matching field includes a matching field corresponding to a matching field value of the merged flow entry, and the action includes the merging
  • the service path of the action corresponding to the action value of the flow entry is used as the first target service path; and when the first flow entry is one, determining a matching field in the pre-configured service path includes The matching field corresponding to the matching field value of the first flow entry, and the action includes the service path of the action corresponding to the action value of the first flow entry as the first target service path.
  • the intersection further includes a hardware flow table for implementing the hardware forwarding chip a matching field and an action of the supported second service;
  • the information of the data packet further includes information about the second data packet of the second service, and the flow table entry received by the interface unit from the controller further includes Describe at least one of the flow table entries matched by the second data packet;
  • the data packet processing unit is further configured to: when the second flow entry matching the second data packet is obtained from the software flow table, process the second data according to an action of the second flow entry package.
  • the communications device further includes a service flow table configuration unit
  • the data packet processing unit is further configured to determine, in the pre-configured service path, a second target service path that matches the second flow entry, and the determined matching field of the second target service path includes An inbound port matching field and a packet header matching field in the matching field corresponding to the matching field value of the second flow entry, where the action of the second target service path is used in the action value of the second flow entry An action corresponding to an action value for processing the second data packet;
  • the service flow table configuration unit is configured to configure, according to the second flow entry, a service flow entry of the service flow table corresponding to the second target service path, where the service flow table is a fine match table, and
  • the matching field of the service flow table is the matching field of the second target service path, and the value of the first matching field in the service flow entry is configured as the corresponding matching field value in the first flow entry.
  • a second matching field value in the service flow entry as a phase in a header of the second data packet
  • the header field value is set, and the action value in the service flow entry is configured as the action value of the second flow entry, where the matching field corresponding to the first match field value belongs to the first flow entry a matching field corresponding to the matching field value, where the matching field corresponding to the second matching field value does not belong to the matching field corresponding to the matching field value in the second flow entry;
  • the data packet processing unit is further configured to: when subsequently receiving the subsequent data packet of the second service, look in the service flow table for a service flow entry that matches the subsequent data packet, and according to the found The action of the traffic flow entry processes the subsequent data packet.
  • the communication device further includes a correspondence relationship configuration unit;
  • the corresponding relationship configuration unit is configured to configure a correspondence between each service path and a corresponding hardware flow table, where each service path includes the first target service path, and specifically includes: configured to configure multiple physical flow tables, and Corresponding relationship between each physical flow table and a hardware flow table, where the plurality of physical flow tables respectively include supported matching fields and actions, wherein a matching field of each physical flow table is included in a matching field of the corresponding hardware flow table, The action of writing the hardware flow table in the action of each physical flow table is included in the action of the corresponding hardware flow table; and is used to configure the correspondence between the service paths and the physical flow table, where each service path
  • the matching field is included in the matching field of all corresponding physical flow tables, and the action of each service path is included in the action of all corresponding physical flow tables;
  • the data packet processing unit is configured to determine, according to a pre-configured correspondence between the first target service path and the first hardware flow table, a first hardware flow table corresponding to the first target service path, specifically: the data
  • the packet processing unit is configured to determine the first physical flow table according to the correspondence between the first target service path and the corresponding first physical flow table, and according to the first physical flow table and the corresponding first hardware
  • the correspondence of the flow tables determines the first hardware flow table.
  • a fourth aspect provides a communication apparatus for implementing a configuration flow entry, including: a processor and a memory;
  • the memory is configured to store computer operation instructions
  • the processor configured to execute computer operating instructions stored in the memory, to cause the communication device to:
  • the flow table structure includes matching fields and actions supported by multiple OpenFlow flow tables, and types of the multiple OpenFlow flow tables, the multiple OpenFlows
  • the matching field and the action supported by the flow table have an intersection, and the intersection includes a matching field and an action of the first service supported by the hardware flow table of the hardware forwarding chip, and the types of the multiple OpenFlow flow table are a wild type, wherein the communication device is connected to a hardware forwarding chip;
  • the first target service path that matches the first flow entry, and the determined matching field of the first target service path includes an inbound port matching field in a matching field corresponding to the matching field value of the first flow entry.
  • a packet matching field, the action of the first target service path includes an action corresponding to an action value for processing the first data packet in an action value of the first flow entry;
  • the executing the computer operation instruction by the processor specifically, the matching field of the multiple OpenFlow flow table reported by the communication device is All the matching fields supported by the OpenFlow protocol, and the actions of the multiple OpenFlow flow tables reported are all actions supported by the OpenFlow protocol.
  • the executing the computer operation instruction by the processor specifically, the communication device to:
  • the first flow entry is aggregated to generate a merged flow entry, where the merged flow entry includes a matching field value that matches the first flow entry. a matching field value corresponding to the inbound port matching field and the packet header matching field, where the action value included in the action value of the first flow entry is used to process the first data packet.
  • the matching field in the pre-configured service path includes a matching field corresponding to the matching field value of the first flow entry, and the action includes the first flow entry.
  • the service path of the action corresponding to the action value is used as the first target service path.
  • the intersection further includes a hardware flow table for implementing the hardware forwarding chip a matching field and an action of the supported second service;
  • the information of the data packet further includes information of the second data packet of the second service, where the flow entry received from the controller further includes At least one of the flow table entries matched by the two data packets;
  • the executing the computer operation instruction by the processor further causes the communication device to perform the following operations:
  • the determined matching field of the second target service path includes a matching field of the second flow entry An inbound port matching field and a packet header matching field in the matching field corresponding to the value, where the action of the second target service path includes the action value of the second flow entry being used to process the second data packet The action corresponding to the action value;
  • the second flow entry configuring, according to the second flow entry, a service flow entry of the service flow table corresponding to the second target service path, where the service flow table is a fine match table, and a matching field of the service flow table is All the matching fields of the second target service path, the first matching field value in the service flow entry is configured as a corresponding matching field value in the first flow entry, and the first in the service flow entry is The second matching field value is configured as a corresponding header field value in the header of the second data packet, and the action value in the service flow entry is configured as an action value of the second flow entry, where The matching field corresponding to the first matching field value belongs to the matching field corresponding to the matching field value in the first flow entry, and the matching field corresponding to the second matching field value does not belong to the matching field in the second flow entry.
  • the matching field corresponding to the value
  • any one of the first to fourth possible implementation manners of the fourth aspect in a fifth possible implementation, the processor executing the computer operation instruction to further enable the communication device to implement The following operations are performed: configuring a correspondence between each service path and a corresponding hardware flow table, where each service path includes the first target service path, and specifically includes:
  • each service path is The allocation field is included in the matching field of all corresponding physical flow tables, and the action of each service path is included in the action of all corresponding physical flow tables;
  • the processor executes the computer operation instruction, so that the communication device determines, according to a pre-configured correspondence between the first target service path and the first hardware flow table, a first hardware flow table corresponding to the first target service path. Specifically, including:
  • a fifth aspect provides a method for configuring a flow entry, including:
  • the switch reports information about the data packet of the first service to the controller
  • the switch receives the first service flow entry delivered by the controller according to the data packet of the first service and the flow table structure, where the flow table structure includes matching fields and actions supported by multiple flow tables. And the matching field supported by each of the plurality of flow tables includes a matching field of the first service, and the supported action includes an action of the first service;
  • the switch configures a flow entry of the target hardware flow table according to the first service flow entry.
  • the switch and the controller communicate by using an OpenFlow OpenFlow protocol, where the multiple flow tables are Openflow flow tables.
  • the matching field of the multiple flow tables is all matching fields supported by the OpenFlow protocol, and the multiple flows are The action of the table is all the actions supported by the OpenFlow protocol.
  • the switch determines the first service flow table in a pre-configured service path
  • the first target service path matched by the item specifically includes:
  • the switch configures the first service flow entry into a software flow table
  • the switch obtains, by the switch from the software flow table, a first target flow entry that matches a data packet of the first service, and determining, in the pre-configured service path, that the first target flow entry is Matching the first target service path, the determined matching field of the first target service path includes an inbound port matching field and a packet header matching field in a matching field corresponding to the matching field value of the first target flow entry
  • the action of the determined first target service path includes an action for processing a data packet of the first service in an action value of the first target flow entry;
  • the configuring, by the switch, the flow entry of the target hardware flow table according to the first service flow entry specifically includes: configuring, by the switch, a flow entry of the target hardware flow table according to the first target flow entry.
  • the determining, by the pre-configured service path, the first target service path that matches the first target flow entry Specifically include:
  • the first target flow entry is aggregated to generate a merged flow entry, where the matching field value of the merged flow entry is the first target a matching field value corresponding to the inbound port matching field and the packet header matching field in the flow entry, where the action value of the combined flow entry is used in the first target flow entry for the data packet of the first service An action value of the action; determining, in the pre-configured service path, a match field corresponding to the match field value of the merge flow entry, and including a service path corresponding to the action value of the merge flow entry The first target service path;
  • the first target flow entry When the first target flow entry is one, determining, in the pre-configured service path, a matching field corresponding to the matching field value of the first target flow entry, and including the first The service path of the action corresponding to the action value of the target flow entry is used as the first target service path.
  • any one of the first to fourth possible implementation manners of the fifth aspect in a fifth possible implementation manner, the matching field and the action supported by each of the multiple flow tables And a matching field and an action of the second service, where the second service is a service that is not supported by the hardware flow table of the switch;
  • the method further includes:
  • the switch reports information about the data packet of the second service to the controller
  • the switch receives the information of the data packet of the second service and the second service flow entry delivered by the flow table structure, and configures the second service flow entry to the software flow table. in.
  • the method further includes:
  • the switch Determining, by the switch, a second target service path that matches the second target flow entry in the pre-configured service path, where the determined matching field of the second target service path includes the second target flow The inbound port matching field and the packet header matching field in the matching field corresponding to the matching field value of the entry, the determined action of the second target service path includes the action value of the second target flow entry The action of processing the data packet of the second service;
  • the switch configures a service flow entry of the service flow table corresponding to the second target service path according to the second target flow entry, where the service flow table is a fine match table, and the service flow table is
  • the matching field is all the matching fields of the second target service path, and the first matching field value in the service flow entry is configured as a matching field value in the second target flow entry, and the service flow is
  • the second matching field value in the entry is configured as a header field value in a header of the data packet of the second service, and the action value in the service flow entry is configured as the second target flow entry.
  • the switch When the switch receives the subsequent data packet of the second service, the switch searches for the service flow entry matching the subsequent data packet in the service flow table, and processes the action according to the found service flow entry. The subsequent data packet.
  • the pre-configured the service path and the hardware flow table Before determining the target hardware flow table includes: configuring a correspondence between each service path and a corresponding hardware flow table, specifically:
  • the switch Determining, by the switch, the first physical flow table according to the correspondence between the first target service path and the corresponding first physical flow table, and according to the first physical flow table and the corresponding target hardware flow table The correspondence determines the target hardware flow table.
  • the flow table structure further includes a type of the multiple flow table,
  • the types of the multiple flow tables are wildcard types.
  • a sixth aspect provides a method for configuring a flow entry, including:
  • the communication device reports information of the data packet of the first service to the controller
  • the communication device receives the first service flow entry delivered by the controller according to the data packet of the first service and the flow table structure, where the flow table structure includes matching fields supported by multiple flow tables and Action, the matching field supported by each of the multiple flow tables includes a matching field of the first service, and the supported action includes an action of the first service;
  • the action of the target service path includes an action of the first service
  • a target hardware flow table Determining, by the communication device, a target hardware flow table according to a correspondence between the pre-configured service path and a hardware flow table of a hardware forwarding chip connected to the communication device, wherein the target hardware flow table supports the first The business supported by the target business path;
  • the communication device configures a flow entry of the target hardware flow table according to the first service flow entry.
  • the communication device and the controller communicate by using an OpenFlow OpenFlow protocol, where the flow table is an Openflow flow table; and matching fields of the multiple flow tables It is all matching fields supported by the OpenFlow protocol, and the actions of the multiple flow tables are all actions supported by the OpenFlow protocol.
  • the communications apparatus determines, in a pre-configured service path, that the first service flow entry is matched
  • the first target business path specifically includes:
  • the communication device configures the first service flow entry into a software flow table
  • the configuring, by the communication device, the flow entry of the target hardware flow table according to the first service flow entry specifically includes: the communication device configuring a flow table of the target hardware flow table according to the first target flow entry item.
  • the determining, by the pre-configured service path, the first target service path that matches the first target flow entry Specifically include:
  • the first target flow entry is aggregated to generate a merged flow entry, where the matching field value of the merged flow entry is the first target a matching field value corresponding to the inbound port matching field and the packet header matching field in the flow entry, where the action value of the combined flow entry is used in the first target flow entry for the data packet of the first service An action value of the action; determining, in the pre-configured service path, a match field corresponding to the match field value of the merge flow entry, and including a service path corresponding to the action value of the merge flow entry The first target service path;
  • the first target flow entry When the first target flow entry is one, determining, in the pre-configured service path, a matching field corresponding to the matching field value of the first target flow entry, and including the first target The service path of the action corresponding to the action value of the flow entry is used as the first target service path.
  • the matching field and the action supported by each of the multiple flow tables And a matching field and an action of the second service, where the second service is a service that is not supported by the hardware flow table of the switch;
  • the method further includes:
  • the communication device reports information of the data packet of the second service to the controller
  • the method further includes:
  • the communication device acquires, from the software flow table, a second target flow entry that matches a data packet of the second service
  • the communication device determines, in the pre-configured service path, a second target service path that matches the second target flow entry, and the determined matching field of the second target service path includes the second target
  • the communication device configures a service flow entry of the service flow table corresponding to the second target service path according to the second target flow entry, where the service flow table is a fine match table, and the service flow table
  • the match field is the match field of the second target service path
  • the first match field value in the service flow entry is configured as the match field value in the second target flow entry, and the service is used.
  • the second matching field value in the flow entry is configured as a header field value in a header of the data packet of the second service
  • the action value in the service flow entry is configured as the second target flow entry
  • the action value wherein the matching field corresponding to the first matching field value belongs to a matching field corresponding to the matching field value in the second target stream entry, and the matching field corresponding to the second matching field value does not belong to the a matching field corresponding to the matching field value in the second flow entry;
  • the communication device searches for the service flow entry matching the subsequent data packet in the service flow table when the subsequent data packet of the second service is received, and performs the action according to the found service flow entry. Processing the subsequent data packet.
  • the pre-configured the service path and the hardware flow table Before determining the target hardware flow table, the correspondence includes: configuring each service path and corresponding hardware flow Correspondence between the tables, including:
  • the communication device Determining, by the communication device, the first physical flow table according to the correspondence between the first target service path and the corresponding first physical flow table, and according to the correspondence between the first physical flow table and the target hardware flow table The relationship determines the target hardware flow table.
  • the flow table structure further includes a type of the multiple flow table,
  • the types of the multiple flow tables are wildcard types.
  • a seventh aspect provides a communication apparatus for implementing a configuration flow entry, the communication apparatus being connected to a hardware forwarding chip, including: an interface unit, a data packet processing unit, and a hardware flow table configuration unit;
  • the interface unit is configured to report the information of the data packet of the first service to the controller, and is further configured to receive, by the controller, the first information delivered according to the information of the data packet of the first service and the flow table structure.
  • a service flow entry the flow table structure includes matching fields and actions supported by the multiple flow tables, and the matching field supported by each of the multiple flow tables includes a matching field of the first service, and is supported.
  • the action includes the action of the first service;
  • the data packet processing unit configured to determine, in the pre-configured service path, the first industry a first target service path that matches the service flow entry, the matching field of the first target service path includes a matching field of the first service, and the action of the target service path includes an action of the first service; Determining a target hardware flow table according to a correspondence between the pre-configured service path and a hardware flow table of the hardware forwarding chip, where the target hardware flow table supports services supported by the first target service path;
  • a hardware flow table configuration unit configured to configure a flow entry of the target hardware flow table according to the first service flow entry.
  • the communication device and the controller communicate by using an OpenFlow OpenFlow protocol, where the flow table is an Openflow flow table; and a matching field of the multiple flow tables It is all matching fields supported by the OpenFlow protocol, and the actions of the multiple flow tables are all actions supported by the OpenFlow protocol.
  • the data packet processing unit is configured to determine, in the pre-configured service path, the first service The first target service path that matches the flow entry includes:
  • the data packet processing unit is configured to configure the first service flow entry into a software flow table, and obtain, from the software flow table, a first target flow entry that matches a data packet of the first service Determining, in the pre-configured service path, the first target service path that matches the first target flow entry, and determining the matching field of the first target service path includes the first target The inbound port matching field and the packet header matching field in the matching field corresponding to the matching field value of the flow entry, and the determined action of the first target service path includes the action value of the first target flow entry.
  • the action of processing the data packet of the first service is configured to configure the first service flow entry into a software flow table, and obtain, from the software flow table, a first target flow entry that matches a data packet of the first service Determining, in the pre-configured service path, the first target service path that matches the first target flow entry, and determining the matching field of the first target service path includes the first target The inbound port matching field and the packet header matching field in the matching field corresponding to the matching
  • the hardware flow table configuration unit is configured to configure a flow entry of the target hardware flow table according to the first target flow entry.
  • the data packet processing unit is configured to determine, in a pre-configured service path, that the first target flow entry is matched
  • the target business path specifically includes:
  • the data packet processing unit is configured to: when the first target flow entry is more than two, aggregate the first target flow entry to generate a combined flow entry, where the merged flow entry
  • the matching field value is a matching field value corresponding to the inbound port matching field and the packet header matching field in the first target flow entry, and the action value of the combined flow entry is used in the first target flow entry.
  • An action value of the data packet of the first service being processed determining, in the pre-configured service path, a matching field corresponding to the matching field value of the merged flow entry, and including the merged flow entry And the service path corresponding to the action value is used as the first target service path; and when the first target flow entry is one, determining, in the pre-configured service path, that the first target is included
  • the matching field corresponding to the matching field value of the flow entry, and the service path including the action corresponding to the action value of the first target flow entry is used as the first target service path.
  • the matching field and the action supported by each of the multiple flow tables And a matching field and an action of the second service, where the second service is a service that is not supported by the hardware flow table of the switch;
  • the interface unit is further configured to report information about the data packet of the second service to the controller, and receive the information that is sent by the controller according to the information of the data packet of the second service and the flow table structure.
  • Two service flow entries Two service flow entries;
  • the data packet processing unit is further configured to configure the second service flow entry received by the interface unit into a software flow table.
  • the communication device further includes a service flow table configuration unit;
  • the data packet processing unit is further configured to: acquire, from the software flow table, a second target flow entry that matches the data packet of the second service, and determine, in the pre-configured service path, the a second target service path that matches the second target flow entry, and the determined matching field of the second target service path includes an inbound port matching field in the matching field corresponding to the matching field value of the second target flow entry And a header matching field, the determined action of the second target service path includes the An action for processing a data packet of the second service in an action value of the second target flow entry;
  • the service flow table configuration unit is configured to configure, according to the second target flow entry, a service flow entry of the service flow table corresponding to the second target service path, where the service flow table is a fine matching table.
  • the matching field of the service flow table is all matching fields of the second target service path, and the first matching field value in the service flow entry is configured as a matching field in the second target flow entry.
  • the second matching field value in the service flow entry is configured as a header field value in a header of the data packet of the second service
  • the action value in the service flow entry is configured as the An action value of the second flow entry, where the matching field corresponding to the first matching field value belongs to a matching field corresponding to the matching field value in the second target flow entry, and the second matching field value corresponds to The matching field does not belong to the matching field corresponding to the matching field value in the second flow entry;
  • the data packet processing unit is further configured to: when subsequently receiving the subsequent data packet of the second service, look in the service flow table for a service flow entry that matches the subsequent data packet, and according to the found The action of the traffic flow entry processes the subsequent data packet.
  • the communication device further includes a correspondence relationship configuration unit;
  • the correspondence relationship configuration unit is configured to configure a correspondence between each service path and a corresponding hardware flow table, and specifically includes: configured to configure multiple physical flow tables, and corresponding relationships between physical flow tables and hardware flow tables,
  • the multiple physical flow tables respectively include supported matching fields and actions, wherein the matching fields of each physical flow table are included in the matching field of the corresponding hardware flow table, and the hardware flow table needs to be written in the action of each physical flow table.
  • the action is included in the action of the corresponding hardware flow table; and is used to configure the correspondence between each service path and the physical flow table, wherein the matching field of each service path is included in the matching field of all corresponding physical flow tables, and The actions of each service path are included in the actions of all corresponding physical flow tables;
  • the data packet processing unit is configured to determine a target hardware flow table according to the corresponding relationship between the service path and the hardware flow table, which is specifically configured to: the data packet processing unit is configured to use, according to the first target service path, Corresponding relationship with the corresponding first physical flow table determines the first physical flow And determining, according to the correspondence between the first physical flow table and the corresponding target hardware flow table, the target hardware flow table.
  • An eighth aspect provides a communication apparatus for implementing a configuration flow entry, including: a processor and a memory;
  • the memory is configured to store computer operation instructions
  • the processor configured to execute computer operating instructions stored in the memory, to cause the communication device to:
  • a target hardware flow table Determining a target hardware flow table according to a correspondence between the pre-configured service path and a hardware flow table of a hardware forwarding chip connected to the communication device, wherein the target hardware flow table supports the first target service path Supported business;
  • the communication device and the controller communicate by using an OpenFlow OpenFlow protocol, where the flow table is an Openflow flow table; and matching fields of the multiple flow tables It is all matching fields supported by the OpenFlow protocol, and the actions of the multiple flow tables are all actions supported by the OpenFlow protocol.
  • the executing the computer operation instruction by the processor, specifically, the communication device is implemented Do the following:
  • the first target service path includes an inbound port matching field and a packet header matching field in a matching field corresponding to the matching field value of the first target flow entry, and the determined
  • the action of the first target service path includes an action for processing a data packet of the first service in an action value of the first target flow entry;
  • the configuring the flow entry of the target hardware flow table according to the first service flow entry specifically includes: the communication device configuring a flow entry of the target hardware flow table according to the first target flow entry.
  • the executing the computer operation instruction by the processor specifically causes the communication device to perform the following operations:
  • the first target flow entry is aggregated to generate a merged flow entry, where the matching field value of the merged flow entry is the first target a matching field value corresponding to the inbound port matching field and the packet header matching field in the flow entry, where the action value of the combined flow entry is used in the first target flow entry for the data packet of the first service An action value of the action; determining, in the pre-configured service path, a match field corresponding to the match field value of the merge flow entry, and including a service path corresponding to the action value of the merge flow entry The first target service path;
  • the first target flow entry When the first target flow entry is one, determining, in the pre-configured service path, a matching field corresponding to the matching field value of the first target flow entry, and including the first target The service path of the action corresponding to the action value of the flow entry is used as the first target service path.
  • the matching field and the action supported by each of the multiple flow tables And a matching field and an action of the second service, where the second service is a service that is not supported by the hardware flow table of the switch;
  • Executing the computer operating instructions by the processor further causes the communication device to:
  • the executing the computer operation instruction by the processor further causes the communication device to perform the following operations:
  • the determined matching field of the second target service path includes the second target flow entry Matching the inbound port matching field and the packet header matching field in the matching field corresponding to the field value, the determined action of the second target service path includes the action value of the second target flow entry for the second The action of processing the data packet of the service;
  • the second target flow entry a service flow entry of the service flow table corresponding to the second target service path, where the service flow table is a fine match table, and a matching field of the service flow table is All the matching fields of the second target service path
  • the first matching field value in the service flow entry is configured as a matching field value in the second target flow entry
  • the service flow entry is
  • the second matching field value is configured as a header field value in a header of the data packet of the second service
  • the action value in the service flow entry is configured as an action value of the second target flow entry
  • the matching field corresponding to the first matching field value belongs to a matching field corresponding to the matching field value in the second target flow entry, and the matching field corresponding to the second matching field value does not belong to the second flow.
  • the matching field corresponding to the matching field value in the entry is
  • the service flow table entry matching the subsequent data packet is searched in the service flow table when the subsequent data packet of the second service is received, and the action processing item is processed according to the found service flow entry. Describe the subsequent data packets.
  • the determined matching field of the second target service path includes a matching field of the second flow entry An inbound port matching field and a packet header matching field in the matching field corresponding to the value, where the action of the second target service path includes the action value of the second flow entry being used to process the second data packet The action corresponding to the action value;
  • the second flow entry configuring, according to the second flow entry, a service flow entry of the service flow table corresponding to the second target service path, where the service flow table is a fine match table, and a matching field of the service flow table is All the matching fields of the second target service path
  • the first matching field value in the service flow entry is configured as a matching field value in the first flow entry
  • the second in the service flow entry is The matching field value is configured as a header field value in the header of the second data packet
  • the action value in the service flow entry is configured as an action value of the second flow entry, where the first The matching field corresponding to the matching field value belongs to the matching field corresponding to the matching field value in the first flow entry, and the matching field corresponding to the second matching field value does not belong to the matching field value in the second flow entry.
  • the executing the computer operation instruction by the processor to further enable the communication device to implement The following operations are performed: configuring the correspondence between each service path and the corresponding hardware flow table, and configuring the correspondence between each service path and the corresponding hardware flow table, including:
  • the processor executes the computer operation instruction, so that the communication device determines the target hardware flow table according to the corresponding relationship between the service path and the hardware flow table, which includes:
  • a switch comprising:
  • a communication device implemented by any of the first to fifth possible implementations of the third aspect, the third aspect, or any of the first to fifth possible implementations of the fourth aspect, the fourth aspect The communication device implemented, or the communication device implemented by any of the first to sixth possible implementations of the seventh aspect, the seventh aspect, or the first to sixth aspects of the eighth aspect, the eighth aspect A communication device implemented in any of the possible implementations.
  • a communication system comprising: a controller and the switch according to the ninth aspect.
  • the multiple OpenFlow flow tables may be used to implement the first service, and therefore, according to the processing logic of the controller, whether the flow of the flow table or the flow table is generated for the first service Table items can be successfully generated and sent.
  • the first target service path determined by the switch includes a matching field value of the data packet of the first service and a matching field and an action corresponding to the action value, so the first target service path supports the first service, and The first item
  • the hardware flow table corresponding to the standard service path supports the service supported by the first target service path. Therefore, the hardware flow table corresponding to the first target service path is a hardware flow table supporting the first service, and further, the switch A flow entry for implementing the first service may be configured in the hardware flow table. Therefore, no matter what controller the host is connected to, the flow table entry for implementing the first service can be successfully configured in the hardware flow table, so that the first service can be successfully processed, thereby reducing the probability of business processing failure. .
  • FIGS. 1-1 to 1-2 are schematic diagrams of a networking structure of a communication system according to an embodiment of the present invention.
  • Embodiment 1 of the present invention is a schematic flow chart of a method provided by Embodiment 1 of the present invention.
  • 3-1 to 3-2 are schematic structural diagrams of a communication device 200 according to Embodiment 2 of the present invention.
  • FIG. 4 is a schematic structural diagram of a communication device 300 according to Embodiment 3 of the present invention.
  • FIG. 5 is a schematic structural diagram of a switch 400 according to Embodiment 4 of the present invention.
  • FIG. 6 is a schematic structural diagram of a communication system 500 according to Embodiment 5 of the present invention.
  • the communication system includes a switch 110 and a controller 120.
  • the switch 110 and the controller 120 pass an open flow ( The OpenFlow protocol communicates.
  • the switch 110 may be configured by an upper layer communication device 110-1 and an underlying hardware forwarding chip 110-2.
  • the hardware forwarding chip 110-2 may be an application specific integrated circuit (ASIC).
  • ASIC application specific integrated circuit
  • the chip and the hardware forwarding chip include a hardware flow table, such as an Access Control List (ACL) 1, ACL2, and the like.
  • the method, device and system provided by the embodiments of the present invention are applied to a software defined network (SDN) system, and the SDN system includes a controller and a switch.
  • the protocol for communication between the controller and the switch may be an OpenFlow protocol, or may be a proprietary protocol or other standard protocol.
  • the flow table structure used by the controller to deliver the flow entry may be reported to the controller by the switch, or may be pre-configured on the controller.
  • the flow table structure includes matching fields and actions supported by the OpenFlow flow table.
  • the OpenFlow protocol is used as an example.
  • the implementation of the other protocols is similar to the implementation of the OpenFlow protocol.
  • Embodiment 1 of the present invention is a schematic flowchart of a method according to Embodiment 1 of the present invention.
  • the method in Embodiment 1 of the present invention can be applied to the communication system shown in FIG. 1-1 or FIG. 1-2.
  • the method provided in Embodiment 1 of the present invention includes:
  • the switch (the switch 110 shown in Figure 1-1) reports the flow table structure to the controller (the controller 120 shown in Figure 1-1) through the OpenFlow protocol.
  • the flow table structure includes multiple OpenFlow flow tables. Supported matching fields and actions, and types of the plurality of OpenFlow flow tables, the matching fields and actions supported by the plurality of OpenFlow flow tables have an intersection, and the intersection includes hardware for implementing the switch Matching fields and actions of the first service supported by the flow table,
  • the types of multiple OpenFlow flow tables are all wildcard types.
  • the controller can generate a flow entry by using any one or more matching fields supported by the flow table when generating the flow entry according to the structure of the flow table.
  • the T0 table is a wildcard type, and the supported matching fields include six matching fields: in_port, eth_type, src_mac, dst_mac, ip_src, and ip_dst, and the flow entry generated by the controller according to the T0 table may include only some of the matching fields.
  • the matching field value such as the generated flow table entry, includes the values of the four matching fields in_port, eth_type, src_mac, and dst_mac, and may also include the matching field values corresponding to all matching fields of the T0 table.
  • the controller sends a flow table capability request message (table stats request) to the switch, and after receiving the flow table capability request message, the switch sends the The controller returns a flow table capability response message (table stats reply), and carries the flow table structure in the flow table capability response message.
  • a flow table capability request message table stats request
  • the switch sends the The controller returns a flow table capability response message (table stats reply)
  • the plurality of OpenFlow flow tables may specifically include a T0 (Table 0) table, a T1 (Table 1) table, and the like.
  • the matching field may include an in port (in_port), an Ethernet type (eth_type), and a source MAC address (src_mac).
  • the action may specifically include: forwarding, modifying a source MAC address, modifying a destination MAC address, and the like by using a port. .
  • the first service which may be an IP-based Layer 2 forwarding service, implements the IP-based Layer 2 forwarding service, and needs to use matching fields in_port, eth_type, src_mac, and dst mac (destination MAC address). And the action output.
  • IP-based Layer 2 forwarding service implements the IP-based Layer 2 forwarding service, and needs to use matching fields in_port, eth_type, src_mac, and dst mac (destination MAC address). And the action output.
  • the criterion for measuring the hardware flow table of the switch to support the first service may be that one or more hardware flow tables of the switch include matching fields and actions required to implement the first service, eg, implementing the The first service needs to use the matching fields in_port, eth_type, src_mac and dst mac, and action output, and one hardware flow table of the switch includes matching fields in_port and eth_type, and another hardware flow table includes matching fields src_mac and dst mac, And the action output, the hardware flow table of the switch can be considered to support the first service.
  • some of the actions required to implement the first service may not need to be configured into the hardware flow table, but rather Supporting other hardware resources of the switch's non-hardware flow table class, such as the matching field pop_vlan (assuming that the first service needs to use the matching field pop_vlan), in this case, as long as the first service is required
  • the matching fields are all included in the hardware flow table of the switch, and the actions required to be written into the hardware flow table in the actions required to implement the first service are included in the hardware flow table of the switch, and the switch can be considered as The hardware flow table supports the first service.
  • one or more hardware flow tables of the switch include a matching field required to implement the first service, and include an action required to implement the first service, the action required to be written into the hardware flow table, The first service can be supported.
  • the matching field of the multiple OpenFlow flow tables reported by the switch may be all matching fields supported by the OpenFlow protocol, and the actions of the multiple OpenFlow flow tables reported by the switch may be supported by the OpenFlow protocol. All actions.
  • the intersection may include matching fields and actions of one or more services for implementing hardware flow table support of the switch. If the multiple OpenFlow flow tables reported include all matching fields and all actions supported by the OpenFlow protocol, that is, the intersection includes all matching fields and all actions supported by the OpenFlow protocol, the matching fields and actions included in the intersection It can be used to implement as many services as possible in the services supported by the hardware flow table of the switch.
  • the flow table structure can be as shown in Table 1:
  • the switch receives the flow entry sent by the controller through the OpenFlow protocol, and configures the flow entry into a software flow table, where the flow entry is the flow table according to the controller.
  • the information and the information about the data packet reported by the switch are generated, the information of the reported data packet includes information of the first data packet of the first service, and the flow entry includes matching the first data packet. At least one of the flow entry entries;
  • the software flow table and the hardware flow table of the switch do not include a flow entry or only a default flow entry that cannot match the received data packet.
  • the items are configured into the software flow table and configured into the hardware flow table through subsequent steps S130-S150.
  • step S120 includes one or more of the following execution processes:
  • S120-1 The switch receives a data packet (such as the first data packet).
  • S120-2 The switch first searches for a flow entry matching the data packet in a hardware flow table of the switch.
  • step S120-3 is performed, and if found, the packet is processed according to the action value of the found flow entry.
  • the switch further searches for a flow entry that matches the data packet in a software flow table of the switch.
  • step S120-4 is performed, if found, according to the found flow entry
  • the action value processes the packet.
  • S120-4 The switch requests, from the controller, a flow entry that matches the data packet.
  • the switch sends a Packet In message to the controller, where the Packet In message includes information of the data packet, such as a port number that receives the data packet, and another information such as the data packet itself or the packet header information of the data packet.
  • the controller when receiving the Packet In message, according to the flow table structure and information of the data packet (such as a port number of receiving the data packet, an Ethernet type in the packet header information of the data packet, and a source
  • the MAC address and the destination MAC address are generated by the flow table entry that matches the data packet, and the generated flow entry is sent to the switch by using a Flow mod message.
  • S120-5 The switch configures the received flow entry into the software flow table.
  • the flow entry corresponding to the first data packet is requested in S120-4, and correspondingly, in S120-5, The flow entry matching the first data packet is configured into the software flow table.
  • the first flow entry matching the first data packet may be one or more than two.
  • the flow entry of the T0 may be generated, as shown in Table 2
  • the flow entry of T0 and the flow entry of T1 can also be generated, as shown in Tables 2-2A and 2-2B.
  • the flow entry in the S120 includes at least one of the flow entry that matches the first data packet, and there are the following cases: when there is one flow entry matching the first data packet
  • the flow entry is included in a flow entry sent by the controller to the switch, when there are more than two flow entries matching the first data packet, if some of the flow entries have been previously
  • the controller sends the switch to the switch, and the controller may send only another part of the flow entry of the two or more flow entries.
  • the IP-based Layer 2 forwarding service generates a flow entry of the T0 table and the T1 table, and in S120, the software flow of the IP-based Layer 2 forwarding service is reported to the controller, and the software flow representation is configured, for example.
  • Tables 3-1 and 3-2 show.
  • the multiple OpenFlow flow tables reported in S110 can be used to implement the first service. Therefore, in S120, according to the processing logic of the controller, whether or not the flow table is generated for the first service Flow table entries can be successfully generated.
  • the hardware flow table in the embodiment of the present invention refers to a flow table in a hardware format, and specifically may be a flow table in a hardware forwarding chip of the switch, such as an ACL table.
  • the software flow table in the embodiment of the present invention refers to an OpenFlow flow table in the form of software, and specifically may be an OpenFlow flow table stored in a memory of the switch.
  • the software flow table is a flow table that complies with the corresponding protocol.
  • the switch acquires a first flow entry that matches the first data packet from the software flow table, and processes the first data packet according to an action value of the first flow entry, and is pre-configured. Determining, in the service path, a first target service path that matches the first flow entry.
  • the switch receives the first data packet through the port 2, the Ethernet type specified in the header field of the first data packet is 0x800, and the source mac address is 0:0:0:0:0:3
  • the destination mac address is 0:0:0:0:0:4, the source IP address is 192.168.0.1, the destination IP address is 192.168.0.2, the source port number is 6633, and the destination port number is 6589.
  • the switch first finds a flow entry that matches the first data packet in the T0 table, and because the data packet is received from the port 2, the second flow entry is matched to the T0 table, according to The action value "goto:1" of the second flow entry of the T0 table further finds a flow entry matching the first data packet in the T1 table.
  • the eth type of the first data packet is 0x800, the source MAC address is 0:0:0:0:0:3, and the destination MAC address is 0:0:0:0:0: 4. Therefore, the second flow entry of the T1 table is matched, and the data packet is forwarded through port 3 according to the action value "output: 3" of the second flow entry of the T1 table.
  • the first flow entry that matches the first data packet of the first service that is found includes the second flow entry of the T0 table and the second flow entry of the T1 table.
  • the switch After acquiring the flow entry matching the first data packet, the switch determines a first target service path that matches the first flow entry in the pre-configured service path.
  • Each of the pre-configured service paths includes matching fields and actions required to implement services corresponding to the respective service paths.
  • the determined matching field of the first target service path includes an ingress port matching field and a packet headers matching field in a matching field corresponding to the matching field value of the first flow entry.
  • the action of the first target service path includes an action corresponding to an action value for processing the first data packet in the action value of the first flow entry.
  • the inbound port matching field is configured to match a port number of the received data packet entering the switch (ie, the port number of the switch receiving the data packet); a packet header matching field, configured to be used with the received data packet The fields in the header are matched.
  • the first flow entry has two, and the matching field corresponding to the matching field value is: in_port, eth_type, src_mac, and dst mac, where in_port is an ingress matching field, and eth_type, src_mac, and dst mac correspond to
  • the match field value is used to match the field in the header of the first data packet to match the field of the packet header.
  • the included action values are goto:1 and output:3, where goto:1 is used to indicate further lookup in the next table, and output:3 is used to indicate that data packets are forwarded through port 3, visible, only output: 3 is An action value for processing the first data packet.
  • the inbound port matching field value may not be included in the first flow entry.
  • the matching field of the first target service path may also have no inbound port matching field.
  • the matched flow entry may further include a metadata matching field value and a field value for generating a match with the metadata.
  • the metadata action of the matched data as shown in Tables 5-1 and 5-2, the metadata matching field is meta, the metadata matching field value is 0x2, and the data for matching the metadata matching field value is generated. Move as w_meta:0x2.
  • the metadata matching field value is not used to match the packet header information of the data packet, and the inbound port matching field and the packet header matching field are juxtaposed, that is, the metadata matching field does not belong to the ingress matching field and the packet header matching field.
  • the metadata action is not used to process the packet, ie, it is not the action corresponding to the action value used to process the packet.
  • the switch searches for the matching field including in_port, eth_type, src_mac, and dst mac from each service flow table, and the service path including the output includes the service path as the first target service path.
  • the matching field of the L2_L1T4S_IPv4IPv6Path includes the in_port, Eth_type, src_mac, and dst mac, and the action of L2_L1T4S_IPv4IPv6Path includes output, and therefore, L2_L1T4S_IPv4IPv6Path is determined as the first target service path.
  • first flow entry may be one or more than two.
  • the matching field corresponding to the matching field value included in the first flow entry belongs to the entry port matching field and the packet header matching field, and the included actions belong to the first data.
  • the action of the package processing correspondsly, a match field corresponding to the matching field value of the first flow entry may be directly determined in the pre-configured service path, and the action includes an action corresponding to the action value of the first flow entry.
  • the service path serves as the first target service path.
  • the first target service path may be determined according to the following method to improve the determined efficiency:
  • A1 The switch aggregates the first flow entry to generate a merged flow entry, where the merged flow entry includes a matching field value that matches the ingress port in the matching field value of the first flow entry. a match field value of the field and the packet header matching field, where the action value included in the action flow value of the first flow entry is used to process the first data packet;
  • A2 The switch determines, in the pre-configured service path, that a matching field includes a matching field corresponding to the matching field value of the merged flow entry, and the action includes an action corresponding to the action value of the merged flow entry.
  • the service path serves as the first target service path.
  • the switch determines, according to the pre-configured correspondence between the first target service path and the hardware flow table, a hardware flow table corresponding to the first target service path, where the hardware flow corresponding to the first target service path The table supports the services supported by the first target service path.
  • the switch pre-configures the correspondence between each service path and the hardware flow table, and the hardware flow table corresponding to each service path supports the services supported by the service paths, for example, the service center that supports the corresponding service path support.
  • the required matching fields and actions are as shown in Table 6.
  • the service path L2_L1T4S_IPv4IPv6 corresponds to the hardware flow table ACL3 and ACL5, and the ACL3 and ACL5 include matching fields and actions required for implementing the ip-based Layer 2 forwarding service supported by L2_L1T4S_IPv4IPv6.
  • the L2_L1T4S_IPv4IPv6 Path is the target service path determined in the step S130.
  • the hardware flow table corresponding to the target service path is ACL3 and ACL5.
  • the switch can directly configure the correspondence between each service path and the corresponding hardware flow table, and can also configure the correspondence between each service path and other information and the correspondence between other information and the hardware flow table, thereby achieving indirect Configure the mapping between each service path and the corresponding hardware flow table.
  • B1 configured to configure a plurality of physical flow tables, and a correspondence between each physical flow table and a hardware flow table, where the multiple physical flow tables respectively include supported matching fields and actions, wherein a matching field of each physical flow table is included in In the matching field of the corresponding hardware flow table, the action of writing the hardware flow table in the action of each physical flow table is included in the action of the corresponding hardware flow table.
  • the action of writing the hardware flow table in the action of each physical flow table refers to an action that can be supported by the hardware resources of the non-hardware flow table class of the switch where the hardware flow table is located.
  • the matching field of each service path may be a complete set of matching fields of all physical flow tables
  • the action of each service path may be a complete set of actions of all corresponding physical flow tables.
  • each physical flow table can be reused for different service paths. Therefore, after configuring multiple physical flow tables through B1 and the corresponding relationship between physical flow tables and hardware flow tables, it can be conveniently configured through B2. Achieve business paths for various businesses.
  • the pre-configured physical flow table L1 includes matching fields eth_src and eth_dst
  • the pre-configured physical flow table T4S includes matching fields ip_src and ip_dst, including action output.
  • step S160 the switch determines, according to the pre-configured correspondence between the first target service path and the physical flow table, a first physical flow table corresponding to the first target service path, and according to the first Corresponding relationship between a physical flow table and a hardware flow table determines the hardware flow table corresponding to the first physical flow table.
  • S150 The switch configures a flow entry of the hardware flow table according to the first flow entry.
  • S150 may include:
  • the value of the matching field corresponding to the inbound port matching field and the packet header matching field in the matching field value of the first flow entry is configured as the matching field value of the added flow entry;
  • the action value other than the first action value of the action values used for processing the first data packet in the action value of the first flow entry is configured as an action value of the added flow entry.
  • the first action value is an action value corresponding to an action supported by a hardware resource of the non-hardware flow table class of the switch in which the hardware flow table is not included in the hardware flow table.
  • the first flow entry may not include the first action value.
  • the matching field value of the combined flow entry may be directly configured as the matching field value of the added flow entry. And configuring, in the action value of the merged flow entry, an action value other than the first action value as an action value of the added flow entry.
  • the switch configures the matching field values in_port, eth_type, src_mac, and dst mac of the first flow entry into the ACL5 table.
  • the first flow table is configured.
  • the action value of the item is output: 3 is configured in the ACL3 table.
  • the matching field of the hardware flow table has more matching fields than the matching field value of the first flow entry
  • other matching field values of the flow entry may be configured as described.
  • Corresponding information in the header field of the data packet for example, the first flow entry does not include the source IP address, and the source IP address is extracted from the data packet, and the extracted source IP address is used as the flow entry.
  • the corresponding value of the matching field src_ip source IP address
  • other matching field values of the flow entry may also be configured as wildcards.
  • the multiple OpenFlow flow tables may be used to implement the first service, and therefore, according to the processing logic of the controller, whether or not the flow table is generated for the first service Flow table entries can be successfully generated and sent.
  • the first target service path determined by the switch includes a matching field value of the data packet of the first service and a matching field and an action corresponding to the action value, so the first target service path supports the first service, and
  • the hardware flow table corresponding to the first target service path supports the service supported by the first target service path. Therefore, the hardware flow table corresponding to the first target service path is a hardware flow table that supports the first service, and further
  • the switch may configure a flow entry for implementing the first service in the hardware flow table. Therefore, no matter what controller the host is connected to, the flow table entry for implementing the first service can be successfully configured in the hardware flow table, so that the first service can be successfully processed, thereby reducing the probability of business processing failure. .
  • the action value of the first flow entry further includes an action corresponding to a hardware resource that is not included in the hardware flow table and is a non-hardware flow table class of the switch where the hardware flow table is located.
  • the action value for example, the action value (for example, pop_vlan, push_vlan) for performing attribute configuration on the port of the switch, the switch may also be used according to the first flow entry in the first flow entry.
  • the action value of the port of the switch is configured to configure the attribute of the port specified by the output action value of the first flow entry (for example, for the pop_vlan service, set the VLAN 1024 attribute of the port to untagging).
  • the switch (the switch 110 shown in FIG. 1-2) may be configured by an upper layer communication device (such as the communication device 110 shown in FIG. 1-2). 1) and the bottom layer
  • the hardware forwarding chip (such as the hardware forwarding chip 110-2 shown in FIG. 1-2) is configured.
  • Steps S110, S130, 140 are performed by the communication device.
  • the data packet received by the switch is received by the port of the hardware forwarding chip, and the action of checking the hardware flow table is performed by the hardware forwarding chip, where the hardware forwarding chip is in the hardware flow table.
  • the received data packet is reported to the communication device, and the received data packet may be reported by the network card channel between the hardware forwarding chip and the communication device.
  • Other actions in S120 other than checking the hardware flow table are performed by the communication device.
  • the specific implementation of the S150 may be: the communication device configures, according to the first flow entry, a flow entry of the hardware flow table in the hardware forwarding chip.
  • the flow table entry may be configured by using an interface for performing hardware flow table configuration on the hardware forwarding chip, where information configured in the hardware flow table is transmitted to the hardware as a parameter of the interface.
  • the forwarding chip is thus configured into the hardware flow table.
  • the service path pre-configured by the communication device is only used to implement a service supported by a hardware flow table of a hardware forwarding chip connected to the communication device, and the communication device is matched in step S130.
  • the target service path may inevitably be determined to the corresponding hardware flow table in step S140.
  • the corresponding service path and the corresponding relationship between the service path and the hardware flow table are configured according to the services supported by the hardware flow table of different hardware forwarding chips. .
  • the pre-configured service path of the communication device can be used to implement services supported by hardware flow tables of a plurality of different hardware forwarding chips.
  • the communication device when the communication device is used to connect different hardware forwarding chips, it is more convenient to separately configure the correspondence between the service configuration service path and the hardware flow table supported by the hardware flow table of the different hardware forwarding chip.
  • the docking of the communication device with different hardware forwarding chips is implemented.
  • the intersection in S110 may further include
  • the information of the data packet reported in the step S120 may further include information of the second data packet of the second service, where the controller of the second service is not supported by the hardware flow table of the switch.
  • the flow entry to be sent may further include at least one of a flow entry that matches the second data packet.
  • the method may further include: the switch acquiring, from the software flow table, a second flow entry that matches the second data packet, and processing, according to the action of the second flow entry Two packets.
  • the switch acquiring, from the software flow table, a second flow entry that matches the second data packet, and processing, according to the action of the second flow entry Two packets.
  • the hardware flow table of the switch does not support the second service, the data packet of the second service may be processed by searching for a software flow table.
  • the method may further include: the switch determining, in the pre-configured service path, a second target service path that matches the second flow entry, the determined The matching field of the second target service path includes an inbound port matching field and a packet header matching field in the matching field corresponding to the matching field value of the second flow entry, and the action of the second target service path includes the An action corresponding to an action value for processing the second data packet in the action value of the second flow entry.
  • the second data packet corresponds to the second service
  • the hardware flow table of the switch does not support the second service, and therefore, the second target service The path does not have a corresponding hardware flow table, so the corresponding relationship between the second target service path and the hardware flow table cannot be configured. Accordingly, the hardware flow table corresponding to the second target service path cannot be found at this time.
  • the method may further include:
  • the switch configures a service flow entry of the service flow table corresponding to the second target service path according to the second flow entry, where the service flow table is a fine match table, and the service flow table is The match field is the match field of the second target service path, and the first match field value in the service flow entry is configured as a corresponding match field value in the first flow entry, and the service flow is The second matching field value in the entry is configured as a corresponding header field value in the header of the second packet, and The action value in the service flow entry is configured as the action value of the second flow entry, where the match field corresponding to the first match field value belongs to the match field value in the first flow entry a matching field, where the matching field corresponding to the second matching field value does not belong to the matching field corresponding to the matching field value in the second flow entry;
  • the switch searches for a service flow entry matching the subsequent data packet in the service flow table, and then, according to the found service flow entry, when the subsequent data packet of the second service is received.
  • the action processes the subsequent data packet.
  • the traffic flow table is a fine matching table, meaning that each matching field in the service flow entry of the service flow table has a corresponding matching field value instead of a wildcard, then each flow table of the service flow table The number of matching field values included in the item is the same. Therefore, the hash algorithm can be used to look up the table, thereby improving the efficiency of the table lookup.
  • a specific implementation manner may be: after receiving the subsequent data packet, the switch performs S120-2 (the data packet in S120-2 is specifically the subsequent data packet), if not found, in the service A flow table entry matching the subsequent data packet is searched in the flow table. If not, the step S120-3 is performed. If found, the subsequent data packet is processed according to the action value of the found flow entry.
  • the switch receives the data packets of other services, it can also be processed by this specific implementation manner.
  • the switch can directly utilize all received flow tables that match a certain data packet.
  • the item determines the business path that matches it in the pre-configured business path.
  • the message that carries the flow entry (such as the flow mod message) sent by the controller to the switch further includes identification information, where the identification information is used to identify all flow entries corresponding to the same data packet. Specifically, it may be an identifier of a data packet corresponding to the carried flow entry.
  • the switch identifies, according to the identification information, all flow entries corresponding to the same data packet in the flow entry received from the controller, for example, identifying all flow entries corresponding to the data packet A, identify Corresponding to all flow entries of packet B, and determining the matching service path in the pre-configured service path.
  • the controller carries all the flow entries matching the different data packets by using different messages, for example, carrying all the flow entries matching the data packet A through the Flow mod message 1 through the Flow mod message 2 Carry all flow entries that match the number of packets B.
  • the switch obtains all flow entries corresponding to a certain data packet from a certain message, and determines a service path that matches the pre-configured service path.
  • the manner of determining the matching service path by using the received flow entry directly refers to the manner of determining the matched first target service path by using the first flow entry in the foregoing step 130, determining the matched service path, and determining the corresponding hardware flow.
  • For the manner of configuring the hardware flow entry refer to the preceding steps 140-150, and no further details are provided.
  • a second embodiment of the present invention provides a communication device 200.
  • the communication device is connected to a hardware forwarding chip, and communicates with the controller through an OpenFlow OpenFlow protocol, including: an interface unit 201, and a software stream.
  • the interface unit 201 is configured to report, to the controller, a flow table structure, where the flow table structure includes matching fields and actions supported by multiple OpenFlow flow tables, and types of the multiple OpenFlow flow tables, where the multiple The matching field and the action supported by the OpenFlow flow table have an intersection, and the intersection includes a matching field and an action of the first service for implementing the hardware flow table supported by the hardware forwarding chip, where the multiple OpenFlow flow table
  • the type is a wildcard type; and is further configured to report information of the data packet to the controller, and receive a flow entry that is sent by the controller, where the flow entry is the flowmeter according to the flow table.
  • the information and the information of the data packet are generated, the information of the data packet includes information of a first data packet of the first service, and the flow entry includes a flow entry that matches the first data packet. At least one of them.
  • the matching fields of the multiple OpenFlow flow tables may be all supported by the OpenFlow protocol.
  • the actions of the multiple OpenFlow flow tables may be all actions supported by the OpenFlow protocol.
  • the software flow table configuration unit 202 is configured to configure the flow entry into the software flow table.
  • a packet processing unit configured to acquire, from the software flow table, a first flow entry that matches the first data packet, and process the first data packet according to an action value of the first flow entry, and Determining, in the configured service path, a first target service path that matches the first flow entry, the determined matching field of the first target service path includes a matching field corresponding to the matching field value of the first flow entry And an inbound port matching field and a packet header matching field, where the action of the first target service path includes an action corresponding to an action value for processing the first data packet in an action value of the first flow entry; And determining, according to the pre-configured correspondence between the first target service path and the first hardware flow table, the first hardware flow table corresponding to the first target service path, where the first target service path corresponds to the first A hardware flow table supports the services supported by the first target service path.
  • the first data packet processed by the data packet processing unit 203 is generally reported by the hardware forwarding chip to the first data packet processing unit. Specifically, the hardware forwarding chip receives the first data packet. After a data packet, the flow table entry matching the first data packet is first searched in the hardware flow table, and reported to the data packet processing unit 203 of the communication device if not found.
  • the first flow entry may be one or more than two.
  • the determining, by the data processing unit 203, the target service path that matches the first flow entry in the pre-configured service path includes: the data packet processing unit 203 is configured to: when the first flow entry is If the two or more of the first flow entries are aggregated, the merged flow entry is included, where the merged flow entry includes a matching field value that matches the ingress port in the matching field value of the first flow entry.
  • the action value included in the merged flow entry being an action value for processing the first data packet in the action value of the first flow entry; Determining, in the configured service path, a matching field that includes a matching field corresponding to the matching field value of the combined flow entry, and the action includes a service path corresponding to the action value of the action value of the combined flow entry as the first target service a path; and when the first flow entry is one, in the pre-matching Determining, in the set of service paths, a matching field that includes a matching field corresponding to the matching field value of the first flow entry, and the action includes the service path of the action corresponding to the action value of the first flow entry as the first target service path.
  • a hardware flow table configuration unit configured to configure a flow entry of the first hardware flow table according to the first flow entry.
  • intersection may further include a matching field and an action for implementing a second service that is not supported by the hardware flow table of the hardware forwarding chip; the information of the data packet further includes second data of the second service.
  • the packet information, the flow table entry received by the interface unit 201 from the controller further includes at least one of the flow table entries matching the second data packet; correspondingly, the data packet processing unit 203 may also be used to When the second flow entry matching the second data packet is obtained in the software flow table, the second data packet is processed according to the action of the second flow entry.
  • the communication device may further include a service flow table configuration unit 205;
  • the data packet processing unit 203 is further configured to determine, in the pre-configured service path, a second target service path that matches the second flow entry, the determined second
  • the matching field of the target service path includes an inbound port matching field and a packet header matching field in the matching field corresponding to the matching field value of the second flow entry, and the action of the second target service path includes the second flow table An action corresponding to an action value for processing the second data packet in the action value of the item;
  • the service flow table configuration unit 205 is configured to configure, according to the second flow entry, a service flow entry of the service flow table corresponding to the second target service path, where the service flow table is a fine match table, and
  • the matching field of the service flow table is all the matching fields of the second target service path, and the first matching field value in the service flow entry is configured as the corresponding matching field value in the first flow entry, and
  • the second matching field value in the service flow entry is configured as a corresponding header field value in the packet header of the second data packet, and the action value in the service flow entry is configured as the second flow table.
  • An action value of the item where the matching field corresponding to the first matching field value belongs to a matching word in the first flow entry a matching field corresponding to the segment value, where the matching field corresponding to the second matching field value does not belong to the matching field corresponding to the matching field value in the second flow entry;
  • the data packet processing unit 203 is further configured to: when subsequently receiving the subsequent data packet of the second service, look in the service flow table for a service flow entry that matches the subsequent data packet, and according to the search The action of the incoming traffic flow entry processes the subsequent data packet.
  • the communication device may further include a correspondence relationship configuration unit 206, where the correspondence relationship configuration unit 206 is configured to configure a correspondence between each service path and a corresponding hardware flow table, where the services are The path includes the first target service path, and specifically includes: configured to configure multiple physical flow tables, and corresponding relationships between physical flow tables and hardware flow tables, where the multiple physical flow tables respectively include supported matching fields and actions The matching field of each physical flow table is included in a matching field of the corresponding hardware flow table, and the action of writing the hardware flow table in the action of each physical flow table is included in the action of the corresponding hardware flow table; And configured to configure a correspondence between each service path and a physical flow table, where a matching field of each service path is included in a matching field of all corresponding physical flow tables, and actions of each service path are included in corresponding The action of the physical flow table;
  • the data packet processing unit 203 is configured to determine, according to the pre-configured correspondence between the first target service path and the first hardware flow table, a first hardware flow table corresponding to the first target service path, specifically: data: The packet processing unit 203 is configured to determine, according to the correspondence between the first target service path and the corresponding first physical flow table, the first physical flow table, and according to the first physical flow table and the corresponding first Corresponding relationship of the hardware flow table determines the first hardware flow table.
  • the functional unit described in Embodiment 2 of the present invention can be used to implement the method performed by the communication apparatus in Embodiment 1 described above.
  • the multiple OpenFlow flow tables may be used to implement the first service, and therefore, according to the processing logic of the controller, whether or not the flow table is generated for the first service Flow table entries can be successfully generated and sent.
  • the first target service path determined by the communication device includes a matching field value of the data packet of the first service and a matching field and an action corresponding to the action value, so the first target service path supports the first service, and Due to the first The hardware flow table corresponding to the target service path supports the service supported by the first target service path.
  • the hardware flow table corresponding to the first target service path is a hardware flow table that supports the first service, and further, the The communication device may configure a flow entry for implementing the first service in the hardware flow table. Therefore, regardless of the controller that the communication device is connected to, the flow entry for implementing the first service can be successfully configured in the hardware flow table, so that the first service can be successfully processed, thereby reducing service processing failure. probability.
  • a third embodiment of the present invention provides a communication device 300 for implementing a configuration flow entry, including: a processor 301 and a memory 302;
  • a memory 302 configured to store computer operation instructions
  • the processor 301 is configured to execute computer operation instructions stored in the memory 302 to cause the communication device to perform the following operations:
  • the flow table structure includes matching fields and actions supported by multiple OpenFlow flow tables, and types of the multiple OpenFlow flow tables, the multiple OpenFlows
  • the matching field and the action supported by the flow table have an intersection, and the intersection includes a matching field and an action for implementing the first service supported by the hardware flow table of the hardware forwarding chip, and the type of the multiple OpenFlow flow table All are wild type, wherein the communication device is connected to a hardware forwarding chip;
  • the matching field of the path includes an inbound port matching field and a packet header matching field in the matching field corresponding to the matching field value of the first flow entry
  • the action of the first target service path includes an action value of the first flow entry An action corresponding to an action value for processing the first data packet
  • the processor 301 may execute the computer operation instruction, so that the matching field of the multiple OpenFlow flow tables reported by the communication device is all matching fields supported by the OpenFlow protocol, and the reported multiple The actions of the OpenFlow flow table are all actions supported by the OpenFlow protocol.
  • the first flow entry may be one or more than two.
  • the processor 301 may execute the computer operation instruction to specifically enable the communication device to perform the following operations:
  • the first flow entry is aggregated to generate a merged flow entry, where the merged flow entry includes a matching field value that matches the first flow entry. a matching field value corresponding to the inbound port matching field and the packet header matching field, where the action value included in the action value of the first flow entry is used to process the first data packet.
  • the matching field in the pre-configured service path includes a matching field corresponding to the matching field value of the first flow entry, and the action includes the first flow entry.
  • the service path of the action corresponding to the action value is used as the first target service path.
  • the intersection may further include a matching field and an action for implementing a second service that is not supported by the hardware flow table of the hardware forwarding chip;
  • the information of the data packet further includes the second service Information of the second data packet, where the flow entry received from the controller further includes Determining at least one of the flow table entries matched by the second data packet; correspondingly, the processor 301 executing the computer operation instruction further causes the communication device to: obtain the second data from the software flow table The second flow entry matched by the data packet processes the second data packet according to the action of the second flow entry.
  • processor 301 can also execute the computer operation instruction to further cause the communication device to perform the following operations:
  • the determined matching field of the second target service path includes a matching field of the second flow entry An inbound port matching field and a packet header matching field in the matching field corresponding to the value, where the action of the second target service path includes the action value of the second flow entry being used to process the second data packet The action corresponding to the action value;
  • the second flow entry configuring, according to the second flow entry, a service flow entry of the service flow table corresponding to the second target service path, where the service flow table is a fine match table, and a matching field of the service flow table is All the matching fields of the second target service path, the first matching field value in the service flow entry is configured as a corresponding matching field value in the first flow entry, and the first in the service flow entry is The second matching field value is configured as a corresponding header field value in the header of the second data packet, and the action value in the service flow entry is configured as an action value of the second flow entry, where The matching field corresponding to the first matching field value belongs to the matching field corresponding to the matching field value in the first flow entry, and the matching field corresponding to the second matching field value does not belong to the matching field in the second flow entry.
  • the matching field corresponding to the value
  • the processor 301 further executes the computer operation instruction to further cause the communication device to: configure a correspondence between each service path and a corresponding hardware flow table, where each service path includes the first target service path Specifically, including:
  • the processor 301 executes the computer operation instruction, so that the communication device determines the first hardware corresponding to the first target service path according to the pre-configured correspondence between the first target service path and the first hardware flow table.
  • the flow table specifically includes: the processor 301 executing the computer operation instruction, specifically, the communication device determining the first physical flow table according to the correspondence between the first target service path and the corresponding first physical flow table, and Determining, according to the correspondence between the first physical flow table and the corresponding first hardware flow table, the first hardware flow table.
  • the processor 301 described in Embodiment 3 of the present invention executes the computer operation instruction to cause the communication device to implement the method performed by the communication device of Embodiment 1 above.
  • the multiple OpenFlow flow tables may be used to implement the first service, and therefore, according to the processing logic of the controller, whether or not the flow table is generated for the first service Flow table entries can be successfully generated and sent.
  • the first target service path determined by the communication device includes a matching field value of the data packet of the first service and a matching field and an action corresponding to the action value, so the first target service path supports the first service, and
  • the hardware flow table corresponding to the first target service path supports the service supported by the first target service path, and the hardware flow table corresponding to the first target service path is a hardware flow table that supports the first service.
  • the communication device may configure a flow entry for implementing the first service in the hardware flow table. Therefore, regardless of the controller that the communication device is connected to, the flow entry for implementing the first service can be successfully configured in the hardware flow table, so that the first service can be successfully processed, thereby reducing service processing failure. probability.
  • a fourth embodiment of the present invention provides a switch 400, including: a communication device 401 and a hardware forwarding chip 402.
  • the communication device 401 and the hardware forwarding chip 402 are connected, and the communication device 401 and the controller pass OpenFlow OpenFlow.
  • the protocol communication, the communication device 401 is specifically the communication device 200 provided in the second embodiment or the communication device 300 provided in the third embodiment.
  • a fifth embodiment of the present invention provides a communication system 500, including a switch 501 and a controller 502, wherein the switch 501 and the controller 502 communicate through an OpenFlow OpenFlow protocol, and the switch 501 is specifically the switch provided in Embodiment 4. 400.
  • the disclosed systems, devices, and methods may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separate.
  • the components displayed for the unit may or may not be physical units, ie may be located in one place, or may be distributed over multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the functions may be stored in a computer readable storage medium if implemented in the form of a software functional unit and sold or used as a standalone product.
  • the technical solution of the present invention which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, including
  • the instructions are used to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明实施例公开了一种配置流表项的方法、装置和系统。该方法包括:交换机向控制器上报流表结构,所述流表结构包括的多个OpenFlow流表的匹配字段和动作的交集中包括用于实现硬件流表支持的第一业务的匹配字段和动作;接收所述控制器发送的根据所述流表结构生成的流表项,当在所述软件流表中查找到与所述第一业务的第一数据包匹配的第一流表项时,确定与所述第一流表项相匹配的第一目标业务路径,进而确定对应的第一硬件流表,并根据所述第一流表项配置所述第一硬件流表的流表项。通过该方法,无论该交换机对接什么控制器,均可以成功地在硬件流表中配置用于实现该第一业务的流表项,因此可以成功地处理该第一业务,从而降低了业务处理失败的几率。

Description

一种配置流表项的方法、装置和系统 技术领域
本发明涉及通信网络技术领域,尤其涉及一种配置流表项的方法、装置及系统。
背景技术
开放流(OpenFlow)网络实现了数据转发层和控制层分离,包括控制层的控制器(Controller)和转发层的交换机(Switch),其中,控制器通过OpenFlow协议控制交换机,以实现对整个网络的集中控制。具体的,控制器通过OpenFlow协议向交换机发送流表项(flow entry),发送的流表项包括匹配字段(match field)值和动作(action)值,其中,匹配字段值可以为目的MAC地址、以太网类型等,动作值可以为用于指示通过指定端口转发数据包的信息,交换机将接收的流表项添加到硬件流表中,后续在接收到数据包时,在该硬件流表中查找与该数据包匹配的流表项,并根据查找到的流表项的动作值处理该数据包。
在现有技术中,通过如下方法配置硬件流表:
交换机存储OpenFlow流表(如T0表、T1表、T2表)和该交换机的硬件流表(如访问控制列表(Access Control List,ACL)1、ACL2)的一一对应关系,生成流表结构,生成的流表结构包括各OpenFlow流表(flow table)的流表类型、各OpenFlow流表支持的匹配字段和动作,并将生成的流表结构上报给控制器,其中,每个OpenFlow流表支持的匹配字段和动作包括对应的硬件流表的匹配字段和动作。
控制器发送的流表项是根据该控制器自身的处理逻辑和交换机上报的流表结构生成的,该控制器的处理逻辑为:为特定的业务生成特定表的流表项,如,为A业务生成T0表和T1表的流表项,为B业务生成T2表的流表项等。
交换机在收到控制器发送的某个或某些流表的流表项时,根据该对应关 系,将该流表项存储到该OpenFlow流表对应的硬件流表中,如,收到T0表的流表项时,将该流表项存储到ACL1表中,从而实现该硬件流表所支持的业务。
举例来说,实现A业务需要用到匹配字段in_port(入端口)、eth_type(以太网类型)、src_mac(源MAC地址)和dst mac(目的MAC地址)、以及动作output(通过端口转发),ACL1表中包括前三个匹配字段,ACL2表中包括后两个匹配字段和output动作,表明ACL1表和ACL2表支持A业务,该交换机存储了T0表和ACL1表、T1表和ACL2表的对应关系,相应地,生成的T0表的匹配字段也包括前三个匹配字段、生成的T1表包括后两个匹配字段和output动作,则T0表和T1表支持A业务。该控制器的处理逻辑是,为A业务生成T0表和T1表的流表项,于是,向该交换机下发了用于处理A业务的报文的流表项。
通常,不同类型的交换机的硬件转发芯片是不同的,不同的硬件转发芯片用以支持相同业务的硬件流表也是不同的,如,ASIC芯片1中支持A业务的是ACL1和ACL2,ASIC芯片2中支持A业务的是ACL3。而在控制器生成流表项时,如果该交换机基于ASIC芯片1,上报的T0表和T1表包括A业务所需要的匹配字段和动作,则该控制器向该交换机发送T0表和T1表的流表项,如果该交换机基于ASIC芯片2,上报的对应于ACL3的T2表可以满足上述条件,但上报的T0表和T1表无法满足上述条件,则该控制器无法向该交换机发送用于处理A业务的报文的流表项。
显然,如果基于ASIC芯片1的交换机利用T0表和T1表实现A业务,基于ASIC芯片2的交换机利用T2表实现A业务,而控制器的处理逻辑是为A业务生成T0表和T1表的流表项,则该控制器在对接基于ASIC芯片2的交换机时无法生成并发送对应于A业务的流表项,自然该基于ASIC芯片2的交换机也就无法配置处理A业务的流表项,从而导致无法处理A业务。
由于各大厂家生成的控制器的处理逻辑往往是不同的,而各大厂家生产 的交换机所基于的硬件转发芯片也往往是不同的,因此,交换机和控制器对接时往往无法处理某些业务,从而导致业务处理失败的几率较高。
发明内容
本发明实施例提供一种配置流表项的方法、装置和系统,用于解决现有技术中存在的交换机无法在硬件流表中配置用于处理某些业务的流表项而导致业务处理失败的几率较高的问题。
第一方面,提供了一种配置流表项的方法,所述方法包括:
交换机通过开放流OpenFlow协议向控制器上报流表结构,所述流表结构包括多个OpenFlow流表所支持的匹配字段和动作、以及所述多个OpenFlow流表的类型,所述多个OpenFlow流表所支持的匹配字段和动作存在交集,且所述交集中包括用于实现所述交换机的硬件流表支持的第一业务的匹配字段和动作,所述多个OpenFlow流表的类型均为通配类型;
所述交换机接收所述控制器通过OpenFlow协议发送的流表项,并将所述流表项配置到软件流表中,其中,所述流表项是所述控制器根据所述流表结构和所述交换机上报的数据包的信息生成的,所述数据包的信息包括所述第一业务的第一数据包的信息,所述流表项包括与所述第一数据包匹配的流表项中的至少一条;
所述交换机从所述软件流表中获取与所述第一数据包匹配的第一流表项,根据所述第一流表项的动作值处理所述第一数据包,并在预先配置的业务路径中确定与所述第一流表项相匹配的第一目标业务路径,确定的所述第一目标业务路径的匹配字段包括所述第一流表项的匹配字段值所对应的匹配字段中的入端口匹配字段和包头匹配字段,所述第一目标业务路径的动作包括所述第一流表项的动作值中用于对所述第一数据包进行处理的动作值所对应的动作;
所述交换机根据预先配置的所述第一目标业务路径和第一硬件流表的对应关系确定所述第一目标业务路径对应的第一硬件流表,其中,所述第一目 标业务路径对应的第一硬件流表支持所述第一目标业务路径所支持的业务;
所述交换机根据所述第一流表项配置所述第一硬件流表的流表项。
在第一方面的第一种可能的实现方式中,所述交换机上报的所述多个OpenFlow流表的匹配字段是OpenFlow协议支持的所有匹配字段,所述交换机上报的所述多个OpenFlow流表的动作是OpenFlow协议支持的所有动作。
结合第一方面或第一方面的第一种可能的实现方式,在第二种可能的实现方式中,所述在预先配置的业务路径中确定与所述第一流表项相匹配的第一目标业务路径具体包括:
当所述第一流表项为两条以上时,对所述第一流表项进行聚合生成合并流表项,其中,所述合并流表项包括的匹配字段值为所述第一流表项的匹配字段值中对应于入端口匹配字段和包头匹配字段的匹配字段值,所述合并流表项包括的动作值为所述第一流表项的动作值中用于对所述第一数据包进行处理的动作值;在所述预先配置的业务路径中确定一个匹配字段包括所述合并流表项的匹配字段值对应的匹配字段、且动作包括所述合并流表项的动作值对应的动作的业务路径作为所述第一目标业务路径;
当所述第一流表项为1条时,在所述预先配置的业务路径中确定一个匹配字段包括所述第一流表项的匹配字段值对应的匹配字段、且动作包括所述第一流表项的动作值对应的动作的业务路径作为所述第一目标业务路径。
结合第一方面或第一方面的第一种或第二种可能的实现方式,在第三种可能的实现方式中,所述交集中还包括用于实现所述交换机的硬件流表不支持的第二业务的匹配字段和动作;所述数据包的信息还包括所述第二业务的第二数据包的信息,所述交换机接收自所述控制器的流表项还包括与所述第二数据包匹配的流表项中的至少一条;
所述方法还包括:所述交换机从所述软件流表中获取与所述第二数据包匹配的第二流表项,根据所述第二流表项的动作处理所述第二数据包。
结合第一方面的第三种可能的实现方式,在第四种可能的实现方式中, 所述方法还包括:
所述交换机在所述预先配置的业务路径中确定与所述第二流表项相匹配的第二目标业务路径,确定的所述第二目标业务路径的匹配字段包括所述第二流表项的匹配字段值所对应的匹配字段中的入端口匹配字段和包头匹配字段,所述第二目标业务路径的动作包括所述第二流表项的动作值中用于对所述第二数据包进行处理的动作值所对应的动作;
所述交换机根据所述第二流表项配置所述第二目标业务路径对应的业务流表的业务流表项,其中,所述业务流表为精配表,且所述业务流表的匹配字段为所述第二目标业务路径的所有匹配字段,将所述业务流表项中的第一匹配字段值配置为所述第一流表项中的相应匹配字段值,将所述业务流表项中的第二匹配字段值配置为所述第二数据包的包头中的相应头域值,并将所述业务流表项中的动作值配置为所述第二流表项的动作值,其中,所述第一匹配字段值对应的匹配字段属于所述第一流表项中的匹配字段值对应的匹配字段,所述第二匹配字段值对应的匹配字段不属于所述第二流表项中的匹配字段值对应的匹配字段;
所述交换机在后续接收到所述第二业务的后续数据包时在所述业务流表中查找与所述后续数据包匹配的业务流表项,并根据查找到的业务流表项的动作处理所述后续数据包。
结合第一方面、第一方面的第一种至第四种任一可能的实现方式,在第五种可能的实现方式中,所述根据预先配置的所述第一目标业务路径和第一硬件流表的对应关系确定所述第一目标业务路径对应的第一硬件流表之前还包括:配置各业务路径和对应的硬件流表的对应关系,所述各业务路径包括所述第一目标业务路径,具体包括:
配置多个物理流表、以及各物理流表与硬件流表的对应关系,所述多个物理流表分别包括支持的匹配字段和动作,其中,每个物理流表的匹配字段包括在对应的硬件流表的匹配字段中,每个物理流表的动作中需写入硬件流 表的动作包括在对应的硬件流表的动作中;
配置所述各业务路径与物理流表的对应关系,其中,每个业务路径的匹配字段包括在对应的所有物理流表的匹配字段中,且每个业务路径的动作包括在对应的所有物理流表的动作中;
所述交换机根据预先配置的所述第一目标业务路径和第一硬件流表的对应关系确定所述第一目标业务路径对应的第一硬件流表,具体包括:
所述交换机根据所述第一目标业务路径和对应的第一物理流表的对应关系确定所述第一物理流表,并根据所述第一物理流表和对应的所述第一硬件流表的对应关系确定所述第一硬件流表。
第二方面,提供了一种配置流表项的方法,所述方法包括:
通信装置通过开放流OpenFlow协议向控制器上报流表结构,所述流表结构包括多个OpenFlow流表所支持的匹配字段和动作、以及所述多个OpenFlow流表的类型,所述多个OpenFlow流表所支持的匹配字段和动作存在交集,且所述交集中包括用于实现硬件转发芯片的硬件流表支持的第一业务的匹配字段和动作,所述多个OpenFlow流表的类型均为通配类型,其中,所述通信装置与所述硬件转发芯片相连接;
所述通信装置接收所述控制器通过OpenFlow协议发送的流表项,并将所述流表项配置到软件流表中,其中,所述流表项是所述控制器根据所述流表结构和所述通信装置上报的数据包的信息生成的,所述数据包的信息包括所述第一业务的第一数据包的信息,所述流表项包括与所述第一数据包匹配的流表项中的至少一条;
所述通信装置从所述软件流表中获取与所述第一数据包匹配的第一流表项,根据所述第一流表项的动作值处理所述第一数据包,并在预先配置的业务路径中确定与所述第一流表项相匹配的第一目标业务路径,确定的所述第一目标业务路径的匹配字段包括所述第一流表项的匹配字段值所对应的匹配字 段中的入端口匹配字段和包头匹配字段,所述第一目标业务路径的动作包括所述第一流表项的动作值中用于对所述第一数据包进行处理的动作值所对应的动作;
所述通信装置根据预先配置的所述第一目标业务路径和所述硬件转发芯片中的第一硬件流表的对应关系确定所述第一目标业务路径对应的第一硬件流表,其中,所述第一目标业务路径对应的第一硬件流表支持所述第一目标业务路径所支持的业务;
所述通信装置根据所述第一流表项配置所述第一硬件流表的流表项。
在第二方面的第一种可能的实现方式中,所述通信装置上报的所述多个OpenFlow流表的匹配字段是OpenFlow协议支持的所有匹配字段,所述通信装置上报的所述多个OpenFlow流表的动作是OpenFlow协议支持的所有动作。
结合第二方面或第二方面的第一种可能的实现方式,在第二种可能的实现方式中,所述在预先配置的业务路径中确定与所述第一流表项相匹配的第一目标业务路径具体包括:
当所述第一流表项为两条以上时,对所述第一流表项进行聚合生成合并流表项,其中,所述合并流表项包括的匹配字段值为所述第一流表项的匹配字段值中对应于入端口匹配字段和包头匹配字段的匹配字段值,所述合并流表项包括的动作值为所述第一流表项的动作值中用于对所述第一数据包进行处理的动作值;在所述预先配置的业务路径中确定一个匹配字段包括所述合并流表项的匹配字段值对应的匹配字段、且动作包括所述合并流表项的动作值对应的动作的业务路径作为所述第一目标业务路径;
当所述第一流表项为1条时,在所述预先配置的业务路径中确定一个匹配字段包括所述第一流表项的匹配字段值对应的匹配字段、且动作包括所述第一流表项的动作值对应的动作的业务路径作为所述第一目标业务路径。
结合第二方面或第二方面的第一种或第二种可能的实现方式,在第三种可能的实现方式中,所述交集中还包括用于实现所述硬件转发芯片的硬件流 表不支持的第二业务的匹配字段和动作;所述数据包的信息还包括所述第二业务的第二数据包的信息,所述通信装置接收自所述控制器的流表项还包括与所述第二数据包匹配的流表项中的至少一条;
所述方法还包括:所述通信装置从所述软件流表中获取与所述第二数据包匹配的第二流表项,根据所述第二流表项的动作处理所述第二数据包。
结合第二方面的第三种可能的实现方式,在第四种可能的实现方式中,所述方法还包括:
所述通信装置在所述预先配置的业务路径中确定与所述第二流表项相匹配的第二目标业务路径,确定的所述第二目标业务路径的匹配字段包括所述第二流表项的匹配字段值所对应的匹配字段中的入端口匹配字段和包头匹配字段,所述第二目标业务路径的动作包括所述第二流表项的动作值中用于对所述第二数据包进行处理的动作值所对应的动作;
所述通信装置根据所述第二流表项配置所述第二目标业务路径对应的业务流表的业务流表项,其中,所述业务流表为精配表,且所述业务流表的匹配字段为所述第二目标业务路径的所有匹配字段,将所述业务流表项中的第一匹配字段值配置为所述第一流表项中的相应匹配字段值,将所述业务流表项中的第二匹配字段值配置为所述第二数据包的包头中的相应头域值,并将所述业务流表项中的动作值配置为所述第二流表项的动作值,其中,所述第一匹配字段值对应的匹配字段属于所述第一流表项中的匹配字段值对应的匹配字段,所述第二匹配字段值对应的匹配字段不属于所述第二流表项中的匹配字段值对应的匹配字段;
所述通信装置在后续接收到所述第二业务的后续数据包时在所述业务流表中查找与所述后续数据包匹配的业务流表项,并根据查找到的业务流表项的动作处理所述后续数据包。
结合第二方面、第二方面的第一种至第四种任一可能的实现方式,在第五种可能的实现方式中,所述根据预先配置的所述第一目标业务路径和第一 硬件流表的对应关系确定所述第一目标业务路径对应的第一硬件流表之前还包括:配置各业务路径和对应的硬件流表的对应关系,所述各业务路径包括所述第一目标业务路径,具体包括:
配置多个物理流表、以及各物理流表与硬件流表的对应关系,所述多个物理流表分别包括支持的匹配字段和动作,其中,每个物理流表的匹配字段包括在对应的硬件流表的匹配字段中,每个物理流表的动作中需写入硬件流表的动作包括在对应的硬件流表的动作中;
配置所述各业务路径与物理流表的对应关系,其中,每个业务路径的匹配字段包括在对应的所有物理流表的匹配字段中,且每个业务路径的动作包括在对应的所有物理流表的动作中;
所述通信装置根据预先配置的所述第一目标业务路径和第一硬件流表的对应关系确定所述第一目标业务路径对应的第一硬件流表,具体包括:
所述通信装置根据所述第一目标业务路径和对应的第一物理流表的对应关系确定所述第一物理流表,并根据所述第一物理流表和对应的所述第一硬件流表的对应关系确定所述第一硬件流表。
第三方面,提供了一种用于实现配置流表项的通信装置,所述通信装置与硬件转发芯片相连接,与控制器之间通过开放流OpenFlow协议通信,包括:接口单元、软件流表配置单元、数据包处理单元和硬件流表配置单元;
所述接口单元,用于向所述控制器上报流表结构,所述流表结构包括多个OpenFlow流表所支持的匹配字段和动作、以及所述多个OpenFlow流表的类型,所述多个OpenFlow流表所支持的匹配字段和动作存在交集,且所述交集中包括用于实现所述硬件转发芯片的硬件流表支持的第一业务的匹配字段和动作,所述多个OpenFlow流表的类型均为通配类型;还用于向所述控制器上报数据包的信息,并接收所述控制器发送的流表项,其中,所述流表项是所述控制器根据所述流表结构和所述数据包的信息生成的,所述数据包的信 息包括所述第一业务的第一数据包的信息,所述流表项包括与所述第一数据包匹配的流表项中的至少一条;
所述软件流表配置单元,用于将所述接口单元接收的所述流表项配置到软件流表中;
数据包处理单元,用于从所述软件流表中获取与所述第一数据包匹配的第一流表项,根据所述第一流表项的动作值处理所述第一数据包,并在预先配置的业务路径中确定与所述第一流表项相匹配的第一目标业务路径,确定的所述第一目标业务路径的匹配字段包括所述第一流表项的匹配字段值所对应的匹配字段中的入端口匹配字段和包头匹配字段,所述第一目标业务路径的动作包括所述第一流表项的动作值中用于对所述第一数据包进行处理的动作值所对应的动作;并用于根据预先配置的所述第一目标业务路径和所述硬件转发芯片的第一硬件流表的对应关系确定所述第一目标业务路径对应的第一硬件流表,其中,所述第一目标业务路径对应的第一硬件流表支持所述第一目标业务路径所支持的业务;
硬件流表配置单元,用于根据所述第一流表项配置所述第一硬件流表的流表项。
在第三方面的第一种可能的实现方式中,所述接口单元上报的所述多个OpenFlow流表的匹配字段是OpenFlow协议支持的所有匹配字段,所述接口单元上报的所述多个OpenFlow流表的动作是OpenFlow协议支持的所有动作。
结合第三方面或第三方面的第一种可能的实现方式,在第二种可能的实现方式中,所述数据包处理单元用于在预先配置的业务路径中确定与所述第一流表项相匹配的目标业务路径具体包括:
所述数据包处理单元,用于当所述第一流表项为两条以上时,对所述第一流表项进行聚合生成合并流表项,其中,所述合并流表项包括的匹配字段值为所述第一流表项的匹配字段值中对应于入端口匹配字段和包头匹配字段的匹配字段值,所述合并流表项包括的动作值为所述第一流表项的动作值中 用于对所述第一数据包进行处理的动作值;在所述预先配置的业务路径中确定一个匹配字段包括所述合并流表项的匹配字段值对应的匹配字段、且动作包括所述合并流表项的动作值对应的动作的业务路径作为所述第一目标业务路径;并用于当所述第一流表项为1条时,在所述预先配置的业务路径中确定一个匹配字段包括所述第一流表项的匹配字段值对应的匹配字段、且动作包括所述第一流表项的动作值对应的动作的业务路径作为所述第一目标业务路径。
结合第三方面或第三方面的第一种或第二种可能的实现方式,在第三种可能的实现方式中,所述交集中还包括用于实现所述硬件转发芯片的硬件流表不支持的第二业务的匹配字段和动作;所述数据包的信息还包括所述第二业务的第二数据包的信息,所述接口单元接收自所述控制器的流表项还包括与所述第二数据包匹配的流表项中的至少一条;
所述数据包处理单元,还用于从所述软件流表中获取与所述第二数据包匹配的第二流表项时,根据所述第二流表项的动作处理所述第二数据包。
结合第三方面的第三种可能的实现方式,在第四种可能的实现方式中,所述通信装置还包括业务流表配置单元;
所述数据包处理单元,还用于在所述预先配置的业务路径中确定与所述第二流表项相匹配的第二目标业务路径,确定的所述第二目标业务路径的匹配字段包括所述第二流表项的匹配字段值所对应的匹配字段中的入端口匹配字段和包头匹配字段,所述第二目标业务路径的动作包括所述第二流表项的动作值中用于对所述第二数据包进行处理的动作值所对应的动作;
所述业务流表配置单元,用于根据所述第二流表项配置所述第二目标业务路径对应的业务流表的业务流表项,其中,所述业务流表为精配表,且所述业务流表的匹配字段为所述第二目标业务路径的所有匹配字段,将所述业务流表项中的第一匹配字段值配置为所述第一流表项中的相应匹配字段值,将所述业务流表项中的第二匹配字段值配置为所述第二数据包的包头中的相 应头域值,并将所述业务流表项中的动作值配置为所述第二流表项的动作值,其中,所述第一匹配字段值对应的匹配字段属于所述第一流表项中的匹配字段值对应的匹配字段,所述第二匹配字段值对应的匹配字段不属于所述第二流表项中的匹配字段值对应的匹配字段;
所述数据包处理单元,还用于在后续接收到所述第二业务的后续数据包时在所述业务流表中查找与所述后续数据包匹配的业务流表项,并根据查找到的业务流表项的动作处理所述后续数据包。
结合第三方面、第三方面的第一种至第四种任一可能的实现方式,在第五种可能的实现方式中,所述通信装置还包括对应关系配置单元;
所述对应关系配置单元,用于配置各业务路径和对应的硬件流表的对应关系,所述各业务路径包括所述第一目标业务路径,具体包括:用于配置多个物理流表、以及各物理流表与硬件流表的对应关系,所述多个物理流表分别包括支持的匹配字段和动作,其中,每个物理流表的匹配字段包括在对应的硬件流表的匹配字段中,每个物理流表的动作中需写入硬件流表的动作包括在对应的硬件流表的动作中;并用于配置所述各业务路径与物理流表的对应关系,其中,每个业务路径的匹配字段包括在对应的所有物理流表的匹配字段中,且每个业务路径的动作包括在对应的所有物理流表的动作中;
所述数据包处理单元用于根据预先配置的所述第一目标业务路径和第一硬件流表的对应关系确定所述第一目标业务路径对应的第一硬件流表,具体包括:所述数据包处理单元用于根据所述第一目标业务路径和对应的第一物理流表的对应关系确定所述第一物理流表,并根据所述第一物理流表和对应的所述第一硬件流表的对应关系确定所述第一硬件流表。
第四方面,提供了用于实现配置流表项的通信装置,包括:处理器和存储器;
所述存储器,用于存放计算机操作指令;
所述处理器,用于执行所述存储器中存放的计算机操作指令使得所述通信装置实现如下操作:
通过开放流OpenFlow协议向所述控制器上报流表结构,所述流表结构包括多个OpenFlow流表所支持的匹配字段和动作、以及所述多个OpenFlow流表的类型,所述多个OpenFlow流表所支持的匹配字段和动作存在交集,且所述交集中包括用于实现硬件转发芯片的硬件流表支持的第一业务的匹配字段和动作,所述多个OpenFlow流表的类型均为通配类型,其中,所述通信装置与硬件转发芯片相连接;
接收所述控制器通过OpenFlow协议发送的根据所述流表结构生成的流表项,并将所述流表项配置到软件流表中,其中,所述流表项是所述控制器根据所述流表结构和所述通信装置上报的数据包的信息生成的,所述数据包的信息包括所述第一业务的第一数据包的信息,所述流表项包括与所述第一数据包匹配的流表项中的至少一条;
从所述软件流表中获取与所述第一数据包匹配的第一流表项,根据所述第一流表项的动作值处理所述第一数据包,并在预先配置的业务路径中确定与所述第一流表项相匹配的第一目标业务路径,确定的所述第一目标业务路径的匹配字段包括所述第一流表项的匹配字段值所对应的匹配字段中的入端口匹配字段和包头匹配字段,所述第一目标业务路径的动作包括所述第一流表项的动作值中用于对所述第一数据包进行处理的动作值所对应的动作;
根据预先配置的所述第一目标业务路径和所述硬件转发芯片中的第一硬件流表的对应关系确定所述第一目标业务路径对应的第一硬件流表,其中,所述第一目标业务路径对应的第一硬件流表支持所述第一目标业务路径所支持的业务;
根据所述第一流表项配置所述第一硬件流表的流表项。
在第四方面的第一种可能的实现方式中,所述处理器执行所述计算机操作指令具体使得所述通信装置上报的所述多个OpenFlow流表的匹配字段是 OpenFlow协议支持的所有匹配字段,上报的所述多个OpenFlow流表的动作是OpenFlow协议支持的所有动作。
结合第四方面或第四方面的第一种可能的实现方式,在第二种可能的实现方式中,所述处理器执行所述计算机操作指令具体使得所述通信装置实现如下操作:
当所述第一流表项为两条以上时,对所述第一流表项进行聚合生成合并流表项,其中,所述合并流表项包括的匹配字段值为所述第一流表项的匹配字段值中对应于入端口匹配字段和包头匹配字段的匹配字段值,所述合并流表项包括的动作值为所述第一流表项的动作值中用于对所述第一数据包进行处理的动作值;在所述预先配置的业务路径中确定一个匹配字段包括所述合并流表项的匹配字段值对应的匹配字段、且动作包括所述合并流表项的动作值对应的动作的业务路径作为所述第一目标业务路径;
当所述第一流表项为1条时,在所述预先配置的业务路径中确定一个匹配字段包括所述第一流表项的匹配字段值对应的匹配字段、且动作包括所述第一流表项的动作值对应的动作的业务路径作为所述第一目标业务路径。
结合第四方面或第四方面的第一种或第二种可能的实现方式,在第三种可能的实现方式中,所述交集中还包括用于实现所述硬件转发芯片的硬件流表不支持的第二业务的匹配字段和动作;所述数据包的信息还包括所述第二业务的第二数据包的信息,所述接收自所述控制器的流表项还包括与所述第二数据包匹配的流表项中的至少一条;
所述处理器执行所述计算机操作指令进一步使得所述通信装置实现如下操作:从所述软件流表中获取与所述第二数据包匹配的第二流表项,根据所述第二流表项的动作处理所述第二数据包。
结合第四方面的第三种可能的实现方式,在第四种可能的实现方式中,所述处理器执行所述计算机操作指令进一步使得所述通信装置实现如下操作:
在所述预先配置的业务路径中确定与所述第二流表项相匹配的第二目标业务路径,确定的所述第二目标业务路径的匹配字段包括所述第二流表项的匹配字段值所对应的匹配字段中的入端口匹配字段和包头匹配字段,所述第二目标业务路径的动作包括所述第二流表项的动作值中用于对所述第二数据包进行处理的动作值所对应的动作;
根据所述第二流表项配置所述第二目标业务路径对应的业务流表的业务流表项,其中,所述业务流表为精配表,且所述业务流表的匹配字段为所述第二目标业务路径的所有匹配字段,将所述业务流表项中的第一匹配字段值配置为所述第一流表项中的相应匹配字段值,将所述业务流表项中的第二匹配字段值配置为所述第二数据包的包头中的相应头域值,并将所述业务流表项中的动作值配置为所述第二流表项的动作值,其中,所述第一匹配字段值对应的匹配字段属于所述第一流表项中的匹配字段值对应的匹配字段,所述第二匹配字段值对应的匹配字段不属于所述第二流表项中的匹配字段值对应的匹配字段;
在后续接收到所述第二业务的后续数据包时在所述业务流表中查找与所述后续数据包匹配的业务流表项,并根据查找到的业务流表项的动作处理所述后续数据包。
结合第四方面、第四方面的第一种至第四种任一可能的实现方式,在第五种可能的实现方式中,所述处理器执行所述计算机操作指令进一步使得所述通信装置实现如下操作:配置各业务路径和对应的硬件流表的对应关系,所述各业务路径包括所述第一目标业务路径,具体包括:
配置多个物理流表、以及各物理流表与硬件流表的对应关系,所述多个物理流表分别包括支持的匹配字段和动作,其中,每个物理流表的匹配字段包括在对应的硬件流表的匹配字段中,每个物理流表的动作中需写入硬件流表的动作包括在对应的硬件流表的动作中;
配置所述各业务路径与物理流表的对应关系,其中,每个业务路径的匹 配字段包括在对应的所有物理流表的匹配字段中,且每个业务路径的动作包括在对应的所有物理流表的动作中;
所述处理器执行所述计算机操作指令使得所述通信装置根据预先配置的所述第一目标业务路径和第一硬件流表的对应关系确定所述第一目标业务路径对应的第一硬件流表,具体包括:
所述处理器执行所述计算机操作指令具体使得所述通信装置根据所述第一目标业务路径和对应的第一物理流表的对应关系确定所述第一物理流表,并根据所述第一物理流表和对应的所述第一硬件流表的对应关系确定所述第一硬件流表。
第五方面,提供了一种配置流表项的方法,包括:
交换机向控制器上报第一业务的数据包的信息;
所述交换机接收所述控制器根据所述第一业务的数据包的信息和流表结构下发的第一业务流表项,所述流表结构包括多个流表所支持的匹配字段和动作,所述多个流表中的每一个所支持的匹配字段包括所述第一业务的匹配字段、所支持的动作包括所述第一业务的动作;
所述交换机在预先配置的业务路径中确定与所述第一业务流表项相匹配的第一目标业务路径,所述第一目标业务路径的匹配字段包括所述第一业务的匹配字段,所述目标业务路径的动作包括所述第一业务的动作;
所述交换机根据预先配置的所述业务路径和所述交换机的硬件流表的对应关系确定目标硬件流表,其中,所述目标硬件流表支持所述第一目标业务路径所支持的业务;
所述交换机根据所述第一业务流表项配置所述目标硬件流表的流表项。
在第五方面的第一种可能的实现方式中,所述交换机和所述控制器之间通过开放流OpenFlow协议通信,所述多个流表为Openflow流表。
结合第五方面的第一种可能的实现方式,在第二种可能的实现方式中,所述多个流表的匹配字段是OpenFlow协议支持的所有匹配字段,所述多个流 表的动作是OpenFlow协议支持的所有动作。
结合第五方面或第五方面的第一种或第二种可能的实现方式,在第三种可能的实现方式中,所述交换机在预先配置的业务路径中确定与所述第一业务流表项相匹配的第一目标业务路径具体包括:
所述交换机将所述第一业务流表项配置到软件流表中;
所述交换机从所述软件流表中获取与所述第一业务的数据包匹配的第一目标流表项,并在所述预先配置的业务路径中确定与所述第一目标流表项相匹配的所述第一目标业务路径,确定的所述第一目标业务路径的匹配字段包括所述第一目标流表项的匹配字段值所对应的匹配字段中的入端口匹配字段和包头匹配字段,确定的所述第一目标业务路径的动作包括所述第一目标流表项的动作值中用于对所述第一业务的数据包进行处理的动作;
所述交换机根据所述第一业务流表项配置所述目标硬件流表的流表项具体包括,所述交换机根据所述第一目标流表项配置所述目标硬件流表的流表项。
结合第五方面的第三种可能的实现方式,在第四种可能的实现方式中,所述在预先配置的业务路径中确定与所述第一目标流表项相匹配的第一目标业务路径具体包括:
当所述第一目标流表项为两条以上时,对所述第一目标流表项进行聚合生成合并流表项,其中,所述合并流表项的匹配字段值为所述第一目标流表项中对应于入端口匹配字段和包头匹配字段的匹配字段值,所述合并流表项的动作值为所述第一目标流表项中用于对所述第一业务的数据包进行处理的动作值;在所述预先配置的业务路径中确定一个包括所述合并流表项的匹配字段值对应的匹配字段、且包括所述合并流表项的动作值对应的动作的业务路径作为所述第一目标业务路径;
当所述第一目标流表项为1条时,在所述预先配置的业务路径中确定一个包括所述第一目标流表项的匹配字段值对应的匹配字段、且包括所述第一 目标流表项的动作值对应的动作的业务路径作为所述第一目标业务路径。
结合第五方面、第五方面的第一种至第四种任一可能的实现方式,在第五种可能的实现方式中,所述多个流表中的每一个所支持的匹配字段和动作还包括第二业务的匹配字段和动作,所述第二业务是所述交换机的硬件流表不支持的业务;
所述方法还包括:
所述交换机向所述控制器上报所述第二业务的数据包的信息;
所述交换机接收所述控制器根据所述第二业务的数据包的信息和所述流表结构下发的第二业务流表项,并将所述第二业务流表项配置到软件流表中。
结合第五方面的第五种可能的实现方式,在第六种可能的实现方式中,所述将所述第二业务流表项配置到软件流表中之后还包括:
所述交换机从所述软件流表中获取与所述第二业务的数据包匹配的第二目标流表项;
所述交换机在所述预先配置的业务路径中确定与所述第二目标流表项相匹配的第二目标业务路径,确定的所述第二目标业务路径的匹配字段包括所述第二目标流表项的匹配字段值所对应的匹配字段中的入端口匹配字段和包头匹配字段,确定的所述第二目标业务路径的动作包括所述第二目标流表项的动作值中用于对所述第二业务的数据包进行处理的动作;
所述交换机根据所述第二目标流表项配置所述第二目标业务路径对应的业务流表的业务流表项,其中,所述业务流表为精配表,且所述业务流表的匹配字段为所述第二目标业务路径的所有匹配字段,将所述业务流表项中的第一匹配字段值配置为所述第二目标流表项中的匹配字段值,将所述业务流表项中的第二匹配字段值配置为所述第二业务的数据包的包头中的头域值,并将所述业务流表项中的动作值配置为所述第二目标流表项的动作值,其中,所述第一匹配字段值对应的匹配字段属于所述第二流表项中的匹配字段值对应的匹配字段,所述第二匹配字段值对应的匹配字段不属于所述第二流表项 中的匹配字段值对应的匹配字段;
所述交换机在后续接收到所述第二业务的后续数据包时在所述业务流表中查找与所述后续数据包匹配的业务流表项,并根据查找到的业务流表项的动作处理所述后续数据包。
结合第五方面、第五方面的第一种至第六种任一可能的实现方式,在第七种可能的实现方式中,所述根据预先配置的所述业务路径和所述硬件流表的对应关系确定目标硬件流表之前还包括:配置各业务路径和对应的硬件流表的对应关系,具体包括:
配置多个物理流表、以及各物理流表与硬件流表的对应关系,所述多个物理流表分别包括支持的匹配字段和动作,其中,每个物理流表的匹配字段包括在对应的硬件流表的匹配字段中,每个物理流表的动作中需写入硬件流表的动作包括在对应的硬件流表的动作中;
配置所述各业务路径与物理流表的对应关系,其中,每个业务路径的匹配字段包括在对应的所有物理流表的匹配字段中,且每个业务路径的动作包括在对应的所有物理流表的动作中;
所述交换机根据预先配置的所述业务路径和所述硬件流表的对应关系确定目标硬件流表,具体包括:
所述交换机根据所述第一目标业务路径和对应的第一物理流表的对应关系确定所述第一物理流表,并根据所述第一物理流表和对应的所述目标硬件流表的对应关系确定所述目标硬件流表。
结合第五方面、第五方面的第一种至第七种任一可能的实现方式,在第八种可能的实现方式中,所述交换机向控制器上报第一业务的数据包的信息之前还包括,所述交换机向所述控制器上报所述流表结构。
结合第五方面、第五方面的第一种至第八种任一可能的实现方式,在第九种可能的实现方式中,所述流表结构还包括所述多个流表的类型,所述多个流表的类型为通配类型。
第六方面,提供了一种配置流表项的方法,包括:
通信装置向控制器上报第一业务的数据包的信息;
所述通信装置接收所述控制器根据所述第一业务的数据包的信息和流表结构下发的第一业务流表项,所述流表结构包括多个流表所支持的匹配字段和动作,所述多个流表中的每一个所支持的匹配字段包括所述第一业务的匹配字段、所支持的动作包括所述第一业务的动作;
所述通信装置在预先配置的业务路径中确定与所述第一业务流表项相匹配的第一目标业务路径,所述第一目标业务路径的匹配字段包括所述第一业务的匹配字段,所述目标业务路径的动作包括所述第一业务的动作;
所述通信装置根据预先配置的所述业务路径和与所述通信装置相连接的硬件转发芯片的硬件流表的对应关系确定目标硬件流表,其中,所述目标硬件流表支持所述第一目标业务路径所支持的业务;
所述通信装置根据所述第一业务流表项配置所述目标硬件流表的流表项。
在第六方面的第一种可能的实现方式中,所述通信装置和所述控制器之间通过开放流OpenFlow协议通信,所述流表为Openflow流表;所述多个流表的匹配字段是OpenFlow协议支持的所有匹配字段,所述多个流表的动作是OpenFlow协议支持的所有动作。
结合第六方面或第六方面的第一种可能的实现方式,在第二种可能的实现方式中,所述通信装置在预先配置的业务路径中确定与所述第一业务流表项相匹配的第一目标业务路径具体包括:
所述通信装置将所述第一业务流表项配置到软件流表中;
所述通信装置从所述软件流表中获取与所述第一业务的数据包匹配的第一目标流表项,并在所述预先配置的业务路径中确定与所述第一目标流表项相匹配的所述第一目标业务路径,确定的所述第一目标业务路径的匹配字段 包括所述第一目标流表项的匹配字段值所对应的匹配字段中的入端口匹配字段和包头匹配字段,确定的所述第一目标业务路径的动作包括所述第一目标流表项的动作值中用于对所述第一业务的数据包进行处理的动作;
所述通信装置根据所述第一业务流表项配置所述目标硬件流表的流表项具体包括,所述通信装置根据所述第一目标流表项配置所述目标硬件流表的流表项。
结合第六方面的第二种可能的实现方式,在第三种可能的实现方式中,所述在预先配置的业务路径中确定与所述第一目标流表项相匹配的第一目标业务路径具体包括:
当所述第一目标流表项为两条以上时,对所述第一目标流表项进行聚合生成合并流表项,其中,所述合并流表项的匹配字段值为所述第一目标流表项中对应于入端口匹配字段和包头匹配字段的匹配字段值,所述合并流表项的动作值为所述第一目标流表项中用于对所述第一业务的数据包进行处理的动作值;在所述预先配置的业务路径中确定一个包括所述合并流表项的匹配字段值对应的匹配字段、且包括所述合并流表项的动作值对应的动作的业务路径作为所述第一目标业务路径;
当所述第一目标流表项为1条时,在所述预先配置的业务路径中确定一个包括所述第一目标流表项的匹配字段值对应的匹配字段、且包括所述第一目标流表项的动作值对应的动作的业务路径作为所述第一目标业务路径。
结合第六方面、第六方面的第一种至第三种任一可能的实现方式,在第四种可能的实现方式中,所述多个流表中的每一个所支持的匹配字段和动作还包括第二业务的匹配字段和动作,所述第二业务是所述交换机的硬件流表不支持的业务;
所述方法还包括:
所述通信装置向所述控制器上报所述第二业务的数据包的信息;
所述通信装置接收所述控制器根据所述第二业务的数据包的信息和所述 流表结构下发的第二业务流表项,并将所述第二业务流表项配置到软件流表中。
结合第六方面的第四种可能的实现方式,在第五种可能的实现方式中,所述将所述第二业务流表项配置到软件流表中之后还包括:
所述通信装置从所述软件流表中获取与所述第二业务的数据包匹配的第二目标流表项;
所述通信装置在所述预先配置的业务路径中确定与所述第二目标流表项相匹配的第二目标业务路径,确定的所述第二目标业务路径的匹配字段包括所述第二目标流表项的匹配字段值所对应的匹配字段中的入端口匹配字段和包头匹配字段,确定的所述第二目标业务路径的动作包括所述第二目标流表项的动作值中用于对所述第二业务的数据包进行处理的动作;
所述通信装置根据所述第二目标流表项配置所述第二目标业务路径对应的业务流表的业务流表项,其中,所述业务流表为精配表,且所述业务流表的匹配字段为所述第二目标业务路径的所有匹配字段,将所述业务流表项中的第一匹配字段值配置为所述第二目标流表项中的匹配字段值,将所述业务流表项中的第二匹配字段值配置为所述第二业务的数据包的包头中的头域值,并将所述业务流表项中的动作值配置为所述第二目标流表项的动作值,其中,所述第一匹配字段值对应的匹配字段属于所述第二目标流表项中的匹配字段值对应的匹配字段,所述第二匹配字段值对应的匹配字段不属于所述第二流表项中的匹配字段值对应的匹配字段;
所述通信装置在后续接收到所述第二业务的后续数据包时在所述业务流表中查找与所述后续数据包匹配的业务流表项,并根据查找到的业务流表项的动作处理所述后续数据包。
结合第六方面、第六方面的第一种至第五种任一可能的实现方式,在第六种可能的实现方式中,所述根据预先配置的所述业务路径和所述硬件流表的对应关系确定目标硬件流表之前还包括:配置各业务路径和对应的硬件流 表的对应关系,具体包括:
配置多个物理流表、以及各物理流表与硬件流表的对应关系,所述多个物理流表分别包括支持的匹配字段和动作,其中,每个物理流表的匹配字段包括在对应的硬件流表的匹配字段中,每个物理流表的动作中需写入硬件流表的动作包括在对应的硬件流表的动作中;
配置所述各业务路径与物理流表的对应关系,其中,每个业务路径的匹配字段包括在对应的所有物理流表的匹配字段中,且每个业务路径的动作包括在对应的所有物理流表的动作中;
所述通信装置根据预先配置的所述业务路径和所述硬件流表的对应关系确定目标硬件流表,具体包括:
所述通信装置根据所述第一目标业务路径和对应的第一物理流表的对应关系确定所述第一物理流表,并根据所述第一物理流表和所述目标硬件流表的对应关系确定所述目标硬件流表。
结合第六方面、第六方面的第一种至第六种任一可能的实现方式,在第七种可能的实现方式中,所述流表结构还包括所述多个流表的类型,所述多个流表的类型为通配类型。
第七方面,提供了一种用于实现配置流表项的通信装置,所述通信装置与硬件转发芯片相连接,包括:接口单元、数据包处理单元和硬件流表配置单元;
所述接口单元,用于向所述控制器上报第一业务的数据包的信息,还用于接收所述控制器根据所述第一业务的数据包的信息和流表结构下发的第一业务流表项,所述流表结构包括多个流表所支持的匹配字段和动作,所述多个流表中的每一个所支持的匹配字段包括所述第一业务的匹配字段、所支持的动作包括所述第一业务的动作;
所述数据包处理单元,用于在预先配置的业务路径中确定与所述第一业 务流表项相匹配的第一目标业务路径,所述第一目标业务路径的匹配字段包括所述第一业务的匹配字段,所述目标业务路径的动作包括所述第一业务的动作;并用于根据预先配置的所述业务路径和所述硬件转发芯片的硬件流表的对应关系确定目标硬件流表,其中,所述目标硬件流表支持所述第一目标业务路径所支持的业务;
硬件流表配置单元,用于根据所述第一业务流表项配置所述目标硬件流表的流表项。
在第七方面的第一种可能的实现方式中,所述通信装置和所述控制器之间通过开放流OpenFlow协议通信,所述流表为Openflow流表;所述多个流表的匹配字段是OpenFlow协议支持的所有匹配字段,所述多个流表的动作是OpenFlow协议支持的所有动作。
结合第七方面或第七方面的第一种可能的实现方式,在第二种可能的实现方式中,所述数据包处理单元,用于在预先配置的业务路径中确定与所述第一业务流表项相匹配的第一目标业务路径具体包括:
所述数据包处理单元,用于将所述第一业务流表项配置到软件流表中,从所述软件流表中获取与所述第一业务的数据包匹配的第一目标流表项,并在所述预先配置的业务路径中确定与所述第一目标流表项相匹配的所述第一目标业务路径,确定的所述第一目标业务路径的匹配字段包括所述第一目标流表项的匹配字段值所对应的匹配字段中的入端口匹配字段和包头匹配字段,确定的所述第一目标业务路径的动作包括所述第一目标流表项的动作值中用于对所述第一业务的数据包进行处理的动作;
硬件流表配置单元,具体用于根据所述第一目标流表项配置所述目标硬件流表的流表项。
结合第七方面的第二种可能的实现方式,在第三种可能的实现方式中,所述数据包处理单元用于在预先配置的业务路径中确定与所述第一目标流表项相匹配的目标业务路径具体包括:
所述数据包处理单元,用于当所述第一目标流表项为两条以上时,对所述第一目标流表项进行聚合生成合并流表项,其中,所述合并流表项的匹配字段值为所述第一目标流表项中对应于入端口匹配字段和包头匹配字段的匹配字段值,所述合并流表项的动作值为所述第一目标流表项中用于对所述第一业务的数据包进行处理的动作值;在所述预先配置的业务路径中确定一个包括所述合并流表项的匹配字段值对应的匹配字段、且包括所述合并流表项的动作值对应的动作的业务路径作为所述第一目标业务路径;并用于当所述第一目标流表项为1条时,在所述预先配置的业务路径中确定一个包括所述第一目标流表项的匹配字段值对应的匹配字段、且包括所述第一目标流表项的动作值对应的动作的业务路径作为所述第一目标业务路径。
结合第七方面或第七方面的第一种至第三种任一可能的实现方式,在第四种可能的实现方式中,所述多个流表中的每一个所支持的匹配字段和动作还包括第二业务的匹配字段和动作,所述第二业务是所述交换机的硬件流表不支持的业务;
所述接口单元,还用于向所述控制器上报所述第二业务的数据包的信息,并接收所述控制器根据所述第二业务的数据包的信息和流表结构下发的第二业务流表项;
所述数据包处理单元,还用于将所述接口单元接收的所述第二业务流表项配置到软件流表中。
结合第七方面或第七方面的第一种至第四种任一可能的实现方式,在第五种可能的实现方式中,所述通信装置还包括业务流表配置单元;
所述数据包处理单元,还用于从所述软件流表中获取与所述第二业务的数据包匹配的第二目标流表项,在所述预先配置的业务路径中确定与所述第二目标流表项相匹配的第二目标业务路径,确定的所述第二目标业务路径的匹配字段包括所述第二目标流表项的匹配字段值所对应的匹配字段中的入端口匹配字段和包头匹配字段,确定的所述第二目标业务路径的动作包括所述 第二目标流表项的动作值中用于对所述第二业务的数据包进行处理的动作;
所述业务流表配置单元,用于根据所述第二目标流表项配置所述第二目标业务路径对应的业务流表的业务流表项,其中,所述业务流表为精配表,且所述业务流表的匹配字段为所述第二目标业务路径的所有匹配字段,将所述业务流表项中的第一匹配字段值配置为所述第二目标流表项中的匹配字段值,将所述业务流表项中的第二匹配字段值配置为所述第二业务的数据包的包头中的头域值,并将所述业务流表项中的动作值配置为所述第二流表项的动作值,其中,所述第一匹配字段值对应的匹配字段属于所述第二目标流表项中的匹配字段值对应的匹配字段,所述第二匹配字段值对应的匹配字段不属于所述第二流表项中的匹配字段值对应的匹配字段;
所述数据包处理单元,还用于在后续接收到所述第二业务的后续数据包时在所述业务流表中查找与所述后续数据包匹配的业务流表项,并根据查找到的业务流表项的动作处理所述后续数据包。
结合第七方面或第七方面的第一种至第五种任一可能的实现方式,在第六种可能的实现方式中,所述通信装置还包括对应关系配置单元;
所述对应关系配置单元,用于配置各业务路径和对应的硬件流表的对应关系,具体包括:用于配置多个物理流表、以及各物理流表与硬件流表的对应关系,所述多个物理流表分别包括支持的匹配字段和动作,其中,每个物理流表的匹配字段包括在对应的硬件流表的匹配字段中,每个物理流表的动作中需写入硬件流表的动作包括在对应的硬件流表的动作中;并用于配置各业务路径与物理流表的对应关系,其中,每个业务路径的匹配字段包括在对应的所有物理流表的匹配字段中,且每个业务路径的动作包括在对应的所有物理流表的动作中;
所述数据包处理单元用于根据预先配置的所述业务路径和所述硬件流表的对应关系确定目标硬件流表,具体包括:所述数据包处理单元用于根据所述第一目标业务路径和对应的第一物理流表的对应关系确定所述第一物理流 表,并根据所述第一物理流表和对应的所述目标硬件流表的对应关系确定所述目标硬件流表。
第八方面,提供了一种用于实现配置流表项的通信装置,包括:处理器和存储器;
所述存储器,用于存放计算机操作指令;
所述处理器,用于执行所述存储器中存放的计算机操作指令使得所述通信装置实现如下操作:
向控制器上报第一业务的数据包的信息;
接收所述控制器根据所述第一业务的数据包的信息和流表结构下发的第一业务流表项,所述流表结构包括多个流表所支持的匹配字段和动作,所述多个流表中的每一个所支持的匹配字段包括所述第一业务的匹配字段、所支持的动作包括所述第一业务的动作;
在预先配置的业务路径中确定与所述第一业务流表项相匹配的第一目标业务路径,所述第一目标业务路径的匹配字段包括所述第一业务的匹配字段,所述目标业务路径的动作包括所述第一业务的动作;
根据预先配置的所述业务路径和与所述通信装置相连接的硬件转发芯片的硬件流表的对应关系确定目标硬件流表,其中,所述目标硬件流表支持所述第一目标业务路径所支持的业务;
根据所述第一业务流表项配置所述目标硬件流表的流表项。
在第八方面的第一种可能的实现方式中,所述通信装置和所述控制器之间通过开放流OpenFlow协议通信,所述流表为Openflow流表;所述多个流表的匹配字段是OpenFlow协议支持的所有匹配字段,所述多个流表的动作是OpenFlow协议支持的所有动作。
结合第八方面或第八方面的第一种可能的实现方式,在第二种可能的实现方式中,所述处理器执行所述计算机操作指令具体使得所述通信装置实现 如下操作:
将所述第一业务流表项配置到软件流表中;
从所述软件流表中获取与所述第一业务的数据包匹配的第一目标流表项,并在所述预先配置的业务路径中确定与所述第一目标流表项相匹配的所述第一目标业务路径,确定的所述第一目标业务路径的匹配字段包括所述第一目标流表项的匹配字段值所对应的匹配字段中的入端口匹配字段和包头匹配字段,确定的所述第一目标业务路径的动作包括所述第一目标流表项的动作值中用于对所述第一业务的数据包进行处理的动作;
根据所述第一业务流表项配置所述目标硬件流表的流表项具体包括,所述通信装置根据所述第一目标流表项配置所述目标硬件流表的流表项。
结合第八方面的第二种可能的实现方式,在第三种可能的实现方式中,所述处理器执行所述计算机操作指令具体使得所述通信装置实现如下操作:
当所述第一目标流表项为两条以上时,对所述第一目标流表项进行聚合生成合并流表项,其中,所述合并流表项的匹配字段值为所述第一目标流表项中对应于入端口匹配字段和包头匹配字段的匹配字段值,所述合并流表项的动作值为所述第一目标流表项中用于对所述第一业务的数据包进行处理的动作值;在所述预先配置的业务路径中确定一个包括所述合并流表项的匹配字段值对应的匹配字段、且包括所述合并流表项的动作值对应的动作的业务路径作为所述第一目标业务路径;
当所述第一目标流表项为1条时,在所述预先配置的业务路径中确定一个包括所述第一目标流表项的匹配字段值对应的匹配字段、且包括所述第一目标流表项的动作值对应的动作的业务路径作为所述第一目标业务路径。
结合第八方面、第八方面的第一种至第三种任一可能的实现方式,在第四种可能的实现方式中,所述多个流表中的每一个所支持的匹配字段和动作还包括第二业务的匹配字段和动作,所述第二业务是所述交换机的硬件流表不支持的业务;
所述处理器执行所述计算机操作指令进一步使得所述通信装置实现如下操作:
向所述控制器上报所述第二业务的数据包的信息;
接收所述控制器根据所述第二业务的数据包的信息和所述流表结构下发的第二业务流表项,并将所述第二业务流表项配置到软件流表中。
结合第八方面的第四种可能的实现方式,在第五种可能的实现方式中,所述处理器执行所述计算机操作指令进一步使得所述通信装置实现如下操作:
从所述软件流表中获取与所述第二业务的数据包匹配的第二目标流表项;
在所述预先配置的业务路径中确定与所述第二目标流表项相匹配的第二目标业务路径,确定的所述第二目标业务路径的匹配字段包括所述第二目标流表项的匹配字段值所对应的匹配字段中的入端口匹配字段和包头匹配字段,确定的所述第二目标业务路径的动作包括所述第二目标流表项的动作值中用于对所述第二业务的数据包进行处理的动作;
根据所述第二目标流表项配置所述第二目标业务路径对应的业务流表的业务流表项,其中,所述业务流表为精配表,且所述业务流表的匹配字段为所述第二目标业务路径的所有匹配字段,将所述业务流表项中的第一匹配字段值配置为所述第二目标流表项中的匹配字段值,将所述业务流表项中的第二匹配字段值配置为所述第二业务的数据包的包头中的头域值,并将所述业务流表项中的动作值配置为所述第二目标流表项的动作值,其中,所述第一匹配字段值对应的匹配字段属于所述第二目标流表项中的匹配字段值对应的匹配字段,所述第二匹配字段值对应的匹配字段不属于所述第二流表项中的匹配字段值对应的匹配字段;
在后续接收到所述第二业务的后续数据包时在所述业务流表中查找与所述后续数据包匹配的业务流表项,并根据查找到的业务流表项的动作处理所 述后续数据包。
在所述预先配置的业务路径中确定与所述第二流表项相匹配的第二目标业务路径,确定的所述第二目标业务路径的匹配字段包括所述第二流表项的匹配字段值所对应的匹配字段中的入端口匹配字段和包头匹配字段,所述第二目标业务路径的动作包括所述第二流表项的动作值中用于对所述第二数据包进行处理的动作值所对应的动作;
根据所述第二流表项配置所述第二目标业务路径对应的业务流表的业务流表项,其中,所述业务流表为精配表,且所述业务流表的匹配字段为所述第二目标业务路径的所有匹配字段,将所述业务流表项中的第一匹配字段值配置为所述第一流表项中的匹配字段值,将所述业务流表项中的第二匹配字段值配置为所述第二数据包的包头中的头域值,并将所述业务流表项中的动作值配置为所述第二流表项的动作值,其中,所述第一匹配字段值对应的匹配字段属于所述第一流表项中的匹配字段值对应的匹配字段,所述第二匹配字段值对应的匹配字段不属于所述第二流表项中的匹配字段值对应的匹配字段;
在后续接收到所述第二业务的后续数据包时在所述业务流表中查找与所述后续数据包匹配的业务流表项,并根据查找到的业务流表项的动作处理所述后续数据包。
结合第八方面、第八方面的第一种至第五种任一可能的实现方式,在第六种可能的实现方式中,所述处理器执行所述计算机操作指令进一步使得所述通信装置实现如下操作:配置各业务路径和对应的硬件流表的对应关系,配置各业务路径和对应的硬件流表的对应关系,具体包括:
配置多个物理流表、以及各物理流表与硬件流表的对应关系,所述多个物理流表分别包括支持的匹配字段和动作,其中,每个物理流表的匹配字段包括在对应的硬件流表的匹配字段中,每个物理流表的动作中需写入硬件流表的动作包括在对应的硬件流表的动作中;
配置所述各业务路径与物理流表的对应关系,其中,每个业务路径的匹配字段包括在对应的所有物理流表的匹配字段中,且每个业务路径的动作包括在对应的所有物理流表的动作中;
所述处理器执行所述计算机操作指令使得所述通信装置根据预先配置的所述业务路径和所述硬件流表的对应关系确定目标硬件流表,具体包括:
所述处理器执行所述计算机操作指令具体使得所述通信装置根据所述第一目标业务路径和对应的第一物理流表的对应关系确定所述第一物理流表,并根据所述第一物理流表和所述目标硬件流表的对应关系确定所述目标硬件流表。
第九方面,提供了一种交换机,包括:
硬件转发芯片;
如第三方面、第三方面的第一种至第五种任一可能的实现方式实现的通信装置,或如第四方面、第四方面的第一种至第五种任一可能的实现方式实现的通信装置,或如第七方面、第七方面的第一种至第六种任一可能的实现方式实现的通信装置,或如第八方面、第八方面的第一种至第六种任一可能的实现方式实现的通信装置。
第十方面,提供了一种通信系统,包括:控制器和如第九方面所述的交换机。
根据本发明实施例,所述多个OpenFlow流表均可以用于实现所述第一业务,因此,根据所述控制器的处理逻辑,无论是为该第一业务生成哪个或哪些流表的流表项,都是可以成功生成并发送的。而且,所述交换机确定的该第一目标业务路径包括该第一业务的数据包的匹配字段值和动作值对应的匹配字段和动作,所以该第一目标业务路径支持该第一业务,又由于该第一目 标业务路径对应的硬件流表支持所述第一目标业务路径所支持的业务,所以,该第一目标业务路径对应的硬件流表即为支持该第一业务的硬件流表,进而,该交换机可以在该硬件流表中配置用于实现该第一业务的流表项。因此,无论该交换机对接什么控制器,均可以成功地在硬件流表中配置用于实现该第一业务的流表项,因此可以成功地处理该第一业务,从而降低了业务处理失败的几率。
附图说明
为了更清楚地说明本发明实施例的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1-1至1-2是本发明实施例提供的一种通信系统的组网结构示意图;
图2是本发明实施例1提供的方法流程示意图;
图3-1至3-2是本发明实施例2提供的通信装置200的结构示意图;
图4是本发明实施例3提供的通信装置300的结构示意图;
图5是本发明实施例4提供的交换机400的结构示意图;
图6是本发明实施例5提供的通信系统500的结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创 造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
图1-1为本发明实施例提供的一种通信系统的组网结构示意图,该通信系统包括交换机(Switch)110和控制器(Controller)120,交换机110和控制器120之间通过开放流(OpenFlow)协议进行通信。
如图1-2所示,交换机110可以由上层的通信装置110-1和底层的硬件转发芯片110-2构成,硬件转发芯片110-2具体可以是专用集成电路(Application Specific Integrated Circuits,ASIC)芯片,硬件转发芯片中包括硬件流表,如访问控制列表(Access Control List,ACL)1、ACL2等。
本发明实施例提供的方法、装置和系统,应用于软件定义网络(software defined network,简称SDN)系统,SDN系统包括控制器和交换机。所述控制器和所述交换机之间通信的协议可以是OpenFlow协议,也可以是私有协议或其他标准协议。控制器用于下发流表项的流表结构可以是交换机上报给控制器的,也可以是预先配置在控制器上的。另外,当所述控制器和所述交换机通过OpenFlow协议通信时,所述流表结构包括的是OpenFlow流表支持的匹配字段和动作。
在如下实施例中,以采用OpenFlow协议为例加以详细阐述,采用其它协议的实现方式和采用OpenFlow协议的实现方式类似,可以参考如下实施例中的实现方式,不再赘述。
图2是本发明实施例1提供的方法流程示意图,本发明实施例1的方法可以应用于图1-1或图1-2所示的通信系统。
如图2所示,本发明实施例1提供的方法包括:
S110:交换机(如图1-1所示的交换机110)通过OpenFlow协议向控制器(如图1-1所示的控制器120)上报流表结构,所述流表结构包括多个OpenFlow流表所支持的匹配字段和动作、以及所述多个OpenFlow流表的类型,所述多个OpenFlow流表所支持的匹配字段和动作存在交集,且所述交集中包括用于实现所述交换机的硬件流表支持的第一业务的匹配字段和动作,所述 多个OpenFlow流表的类型均为通配类型。
如果某个流表的类型为通配类型,则控制器在根据该流表的结构生成流表项时,可以利用该流表支持的任意一个或多个匹配字段生成流表项。
如,T0表为通配类型,且支持的匹配字段包括in_port、eth_type、src_mac、dst_mac、ip_src和ip_dst六个匹配字段,则控制器根据T0表生成的流表项可以只包括其中部分匹配字段对应的匹配字段值,如生成的流表项包括in_port、eth_type、src_mac和dst_mac这四个匹配字段的值,也可以包括T0表的所有匹配字段对应的匹配字段值。
具体地,所述控制器在与所述交换机建立连接后,向所述交换机发送流表能力请求消息(table stats request),所述交换机在接收到所述流表能力请求消息后,向所述控制器回复流表能力响应消息(table stats reply),在所述流表能力响应消息中携带所述流表结构。
所述多个OpenFlow流表,具体可以包括T0(Table 0)表、T1(Table 1)表等。所述匹配字段具体可以包括入端口(in_port)、以太网类型(eth_type)、源MAC地址(src_mac);所述动作具体可以包括通过端口转发(output)、修改源MAC地址、修改目的MAC地址等。
举例来说,所述第一业务,具体可以是基于IP的二层转发业务等,实现该基于IP的二层转发业务,需要用到匹配字段in_port、eth_type、src_mac和dst mac(目的MAC地址)、以及动作output。
衡量所述交换机的硬件流表支持所述第一业务的标准可以是,所述交换机的一个或多个硬件流表包括实现所述第一业务所需的匹配字段和动作,如,实现所述第一业务需要用到匹配字段in_port、eth_type、src_mac和dst mac、以及动作output,而所述交换机的一个硬件流表包括匹配字段in_port、eth_type,另一个硬件流表包括匹配字段src_mac和dst mac、以及动作output,则可以认为所述交换机的硬件流表支持所述第一业务。另外,实现所述第一业务所需的部分动作也可能并不需要配置到硬件流表中,而是由所 述交换机的非硬件流表类的其它硬件资源来支持,如匹配字段pop_vlan(假设实现所述第一业务需要用到匹配字段pop_vlan),在这种情况下,只要实现所述第一业务所需的匹配字段均包括在该交换机的硬件流表中、且实现所述第一业务所需的动作中需写入硬件流表的动作均包括在该交换机的硬件流表中,即可认为该交换机的硬件流表支持所述第一业务。综上,如果所述交换机的一个或多个硬件流表包括实现所述第一业务所需的匹配字段,且包括实现所述第一业务所需的动作中需写入硬件流表的动作,即可支持所述第一业务。
在具体实现时,所述交换机上报的所述多个OpenFlow流表的匹配字段可以是OpenFlow协议支持的所有匹配字段,所述交换机上报的所述多个OpenFlow流表的动作可以是OpenFlow协议支持的所有动作。需要说明的是,所述交集中可以包括用于实现所述交换机的硬件流表支持的一个或多个业务的匹配字段和动作。如果上报的所述多个OpenFlow流表均包括OpenFlow协议支持的所有匹配字段和所有动作,即所述交集中包括OpenFlow协议支持的所有匹配字段和所有动作,则所述交集包括的匹配字段和动作可以用于实现所述交换机的硬件流表支持的业务中尽可能多的业务。
所述流表结构可以如表1所示:
Figure PCTCN2014089530-appb-000001
Figure PCTCN2014089530-appb-000002
表1
S120:所述交换机接收所述控制器通过OpenFlow协议发送的流表项,并将所述流表项配置到软件流表中,其中,所述流表项是所述控制器根据所述流表结构和所述交换机上报的数据包的信息生成的,所述上报的数据包的信息包括所述第一业务的第一数据包的信息,所述流表项包括与所述第一数据包匹配的流表项中的至少一条;
需要说明的是,在执行S110时,所述交换机的软件流表和硬件流表均不包括流表项或仅包括无法与接收的数据包相匹配的默认流表项。
在S120中,所述交换机每次接收到无法在硬件流表和软件流表中查找到相匹配的流表项的数据包时,均会向所述控制器请求与该数据包匹配的流表项并配置到该软件流表中,并通过后续步骤S130-S150配置到硬件流表中。
在具体实现时,步骤S120包括一个或多个如下执行过程:
S120-1:所述交换机接收到一个数据包(如所述第一数据包)。
S120-2:所述交换机先在所述交换机的硬件流表中查找与该数据包匹配的流表项。
如果没有查找到,则执行步骤S120-3,如果找到,根据找到的流表项的动作值处理该数据包。
S120-3:所述交换机再在所述交换机的软件流表中查找与该数据包匹配的流表项。
如果没有查找到,则执行步骤S120-4,如果找到,根据找到的流表项的 动作值处理该数据包。
S120-4:所述交换机向所述控制器请求与该数据包匹配的流表项。
具体地,所述交换机向所述控制器发送Packet In消息,所述Packet In消息包括该数据包的信息,如接收该数据包的端口号,又如该数据包本身或该数据包的包头信息,所述控制器在接收到所述Packet In消息时,根据所述流表结构和该数据包的信息(如接收该数据包的端口号、该数据包的包头信息中的以太网类型、源MAC地址、目的MAC地址)生成与该数据包匹配的流表项并通过Flow mod消息将生成的流表项发送给所述交换机。
S120-5:所述交换机将接收的流表项配置到该软件流表中。
当S120-1中接收的数据包为所述第一数据包时,在S120-4中请求的是与所述第一数据包匹配的流表项,相应地,在S120-5中将与所述第一数据包匹配的流表项配置到软件流表中。
所述与所述第一数据包匹配的第一流表项可以是一条也可以是两条以上,如,对于上述基于IP的二层转发业务,可以仅生成T0的流表项,如表2-1所示,也可以生成T0的流表项和T1的流表项,如表2-2A和2-2B所示。
Figure PCTCN2014089530-appb-000003
表2-1
Figure PCTCN2014089530-appb-000004
表2-2A
Figure PCTCN2014089530-appb-000005
Figure PCTCN2014089530-appb-000006
表2-2B
需要说明的是,对于某个数据包,如果该数据包匹配的流表项是两条以上,如表2-2A和表2-2B所示,则可能存在其中一部分流表项(如表2-2A中的流表项)已经配置在软件流表中的情况,这种情况说明控制器为之前上报的另一个数据包下发的流表项包括这部分流表项,则该控制器可以不用将已经配置的那部分流表项重复下发给该交换机。因此,S120中的所述流表项包括与所述第一数据包匹配的流表项中的至少一条,存在如下几种情况:当与所述第一数据包匹配的流表项有一条时,这一条流表项包括在所述控制器发送给所述交换机的流表项中,当与所述第一数据包匹配的流表项有两条以上时,如果其中一部分之前已经由所述控制器发送给所述交换机,则所述控制器可以仅发送所述两条以上流表项中的另一部分流表项。
以基于IP的二层转发业务生成T0表和T1表的流表项为例,在S120中向所述控制器上报多个基于IP的二层转发业务的数据包后配置后的软件流表示例如表3-1和3-2所示。
Figure PCTCN2014089530-appb-000007
表3-1
Figure PCTCN2014089530-appb-000008
表3-2
在S110中上报的多个OpenFlow流表均可以用于实现所述第一业务,因此,在S120中,根据所述控制器的处理逻辑,无论是为该第一业务生成哪个或哪些流表的流表项,都是可以成功生成的。
需要说明的是,本发明实施例中的硬件流表,指的是硬件形式的流表,具体可以是在交换机的硬件转发芯片中的流表,如ACL表。本发明实施例中的软件流表,指的是软件形式的OpenFlow流表,具体可以是存储在交换机的存储器中的OpenFlow流表。类似地,如果是基于私有协议或其他标准协议来实现,则软件流表为遵守相应协议的流表。
S130:所述交换机从所述软件流表中获取与所述第一数据包匹配的第一流表项,根据所述第一流表项的动作值处理所述第一数据包,并在预先配置的业务路径中确定与所述第一流表项相匹配的第一目标业务路径。
下面结合一个具体的例子说明其具体实现方式。
如,所述交换机通过端口2接收到所述第一数据包,所述第一数据包的头域中指定的以太网类型为0x800、源mac地址为0:0:0:0:0:3、目的mac地址为0:0:0:0:0:4、源ip地址为192.168.0.1、目的ip地址为192.168.0.2、源端口号为6633、目的端口号为6589。
所述交换机首先在T0表中查找到与所述第一数据包匹配的流表项,由于所述数据包是从端口2接收到的,因此匹配到T0表的第二个流表项,根据T0表的第二个流表项的动作值“goto:1”进一步在T1表中查找到与所述第一数据包匹配的流表项。
由于所述第一数据包的eth type(以太网类型)是0x800,源MAC地址是:0:0:0:0:0:3,目的MAC地址是:0:0:0:0:0:4,因此匹配到T1表的第二个流表项,根据T1表的第二个流表项的动作值“output:3”通过端口3转发所述数据包。
在上述实现中,查找到的与所述第一业务的第一数据包匹配的第一流表项包括T0表的第二个流表项和T1表的第二个流表项。
所述交换机在获取与所述第一数据包匹配的流表项后,在预先配置的业务路径中确定与所述第一流表项相匹配的第一目标业务路径。
预先配置的各业务路径包括实现各业务路径对应的业务所需要的匹配字段和动作。
所述业务路径的示例如表4所示:
Figure PCTCN2014089530-appb-000009
表4
所述交换机在所述业务路径中确定与所述第一流表项相匹配的第一目标 业务路径,确定的所述第一目标业务路径的匹配字段包括所述第一流表项的匹配字段值所对应的匹配字段中的入端口(ingress port)匹配字段和包头(packet headers)匹配字段,所述第一目标业务路径的动作包括所述第一流表项的动作值中用于对所述第一数据包进行处理的动作值所对应的动作。其中,入端口匹配字段,用于与接收的数据包进入所述交换机的端口号(即所述交换机接收所述数据包的端口号)进行匹配;包头匹配字段,用于与接收的数据包的包头中的字段进行匹配。
如上述示例,所述第一流表项有两个,包括的匹配字段值对应的匹配字段为:in_port、eth_type、src_mac和dst mac,其中,in_port为入端口匹配字段,eth_type、src_mac和dst mac对应的匹配字段值用于与所述第一数据包的包头中的字段进行匹配,为包头匹配字段。包括的动作值为goto:1和output:3,其中,goto:1用于指示进一步在下一个表中查找,而output:3用于指示通过端口3转发数据数据包,可见,只有output:3是用于对所述第一数据包进行处理的动作值。
需要说明的是,所述第一流表项中可能并不包括入端口匹配字段值,相应地,所述第一目标业务路径的匹配字段中自然也可以没有入端口匹配字段。
还需要说明的是,当利用多个流表的流表项实现一个业务时,匹配到的流表项中还有可能包括元数据(metadata)匹配字段值和用于生成与元数据匹配字段值进行匹配的数据的元数据动作,如表5-1和5-2所示,元数据匹配字段为meta,元数据匹配字段值为0x2,生成用于与元数据匹配字段值进行匹配的数据的动作为w_meta:0x2。
其中,元数据匹配字段值并不用于与数据包的包头信息进行匹配,和入端口匹配字段、包头匹配字段是并列的,即元数据匹配字段并不属于入端口匹配字段和包头匹配字段。元数据动作并不用于对数据包进行处理,即,并不是用于对数据包进行处理的动作值所对应的动作。
Figure PCTCN2014089530-appb-000010
Figure PCTCN2014089530-appb-000011
表5-1
Figure PCTCN2014089530-appb-000012
表5-2
所述交换机从各业务流表中查找匹配字段包括in_port、eth_type、src_mac和dst mac且动作包括output的业务路径作为所述第一目标业务路径,如表4所示,L2_L1T4S_IPv4IPv6Path的匹配字段包括in_port、eth_type、src_mac和dst mac,且L2_L1T4S_IPv4IPv6Path的动作包括output,因此,将L2_L1T4S_IPv4IPv6Path确定为所述第一目标业务路径。
需要说明的是,所述第一流表项可能是一条,也可能是两条以上。
当所述第一流表项是一条时,则所述第一流表项中包括的匹配字段值对应的匹配字段均属于进入端口匹配字段和包头匹配字段,包括的动作均属于对所述第一数据包进行处理的动作。相应地,可以直接在所述预先配置的业务路径中确定一个匹配字段包括所述第一流表项的匹配字段值对应的匹配字段、且动作包括所述第一流表项的动作值对应的动作的业务路径作为所述第一目标业务路径。
当所述第一流表项为两条以上时,所述交换机查找到所述第一流表项后可以按照如下方法确定所述第一目标业务路径,以提高确定的效率:
A1:所述交换机对所述第一流表项进行聚合生成合并流表项,其中,所述合并流表项包括的匹配字段值为所述第一流表项的匹配字段值中对应于入端口匹配字段和包头匹配字段的匹配字段值,所述合并流表项包括的动作值为所述第一流表项的动作值中用于对所述第一数据包进行处理的动作值;
A2:所述交换机在所述预先配置的业务路径中确定一个匹配字段包括所述合并流表项的匹配字段值对应的匹配字段、且动作包括所述合并流表项的动作值对应的动作的业务路径作为所述第一目标业务路径。
S140:所述交换机根据预先配置的所述第一目标业务路径和硬件流表的对应关系确定所述第一目标业务路径对应的硬件流表,其中,所述第一目标业务路径对应的硬件流表支持所述第一目标业务路径所支持的业务。
具体地,所述交换机预先配置各业务路径和硬件流表的对应关系,每个业务路径所对应的硬件流表支持各业务路径所支持的业务,如,包括实现对应的业务路径支持的业务所需要的匹配字段和动作,如表6所示,业务路径L2_L1T4S_IPv4IPv6对应于硬件流表ACL3和ACL5,ACL3和ACL5中包括实现L2_L1T4S_IPv4IPv6所支持的基于ip的二层转发业务需要的匹配字段和动作。
业务路径标识 硬件流表
L2_L2_MAC ACL1
L2_T3S_IPV4 ACL4
L3_T3R_IPV4 ACL4
L2_L1T4S_IPv4IPv6 ACL3、ACL5
表6
L2_L1T4S_IPv4IPv6 Path为在步骤S130中确定的所述目标业务路径,根据表6可以确定,所述目标业务路径对应的硬件流表为ACL3和ACL5。
需要说明的是,所述交换机可以直接配置各业务路径与对应的硬件流表的对应关系,也可以配置各业务路径与其他信息的对应关系以及其他信息与硬件流表的对应关系,从而达到间接配置各业务路径与对应的硬件流表的对应关系。
为了更方便地配置业务路径,可以采用如下方式配置各业务路径和硬件 流表的对应关系。
B1、配置多个物理流表、以及各物理流表与硬件流表的对应关系,所述多个物理流表分别包括支持的匹配字段和动作,其中,每个物理流表的匹配字段包括在对应的硬件流表的匹配字段中,每个物理流表的动作中需写入硬件流表的动作包括在对应的硬件流表的动作中。
需要说明的是,每个物理流表的动作中无需写入硬件流表的动作,指的是可以被所述硬件流表所在的交换机的非硬件流表类的硬件资源所支持的动作。
B2、配置所述各业务路径与物理流表的对应关系,其中,每个业务路径的匹配字段包括在对应的所有物理流表的匹配字段中,且每个业务路径的动作包括在对应的所有物理流表的动作中;
在一种具体的实现方式中,每个业务路径的匹配字段可以为对应的所有物理流表的匹配字段的全集,且每个业务路径的动作可以为对应的所有物理流表的动作的全集。
通过这种方法,各物理流表可以为不同的业务路径所重用,从而,可以在通过B1配置多个物理流表、以及各物理流表与硬件流表的对应关系后,通过B2方便地配置实现各种业务的业务路径。
例如:预先配置的物理流表L1包括匹配字段eth_src和eth_dst,预先配置的物理流表T4S包括匹配字段ip_src和ip_dst、包括动作output。要实现X业务,需要匹配字段eth_src、eth_dst、ip_src和ip_dst、以及动作output,则可以根据物理流表L1和T4S生成实现X业务的业务路径Y,并配置业务路径Y与物理流表L1、物理流表T4S的对应关系。
相应地,在步骤S160中,所述交换机根据预先配置的所述第一目标业务路径和物理流表的对应关系确定所述第一目标业务路径对应的第一物理流表,并根据所述第一物理流表和硬件流表的对应关系确定所述第一物理流表对应的所述硬件流表。
S150:所述交换机根据所述第一流表项配置所述硬件流表的流表项。
S150的具体实现可以包括:
C1、在所述硬件流表中添加一条新的流表项;
C2、将所述第一流表项的匹配字段值中对应于入端口匹配字段和包头匹配字段的匹配字段值配置为所述添加的流表项的匹配字段值;
C3、将所述第一流表项的动作值中用于对所述第一数据包进行处理的动作值中除第一动作值以外的动作值配置为所述添加的流表项的动作值,所述第一动作值为没有包括在所述硬件流表中且是所述硬件流表所在的交换机的非硬件流表类的硬件资源所支持的动作对应的动作值。
需要说明的是,所述第一流表项可能并不包括所述第一动作值。
如果在步骤S130中利用A1和A2的方法确定所述目标业务路径,则在本步骤中,可以直接将所述合并流表项的匹配字段值配置为所述添加的流表项的匹配字段值,并将所述合并流表项的动作值中除所述第一动作值以外的其它动作值配置为所述添加的流表项的动作值。
如表7-1所示,所述交换机将所述第一流表项的匹配字段值in_port、eth_type、src_mac和dst mac配置到ACL5表中,如表7-2所示,将所述第一流表项的动作值output:3配置到ACL3表中。
Figure PCTCN2014089530-appb-000013
表7-1
src_ip dst_ip ip_proto ip_dscp fhid action
192.168.0.1 192.168.0.2 6 0 1 output:3
表7-2
如果所述硬件流表的匹配字段比所述第一流表项的匹配字段值对应的匹配字段多,根据具体实现,可以将所述流表项的其它匹配字段值配置为所述 数据包的头域中的相应信息,如,所述第一流表项并不包括源IP地址,则从所述数据包中提取源IP地址,并将提取的源IP地址作为所述流表项中对应于匹配字段src_ip(源IP地址)的值,也可以将所述流表项的其它匹配字段值配置为通配符。
根据本发明实施例1,所述多个OpenFlow流表均可以用于实现所述第一业务,因此,根据所述控制器的处理逻辑,无论是为该第一业务生成哪个或哪些流表的流表项,都是可以成功生成并发送的。而且,所述交换机确定的该第一目标业务路径包括该第一业务的数据包的匹配字段值和动作值对应的匹配字段和动作,所以该第一目标业务路径支持该第一业务,又由于该第一目标业务路径对应的硬件流表支持所述第一目标业务路径所支持的业务,所以,该第一目标业务路径对应的硬件流表即为支持该第一业务的硬件流表,进而,该交换机可以在该硬件流表中配置用于实现该第一业务的流表项。因此,无论该交换机对接什么控制器,均可以成功地在硬件流表中配置用于实现该第一业务的流表项,因此可以成功地处理该第一业务,从而降低了业务处理失败的几率。
在某些情况下,所述第一流表项的动作值还包括没有包括在所述硬件流表中且是所述硬件流表所在的交换机的非硬件流表类的硬件资源所支持的动作对应的动作值,如,用于对所述交换机的端口进行属性配置的动作值(如,pop_vlan、push_vlan),则相应地,所述交换机还可以根据所述第一流表项中的用于对所述交换机的端口进行属性配置的动作值配置所述第一流表项的output动作值指定的端口的属性(如,对于pop_vlan业务,将端口的VLAN 1024属性设置为untagging)。
在本发明实施例1中,如图1-2所示,所述交换机(如图1-2所示的交换机110)可以由上层的通信装置(如图1-2所示的通信装置110-1)和底层 的硬件转发芯片(如图1-2所示的硬件转发芯片110-2)构成。
步骤S110、S130、140由所述通信装置执行。
在S120中,所述交换机接收的数据包均是通过所述硬件转发芯片的端口接收的,查硬件流表的动作由所述硬件转发芯片执行,所述硬件转发芯片在所述硬件流表中没有查找到与接收的数据包匹配的流表项时,将接收的数据包上报给所述通信装置,具体可以通过所述硬件转发芯片和所述通信装置之间的网卡通道上报接收的数据包。S120中除查硬件流表之外的其它动作由所述通信装置执行。
S150的具体实现可以为:所述通信装置根据所述第一流表项配置所述硬件转发芯片中的所述硬件流表的流表项。具体可以是,调用所述硬件转发芯片的用于进行硬件流表配置的接口配置所述流表项,其中,配置到所述硬件流表中的信息作为所述接口的参数传递给所述硬件转发芯片从而配置到所述硬件流表中。
在一种具体实现方式中,所述通信装置预先配置的业务路径仅用于实现与该通信装置连接的硬件转发芯片的硬件流表支持的业务,则,所述通信装置在步骤S130中匹配到的目标业务路径,必然可以在步骤S140中确定到对应的硬件流表。通过这种实现方式,当利用所述通信装置对接不同的硬件转发芯片时,需根据不同的硬件转发芯片的硬件流表支持的业务配置相应的业务路径、以及业务路径和硬件流表的对应关系。
在另一种具体实现方式中,所述通信装置预先配置的业务路径可用于实现多个不同的硬件转发芯片的硬件流表支持的业务。通过这种实现方式,当利用所述通信装置对接不同的硬件转发芯片时,只需根据不同的硬件转发芯片的硬件流表支持的业务配置业务路径和硬件流表的对应关系,可以更加方便地实现该通信装置与不同的硬件转发芯片的对接。
在本发明实施例1中,S110中的所述交集中还可能包括用于实现所述交 换机的硬件流表不支持的第二业务的匹配字段和动作,在步骤S120中上报的数据包的信息还可以包括所述第二业务的第二数据包的信息,S120中所述控制器发送的所述流表项还可以包括与所述第二数据包匹配的流表项中的至少一条。
相应地,所述方法还可以包括,所述交换机从所述软件流表中获取与所述第二数据包匹配的第二流表项,根据所述第二流表项的动作处理所述第二数据包。通过这种方法,尽管所述交换机的硬件流表并不支持所述第二业务,也可以通过查找软件流表的方式处理所述第二业务的数据包。
在获取所述第二流表项之后,所述方法还可以包括:所述交换机在所述预先配置的业务路径中确定与所述第二流表项相匹配的第二目标业务路径,确定的所述第二目标业务路径的匹配字段包括所述第二流表项的匹配字段值所对应的匹配字段中的入端口匹配字段和包头匹配字段,所述第二目标业务路径的动作包括所述第二流表项的动作值中用于对所述第二数据包进行处理的动作值所对应的动作。
对应于上述第二种具体实现方式,由于所述第二数据包对应于所述第二业务,而所述交换机的硬件流表并不支持所述第二业务,因此,所述第二目标业务路径并没有对应的硬件流表,故无法配置所述第二目标业务路径与硬件流表的对应关系,相应地,此时也就无法找到与所述第二目标业务路径对应的硬件流表。
针对这种情况,为了提高后续处理对应于第二业务的数据包的效率,在本发明实施例1中,所述方法还可以包括:
D1、所述交换机根据所述第二流表项配置所述第二目标业务路径对应的业务流表的业务流表项,其中,所述业务流表为精配表,且所述业务流表的匹配字段为所述第二目标业务路径的所有匹配字段,将所述业务流表项中的第一匹配字段值配置为所述第一流表项中的相应匹配字段值,将所述业务流表项中的第二匹配字段值配置为所述第二数据包的包头中的相应头域值,并 将所述业务流表项中的动作值配置为所述第二流表项的动作值,其中,所述第一匹配字段值对应的匹配字段属于所述第一流表项中的匹配字段值对应的匹配字段,所述第二匹配字段值对应的匹配字段不属于所述第二流表项中的匹配字段值对应的匹配字段;
D2、所述交换机在后续接收到所述第二业务的后续数据包时在所述业务流表中查找与所述后续数据包匹配的业务流表项,并根据查找到的业务流表项的动作处理所述后续数据包。
所述业务流表为精配表的含义是,所述业务流表的业务流表项中的每个匹配字段都有对应的匹配字段值而不是通配符,则,该业务流表的各个流表项所包括的匹配字段值的数量是相同的,因此,可以利用hash算法查表,从而提高查表的效率。
一种具体实现方式可以是,所述交换机接收到所述后续数据包后,执行S120-2(S120-2中的数据包具体为所述后续数据包),如果没有查找到,在所述业务流表中查找与所述后续数据包匹配的流表项,如果没有查找到,则执行步骤S120-3,如果找到,根据找到的流表项的动作值处理该后续数据包。另外,所述交换机在接收到其它业务的数据包时,也可以通过这种具体实现方式来处理。
另外,如果控制器根据每个数据包下发的流表项均包括与该数据包匹配的所有流表项,则,所述交换机还可以直接利用接收的与某个数据包匹配的所有流表项在预先配置的业务路径中确定与其相匹配的业务路径。具体有如下两种实现方式:
具体实现方式1:所述控制器向所述交换机发送的携带流表项的消息(如Flow mod消息)中还包括识别信息,所述识别信息用于识别对应同一个数据包的所有流表项,具体可以是携带的流表项所对应的数据包的标识。相应地,所述交换机根据所述识别信息在接收自所述控制器的流表项中识别出对应同一个数据包的所有流表项,如,识别出对应数据包A的所有流表项,识别出 对应数据包B的所有流表项,并在预先配置的业务路径中确定与其相匹配的业务路径。
具体实现方式2:所述控制器通过不同的消息携带与不同的数据包匹配的所有流表项,如,通过Flow mod消息1携带与数据包A匹配的所有流表项,通过Flow mod消息2携带与数包B匹配的所有流表项。相应地,所述交换机从某个消息中获取对应某一个数据包的所有流表项,并在预先配置的业务路径中确定与其相匹配的业务路径。
直接利用接收的流表项确定匹配的业务路径的方式参照前述步骤130中利用所述第一流表项确定匹配的所述第一目标业务路径的方式,确定匹配的业务路径后确定对应的硬件流表并配置硬件流表项的方式,参照前述步骤140-150,不再赘述。
参见图3-1,本发明实施例2提供了一种通信装置200,所述通信装置与硬件转发芯片相连接,与控制器之间通过开放流OpenFlow协议通信,包括:接口单元201、软件流表配置单元202、数据包处理单元203和硬件流表配置单元204;
接口单元201,用于向所述控制器上报流表结构,所述流表结构包括多个OpenFlow流表所支持的匹配字段和动作、以及所述多个OpenFlow流表的类型,所述多个OpenFlow流表所支持的匹配字段和动作存在交集,且所述交集中包括用于实现所述硬件转发芯片的硬件流表支持的第一业务的匹配字段和动作,所述多个OpenFlow流表的类型均为通配类型;还用于向所述控制器上报数据包的信息,并接收所述控制器发送的流表项,其中,所述流表项是所述控制器根据所述流表结构和所述数据包的信息生成的,所述数据包的信息包括所述第一业务的第一数据包的信息,所述流表项包括与所述第一数据包匹配的流表项中的至少一条。
所述多个OpenFlow流表的匹配字段可以是OpenFlow协议支持的所有匹 配字段,所述多个OpenFlow流表的动作可以是OpenFlow协议支持的所有动作。
软件流表配置单元202,用于将所述流表项配置到软件流表中。
数据包处理单元,用于从所述软件流表中获取与所述第一数据包匹配的第一流表项,根据所述第一流表项的动作值处理所述第一数据包,并在预先配置的业务路径中确定与所述第一流表项相匹配的第一目标业务路径,确定的所述第一目标业务路径的匹配字段包括所述第一流表项的匹配字段值所对应的匹配字段中的入端口匹配字段和包头匹配字段,所述第一目标业务路径的动作包括所述第一流表项的动作值中用于对所述第一数据包进行处理的动作值所对应的动作;并用于根据预先配置的所述第一目标业务路径和第一硬件流表的对应关系确定所述第一目标业务路径对应的第一硬件流表,其中,所述第一目标业务路径对应的第一硬件流表支持所述第一目标业务路径所支持的业务。需要说明的是,数据包处理单元203处理的所述第一数据包一般是所述硬件转发芯片上报给所述第一数据包处理单元的,具体地,所述硬件转发芯片接收到所述第一数据包后,先在硬件流表中查找与所述第一数据包匹配的流表项,在没找到的情况下上报给所述通信装置的数据包处理单元203。
所述第一流表项,可能是1条,也可能是两条以上。相应地,数据包处理单元203用于在预先配置的业务路径中确定与所述第一流表项相匹配的目标业务路径具体包括:数据包处理单元203用于,当所述第一流表项为两条以上时,对所述第一流表项进行聚合生成合并流表项,其中,所述合并流表项包括的匹配字段值为所述第一流表项的匹配字段值中对应于入端口匹配字段和包头匹配字段的匹配字段值,所述合并流表项包括的动作值为所述第一流表项的动作值中用于对所述第一数据包进行处理的动作值;在所述预先配置的业务路径中确定一个匹配字段包括所述合并流表项的匹配字段值对应的匹配字段、且动作包括所述合并流表项的动作值对应的动作的业务路径作为所述第一目标业务路径;并用于当所述第一流表项为1条时,在所述预先配 置的业务路径中确定一个匹配字段包括所述第一流表项的匹配字段值对应的匹配字段、且动作包括所述第一流表项的动作值对应的动作的业务路径作为所述第一目标业务路径。
硬件流表配置单元,用于根据所述第一流表项配置所述第一硬件流表的流表项。
另外,所述交集中还可能包括用于实现所述硬件转发芯片的硬件流表不支持的第二业务的匹配字段和动作;所述数据包的信息还包括所述第二业务的第二数据包的信息,接口单元201接收自所述控制器的流表项还包括与所述第二数据包匹配的流表项中的至少一条;相应地,数据包处理单元203,还可以用于从所述软件流表中获取与所述第二数据包匹配的第二流表项时,根据所述第二流表项的动作处理所述第二数据包。
在一种具体的实现方式中,如图3-2所示,所述通信装置还可以包括业务流表配置单元205;
在这种具体实现方式中,数据包处理单元203,还用于在所述预先配置的业务路径中确定与所述第二流表项相匹配的第二目标业务路径,确定的所述第二目标业务路径的匹配字段包括所述第二流表项的匹配字段值所对应的匹配字段中的入端口匹配字段和包头匹配字段,所述第二目标业务路径的动作包括所述第二流表项的动作值中用于对所述第二数据包进行处理的动作值所对应的动作;
业务流表配置单元205,用于根据所述第二流表项配置所述第二目标业务路径对应的业务流表的业务流表项,其中,所述业务流表为精配表,且所述业务流表的匹配字段为所述第二目标业务路径的所有匹配字段,将所述业务流表项中的第一匹配字段值配置为所述第一流表项中的相应匹配字段值,将所述业务流表项中的第二匹配字段值配置为所述第二数据包的包头中的相应头域值,并将所述业务流表项中的动作值配置为所述第二流表项的动作值,其中,所述第一匹配字段值对应的匹配字段属于所述第一流表项中的匹配字 段值对应的匹配字段,所述第二匹配字段值对应的匹配字段不属于所述第二流表项中的匹配字段值对应的匹配字段;
相应地,数据包处理单元203,还用于在后续接收到所述第二业务的后续数据包时在所述业务流表中查找与所述后续数据包匹配的业务流表项,并根据查找到的业务流表项的动作处理所述后续数据包。
优选地,如图3-2所示,所述通信装置还可以包括对应关系配置单元206,对应关系配置单元206,用于配置各业务路径和对应的硬件流表的对应关系,所述各业务路径包括所述第一目标业务路径,具体包括:用于配置多个物理流表、以及各物理流表与硬件流表的对应关系,所述多个物理流表分别包括支持的匹配字段和动作,其中,每个物理流表的匹配字段包括在对应的硬件流表的匹配字段中,每个物理流表的动作中需写入硬件流表的动作包括在对应的硬件流表的动作中;并用于配置所述各业务路径与物理流表的对应关系,其中,每个业务路径的匹配字段包括在对应的所有物理流表的匹配字段中,且每个业务路径的动作包括在对应的所有物理流表的动作中;
相应地,数据包处理单元203用于根据预先配置的所述第一目标业务路径和第一硬件流表的对应关系确定所述第一目标业务路径对应的第一硬件流表,具体包括:数据包处理单元203用于根据所述第一目标业务路径和对应的第一物理流表的对应关系确定所述第一物理流表,并根据所述第一物理流表和对应的所述第一硬件流表的对应关系确定所述第一硬件流表。
本发明实施例2中描述的功能单元可以用来实施上述实施例1中的通信装置执行的方法。
根据本发明实施例2,所述多个OpenFlow流表均可以用于实现所述第一业务,因此,根据所述控制器的处理逻辑,无论是为该第一业务生成哪个或哪些流表的流表项,都是可以成功生成并发送的。而且,所述通信装置确定的该第一目标业务路径包括该第一业务的数据包的匹配字段值和动作值对应的匹配字段和动作,所以该第一目标业务路径支持该第一业务,又由于该第 一目标业务路径对应的硬件流表支持所述第一目标业务路径所支持的业务,所以,该第一目标业务路径对应的硬件流表即为支持该第一业务的硬件流表,进而,该通信装置可以在该硬件流表中配置用于实现该第一业务的流表项。因此,无论该通信装置对接什么控制器,均可以成功地在硬件流表中配置用于实现该第一业务的流表项,因此可以成功地处理该第一业务,从而降低了业务处理失败的几率。
参见图4,本发明实施例3提供了一种用于实现配置流表项的通信装置300,包括:处理器301和存储器302;
存储器302,用于存放计算机操作指令;
处理器301,用于执行存储器302中存放的计算机操作指令使得所述通信装置实现如下操作:
通过开放流OpenFlow协议向所述控制器上报流表结构,所述流表结构包括多个OpenFlow流表所支持的匹配字段和动作、以及所述多个OpenFlow流表的类型,所述多个OpenFlow流表所支持的匹配字段和动作存在交集,且所述交集中包括用于实现所述硬件转发芯片的硬件流表支持的第一业务的匹配字段和动作,所述多个OpenFlow流表的类型均为通配类型,其中,所述通信装置与硬件转发芯片相连接;
接收所述控制器通过OpenFlow协议发送的根据所述流表结构生成的流表项,并将所述流表项配置到软件流表中,其中,所述流表项是所述控制器根据所述流表结构和所述通信装置上报的数据包的信息生成的,所述数据包的信息包括所述第一业务的第一数据包的信息,所述流表项包括与所述第一数据包匹配的流表项中的至少一条;
从所述软件流表中获取与所述第一数据包匹配的第一流表项,根据所述第一流表项的动作值处理所述第一数据包,并在预先配置的业务路径中确定与所述第一流表项相匹配的第一目标业务路径,确定的所述第一目标业务路 径的匹配字段包括所述第一流表项的匹配字段值所对应的匹配字段中的入端口匹配字段和包头匹配字段,所述第一目标业务路径的动作包括所述第一流表项的动作值中用于对所述第一数据包进行处理的动作值所对应的动作;
根据预先配置的所述第一目标业务路径和第一硬件流表的对应关系确定所述第一目标业务路径对应的第一硬件流表,其中,所述第一目标业务路径对应的第一硬件流表支持所述第一目标业务路径所支持的业务;
根据所述第一流表项配置所述第一硬件流表的流表项。
在一种具体实现方式中,处理器301可以执行所述计算机操作指令具体使得所述通信装置上报的所述多个OpenFlow流表的匹配字段是OpenFlow协议支持的所有匹配字段,上报的所述多个OpenFlow流表的动作是OpenFlow协议支持的所有动作。
所述第一流表项可能为一条,也可能是两条以上,相应地,处理器301可以执行所述计算机操作指令具体使得所述通信装置实现如下操作:
当所述第一流表项为两条以上时,对所述第一流表项进行聚合生成合并流表项,其中,所述合并流表项包括的匹配字段值为所述第一流表项的匹配字段值中对应于入端口匹配字段和包头匹配字段的匹配字段值,所述合并流表项包括的动作值为所述第一流表项的动作值中用于对所述第一数据包进行处理的动作值;在所述预先配置的业务路径中确定一个匹配字段包括所述合并流表项的匹配字段值对应的匹配字段、且动作包括所述合并流表项的动作值对应的动作的业务路径作为所述第一目标业务路径;
当所述第一流表项为1条时,在所述预先配置的业务路径中确定一个匹配字段包括所述第一流表项的匹配字段值对应的匹配字段、且动作包括所述第一流表项的动作值对应的动作的业务路径作为所述第一目标业务路径。
在具体实现时,所述交集中还可能包括用于实现所述硬件转发芯片的硬件流表不支持的第二业务的匹配字段和动作;所述数据包的信息还包括所述第二业务的第二数据包的信息,所述接收自所述控制器的流表项还包括与所 述第二数据包匹配的流表项中的至少一条;相应地,处理器301执行所述计算机操作指令进一步使得所述通信装置实现如下操作:从所述软件流表中获取与所述第二数据包匹配的第二流表项,根据所述第二流表项的动作处理所述第二数据包。
进一步地,处理器301还可以执行所述计算机操作指令进一步使得所述通信装置实现如下操作:
在所述预先配置的业务路径中确定与所述第二流表项相匹配的第二目标业务路径,确定的所述第二目标业务路径的匹配字段包括所述第二流表项的匹配字段值所对应的匹配字段中的入端口匹配字段和包头匹配字段,所述第二目标业务路径的动作包括所述第二流表项的动作值中用于对所述第二数据包进行处理的动作值所对应的动作;
根据所述第二流表项配置所述第二目标业务路径对应的业务流表的业务流表项,其中,所述业务流表为精配表,且所述业务流表的匹配字段为所述第二目标业务路径的所有匹配字段,将所述业务流表项中的第一匹配字段值配置为所述第一流表项中的相应匹配字段值,将所述业务流表项中的第二匹配字段值配置为所述第二数据包的包头中的相应头域值,并将所述业务流表项中的动作值配置为所述第二流表项的动作值,其中,所述第一匹配字段值对应的匹配字段属于所述第一流表项中的匹配字段值对应的匹配字段,所述第二匹配字段值对应的匹配字段不属于所述第二流表项中的匹配字段值对应的匹配字段;
在后续接收到所述第二业务的后续数据包时在所述业务流表中查找与所述后续数据包匹配的业务流表项,并根据查找到的业务流表项的动作处理所述后续数据包。
优选地,处理器301还执行所述计算机操作指令进一步使得所述通信装置实现如下操作:配置各业务路径和对应的硬件流表的对应关系,所述各业务路径包括所述第一目标业务路径,具体包括:
配置多个物理流表、以及各物理流表与硬件流表的对应关系,所述多个物理流表分别包括支持的匹配字段和动作,其中,每个物理流表的匹配字段包括在对应的硬件流表的匹配字段中,每个物理流表的动作中需写入硬件流表的动作包括在对应的硬件流表的动作中;
配置所述各业务路径与物理流表的对应关系,其中,每个业务路径的匹配字段包括在对应的所有物理流表的匹配字段中,且每个业务路径的动作包括在对应的所有物理流表的动作中;
相应地,处理器301执行所述计算机操作指令使得所述通信装置根据预先配置的所述第一目标业务路径和第一硬件流表的对应关系确定所述第一目标业务路径对应的第一硬件流表,具体包括:处理器301执行所述计算机操作指令具体使得所述通信装置根据所述第一目标业务路径和对应的第一物理流表的对应关系确定所述第一物理流表,并根据所述第一物理流表和对应的所述第一硬件流表的对应关系确定所述第一硬件流表。
本发明实施例3中描述的处理器301执行所述计算机操作指令使得所述通信装置实施上述实施例1的通信装置执行的方法。
根据本发明实施例3,所述多个OpenFlow流表均可以用于实现所述第一业务,因此,根据所述控制器的处理逻辑,无论是为该第一业务生成哪个或哪些流表的流表项,都是可以成功生成并发送的。而且,所述通信装置确定的该第一目标业务路径包括该第一业务的数据包的匹配字段值和动作值对应的匹配字段和动作,所以该第一目标业务路径支持该第一业务,又由于该第一目标业务路径对应的硬件流表支持所述第一目标业务路径所支持的业务,所以,该第一目标业务路径对应的硬件流表即为支持该第一业务的硬件流表,进而,该通信装置可以在该硬件流表中配置用于实现该第一业务的流表项。因此,无论该通信装置对接什么控制器,均可以成功地在硬件流表中配置用于实现该第一业务的流表项,因此可以成功地处理该第一业务,从而降低了业务处理失败的几率。
参见图5,本发明实施例4提供了一种交换机400,包括:通信装置401和硬件转发芯片402,其中,通信装置401和硬件转发芯片402相连接,通信装置401与控制器通过开放流OpenFlow协议通信,通信装置401具体为实施例2提供的通信装置200或实施例3提供的通信装置300。
参见图6,本发明实施例5提供了一种通信系统500,包括交换机501和控制器502,其中,交换机501和控制器502通过开放流OpenFlow协议通信,交换机501具体为实施例4提供的交换机400。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作 为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。

Claims (34)

  1. 一种配置流表项的方法,其特征在于,包括:
    交换机向控制器上报第一业务的数据包的信息;
    所述交换机接收所述控制器根据所述第一业务的数据包的信息和流表结构下发的第一业务流表项,所述流表结构包括多个流表所支持的匹配字段和动作,所述多个流表中的每一个所支持的匹配字段包括所述第一业务的匹配字段、所支持的动作包括所述第一业务的动作;
    所述交换机在预先配置的业务路径中确定与所述第一业务流表项相匹配的第一目标业务路径,所述第一目标业务路径的匹配字段包括所述第一业务的匹配字段,所述目标业务路径的动作包括所述第一业务的动作;
    所述交换机根据预先配置的所述业务路径和所述交换机的硬件流表的对应关系确定目标硬件流表,其中,所述目标硬件流表支持所述第一目标业务路径所支持的业务;
    所述交换机根据所述第一业务流表项配置所述目标硬件流表的流表项。
  2. 如权利要求1所述的方法,其特征在于,所述交换机和所述控制器之间通过开放流OpenFlow协议通信,所述多个流表为Openflow流表。
  3. 如权利要求2所述的方法,其特征在于,所述多个流表的匹配字段是OpenFlow协议支持的所有匹配字段,所述多个流表的动作是OpenFlow协议支持的所有动作。
  4. 如权利要求1-3任一所述的方法,其特征在于,所述交换机在预先配置的业务路径中确定与所述第一业务流表项相匹配的第一目标业务路径具体包括:
    所述交换机将所述第一业务流表项配置到软件流表中;
    所述交换机从所述软件流表中获取与所述第一业务的数据包匹配的第一目标流表项,并在所述预先配置的业务路径中确定与所述第一目标流表项相匹配的所述第一目标业务路径,确定的所述第一目标业务路径的匹配字段包括所述 第一目标流表项的匹配字段值所对应的匹配字段中的入端口匹配字段和包头匹配字段,确定的所述第一目标业务路径的动作包括所述第一目标流表项的动作值中用于对所述第一业务的数据包进行处理的动作;
    所述交换机根据所述第一业务流表项配置所述目标硬件流表的流表项具体包括,所述交换机根据所述第一目标流表项配置所述目标硬件流表的流表项。
  5. 如权利要求4所述的方法,其特征在于,所述在预先配置的业务路径中确定与所述第一目标流表项相匹配的第一目标业务路径具体包括:
    当所述第一目标流表项为两条以上时,对所述第一目标流表项进行聚合生成合并流表项,其中,所述合并流表项的匹配字段值为所述第一目标流表项中对应于入端口匹配字段和包头匹配字段的匹配字段值,所述合并流表项的动作值为所述第一目标流表项中用于对所述第一业务的数据包进行处理的动作值;在所述预先配置的业务路径中确定一个包括所述合并流表项的匹配字段值对应的匹配字段、且包括所述合并流表项的动作值对应的动作的业务路径作为所述第一目标业务路径;
    当所述第一目标流表项为1条时,在所述预先配置的业务路径中确定一个包括所述第一目标流表项的匹配字段值对应的匹配字段、且包括所述第一目标流表项的动作值对应的动作的业务路径作为所述第一目标业务路径。
  6. 如权利要求1-5任一所述的方法,其特征在于,所述多个流表中的每一个所支持的匹配字段和动作还包括第二业务的匹配字段和动作,所述第二业务是所述交换机的硬件流表不支持的业务;
    所述方法还包括:
    所述交换机向所述控制器上报所述第二业务的数据包的信息;
    所述交换机接收所述控制器根据所述第二业务的数据包的信息和所述流表结构下发的第二业务流表项,并将所述第二业务流表项配置到软件流表中。
  7. 如权利要求6所述的方法,其特征在于,所述将所述第二业务流表项配置到软件流表中之后还包括:
    所述交换机从所述软件流表中获取与所述第二业务的数据包匹配的第二目标流表项;
    所述交换机在所述预先配置的业务路径中确定与所述第二目标流表项相匹配的第二目标业务路径,确定的所述第二目标业务路径的匹配字段包括所述第二目标流表项的匹配字段值所对应的匹配字段中的入端口匹配字段和包头匹配字段,确定的所述第二目标业务路径的动作包括所述第二目标流表项的动作值中用于对所述第二业务的数据包进行处理的动作;
    所述交换机根据所述第二目标流表项配置所述第二目标业务路径对应的业务流表的业务流表项,其中,所述业务流表为精配表,且所述业务流表的匹配字段为所述第二目标业务路径的所有匹配字段,将所述业务流表项中的第一匹配字段值配置为所述第二目标流表项中的匹配字段值,将所述业务流表项中的第二匹配字段值配置为所述第二业务的数据包的包头中的头域值,并将所述业务流表项中的动作值配置为所述第二目标流表项的动作值,其中,所述第一匹配字段值对应的匹配字段属于所述第二流表项中的匹配字段值对应的匹配字段,所述第二匹配字段值对应的匹配字段不属于所述第二流表项中的匹配字段值对应的匹配字段;
    所述交换机在后续接收到所述第二业务的后续数据包时在所述业务流表中查找与所述后续数据包匹配的业务流表项,并根据查找到的业务流表项的动作处理所述后续数据包。
  8. 如权利要求1-7任一权项所述的方法,其特征在于,
    所述根据预先配置的所述业务路径和所述硬件流表的对应关系确定目标硬件流表之前还包括:配置各业务路径和对应的硬件流表的对应关系,具体包括:
    配置多个物理流表、以及各物理流表与硬件流表的对应关系,所述多个物理流表分别包括支持的匹配字段和动作,其中,每个物理流表的匹配字段包括在对应的硬件流表的匹配字段中,每个物理流表的动作中需写入硬件流表的动作包括在对应的硬件流表的动作中;
    配置所述各业务路径与物理流表的对应关系,其中,每个业务路径的匹配字段包括在对应的所有物理流表的匹配字段中,且每个业务路径的动作包括在对应的所有物理流表的动作中;
    所述交换机根据预先配置的所述业务路径和所述硬件流表的对应关系确定目标硬件流表,具体包括:
    所述交换机根据所述第一目标业务路径和对应的第一物理流表的对应关系确定所述第一物理流表,并根据所述第一物理流表和对应的所述目标硬件流表的对应关系确定所述目标硬件流表。
  9. 如权利要求1-8任一权项所述的方法,其特征在于,所述交换机向控制器上报第一业务的数据包的信息之前还包括,所述交换机向所述控制器上报所述流表结构。
  10. 如权利要求1-9任一权项所述的方法,其特征在于,所述流表结构还包括所述多个流表的类型,所述多个流表的类型为通配类型。
  11. 一种配置流表项的方法,其特征在于,包括:
    通信装置向控制器上报第一业务的数据包的信息;
    所述通信装置接收所述控制器根据所述第一业务的数据包的信息和流表结构下发的第一业务流表项,所述流表结构包括多个流表所支持的匹配字段和动作,所述多个流表中的每一个所支持的匹配字段包括所述第一业务的匹配字段、所支持的动作包括所述第一业务的动作;
    所述通信装置在预先配置的业务路径中确定与所述第一业务流表项相匹配的第一目标业务路径,所述第一目标业务路径的匹配字段包括所述第一业务的匹配字段,所述目标业务路径的动作包括所述第一业务的动作;
    所述通信装置根据预先配置的所述业务路径和与所述通信装置相连接的硬件转发芯片的硬件流表的对应关系确定目标硬件流表,其中,所述目标硬件流表支持所述第一目标业务路径所支持的业务;
    所述通信装置根据所述第一业务流表项配置所述目标硬件流表的流表项。
  12. 如权利要求11所述的方法,其特征在于,所述通信装置和所述控制器之间通过开放流OpenFlow协议通信,所述流表为Openflow流表;所述多个流表的匹配字段是OpenFlow协议支持的所有匹配字段,所述多个流表的动作是OpenFlow协议支持的所有动作。
  13. 如权利要求11或12所述的方法,其特征在于,所述通信装置在预先配置的业务路径中确定与所述第一业务流表项相匹配的第一目标业务路径具体包括:
    所述通信装置将所述第一业务流表项配置到软件流表中;
    所述通信装置从所述软件流表中获取与所述第一业务的数据包匹配的第一目标流表项,并在所述预先配置的业务路径中确定与所述第一目标流表项相匹配的所述第一目标业务路径,确定的所述第一目标业务路径的匹配字段包括所述第一目标流表项的匹配字段值所对应的匹配字段中的入端口匹配字段和包头匹配字段,确定的所述第一目标业务路径的动作包括所述第一目标流表项的动作值中用于对所述第一业务的数据包进行处理的动作;
    所述通信装置根据所述第一业务流表项配置所述目标硬件流表的流表项具体包括,所述通信装置根据所述第一目标流表项配置所述目标硬件流表的流表项。
  14. 如权利要求13所述的方法,其特征在于,所述在预先配置的业务路径中确定与所述第一目标流表项相匹配的第一目标业务路径具体包括:
    当所述第一目标流表项为两条以上时,对所述第一目标流表项进行聚合生成合并流表项,其中,所述合并流表项的匹配字段值为所述第一目标流表项中对应于入端口匹配字段和包头匹配字段的匹配字段值,所述合并流表项的动作值为所述第一目标流表项中用于对所述第一业务的数据包进行处理的动作值;在所述预先配置的业务路径中确定一个包括所述合并流表项的匹配字段值对应的匹配字段、且包括所述合并流表项的动作值对应的动作的业务路径作为所述 第一目标业务路径;
    当所述第一目标流表项为1条时,在所述预先配置的业务路径中确定一个包括所述第一目标流表项的匹配字段值对应的匹配字段、且包括所述第一目标流表项的动作值对应的动作的业务路径作为所述第一目标业务路径。
  15. 如权利要求11-14任一所述的方法,其特征在于,所述多个流表中的每一个所支持的匹配字段和动作还包括第二业务的匹配字段和动作,所述第二业务是所述交换机的硬件流表不支持的业务;
    所述方法还包括:
    所述通信装置向所述控制器上报所述第二业务的数据包的信息;
    所述通信装置接收所述控制器根据所述第二业务的数据包的信息和所述流表结构下发的第二业务流表项,并将所述第二业务流表项配置到软件流表中。
  16. 如权利要求15所述的方法,其特征在于,所述将所述第二业务流表项配置到软件流表中之后还包括:
    所述通信装置从所述软件流表中获取与所述第二业务的数据包匹配的第二目标流表项;
    所述通信装置在所述预先配置的业务路径中确定与所述第二目标流表项相匹配的第二目标业务路径,确定的所述第二目标业务路径的匹配字段包括所述第二目标流表项的匹配字段值所对应的匹配字段中的入端口匹配字段和包头匹配字段,确定的所述第二目标业务路径的动作包括所述第二目标流表项的动作值中用于对所述第二业务的数据包进行处理的动作;
    所述通信装置根据所述第二目标流表项配置所述第二目标业务路径对应的业务流表的业务流表项,其中,所述业务流表为精配表,且所述业务流表的匹配字段为所述第二目标业务路径的所有匹配字段,将所述业务流表项中的第一匹配字段值配置为所述第二目标流表项中的匹配字段值,将所述业务流表项中的第二匹配字段值配置为所述第二业务的数据包的包头中的头域值,并将所述业务流表项中的动作值配置为所述第二目标流表项的动作值,其中,所述第一 匹配字段值对应的匹配字段属于所述第二目标流表项中的匹配字段值对应的匹配字段,所述第二匹配字段值对应的匹配字段不属于所述第二流表项中的匹配字段值对应的匹配字段;
    所述通信装置在后续接收到所述第二业务的后续数据包时在所述业务流表中查找与所述后续数据包匹配的业务流表项,并根据查找到的业务流表项的动作处理所述后续数据包。
  17. 如权利要求11-16任一权项所述的方法,其特征在于,
    所述根据预先配置的所述业务路径和所述硬件流表的对应关系确定目标硬件流表之前还包括:配置各业务路径和对应的硬件流表的对应关系,具体包括:
    配置多个物理流表、以及各物理流表与硬件流表的对应关系,所述多个物理流表分别包括支持的匹配字段和动作,其中,每个物理流表的匹配字段包括在对应的硬件流表的匹配字段中,每个物理流表的动作中需写入硬件流表的动作包括在对应的硬件流表的动作中;
    配置所述各业务路径与物理流表的对应关系,其中,每个业务路径的匹配字段包括在对应的所有物理流表的匹配字段中,且每个业务路径的动作包括在对应的所有物理流表的动作中;
    所述通信装置根据预先配置的所述业务路径和所述硬件流表的对应关系确定目标硬件流表,具体包括:
    所述通信装置根据所述第一目标业务路径和对应的第一物理流表的对应关系确定所述第一物理流表,并根据所述第一物理流表和所述目标硬件流表的对应关系确定所述目标硬件流表。
  18. 如权利要求11-17任一权项所述的方法,其特征在于,所述流表结构还包括所述多个流表的类型,所述多个流表的类型为通配类型。
  19. 一种用于实现配置流表项的通信装置,其特征在于,所述通信装置与硬件转发芯片相连接,包括:接口单元、数据包处理单元和硬件流表配置单元;
    所述接口单元,用于向所述控制器上报第一业务的数据包的信息,还用于接收所述控制器根据所述第一业务的数据包的信息和流表结构下发的第一业务流表项,所述流表结构包括多个流表所支持的匹配字段和动作,所述多个流表中的每一个所支持的匹配字段包括所述第一业务的匹配字段、所支持的动作包括所述第一业务的动作;
    所述数据包处理单元,用于在预先配置的业务路径中确定与所述第一业务流表项相匹配的第一目标业务路径,所述第一目标业务路径的匹配字段包括所述第一业务的匹配字段,所述目标业务路径的动作包括所述第一业务的动作;并用于根据预先配置的所述业务路径和所述硬件转发芯片的硬件流表的对应关系确定目标硬件流表,其中,所述目标硬件流表支持所述第一目标业务路径所支持的业务;
    硬件流表配置单元,用于根据所述第一业务流表项配置所述目标硬件流表的流表项。
  20. 如权利要求19所述的通信装置,其特征在于,所述通信装置和所述控制器之间通过开放流OpenFlow协议通信,所述流表为Openflow流表;所述多个流表的匹配字段是OpenFlow协议支持的所有匹配字段,所述多个流表的动作是OpenFlow协议支持的所有动作。
  21. 如权利要求19或20所述的通信装置,其特征在于,所述数据包处理单元,用于在预先配置的业务路径中确定与所述第一业务流表项相匹配的第一目标业务路径具体包括:
    所述数据包处理单元,用于将所述第一业务流表项配置到软件流表中,从所述软件流表中获取与所述第一业务的数据包匹配的第一目标流表项,并在所述预先配置的业务路径中确定与所述第一目标流表项相匹配的所述第一目标业务路径,确定的所述第一目标业务路径的匹配字段包括所述第一目标流表项的匹配字段值所对应的匹配字段中的入端口匹配字段和包头匹配字段,确定的所述第一目标业务路径的动作包括所述第一目标流表项的动作值中用于对所述第 一业务的数据包进行处理的动作;
    硬件流表配置单元,具体用于根据所述第一目标流表项配置所述目标硬件流表的流表项。
  22. 如权利要求21所述的通信装置,其特征在于,所述数据包处理单元用于在预先配置的业务路径中确定与所述第一目标流表项相匹配的目标业务路径具体包括:
    所述数据包处理单元,用于当所述第一目标流表项为两条以上时,对所述第一目标流表项进行聚合生成合并流表项,其中,所述合并流表项的匹配字段值为所述第一目标流表项中对应于入端口匹配字段和包头匹配字段的匹配字段值,所述合并流表项的动作值为所述第一目标流表项中用于对所述第一业务的数据包进行处理的动作值;在所述预先配置的业务路径中确定一个包括所述合并流表项的匹配字段值对应的匹配字段、且包括所述合并流表项的动作值对应的动作的业务路径作为所述第一目标业务路径;并用于当所述第一目标流表项为1条时,在所述预先配置的业务路径中确定一个包括所述第一目标流表项的匹配字段值对应的匹配字段、且包括所述第一目标流表项的动作值对应的动作的业务路径作为所述第一目标业务路径。
  23. 如权利要求19-11任一所述的通信装置,其特征在于,所述多个流表中的每一个所支持的匹配字段和动作还包括第二业务的匹配字段和动作,所述第二业务是所述交换机的硬件流表不支持的业务;
    所述接口单元,还用于向所述控制器上报所述第二业务的数据包的信息,并接收所述控制器根据所述第二业务的数据包的信息和所述流表结构下发的第二业务流表项;
    所述数据包处理单元,还用于将所述接口单元接收的所述第二业务流表项配置到软件流表中。
  24. 如权利要求19-23任一权项所述的通信装置,其特征在于,所述通信装置还包括业务流表配置单元;
    所述数据包处理单元,还用于从所述软件流表中获取与所述第二业务的数据包匹配的第二目标流表项,在所述预先配置的业务路径中确定与所述第二目标流表项相匹配的第二目标业务路径,确定的所述第二目标业务路径的匹配字段包括所述第二目标流表项的匹配字段值所对应的匹配字段中的入端口匹配字段和包头匹配字段,确定的所述第二目标业务路径的动作包括所述第二目标流表项的动作值中用于对所述第二业务的数据包进行处理的动作;
    所述业务流表配置单元,用于根据所述第二目标流表项配置所述第二目标业务路径对应的业务流表的业务流表项,其中,所述业务流表为精配表,且所述业务流表的匹配字段为所述第二目标业务路径的所有匹配字段,将所述业务流表项中的第一匹配字段值配置为所述第二目标流表项中的匹配字段值,将所述业务流表项中的第二匹配字段值配置为所述第二业务的数据包的包头中的头域值,并将所述业务流表项中的动作值配置为所述第二流表项的动作值,其中,所述第一匹配字段值对应的匹配字段属于所述第二目标流表项中的匹配字段值对应的匹配字段,所述第二匹配字段值对应的匹配字段不属于所述第二流表项中的匹配字段值对应的匹配字段;
    所述数据包处理单元,还用于在后续接收到所述第二业务的后续数据包时在所述业务流表中查找与所述后续数据包匹配的业务流表项,并根据查找到的业务流表项的动作处理所述后续数据包。
  25. 如权利要求19-24任一权项所述的通信装置,其特征在于,所述通信装置还包括对应关系配置单元;
    所述对应关系配置单元,用于配置各业务路径和对应的硬件流表的对应关系,具体包括:用于配置多个物理流表、以及各物理流表与硬件流表的对应关系,所述多个物理流表分别包括支持的匹配字段和动作,其中,每个物理流表的匹配字段包括在对应的硬件流表的匹配字段中,每个物理流表的动作中需写入硬件流表的动作包括在对应的硬件流表的动作中;并用于配置各业务路径与物理流表的对应关系,其中,每个业务路径的匹配字段包括在对应的所有物理 流表的匹配字段中,且每个业务路径的动作包括在对应的所有物理流表的动作中;
    所述数据包处理单元用于根据预先配置的所述业务路径和所述硬件流表的对应关系确定目标硬件流表,具体包括:所述数据包处理单元用于根据所述第一目标业务路径和对应的第一物理流表的对应关系确定所述第一物理流表,并根据所述第一物理流表和对应的所述目标硬件流表的对应关系确定所述目标硬件流表。
  26. 一种用于实现配置流表项的通信装置,其特征在于,包括:处理器和存储器;
    所述存储器,用于存放计算机操作指令;
    所述处理器,用于执行所述存储器中存放的计算机操作指令使得所述通信装置实现如下操作:
    向控制器上报第一业务的数据包的信息;
    接收所述控制器根据所述第一业务的数据包的信息和流表结构下发的第一业务流表项,所述流表结构包括多个流表所支持的匹配字段和动作,所述多个流表中的每一个所支持的匹配字段包括所述第一业务的匹配字段、所支持的动作包括所述第一业务的动作;
    在预先配置的业务路径中确定与所述第一业务流表项相匹配的第一目标业务路径,所述第一目标业务路径的匹配字段包括所述第一业务的匹配字段,所述目标业务路径的动作包括所述第一业务的动作;
    根据预先配置的所述业务路径和与所述通信装置相连接的硬件转发芯片的硬件流表的对应关系确定目标硬件流表,其中,所述目标硬件流表支持所述第一目标业务路径所支持的业务;
    根据所述第一业务流表项配置所述目标硬件流表的流表项。
  27. 如权利要求26所述的通信装置,其特征在于,所述通信装置和所述控 制器之间通过开放流OpenFlow协议通信,所述流表为Openflow流表;所述多个流表的匹配字段是OpenFlow协议支持的所有匹配字段,所述多个流表的动作是OpenFlow协议支持的所有动作。
  28. 如权利要求26或27所述的通信装置,其特征在于,所述处理器执行所述计算机操作指令具体使得所述通信装置实现如下操作:
    将所述第一业务流表项配置到软件流表中;
    从所述软件流表中获取与所述第一业务的数据包匹配的第一目标流表项,并在所述预先配置的业务路径中确定与所述第一目标流表项相匹配的所述第一目标业务路径,确定的所述第一目标业务路径的匹配字段包括所述第一目标流表项的匹配字段值所对应的匹配字段中的入端口匹配字段和包头匹配字段,确定的所述第一目标业务路径的动作包括所述第一目标流表项的动作值中用于对所述第一业务的数据包进行处理的动作;
    根据所述第一业务流表项配置所述目标硬件流表的流表项具体包括,所述通信装置根据所述第一目标流表项配置所述目标硬件流表的流表项。
  29. 如权利要求28所述的通信装置,其特征在于,所述处理器执行所述计算机操作指令具体使得所述通信装置实现如下操作:
    当所述第一目标流表项为两条以上时,对所述第一目标流表项进行聚合生成合并流表项,其中,所述合并流表项的匹配字段值为所述第一目标流表项中对应于入端口匹配字段和包头匹配字段的匹配字段值,所述合并流表项的动作值为所述第一目标流表项中用于对所述第一业务的数据包进行处理的动作值;在所述预先配置的业务路径中确定一个包括所述合并流表项的匹配字段值对应的匹配字段、且包括所述合并流表项的动作值对应的动作的业务路径作为所述第一目标业务路径;
    当所述第一目标流表项为1条时,在所述预先配置的业务路径中确定一个包括所述第一目标流表项的匹配字段值对应的匹配字段、且包括所述第一目标流表项的动作值对应的动作的业务路径作为所述第一目标业务路径。
  30. 如权利要求26-29任一所述的通信装置,其特征在于,所述多个流表中的每一个所支持的匹配字段和动作还包括第二业务的匹配字段和动作,所述第二业务是所述交换机的硬件流表不支持的业务;
    所述处理器执行所述计算机操作指令进一步使得所述通信装置实现如下操作:
    向所述控制器上报所述第二业务的数据包的信息;
    接收所述控制器根据所述第二业务的数据包的信息和所述流表结构下发的第二业务流表项,并将所述第二业务流表项配置到软件流表中。
  31. 如权利要求30所述的通信装置,其特征在于,所述处理器执行所述计算机操作指令进一步使得所述通信装置实现如下操作:
    从所述软件流表中获取与所述第二业务的数据包匹配的第二目标流表项;
    在所述预先配置的业务路径中确定与所述第二目标流表项相匹配的第二目标业务路径,确定的所述第二目标业务路径的匹配字段包括所述第二目标流表项的匹配字段值所对应的匹配字段中的入端口匹配字段和包头匹配字段,确定的所述第二目标业务路径的动作包括所述第二目标流表项的动作值中用于对所述第二业务的数据包进行处理的动作;
    根据所述第二目标流表项配置所述第二目标业务路径对应的业务流表的业务流表项,其中,所述业务流表为精配表,且所述业务流表的匹配字段为所述第二目标业务路径的所有匹配字段,将所述业务流表项中的第一匹配字段值配置为所述第二目标流表项中的匹配字段值,将所述业务流表项中的第二匹配字段值配置为所述第二业务的数据包的包头中的头域值,并将所述业务流表项中的动作值配置为所述第二目标流表项的动作值,其中,所述第一匹配字段值对应的匹配字段属于所述第二目标流表项中的匹配字段值对应的匹配字段,所述第二匹配字段值对应的匹配字段不属于所述第二流表项中的匹配字段值对应的匹配字段;
    在后续接收到所述第二业务的后续数据包时在所述业务流表中查找与所述 后续数据包匹配的业务流表项,并根据查找到的业务流表项的动作处理所述后续数据包。
    在所述预先配置的业务路径中确定与所述第二流表项相匹配的第二目标业务路径,确定的所述第二目标业务路径的匹配字段包括所述第二流表项的匹配字段值所对应的匹配字段中的入端口匹配字段和包头匹配字段,所述第二目标业务路径的动作包括所述第二流表项的动作值中用于对所述第二数据包进行处理的动作值所对应的动作;
    根据所述第二流表项配置所述第二目标业务路径对应的业务流表的业务流表项,其中,所述业务流表为精配表,且所述业务流表的匹配字段为所述第二目标业务路径的所有匹配字段,将所述业务流表项中的第一匹配字段值配置为所述第一流表项中的匹配字段值,将所述业务流表项中的第二匹配字段值配置为所述第二数据包的包头中的头域值,并将所述业务流表项中的动作值配置为所述第二流表项的动作值,其中,所述第一匹配字段值对应的匹配字段属于所述第一流表项中的匹配字段值对应的匹配字段,所述第二匹配字段值对应的匹配字段不属于所述第二流表项中的匹配字段值对应的匹配字段;
    在后续接收到所述第二业务的后续数据包时在所述业务流表中查找与所述后续数据包匹配的业务流表项,并根据查找到的业务流表项的动作处理所述后续数据包。
  32. 如权利要求26-31任一权项所述的通信装置,其特征在于,
    所述处理器执行所述计算机操作指令进一步使得所述通信装置实现如下操作:配置各业务路径和对应的硬件流表的对应关系,配置各业务路径和对应的硬件流表的对应关系,具体包括:
    配置多个物理流表、以及各物理流表与硬件流表的对应关系,所述多个物理流表分别包括支持的匹配字段和动作,其中,每个物理流表的匹配字段包括在对应的硬件流表的匹配字段中,每个物理流表的动作中需写入硬件流表的动作包括在对应的硬件流表的动作中;
    配置所述各业务路径与物理流表的对应关系,其中,每个业务路径的匹配字段包括在对应的所有物理流表的匹配字段中,且每个业务路径的动作包括在对应的所有物理流表的动作中;
    所述处理器执行所述计算机操作指令使得所述通信装置根据预先配置的所述业务路径和所述硬件流表的对应关系确定目标硬件流表,具体包括:
    所述处理器执行所述计算机操作指令具体使得所述通信装置根据所述第一目标业务路径和对应的第一物理流表的对应关系确定所述第一物理流表,并根据所述第一物理流表和所述目标硬件流表的对应关系确定所述目标硬件流表。
  33. 一种交换机,其特征在于,包括:
    硬件转发芯片;
    如权利要求19-25任一所述的通信装置,或如权利要求26-32任一所述的通信装置。
  34. 一种通信系统,其特征在于,包括:控制器和如权利要求33所述的交换机。
PCT/CN2014/089530 2014-06-30 2014-10-27 一种配置流表项的方法、装置和系统 Ceased WO2016000362A1 (zh)

Priority Applications (9)

Application Number Priority Date Filing Date Title
JP2017519755A JP6490205B2 (ja) 2014-06-30 2014-10-27 フローエントリ構成の方法、装置及びシステム
EP14896752.4A EP3142310B1 (en) 2014-06-30 2014-10-27 Method, device, and system for configuring flow entries
CN201480079888.0A CN106664261B (zh) 2014-06-30 2014-10-27 一种配置流表项的方法、装置和系统
AU2014399458A AU2014399458B2 (en) 2014-06-30 2014-10-27 Flow Entry Configuration Method, Apparatus, and System
KR1020167035418A KR101886291B1 (ko) 2014-06-30 2014-10-27 흐름 엔트리 구성 방법, 장치, 및 시스템
CA2950206A CA2950206C (en) 2014-06-30 2014-10-27 Flow entry configuration method, apparatus, and system
RU2017100992A RU2651143C1 (ru) 2014-06-30 2014-10-27 Способ, устройство и система для конфигурирования записей потоков
US15/394,352 US10305777B2 (en) 2014-06-30 2016-12-29 Flow entry configuration method, apparatus, and system
US16/386,655 US10659342B2 (en) 2014-06-30 2019-04-17 Flow entry configuration method, apparatus, and system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CNPCT/CN2014/081183 2014-06-30
CN2014081183 2014-06-30

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/394,352 Continuation US10305777B2 (en) 2014-06-30 2016-12-29 Flow entry configuration method, apparatus, and system

Publications (1)

Publication Number Publication Date
WO2016000362A1 true WO2016000362A1 (zh) 2016-01-07

Family

ID=55018375

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/089530 Ceased WO2016000362A1 (zh) 2014-06-30 2014-10-27 一种配置流表项的方法、装置和系统

Country Status (9)

Country Link
US (2) US10305777B2 (zh)
EP (1) EP3142310B1 (zh)
JP (1) JP6490205B2 (zh)
KR (1) KR101886291B1 (zh)
CN (1) CN106664261B (zh)
AU (1) AU2014399458B2 (zh)
CA (1) CA2950206C (zh)
RU (1) RU2651143C1 (zh)
WO (1) WO2016000362A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108256045A (zh) * 2018-01-12 2018-07-06 福建星瑞格软件有限公司 实时流数据的结构化解析、流计算的方法及计算机设备
CN111131050A (zh) * 2019-12-31 2020-05-08 盛科网络(苏州)有限公司 流表的匹配方法及装置

Families Citing this family (71)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9781004B2 (en) 2014-10-16 2017-10-03 Cisco Technology, Inc. Discovering and grouping application endpoints in a network environment
US20160315866A1 (en) * 2015-04-27 2016-10-27 Telefonaktiebolaget L M Ericsson (Publ) Service based intelligent packet-in mechanism for openflow switches
US10348619B2 (en) * 2015-07-31 2019-07-09 Nicira, Inc. Generating conjunctive match flow entries
CN107547293B (zh) * 2016-06-29 2020-09-08 新华三技术有限公司 一种流路径探测方法和装置
US10623264B2 (en) 2017-04-20 2020-04-14 Cisco Technology, Inc. Policy assurance for service chaining
US10560328B2 (en) 2017-04-20 2020-02-11 Cisco Technology, Inc. Static network policy analysis for networks
US10826788B2 (en) 2017-04-20 2020-11-03 Cisco Technology, Inc. Assurance of quality-of-service configurations in a network
US10439875B2 (en) 2017-05-31 2019-10-08 Cisco Technology, Inc. Identification of conflict rules in a network intent formal equivalence failure
US10693738B2 (en) 2017-05-31 2020-06-23 Cisco Technology, Inc. Generating device-level logical models for a network
US20180351788A1 (en) 2017-05-31 2018-12-06 Cisco Technology, Inc. Fault localization in large-scale network policy deployment
US10812318B2 (en) 2017-05-31 2020-10-20 Cisco Technology, Inc. Associating network policy objects with specific faults corresponding to fault localizations in large-scale network deployment
US10581694B2 (en) 2017-05-31 2020-03-03 Cisco Technology, Inc. Generation of counter examples for network intent formal equivalence failures
US10623271B2 (en) 2017-05-31 2020-04-14 Cisco Technology, Inc. Intra-priority class ordering of rules corresponding to a model of network intents
US10505816B2 (en) 2017-05-31 2019-12-10 Cisco Technology, Inc. Semantic analysis to detect shadowing of rules in a model of network intents
US10554483B2 (en) 2017-05-31 2020-02-04 Cisco Technology, Inc. Network policy analysis for networks
US10587621B2 (en) 2017-06-16 2020-03-10 Cisco Technology, Inc. System and method for migrating to and maintaining a white-list network security model
US10547715B2 (en) 2017-06-16 2020-01-28 Cisco Technology, Inc. Event generation in response to network intent formal equivalence failures
US11645131B2 (en) 2017-06-16 2023-05-09 Cisco Technology, Inc. Distributed fault code aggregation across application centric dimensions
US10498608B2 (en) 2017-06-16 2019-12-03 Cisco Technology, Inc. Topology explorer
US11150973B2 (en) 2017-06-16 2021-10-19 Cisco Technology, Inc. Self diagnosing distributed appliance
US10686669B2 (en) 2017-06-16 2020-06-16 Cisco Technology, Inc. Collecting network models and node information from a network
US10904101B2 (en) 2017-06-16 2021-01-26 Cisco Technology, Inc. Shim layer for extracting and prioritizing underlying rules for modeling network intents
US10574513B2 (en) 2017-06-16 2020-02-25 Cisco Technology, Inc. Handling controller and node failure scenarios during data collection
US11469986B2 (en) 2017-06-16 2022-10-11 Cisco Technology, Inc. Controlled micro fault injection on a distributed appliance
US10547509B2 (en) 2017-06-19 2020-01-28 Cisco Technology, Inc. Validation of a virtual port channel (VPC) endpoint in the network fabric
US10560355B2 (en) 2017-06-19 2020-02-11 Cisco Technology, Inc. Static endpoint validation
US10411996B2 (en) 2017-06-19 2019-09-10 Cisco Technology, Inc. Validation of routing information in a network fabric
US11343150B2 (en) 2017-06-19 2022-05-24 Cisco Technology, Inc. Validation of learned routes in a network
US10623259B2 (en) 2017-06-19 2020-04-14 Cisco Technology, Inc. Validation of layer 1 interface in a network
US10437641B2 (en) 2017-06-19 2019-10-08 Cisco Technology, Inc. On-demand processing pipeline interleaved with temporal processing pipeline
US10673702B2 (en) 2017-06-19 2020-06-02 Cisco Technology, Inc. Validation of layer 3 using virtual routing forwarding containers in a network
US10567228B2 (en) 2017-06-19 2020-02-18 Cisco Technology, Inc. Validation of cross logical groups in a network
US11283680B2 (en) 2017-06-19 2022-03-22 Cisco Technology, Inc. Identifying components for removal in a network configuration
US10348564B2 (en) 2017-06-19 2019-07-09 Cisco Technology, Inc. Validation of routing information base-forwarding information base equivalence in a network
US10812336B2 (en) 2017-06-19 2020-10-20 Cisco Technology, Inc. Validation of bridge domain-L3out association for communication outside a network
US10432467B2 (en) 2017-06-19 2019-10-01 Cisco Technology, Inc. Network validation between the logical level and the hardware level of a network
US10218572B2 (en) 2017-06-19 2019-02-26 Cisco Technology, Inc. Multiprotocol border gateway protocol routing validation
US10341184B2 (en) 2017-06-19 2019-07-02 Cisco Technology, Inc. Validation of layer 3 bridge domain subnets in in a network
US10554493B2 (en) 2017-06-19 2020-02-04 Cisco Technology, Inc. Identifying mismatches between a logical model and node implementation
US10567229B2 (en) 2017-06-19 2020-02-18 Cisco Technology, Inc. Validating endpoint configurations between nodes
US10644946B2 (en) 2017-06-19 2020-05-05 Cisco Technology, Inc. Detection of overlapping subnets in a network
US10652102B2 (en) 2017-06-19 2020-05-12 Cisco Technology, Inc. Network node memory utilization analysis
US10528444B2 (en) 2017-06-19 2020-01-07 Cisco Technology, Inc. Event generation in response to validation between logical level and hardware level
US10333787B2 (en) 2017-06-19 2019-06-25 Cisco Technology, Inc. Validation of L3OUT configuration for communications outside a network
US10536337B2 (en) 2017-06-19 2020-01-14 Cisco Technology, Inc. Validation of layer 2 interface and VLAN in a networked environment
US10505817B2 (en) 2017-06-19 2019-12-10 Cisco Technology, Inc. Automatically determining an optimal amount of time for analyzing a distributed network environment
US10700933B2 (en) 2017-06-19 2020-06-30 Cisco Technology, Inc. Validating tunnel endpoint addresses in a network fabric
US10805160B2 (en) 2017-06-19 2020-10-13 Cisco Technology, Inc. Endpoint bridge domain subnet validation
US10587456B2 (en) 2017-09-12 2020-03-10 Cisco Technology, Inc. Event clustering for a network assurance platform
US10587484B2 (en) 2017-09-12 2020-03-10 Cisco Technology, Inc. Anomaly detection and reporting in a network assurance appliance
US10554477B2 (en) 2017-09-13 2020-02-04 Cisco Technology, Inc. Network assurance event aggregator
US10333833B2 (en) 2017-09-25 2019-06-25 Cisco Technology, Inc. Endpoint path assurance
CN107623635B (zh) * 2017-10-30 2020-07-21 深圳市德赛微电子技术有限公司 一种网络交换芯片可识别流表的智能匹配方法
US11102053B2 (en) 2017-12-05 2021-08-24 Cisco Technology, Inc. Cross-domain assurance
US10873509B2 (en) 2018-01-17 2020-12-22 Cisco Technology, Inc. Check-pointing ACI network state and re-execution from a check-pointed state
US10572495B2 (en) 2018-02-06 2020-02-25 Cisco Technology Inc. Network assurance database version compatibility
US10812315B2 (en) 2018-06-07 2020-10-20 Cisco Technology, Inc. Cross-domain network assurance
US11019027B2 (en) 2018-06-27 2021-05-25 Cisco Technology, Inc. Address translation for external network appliance
US11044273B2 (en) 2018-06-27 2021-06-22 Cisco Technology, Inc. Assurance of security rules in a network
US10659298B1 (en) 2018-06-27 2020-05-19 Cisco Technology, Inc. Epoch comparison for network events
US11218508B2 (en) 2018-06-27 2022-01-04 Cisco Technology, Inc. Assurance of security rules in a network
US10911495B2 (en) 2018-06-27 2021-02-02 Cisco Technology, Inc. Assurance of security rules in a network
US10904070B2 (en) 2018-07-11 2021-01-26 Cisco Technology, Inc. Techniques and interfaces for troubleshooting datacenter networks
US10826770B2 (en) 2018-07-26 2020-11-03 Cisco Technology, Inc. Synthesis of models for networks using automated boolean learning
US10616072B1 (en) 2018-07-27 2020-04-07 Cisco Technology, Inc. Epoch data interface
CN109450798B (zh) * 2018-12-13 2022-07-12 郑州云海信息技术有限公司 路由表信息的管理方法和计算机可读存储介质
US11470009B2 (en) * 2019-10-18 2022-10-11 Arista Networks, Inc. Implementing multi-table OpenFlow using a parallel hardware table lookup architecture
CN114726788B (zh) * 2022-05-06 2024-02-02 深圳星云智联科技有限公司 应用于dpu的报文传输方法及相关装置
CN114978809B (zh) * 2022-06-23 2024-01-12 惠州华阳通用电子有限公司 一种车载以太网vlan节点配置方法
CN117834461A (zh) * 2022-09-28 2024-04-05 中兴通讯股份有限公司 业务数据处理方法、设备及计算机可读存储介质
CN117041147B (zh) * 2023-10-08 2024-02-23 井芯微电子技术(天津)有限公司 智能网卡设备、主机设备和方法及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102685006A (zh) * 2012-05-03 2012-09-19 中兴通讯股份有限公司 一种转发数据报文的方法及装置
CN102843299A (zh) * 2012-09-12 2012-12-26 盛科网络(苏州)有限公司 基于TCAM实现Openflow多级流表的方法及系统
WO2013093857A1 (en) * 2011-12-22 2013-06-27 Telefonaktiebolaget L M Ericsson (Publ) Controller for flexible and extensible flow processing in software-defined networks
CN103685033A (zh) * 2013-12-19 2014-03-26 武汉邮电科学研究院 Sdn架构中支持分组交换和电路交换的通用流表及方法

Family Cites Families (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1001631A1 (en) * 1998-11-09 2000-05-17 CANAL+ Société Anonyme Signalling of bouquet information in a digital transmission system
US7826364B1 (en) * 2006-02-09 2010-11-02 Verizon Services Corp. Dynamic service-aware flow control in packet networks
US7583677B1 (en) * 2006-11-03 2009-09-01 Juniper Networks, Inc. Dynamic flow-based multi-path load balancing with quality of service assurances
US8218442B2 (en) 2008-09-11 2012-07-10 Juniper Networks, Inc. Methods and apparatus for flow-controllable multi-staged queues
US8804710B2 (en) 2008-12-29 2014-08-12 Juniper Networks, Inc. System architecture for a scalable and distributed multi-stage switch fabric
JP5621781B2 (ja) * 2009-10-06 2014-11-12 日本電気株式会社 ネットワークシステムとコントローラと方法とプログラム
JP5561366B2 (ja) * 2010-09-08 2014-07-30 日本電気株式会社 スイッチシステム、スイッチ制御方法、及び記憶媒体
JP5585664B2 (ja) 2011-01-13 2014-09-10 日本電気株式会社 ネットワークシステム、及び経路制御方法
CN103444138B (zh) * 2011-03-23 2016-03-30 日本电气株式会社 通信控制系统、交换节点以及通信控制方法
US20130223226A1 (en) 2012-02-29 2013-08-29 Dell Products, Lp System and Method for Providing a Split Data Plane in a Flow-Based Switching Device
JP5814830B2 (ja) * 2012-03-05 2015-11-17 Kddi株式会社 フロー単位パケット転送のための宛先検索装置および検索方法
CN104365068B (zh) 2012-05-31 2017-08-04 日本电气株式会社 控制装置、通信系统、交换机控制方法及非瞬态计算机可读存储介质
WO2014000290A1 (zh) 2012-06-29 2014-01-03 华为技术有限公司 数据报文的控制方法、设备及系统
US20140146664A1 (en) 2012-11-26 2014-05-29 Level 3 Communications, Llc Apparatus, system and method for packet switching
CN103905311B (zh) * 2012-12-28 2017-02-22 华为技术有限公司 流表匹配方法和装置以及交换机
US8964752B2 (en) * 2013-02-25 2015-02-24 Telefonaktiebolaget L M Ericsson (Publ) Method and system for flow table lookup parallelization in a software defined networking (SDN) system
CN103152264B (zh) 2013-02-25 2015-11-25 北京百度网讯科技有限公司 Openflow网络和IP网络互连通信方法及Openflow子网边缘交换机
US9722917B2 (en) * 2013-02-26 2017-08-01 Telefonaktiebolaget Lm Ericsson (Publ) Traffic recovery in openflow networks
EP2966813A4 (en) * 2013-03-06 2016-09-14 Nec Corp COMMUNICATION SYSTEM, SWITCH, CONTROL DEVICE, PACKET PROCESSING METHOD, AND PROGRAM
WO2014157460A1 (ja) * 2013-03-28 2014-10-02 日本電気株式会社 通信システム、制御装置、情報収集方法およびプログラム
CN103259718B (zh) * 2013-04-18 2016-12-28 华为技术有限公司 一种流表转换方法和装置
JPWO2014192259A1 (ja) * 2013-05-27 2017-02-23 日本電気株式会社 ネットワーク制御装置、ネットワーク制御方法、プログラムおよび通信システム
CN103428094B (zh) 2013-08-12 2016-08-17 杭州华三通信技术有限公司 开放流OpenFlow系统中的报文转发方法及装置
US9602398B2 (en) * 2013-09-15 2017-03-21 Nicira, Inc. Dynamically generating flows with wildcard fields
US9363180B2 (en) * 2013-11-04 2016-06-07 Telefonkatiebolaget L M Ericsson (Publ) Service chaining in a cloud environment using Software Defined Networking
CN103888369B (zh) 2014-04-10 2019-02-05 广州市高科通信技术股份有限公司 以太网通信方法、系统和sdn交换机

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013093857A1 (en) * 2011-12-22 2013-06-27 Telefonaktiebolaget L M Ericsson (Publ) Controller for flexible and extensible flow processing in software-defined networks
CN102685006A (zh) * 2012-05-03 2012-09-19 中兴通讯股份有限公司 一种转发数据报文的方法及装置
CN102843299A (zh) * 2012-09-12 2012-12-26 盛科网络(苏州)有限公司 基于TCAM实现Openflow多级流表的方法及系统
CN103685033A (zh) * 2013-12-19 2014-03-26 武汉邮电科学研究院 Sdn架构中支持分组交换和电路交换的通用流表及方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3142310A4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108256045A (zh) * 2018-01-12 2018-07-06 福建星瑞格软件有限公司 实时流数据的结构化解析、流计算的方法及计算机设备
CN111131050A (zh) * 2019-12-31 2020-05-08 盛科网络(苏州)有限公司 流表的匹配方法及装置

Also Published As

Publication number Publication date
US20170111259A1 (en) 2017-04-20
US20190245772A1 (en) 2019-08-08
US10659342B2 (en) 2020-05-19
JP2017520214A (ja) 2017-07-20
JP6490205B2 (ja) 2019-03-27
AU2014399458B2 (en) 2018-01-18
RU2651143C1 (ru) 2018-04-18
US10305777B2 (en) 2019-05-28
KR20170009927A (ko) 2017-01-25
CN106664261A (zh) 2017-05-10
EP3142310B1 (en) 2022-06-15
CA2950206C (en) 2019-03-05
KR101886291B1 (ko) 2018-09-06
CA2950206A1 (en) 2016-01-07
CN106664261B (zh) 2019-10-25
AU2014399458A1 (en) 2016-12-15
EP3142310A1 (en) 2017-03-15
EP3142310A4 (en) 2017-04-26

Similar Documents

Publication Publication Date Title
WO2016000362A1 (zh) 一种配置流表项的方法、装置和系统
US9736278B1 (en) Method and apparatus for connecting a gateway router to a set of scalable virtual IP network appliances in overlay networks
US8913613B2 (en) Method and system for classification and management of inter-blade network traffic in a blade server
US9602428B2 (en) Method and apparatus for locality sensitive hash-based load balancing
EP2725749B1 (en) Method, apparatus and system for processing service flow
CN105207873A (zh) 一种报文处理方法和装置
WO2015014187A1 (zh) 一种支持多租户的数据转发方法和装置
CN103560951A (zh) 报文处理方法及物理转发设备
CN112583655B (zh) 数据传输方法、装置、电子设备及可读存储介质
EP3190754A1 (en) Method and apparatus for processing modified packet
WO2015106623A1 (zh) 一种配置、下发流表项的方法及装置
CN105657078B (zh) 一种数据传输方法、装置及多层网络管理器
WO2020063776A1 (zh) OpenFlow实例配置
WO2014067055A1 (zh) 流表刷新的方法及装置
CN106803804B (zh) 传输报文的方法和装置
CN114915582B (zh) 报文转发方法、设备及系统
CN115086105A (zh) 一种报文传输方法及装置
CN105915471B (zh) 报文转发方法以及装置
EP4290812A1 (en) Packet transmission method and apparatus
CN116055396A (zh) 一种数据转发的方法、装置、路由设备及存储介质
WO2018014772A1 (zh) 报文的转发方法、装置及系统
CN101977247B (zh) 一种实现n:1 vlan翻译的方法和交换设备
CN104243361A (zh) 一种业务处理的方法及系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14896752

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2950206

Country of ref document: CA

REEP Request for entry into the european phase

Ref document number: 2014896752

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2014896752

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2014399458

Country of ref document: AU

Date of ref document: 20141027

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 20167035418

Country of ref document: KR

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2017519755

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2017100992

Country of ref document: RU

Kind code of ref document: A