WO2018161827A1 - Address self-learning method and device, and switch - Google Patents
Address self-learning method and device, and switch Download PDFInfo
- Publication number
- WO2018161827A1 WO2018161827A1 PCT/CN2018/077526 CN2018077526W WO2018161827A1 WO 2018161827 A1 WO2018161827 A1 WO 2018161827A1 CN 2018077526 W CN2018077526 W CN 2018077526W WO 2018161827 A1 WO2018161827 A1 WO 2018161827A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- source address
- address
- state
- packet
- learning
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/36—Backward learning
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/54—Organization of routing tables
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
- H04L45/745—Address table lookup; Address filtering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/66—Layer 2 routing, e.g. in Ethernet based MAN's
Definitions
- the present disclosure relates to the field of communications, and in particular, to a method, an apparatus, and a switch for address self-learning.
- OpenFlow OpenFlow
- the message processing flow defined by the OpenFlow protocol specification is a stateless process, and all state information is stored in the OpenFlow controller. Therefore, the response speed of the OpenFlow switch is not fast enough, and it also puts a lot of pressure on the control channel between the OpenFlow controller and the OpenFlow controller and the OpenFlow switch.
- the OpenState technology solution can support the MAC address self-learning function by extending the OpenFlow protocol specification
- the OpenFlow network cannot support the self-learning function of the outer address to be encapsulated required by the cascading network because it does not support the acquisition and use of the two-layer address.
- a method, device and switch for address self-learning are provided in the embodiments of the present disclosure.
- a method for address self-learning including: acquiring first action indication information that matches a received first message from a first flow table; and indicating information according to the first action Copying, to the first state variable, a first source address corresponding to the first message; updating a state table for address self-learning according to the first state variable, where the state table stores a mapping relationship between the second source address corresponding to the first packet and the first source address; updating the preset table according to the updated state table, where the preset table is used to store the address The result of self-learning.
- an apparatus for address self-learning including: a first obtaining module, configured to acquire, from a first flow table, first action indication information that matches a received first message; a copying module, configured to: copy, according to the first action indication information, a first source address corresponding to the first packet into a first state variable; and a first update module, configured to update according to the first state variable a state table for address self-learning, wherein the state table stores a mapping relationship between a second source address corresponding to the first packet and the first source address; and a second update module, Updating the preset table according to the updated status table, wherein the preset table is used to store the result of the address self-learning.
- a switch including: a processor and a memory, wherein the processor is configured to acquire, from a first flow table, a first action that matches a received first message. Instructing information; copying, according to the first action indication information, a first source address corresponding to the first message to a first state variable; updating a state table for address self-learning according to the first state variable,
- the state table stores a mapping relationship between the second source address corresponding to the first packet and the first source address, and updates the preset table according to the updated state table, where
- the preset table is configured to store a result of the self-learning of the address, and the memory is configured to store the first flow table, the state table, and the preset table.
- a storage medium is also provided.
- the storage medium is configured to store program code for performing the following steps: acquiring, from the first flow table, first action indication information that matches the received first message; and according to the first action indication information, The first source address corresponding to a message is copied into the first state variable; and the state table for address self-learning is updated according to the first state variable, wherein the state table stores the first message a mapping relationship between the corresponding second source address and the first source address; updating the preset table according to the updated state table, wherein the preset table is used to store the result of the address self-learning.
- FIG. 1 is a schematic diagram of an OpenFlow network component architecture
- FIG. 3 is a schematic diagram of a network structure of a laminated network
- FIG. 4 is a structural diagram of a switch of an embodiment of the present disclosure.
- FIG. 5 is a flowchart of a method of address self-learning, in accordance with one embodiment of the present disclosure
- FIG. 6 is a flow chart showing a method of address self-learning according to an embodiment of the present disclosure
- FIG. 7 is a schematic diagram of implementing a MAC address self-learning function according to an embodiment of the present disclosure.
- FIG. 8 is a schematic diagram of implementing a self-learning function of an outer address to be encapsulated according to an embodiment of the present disclosure
- FIG. 9 is a structural block diagram of an apparatus for address self-learning according to an embodiment of the present disclosure.
- FIG. 10 is a structural block diagram of a first update module in an apparatus for address self-learning according to an embodiment of the present disclosure
- FIG. 11 is another structural block diagram of a first update module in an apparatus for address self-learning according to an embodiment of the present disclosure
- FIG. 12 is a structural block diagram of an apparatus for address self-learning according to an embodiment of the present disclosure.
- FIG. 13 is a structural block diagram of an apparatus for address self-learning according to an embodiment of the present disclosure.
- FIG. 14 is a structural block diagram of a switch according to an embodiment of the present disclosure.
- FIG. 15 is a structural block diagram of a switch according to an embodiment of the present disclosure.
- 16 is a structural block diagram of a switch in accordance with one embodiment of the present disclosure.
- FIG. 1 is a schematic diagram of an OpenFlow network component architecture.
- the control plane of the OpenFlow network is implemented by the OpenFlow controller.
- the forwarding plane of the OpenFlow network is implemented by the OpenFlow switch.
- the OpenFlow protocol is run between the OpenFlow controller and the OpenFlow switch.
- the OpenFlow controller uses the OpenFlow protocol to the OpenFlow switch.
- a flow table containing a plurality of entries (Entry) and a plurality of types of group tables (Group Table) are delivered.
- Flow table parameters include Match Fields and Instructions (Instructions) containing Actions.
- Group table parameters include group type (Group Type) and action set (Action Buckets). In this way, the purpose of controlling data forwarding can be achieved, and the separation of data forwarding and routing control is realized.
- the OpenFlow controller sends a flow table matching the packet to the OpenFlow switch. In this way, the subsequent packets of the same type can be matched to the newly sent flow table, and the OpenFlow switch autonomously completes the forwarding of the message according to the flow table and the group table.
- FIG. 2 is a schematic diagram of an OpenState technical solution.
- the OpenState solution introduces a new state table, which is sent by the OpenFlow controller to the OpenFlow switch.
- the state table contains two parameters: the match key (Match Key) and the state value (State).
- the matching key value represents the key value that the Key Extractor combines based on some fields extracted from the message.
- the status value is appended to the message matching the status table and enters the flow table along with the message.
- the flow table adds a state value (State) to the flow table matching field defined by the OpenFlow protocol specification as a new matching field.
- the flow table adds a Set-State action to the successfully matched message, which can set a new state value (Next_State).
- the new status value is used in conjunction with the key value extracted by the other key extractor from the message to update the status table. In this way, automatic update of the state information stored by the OpenFlow switch is implemented.
- An address self-learning function is a Media Access Control (MAC) address self-learning function, which is used in a network based on MAC address forwarding.
- the network device learns the correspondence between the source MAC address of the received packet and the ingress port, generates a new MAC address forwarding table, or updates the existing MAC address forwarding table.
- Another function of address self-learning is to encapsulate the outer address self-learning function for use in an overlay network.
- the edge network device learns the mapping relationship between the outer source address and the inner source address of the received packet to generate a new outer address encapsulation table or update the existing outer address encapsulation table.
- the cascading network includes two different types of network devices: an edge node and an intermediate node.
- the user equipment accesses the cascading network by connecting the edge node, and the edge node accesses the multiplexed network packet through all the user-side ports. Add an outer package.
- the remote edge node After receiving the packet with the outer layer encapsulation, the remote edge node performs self-learning on the mapping between the outer source address and the inner source address of the packet, and maps the address between the packets. The relationship is saved as the basis for the edge node to add outer packaging to the subsequent packets entering the cascading network from the edge node. This is also the aforementioned self-learning function of the outer address to be encapsulated.
- switch 40 may include one or more (only one shown) processor 42 (processor 42 may include, but is not limited to, a microprocessor MCU, a programmable logic device FPGA, and any other suitable processing device).
- processor 42 may include, but is not limited to, a microprocessor MCU, a programmable logic device FPGA, and any other suitable processing device.
- FIG. 4 is merely exemplary and does not limit the structure of the electronic device.
- switch 40 may also include more or fewer components than shown in FIG. 4, or have a different configuration than that shown in FIG.
- the memory 44 can be used to store software programs and modules of application software, such as program instructions and modules corresponding to the method of address self-learning in the embodiments of the present disclosure.
- the processor 42 performs various functional applications and data processing by executing software programs and modules stored in the memory 44, i.e., implementing the methods described.
- Memory 44 may include high speed random access memory and may also include non-volatile memory such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory.
- memory 44 may also include memory remotely located relative to processor 42 that may be connected to switch 40 over a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
- Transmission device 46 is for receiving or transmitting data via a network.
- the network may include a wireless network provided by a communication provider of switch 40.
- transmission device 46 includes a Network Interface Controller (NIC) that can be connected to other network devices through a base station to communicate with the Internet.
- NIC Network Interface Controller
- the transmission device 46 can be a Radio Frequency (RF) module for communicating wirelessly with the Internet.
- RF Radio Frequency
- FIG. 5 is a flowchart of a method of address self-learning in accordance with an embodiment of the present disclosure. As shown in FIG. 5, the process includes the following steps:
- Step S502 Acquire, from the first flow table, first action indication information that matches the received first packet.
- Step S504 copying, according to the first action indication information, the first source address corresponding to the first packet into the first state variable;
- Step S506 updating a state table for address self-learning according to the first state variable, wherein the state table stores a mapping relationship between the second source address corresponding to the first packet and the first source address;
- Step S508 updating the preset table according to the updated status table, wherein the preset table is used to store the result of the address self-learning.
- the first source address information is obtained by using the first flow table, and the mapping relationship between the first source address and the second source address is obtained through the state table for address self-learning, and then updated by the state table.
- the execution body of the steps may include, but is not limited to, a switch and a computer terminal or the like.
- the first source address may be an ingress port of the first packet or an outer source address of the packet; the second source address may be a media access control of the first packet (Media Access Control, Referred to as the MAC address, it can also be the inner source address of the first packet.
- Media Access Control Referred to as the MAC address, it can also be the inner source address of the first packet.
- the status table can be updated in a variety of ways.
- the second source address of the first packet may be extracted from the first packet, and the state table may be updated according to the second source address and the first state variable.
- the second source address of the packet may be extracted from the first packet by using the key extractor.
- the update of the status table may be performed by searching for a second source address in the status table, wherein the second source is not found.
- a state entry corresponding to the second source address is created in the state table, wherein the created state entry is used to record the second source address and the first source address carried in the first state variable a mapping relationship; if the second source address is found, determining whether the third source address that is stored in the state table and matches the second source address is the same as the first source address carried in the first state variable, where The third source address that matches the second source address in the state table is different from the first source address carried in the first state variable, and replaces the third source address in the state table with the first source address; When the third source address matching the second source address in the table is the same as the first source address carried in the first state variable, the state table may not be processed.
- the preset table may be updated in various ways in step S508. For example, a matching field corresponding to the second source address in the updated state table may be generated in the preset table; and the first source address in the updated state table is embedded in the preset table corresponding to the matching field.
- the second action indication information wherein the second action indication information is used to indicate that the predetermined operation is performed according to the first source address.
- the second packet may also be received, where the destination address of the second packet is the same as the second source address corresponding to the first packet; Obtaining second action indication information from the preset table according to the matching field corresponding to the destination address; performing a predetermined operation on the second packet according to the first source address according to the indication of the second action indication information. If the destination address of the second packet is the same as the second source address, the matching field corresponding to the destination address and the matching field corresponding to the second source address are the same, and the matching field corresponding to the destination address is from the preset table.
- the acquired action indication information is the foregoing second action indication information.
- the second message may be encapsulated according to the first source address.
- an outer encapsulation may be added to the second packet and the first source address is used as the destination address of the message.
- the second message may also be output according to the first source address, for example, outputted from the first source address, that is, the second message is output from the first source address.
- the first flow table, status table, and preset table may be received by an OpenFlow controller.
- the first flow table, the status table, and the preset table delivered by the OpenFlow controller may be received before the step S502, the first flow table, the status table, and the preset table delivered by the OpenFlow controller may be received.
- the updated pre-process may also be reported to the OpenFlow controller.
- Set the table. The operations of issuing and reporting can be set as needed.
- the sending operation of the first flow table, the status table, and the preset table may be performed based on a request message sent by the local device (for example, an OpenFlow switch), or may be performed according to a preset sending period, or may be The OpenFlow controller actively performs the current state of the switch (network conditions, processing efficiency, etc.).
- the reporting operation of the preset table may be performed immediately after the update, or may be performed periodically, or may be performed after the preset conditions (time conditions, network conditions, resource occupancy conditions of the device, etc.) are met.
- the preset table may be a second flow table or a group table.
- the type of preset table can be selected as needed.
- a method of address self-learning is provided.
- the address self-learning method provided in the exemplary embodiment may implement address self-learning in the following manner: the controller sends a flow table, an address self-learning state table, and a storage address to obtain the packet state information from the network device.
- the flow table of the learning result; the packet that the network device receives is first processed into a flow table that acquires the state information of the packet, and the flow table copies the state information of the packet to a new state (Next_State), and then uses the new state and the report.
- the source address updates the address self-learning state table; the flow table of the storage address self-learning result is updated by using the matching key value and the state value of each entry in the address self-learning state table.
- a method of address self-learning includes the following steps:
- step A the controller sends a flow table, a self-learning state table, and a flow table of the self-learning result of the storage address to the network device.
- the flow table for obtaining the packet status information (acting the same as the foregoing first flow table) is used for the status information related to the packet (for example, the inbound port of the packet, the outer source address of the packet, and the first source address) Copy to a new state (acting the same as the foregoing state information variable), where the matching field of the flow table is "message requiring address self-learning", and the corresponding action is "copy message status information to new state (Next_State)" ( The function is the same as the foregoing first action indication information); the address self-learning state table (acting the same as the foregoing state table for address self-learning) is used to record the source address information of the message (acting the same as the foregoing second source address) and obtain the message state.
- the packet status information obtained by the flow table of the information wherein the matching key value of the status table is the source address of the packet, and the status value is the status information of the packet; the address self-learning status table uses the matching key value and the status value to store the address
- the flow table of the self-learning result is updated, wherein the matching field of the flow table storing the self-learning result of the address (acting with the preset table) is “a matching field containing a matching key value”, and the corresponding action is “ Operation parameter value "(with the effect of a second operation instruction information).
- Step B The packet received by the network device is first processed into a flow table that obtains the status information of the packet, and the flow table copies the status information of the packet to a new state, and then uses the new state and the source address of the packet to address the address.
- the learning status table is updated.
- the matching field "requires address self-learning packet” is used for matching. For example, if a wildcard is used as the matching field, it means that all packets entering the network device are subject to address self-learning. For a message that matches the success, the action "Copy message status information to new status" is executed to copy the status information of the message to the new status.
- the key extractor extracts the source address of the message from the message, and then updates the address self-learning status table with the source address and the new status of the message. In this way, the address self-learning state table records the source address information and the packet state information of the packet obtained by the address self-learning.
- step C the flow table of the storage address self-learning result is updated by using the matching key value and the state value of each entry in the address self-learning state table.
- the matching key value and the status value of each entry in the address self-learning state table respectively record the source address information and the packet state information of the packet obtained by the address self-learning.
- the flow table of the storage address self-learning result is updated by using the matching key value and the state value. That is, the matching key value in the address self-learning state table is used to update the matching key value in the flow table of the storage address self-learning result, and the state value of the address self-learning state table is used to update the storage address self-learning result in the flow table. Status value.
- the matching key value of an entry in the address self-learning state table does not exist in the flow table of the storage address self-learning result, a new flow table entry is added to the flow table of the storage address self-learning result; if the address self-learning state If the matching key value of an entry of the table exists in the flow table of the storage address self-learning result, the existing flow table entry in the flow table of the storage address self-learning result is updated. When the flow table of the storage address self-learning result is updated, the network device needs to report the flow table of the updated storage address self-learning result to the controller.
- FIG. 7 is a schematic diagram showing a MAC address self-learning function, according to an exemplary embodiment of the present disclosure. As shown in Figure 7, in this example, the steps performed by the OpenFlow controller and the OpenFlow switch are as follows:
- Step 1 The OpenFlow controller sends a flow table, a self-learning state table, and a flow table of the self-learning result of the storage address to the OpenFlow switch.
- the matching field of the flow table that obtains the information of the inbound port information is the wildcard.
- the corresponding action is Copy ⁇ incoming port of the packet> to the new state.
- the matching key of the address self-learning state table is the source of the packet. "MAC address”, the status value is "incoming port of the packet”; the matching field of the flow table of the storage address self-learning result is " ⁇ destination MAC address of the packet>”, and the corresponding action is "from the outbound port of the packet" >Output".
- Step 2 The packet received by the OpenFlow switch is first processed into a flow table for obtaining the inbound port information of the packet, where the flow table copies the inbound port information of the packet to a new state, and then uses the new state and the packet.
- the source MAC address updates the address self-learning status table.
- the matching field "wildcard" is used for matching. That is to say, all packets entering the OpenFlow switch will match successfully.
- For the packets that match successfully perform the action "Copy ⁇ incoming port of the packet> to the new state" to copy the inbound port information of the packet to the new state.
- the inbound port of the packet is the status information about the packet obtained by the flow table.
- the key extractor extracts the source MAC address of the packet from the packet, and then updates the address self-learning state table with the source MAC address and the ingress port of the packet. In this way, the address self-learning state table records the source MAC address of the packet obtained by the address self-learning and the ingress port of the packet.
- Step 3 Update the flow table of the storage address self-learning result by using the matching key value and the state value of each entry in the address self-learning state table.
- the matching key value and the status value of each entry in the address self-learning state table record the source MAC address of the packet obtained by the address self-learning and the ingress port of the packet.
- the flow table of the storage address self-learning result is updated by using the matching key value and the state value.
- the source MAC address of the packet in the address self-learning state table is used to update the matching field ⁇ destination MAC address of the packet> in the flow table of the self-learning result of the storage address (acting the same as the foregoing matching field), and self-learning by address
- the ingress port of the packet of the state table is used to update the action parameter ⁇ outbound port> of the packet in the flow table of the self-learning result of the storage address to achieve the purpose of forwarding the packet from the ⁇ outgoing port of the packet>. If the source MAC address of the packet in the address self-learning state table does not exist in the matching field of the flow table of the storage address self-learning result, add a new flow table entry in the flow table of the storage address self-learning result.
- the OpenFlow switch needs to report the flow table of the updated storage address self-learning result to the OpenFlow controller.
- FIG. 8 is a schematic diagram showing an outer address address self-learning function to be encapsulated, according to an exemplary embodiment of the present disclosure.
- the OpenFlow controller performs the following steps with an OpenFlow switch that is an edge node of the cascading network:
- Step 1 The OpenFlow controller sends a flow table, an address self-learning state table, and a flow table for storing the self-learning result of the outer address source information of the packet to the OpenFlow switch.
- the matching field of the flow table that obtains the outer source address information of the packet is "the inbound port of the packet is the network side port", and the corresponding action is "copy ⁇ outer source address of the packet> to the new state"; address self-learning
- the matching key of the status table is the inner source address of the packet, and the status value is the outer source address of the packet.
- the matching field of the flow table that stores the self-learning result is that the inbound port of the packet is the user.
- the corresponding action is to add an outer encapsulation to the packet. Use ⁇ outer destination address of the packet> as the outer destination address of the packet.”
- Step 2 The packet received by the OpenFlow switch is first processed into a flow table for obtaining the outer source address information of the packet, where the flow table copies the outer source address information of the packet to a new state, and then uses the new state. And the inner source address of the message is updated to the address self-learning state table.
- the matching field is used to match the incoming port of the packet to the network-side port. That is, the packets received by the OpenFlow switch from the network-side port match successfully. For a successful packet, perform the action "Copy ⁇ Outer Source Address of the Packet> to the New State" to copy the outer source address information of the packet to the new state.
- the outer source address of the packet is obtained by the flow table.
- the message related state information, and the key value extractor extracts the inner source address of the message from the message, and then updates the address self-learning state table with the inner source address and the outer source address of the message, and the address
- the self-learning state table records the inner source address of the packet obtained by the address self-learning and the outer source address of the packet.
- Step 3 Update the flow table of the storage address self-learning result by using the matching key value and the state value of each entry in the address self-learning state table.
- the matching key value and the status value of each entry in the address self-learning state table record the inner source address of the packet obtained by the address self-learning and the outer source address of the packet.
- the flow table of the storage address self-learning result is updated by using the matching key value and the state value. That is, the inner source address of the message in the address self-learning state table is used to update the ⁇ destination address of the message in the flow table of the self-learning result of the storage address, and the outer source of the message in the self-learning state table of the address is used.
- the address is to update the action parameter ⁇ outer destination address of the packet> in the flow table of the storage address self-learning result.
- a new flow table is added to the flow table of the storage address self-learning result. Entries, and use the inner source address of the message in the address self-learning state table and the outer source address of the message to update the newly added flow table entry; if the address self-learns the status table of an entry of the message If the inner source address is in the matching field of the flow table in which the address self-learning result is stored, the outer source address of the packet in the address self-learning state table is directly used to update the flow table in the self-learning result of the storage address. There are flow table entries.
- the OpenFlow switch needs to report the flow table of the updated storage address self-learning result to the OpenFlow controller.
- a group table can also be used to store address self-learning results. You can use the group table to store the mapping between the destination address of a packet and the outer destination address of multiple encapsulated packets. Therefore, the correspondence between the source address of the packet obtained by the address self-learning and the status of multiple packets can be supported, which may be required in the self-learning function of the outer address of the layer to be encapsulated.
- the two source addresses of the packet are respectively obtained by using the flow table and the state table, so that the OpenFlow network can simultaneously support the MAC address self-learning function required for the MAC-based forwarding network. And the self-learning function of the outer address to be encapsulated required by the cascading network.
- the method according to the embodiment can be implemented by means of software plus a necessary general hardware platform, or can be implemented by hardware. But in many cases the former is a better implementation.
- the portion of the technical solution of the present disclosure that contributes to the prior art can be embodied in the form of a software product.
- the computer software product is stored in a storage medium (such as a ROM/RAM, a magnetic disk, an optical disk), and includes a plurality of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the present disclosure.
- a terminal device which may be a mobile phone, a computer, a server, or a network device, etc.
- an apparatus for address self-learning for implementing the embodiment and the exemplary embodiment.
- module refers to a combination of software and/or hardware that can implement a predetermined function.
- the apparatus described in the following embodiments is preferably implemented in software, it is also conceivable to implement the hardware or a combination of software and hardware.
- FIG. 9 is a structural block diagram of an apparatus for address self-learning according to an embodiment of the present disclosure. As shown in Figure 9, the device includes:
- the first obtaining module 92 is configured to obtain, from the first flow table, first action indication information that matches the received first packet, and the copying module 94 is connected to the first acquiring module 92, according to the first action.
- the indication information is copied into the first state variable corresponding to the first message;
- the first update module 96 is connected to the copy module 94, and is configured to update the address self-learning according to the first state variable.
- a state table wherein the state table stores a mapping relationship between the second source address corresponding to the first packet and the first source address; and the second update module 98 is connected to the first update module 96.
- the preset table is updated according to the updated status table, wherein the preset table is used to store the result of the address self-learning.
- the first update module 96 is further configured to: extract a second source address of the first packet from the first packet; and update the state table according to the second source address and the first state variable.
- FIG. 10 is a structural block diagram of a first update module 96 in an apparatus for address self-learning according to an embodiment of the present disclosure.
- the first update module 96 includes: a searching unit 102 for searching for a second source address in the state table; a creating unit 104, connected to the searching unit 102, for not finding the second In the case of a source address, a state entry corresponding to the second source address is created in the state table, wherein the created state entry is used to record the second source address and the first source address carried in the first state variable Mapping relationship.
- FIG. 11 is a structural block diagram of a first update module 96 in an apparatus for address self-learning according to an embodiment of the present disclosure.
- the first update module 96 further includes: a determining unit 112, connected to the searching unit 102, for searching for the second source address in the state table, and in the case of finding the second source address Determining whether the third source address that is stored in the state table that matches the second source address is the same as the first source address that is carried in the first state variable; the replacing unit 114 is connected to the determining unit 112, for The third source address in the state table that matches the second source address is different from the first source address carried in the first state variable, and the third source address in the state table is replaced with the first source address.
- the second update module 98 is further configured to generate, in the preset table, a matching field corresponding to the second source address in the updated state table; the first source in the updated state table The address is embedded in the second action indication information corresponding to the matching field in the preset table, where the second action indication information is used to indicate that the predetermined operation is performed according to the first source address.
- FIG. 12 is a structural block diagram of an apparatus for address self-learning according to an embodiment of the present disclosure.
- the device includes, in addition to all the modules shown in FIG. 9, a first receiving module 122, configured to receive a second packet after updating the preset table according to the updated state table, where The second address of the second packet is the same as the second source address corresponding to the first packet.
- the second obtaining module 124 is connected to the first receiving module 122, and is configured to use the matching field corresponding to the destination address.
- the second action indication information is obtained in the table.
- the execution module 126 is connected to the second acquisition module 124, and is configured to perform a predetermined operation on the second message according to the first source address according to the indication of the second action indication information.
- the executing module 126 is further configured to encapsulate the second packet according to the first source address; or output the second packet according to the first source address.
- FIG. 13 is a structural block diagram of an apparatus for address self-learning according to an embodiment of the present disclosure.
- the device includes, in addition to all the modules shown in FIG. 9, a second receiving module 132, configured to acquire, from the first flow table, a first action that matches the received first packet.
- the reporting module 134 is connected to the second receiving module 132, and is configured to update the preset table according to the updated status table. , report the updated preset table to the open flow controller.
- the preset table may be one of a second flow table and a group table.
- each of the modules may be implemented by software or hardware.
- the modules may all be located in the same processor, or the respective modules may be located in different processors in any combination.
- FIG. 14 is a structural block diagram of a switch according to an embodiment of the present disclosure.
- the switch includes: a processor 142 and a memory 144, wherein the processor 142 is configured to obtain, from the first flow table, first action indication information that matches the received first packet; The action indication information is copied to the first state variable corresponding to the first message; the state table for address self-learning is updated according to the first state variable, wherein the first message is stored in the state table.
- the 142 is connected to store the first flow table, the status table, and the preset table.
- the processor 142 is further configured to: extract a second source address of the first packet from the first packet; and update the state table according to the second source address and the first state variable.
- the processor 142 is further configured to: search for a second source address in the state table; and if the second source address is not found, create a state entry corresponding to the second source address in the state table, The created status entry is used to record a mapping relationship between the second source address and the first source address carried in the first state variable.
- the processor 142 is further configured to: after searching for the second source address in the state table, determine, in the case that the second source address is found, the first location in the state table that matches the second source address. Whether the third source address is the same as the first source address carried in the first state variable; and the third source address matching the second source address in the state table is different from the first source address carried in the first state variable, Replace the third source address in the status table with the first source address.
- the processor 142 is further configured to generate, in the preset table, a matching field corresponding to the second source address in the updated state table; embedding the first source address in the updated state table And the second action indication information corresponding to the matching field in the preset table, where the second action indication information is used to indicate that the predetermined operation is performed according to the first source address.
- the switch further includes: a first transmission device 152, configured to receive a second packet after updating the preset table according to the updated state table, where The destination address of the second packet is the same as the second source address corresponding to the first packet, and
- the processor 142 is connected to the first transmission device 152, and is further configured to: obtain, according to the matching field corresponding to the destination address, the second action indication information from the preset table; according to the indication of the second action indication information, according to the first source address Perform a predetermined operation on the second message.
- the processor 142 is further configured to encapsulate the second packet according to the first source address; or output the second packet according to the first source address.
- the switch further includes: a second transmission device 162, configured to acquire, from the first flow table, a first action indication that matches the received first message.
- a second transmission device 162 configured to acquire, from the first flow table, a first action indication that matches the received first message.
- the flow table, the status table, and the preset table sent by the OpenFlow controller are received. After the preset table is updated according to the updated status table, the updated preset table is reported to the OpenFlow controller.
- the preset table may be one of a second flow table and a group table.
- a storage medium is also provided.
- the storage medium may be arranged to store program code for performing the following steps:
- the first action indication information that matches the received first packet is obtained from the first flow table.
- the first source address corresponding to the first packet is copied to the first state variable according to the first action indication information.
- updating a state table for address self-learning according to the first state variable wherein the state table stores a mapping relationship between the second source address corresponding to the first packet and the first source address; and
- S4 And updating the preset table according to the updated status table, wherein the preset table is used to store the result of the address self-learning.
- the storage medium is further configured to store program code for performing the steps of: S31, extracting a second source address of the first message from the first message; and S32, according to the second source address And the first state variable update status table.
- the storage medium is also arranged to store program code for performing the following steps:
- the storage medium is further configured to store program code for performing the following steps: S323, after looking up the second source address in the status table, in the case of finding the second source address, determining the status table
- the third address stored in the second source address is the same as the first source address carried in the first state variable; and S324, the third address matching the second source address in the state table, and the first
- the third address in the state table is replaced with the first source address.
- the storage medium is further configured to store program code for performing the following steps: S41, generating a matching field corresponding to the second source address in the updated status table in the preset table; and S42,
- the first source address in the updated state table is embedded in the second action indication information corresponding to the matching field in the preset table, where the second action indication information is used to indicate that the predetermined operation is performed according to the first source address.
- the storage medium is further configured to store program code for performing the following steps: S43, after updating the preset table according to the updated status table, receiving the second message, wherein the second message The destination address is the same as the second source address corresponding to the first packet; S44, the second action indication information is obtained from the preset table according to the matching field corresponding to the destination address; and the first step S45 is performed according to the indication of the second action indication information. And performing a predetermined operation on the second packet according to the first source address.
- the storage medium is further configured to store program code for performing the steps of: S451, encapsulating the second message according to the first source address; or S452, outputting the second message according to the first source address.
- the storage medium is also arranged to store program code for performing the following steps:
- the storage medium may include, but is not limited to, a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or a magnetic disk. And other media that can store program code.
- the processor performs the method steps in the described embodiments in accordance with stored program code in a storage medium.
- the embodiment of the present disclosure can solve the problem that the conventional OpenFlow network cannot support the self-learning function of the outer address to be encapsulated required for the cascading network because it does not support the acquisition and use of the two-layer address, and achieve the effect of effectively performing address self-learning.
- the first source address information is obtained by using the first flow table
- the mapping relationship between the first source address and the second source address is obtained by using the state table for address self-learning, and is performed through the state table. Update the preset table of the storage address self-learning results. Therefore, learning the two source addresses of the inner layer and the outer layer through the state table for address self-learning can support the acquisition and use of the two-layer address.
- modules or steps in the embodiments of the present disclosure may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed across multiple computing devices.
- they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from this
- the steps shown or described are performed sequentially, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated into a single integrated circuit module.
- Embodiments of the present disclosure are not limited to any particular combination of hardware and software.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Provided are an address self-learning method and device, and a switch. The method comprises: acquiring, from a first flow table, first action indication information matching a received first packet; copying a first source address corresponding to the first packet to a first status variable according to the first action indication information; updating, according to the first status variable, a status table used for address self-learning, wherein a mapping relationship between a second source address and the first source address and corresponding to the first packet is stored in the status table; and updating a preset table according to the updated status table, wherein the preset table is used for storing address self-learning results. Fig. 5
Description
本公开涉及通信领域,具体涉及一种地址自学习的方法、装置及交换机。The present disclosure relates to the field of communications, and in particular, to a method, an apparatus, and a switch for address self-learning.
OpenFlow(开放流)网络采用控制平面与转发平面相分离的架构。在一种情况中,OpenFlow协议规范定义的报文处理流程是一种无状态的流程,所有的状态信息都存储在OpenFlow控制器中。因此,OpenFlow交换机的反应速度不够快,同时也给OpenFlow控制器以及OpenFlow控制器与OpenFlow交换机之间的控制通道带来了较大的压力。An OpenFlow (OpenFlow) network uses an architecture in which the control plane is separated from the forwarding plane. In one case, the message processing flow defined by the OpenFlow protocol specification is a stateless process, and all state information is stored in the OpenFlow controller. Therefore, the response speed of the OpenFlow switch is not fast enough, and it also puts a lot of pressure on the control channel between the OpenFlow controller and the OpenFlow controller and the OpenFlow switch.
虽然OpenState技术方案通过对OpenFlow协议规范的扩展能够支持MAC地址自学习功能,但是OpenFlow网络由于不支持两层地址的获取和使用,仍无法支持层叠网所需的待封装外层地址自学习功能。Although the OpenState technology solution can support the MAC address self-learning function by extending the OpenFlow protocol specification, the OpenFlow network cannot support the self-learning function of the outer address to be encapsulated required by the cascading network because it does not support the acquisition and use of the two-layer address.
公开内容Public content
本公开实施例中提供了一种地址自学习的方法、装置及交换机。A method, device and switch for address self-learning are provided in the embodiments of the present disclosure.
根据本公开的一个实施例,提供了一种地址自学习的方法,包括:从第一流表中获取与接收到的第一报文匹配的第一动作指示信息;根据所述第一动作指示信息将与所述第一报文对应的第一源地址复制到第一状态变量中;根据所述第一状态变量更新用于地址自学习的状态表,其中,所述状态表中存储有与所述第一报文对应的第二源地址与所述第一源地址之间的映射关系;根据更新后的所述状态表更新预设表,其中,所述预设表用于存储所述地址自学习的结果。According to an embodiment of the present disclosure, a method for address self-learning is provided, including: acquiring first action indication information that matches a received first message from a first flow table; and indicating information according to the first action Copying, to the first state variable, a first source address corresponding to the first message; updating a state table for address self-learning according to the first state variable, where the state table stores a mapping relationship between the second source address corresponding to the first packet and the first source address; updating the preset table according to the updated state table, where the preset table is used to store the address The result of self-learning.
根据本公开的另一个实施例,提供了一种地址自学习的装置,包括:第一获取模块,用于从第一流表中获取与接收到的第一报文匹配的第一动作指示信息;复制模块,用于根据所述第一动作指示信息将与所述第一报文对应的第一源地址复制到第一状态变量中;第一更新模块,用于根据所述第一状态变量更新用于地址自学习的状态表,其中,所述状态表中存储有与所述 第一报文对应的第二源地址与所述第一源地址之间的映射关系;第二更新模块,用于根据更新后的所述状态表更新预设表,其中,所述预设表用于存储所述地址自学习的结果。According to another embodiment of the present disclosure, an apparatus for address self-learning is provided, including: a first obtaining module, configured to acquire, from a first flow table, first action indication information that matches a received first message; a copying module, configured to: copy, according to the first action indication information, a first source address corresponding to the first packet into a first state variable; and a first update module, configured to update according to the first state variable a state table for address self-learning, wherein the state table stores a mapping relationship between a second source address corresponding to the first packet and the first source address; and a second update module, Updating the preset table according to the updated status table, wherein the preset table is used to store the result of the address self-learning.
根据本公开的再一个实施例,提供了一种交换机,包括:处理器和存储器,其中,所述处理器,用于从第一流表中获取与接收到的第一报文匹配的第一动作指示信息;根据所述第一动作指示信息将与所述第一报文对应的第一源地址复制到第一状态变量中;根据所述第一状态变量更新用于地址自学习的状态表,其中,所述状态表中存储有与所述第一报文对应的第二源地址与所述第一源地址之间的映射关系;根据更新后的所述状态表更新预设表,其中,所述预设表用于存储所述地址自学习的结果;所述存储器,用于存储所述第一流表、所述状态表和所述预设表。According to still another embodiment of the present disclosure, a switch is provided, including: a processor and a memory, wherein the processor is configured to acquire, from a first flow table, a first action that matches a received first message. Instructing information; copying, according to the first action indication information, a first source address corresponding to the first message to a first state variable; updating a state table for address self-learning according to the first state variable, The state table stores a mapping relationship between the second source address corresponding to the first packet and the first source address, and updates the preset table according to the updated state table, where The preset table is configured to store a result of the self-learning of the address, and the memory is configured to store the first flow table, the state table, and the preset table.
根据本公开的再一个实施例,还提供了一种存储介质。该存储介质设置为存储用于执行以下步骤的程序代码:从第一流表中获取与接收到的第一报文匹配的第一动作指示信息;根据所述第一动作指示信息将与所述第一报文对应的第一源地址复制到第一状态变量中;根据所述第一状态变量更新用于地址自学习的状态表,其中,所述状态表中存储有与所述第一报文对应的第二源地址与所述第一源地址之间的映射关系;根据更新后的所述状态表更新预设表,其中,所述预设表用于存储所述地址自学习的结果。According to still another embodiment of the present disclosure, a storage medium is also provided. The storage medium is configured to store program code for performing the following steps: acquiring, from the first flow table, first action indication information that matches the received first message; and according to the first action indication information, The first source address corresponding to a message is copied into the first state variable; and the state table for address self-learning is updated according to the first state variable, wherein the state table stores the first message a mapping relationship between the corresponding second source address and the first source address; updating the preset table according to the updated state table, wherein the preset table is used to store the result of the address self-learning.
此处所说明的附图用来提供对本公开的进一步理解,构成本申请的一部分,本公开的示意性实施例及其说明用于解释本公开,并不构成对本公开的不当限定。在附图中:The drawings described herein are provided to provide a further understanding of the present disclosure, which is a part of the present disclosure, and the description of the present disclosure and the description thereof are not intended to limit the disclosure. In the drawing:
图1是一种OpenFlow网络组件架构的示意图;1 is a schematic diagram of an OpenFlow network component architecture;
图2是一种OpenState技术方案的示意图;2 is a schematic diagram of an OpenState technical solution;
图3是一种层叠网的网络结构的示意图;3 is a schematic diagram of a network structure of a laminated network;
图4是本公开的一个实施例的交换机的结构图;4 is a structural diagram of a switch of an embodiment of the present disclosure;
图5是根据本公开的一个实施例的地址自学习的方法的流程图;5 is a flowchart of a method of address self-learning, in accordance with one embodiment of the present disclosure;
图6是根据本公开的一个实施例的地址自学习的方法的流程示意图;6 is a flow chart showing a method of address self-learning according to an embodiment of the present disclosure;
图7是根据本公开的一个实施例的实现MAC地址自学习功能的示意图;FIG. 7 is a schematic diagram of implementing a MAC address self-learning function according to an embodiment of the present disclosure; FIG.
图8是根据本公开的一个实施例的实现待封装外层地址自学习功能的示意图;FIG. 8 is a schematic diagram of implementing a self-learning function of an outer address to be encapsulated according to an embodiment of the present disclosure; FIG.
图9是根据本公开的一个实施例的地址自学习的装置的结构框图;9 is a structural block diagram of an apparatus for address self-learning according to an embodiment of the present disclosure;
图10是根据本公开的一个实施例的地址自学习的装置中第一更新模块的结构框图;FIG. 10 is a structural block diagram of a first update module in an apparatus for address self-learning according to an embodiment of the present disclosure; FIG.
图11是根据本公开的一个实施例的地址自学习的装置中第一更新模块的另一个结构框图;11 is another structural block diagram of a first update module in an apparatus for address self-learning according to an embodiment of the present disclosure;
图12是根据本公开的一个实施例的地址自学习的装置的结构框图;FIG. 12 is a structural block diagram of an apparatus for address self-learning according to an embodiment of the present disclosure; FIG.
图13是根据本公开的一个实施例的地址自学习的装置的结构框图;FIG. 13 is a structural block diagram of an apparatus for address self-learning according to an embodiment of the present disclosure; FIG.
图14是根据本公开的一个实施例的交换机的结构框图;14 is a structural block diagram of a switch according to an embodiment of the present disclosure;
图15是根据本公开的一个实施例的交换机的结构框图;以及15 is a structural block diagram of a switch according to an embodiment of the present disclosure;
图16是根据本公开的一个实施例的交换机的结构框图。16 is a structural block diagram of a switch in accordance with one embodiment of the present disclosure.
下文中将参考附图并结合实施例来详细说明本公开。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The present disclosure will be described in detail below with reference to the drawings in conjunction with the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
需要说明的是,本公开的说明书和权利要求书及所述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that the terms "first", "second" and the like in the specification and claims of the present disclosure and the drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or order. .
图1是一种OpenFlow网络组件架构的示意图。如图1所示,OpenFlow网络的控制平面由OpenFlow控制器来实现,OpenFlow网络的转发平面由OpenFlow交换机来实现,OpenFlow控制器与OpenFlow交换机之间运行OpenFlow协议,OpenFlow控制器利用OpenFlow协议向OpenFlow交换机下发包含多个条目(Entry)的流表(Flow Table)和多种类型的组表(Group Table)。流表参数包括匹配字段(Match Fields)和包含动作(Actions)的指令(Instructions)等。组表参数包括组类型(Group Type)和动作集(Action Buckets)等。这样,可以达到控制数据转发的目的,实现了数据转发和路由控制的分离。1 is a schematic diagram of an OpenFlow network component architecture. As shown in Figure 1, the control plane of the OpenFlow network is implemented by the OpenFlow controller. The forwarding plane of the OpenFlow network is implemented by the OpenFlow switch. The OpenFlow protocol is run between the OpenFlow controller and the OpenFlow switch. The OpenFlow controller uses the OpenFlow protocol to the OpenFlow switch. A flow table containing a plurality of entries (Entry) and a plurality of types of group tables (Group Table) are delivered. Flow table parameters include Match Fields and Instructions (Instructions) containing Actions. Group table parameters include group type (Group Type) and action set (Action Buckets). In this way, the purpose of controlling data forwarding can be achieved, and the separation of data forwarding and routing control is realized.
根据OpenFlow协议规范的规定,在OpenFlow交换机中,如果接收到没有匹配流表的报文,则会把该报文封装在Packet_in消息中发送给 OpenFlow控制器处理。按事先设定好的规则处理完后,OpenFlow控制器会向OpenFlow交换机下发匹配该报文的流表。这样,后续的同类报文就能够匹配到新下发的流表并由OpenFlow交换机根据流表和组表自主完成报文的转发。According to the OpenFlow protocol specification, if an unmatched flow table packet is received, the packet is encapsulated in a Packet_in message and sent to the OpenFlow controller for processing. After the processing is performed according to the preset rules, the OpenFlow controller sends a flow table matching the packet to the OpenFlow switch. In this way, the subsequent packets of the same type can be matched to the newly sent flow table, and the OpenFlow switch autonomously completes the forwarding of the message according to the flow table and the group table.
图2是一种OpenState技术方案的示意图。如图2所示,OpenState技术方案引入了新的状态表(State Table),状态表由OpenFlow控制器下发到OpenFlow交换机。状态表包含两个参数:匹配键值(Match Key)和状态值(State)。匹配键值表示的是键值提取器(Key Extractor)根据从报文中提取的一些字段组合而成的键值。状态值则附加在匹配状态表成功的报文上,与报文一道进入流表(Flow Table)。流表在OpenFlow协议规范定义的流表匹配字段基础上增加了状态值(State),作为新的匹配字段。另外,流表针对匹配成功的报文增加了设置状态(Set-State)的动作(Action),该动作可以设置新的状态值(Next_State)。新的状态值与另一个键值提取器(Key Extractor)从报文中提取出的键值一道用于更新状态表。这样,就实现了OpenFlow交换机所存储状态信息的自动更新。2 is a schematic diagram of an OpenState technical solution. As shown in Figure 2, the OpenState solution introduces a new state table, which is sent by the OpenFlow controller to the OpenFlow switch. The state table contains two parameters: the match key (Match Key) and the state value (State). The matching key value represents the key value that the Key Extractor combines based on some fields extracted from the message. The status value is appended to the message matching the status table and enters the flow table along with the message. The flow table adds a state value (State) to the flow table matching field defined by the OpenFlow protocol specification as a new matching field. In addition, the flow table adds a Set-State action to the successfully matched message, which can set a new state value (Next_State). The new status value is used in conjunction with the key value extracted by the other key extractor from the message to update the status table. In this way, automatic update of the state information stored by the OpenFlow switch is implemented.
一般来说,在网络中有两种地址自学习的功能。一种地址自学习的功能是媒质接入控制(Media Access Control,简称为MAC)地址自学习功能,用于基于MAC地址转发的网络中。网络设备通过学习所接收报文的源MAC地址与入端口的对应关系,生成新的MAC地址转发表或更新已有的MAC地址转发表。另一种地址自学习的功能是待封装外层地址自学习功能,用于层叠网(Overlay Network)中。边缘网络设备通过学习所接收报文的外层源地址与内层源地址的映射关系,生成新的外层地址封装表或更新已有的外层地址封装表。In general, there are two types of address self-learning functions in the network. An address self-learning function is a Media Access Control (MAC) address self-learning function, which is used in a network based on MAC address forwarding. The network device learns the correspondence between the source MAC address of the received packet and the ingress port, generates a new MAC address forwarding table, or updates the existing MAC address forwarding table. Another function of address self-learning is to encapsulate the outer address self-learning function for use in an overlay network. The edge network device learns the mapping relationship between the outer source address and the inner source address of the received packet to generate a new outer address encapsulation table or update the existing outer address encapsulation table.
图3是一种层叠网的网络结构示意图。如图3所示,层叠网中包含边缘节点和中间节点两种不同类型的网络设备,用户设备通过连接边缘节点以接入层叠网,边缘节点会针对所有通过用户侧端口进入层叠网的报文添加外层封装。远端边缘节点通过网络侧端口接收到添加了外层封装的报文后,会对报文的外层源地址与内层源地址之间的映射关系进行自学习,并把这种地址间映射关系保存下来,作为该边缘节点给后续的从本边缘节点进入层叠网的报文添加外层封装的依据。这也就是前述的待封装外层地址自学习功能。3 is a schematic diagram of a network structure of a laminated network. As shown in FIG. 3, the cascading network includes two different types of network devices: an edge node and an intermediate node. The user equipment accesses the cascading network by connecting the edge node, and the edge node accesses the multiplexed network packet through all the user-side ports. Add an outer package. After receiving the packet with the outer layer encapsulation, the remote edge node performs self-learning on the mapping between the outer source address and the inner source address of the packet, and maps the address between the packets. The relationship is saved as the basis for the edge node to add outer packaging to the subsequent packets entering the cascading network from the edge node. This is also the aforementioned self-learning function of the outer address to be encapsulated.
实施例1Example 1
本公开的地址自学习的方法可以在交换机、计算机终端或者任何其他适当运算装置中执行。下面,以在交换机上执行本公开的地址自学习的方法为例进行描述。图4是本公开实施例的交换机的结构框图。如图4所示,交换机40可以包括一个或多个(图中仅示出一个)处理器42(处理器42可以包括但不限于微处理器MCU、可编程逻辑器件FPGA以及其他任何适当处理装置)、用于存储数据的存储器44、以及具有通信功能的传输装置46。本领域普通技术人员可以理解,图4所示的结构仅为示例性的,并不对所述电子装置的结构造成限定。例如,交换机40还可以包括比图4中所示更多或者更少的组件,或者具有与图4所示不同的配置。The method of address self-learning of the present disclosure can be performed in a switch, computer terminal, or any other suitable computing device. Hereinafter, a method of performing address self-learning of the present disclosure on a switch will be described as an example. 4 is a structural block diagram of a switch according to an embodiment of the present disclosure. As shown in FIG. 4, switch 40 may include one or more (only one shown) processor 42 (processor 42 may include, but is not limited to, a microprocessor MCU, a programmable logic device FPGA, and any other suitable processing device). A memory 44 for storing data, and a transmission device 46 having a communication function. It will be understood by those skilled in the art that the structure shown in FIG. 4 is merely exemplary and does not limit the structure of the electronic device. For example, switch 40 may also include more or fewer components than shown in FIG. 4, or have a different configuration than that shown in FIG.
存储器44可用于存储应用软件的软件程序以及模块,如本公开实施例中的地址自学习的方法对应的程序指令以及模块。处理器42通过运行存储在存储器44内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现所述的方法。存储器44可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器44还可以包括相对于处理器42远程设置的存储器,这些远程存储器可以通过网络连接至交换机40。所述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 44 can be used to store software programs and modules of application software, such as program instructions and modules corresponding to the method of address self-learning in the embodiments of the present disclosure. The processor 42 performs various functional applications and data processing by executing software programs and modules stored in the memory 44, i.e., implementing the methods described. Memory 44 may include high speed random access memory and may also include non-volatile memory such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory. In some examples, memory 44 may also include memory remotely located relative to processor 42 that may be connected to switch 40 over a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
传输装置46用于经由一个网络接收或者发送数据。所述网络可包括交换机40的通信供应商提供的无线网络。在一个实例中,传输装置46包括一个网络适配器(Network Interface Controller,NIC),其可通过基站与其他网络设备相连,从而可与互联网进行通讯。在一个实例中,传输装置46可以为射频(Radio Frequency,RF)模块,其用于通过无线方式与互联网进行通讯。Transmission device 46 is for receiving or transmitting data via a network. The network may include a wireless network provided by a communication provider of switch 40. In one example, transmission device 46 includes a Network Interface Controller (NIC) that can be connected to other network devices through a base station to communicate with the Internet. In one example, the transmission device 46 can be a Radio Frequency (RF) module for communicating wirelessly with the Internet.
在本实施例中提供了一种运行于所述交换机的地址自学习的方法。图5是根据本公开实施例的地址自学习的方法的流程图。如图5所示,该流程包括如下步骤:In this embodiment, a method for address self-learning running on the switch is provided. FIG. 5 is a flowchart of a method of address self-learning in accordance with an embodiment of the present disclosure. As shown in FIG. 5, the process includes the following steps:
步骤S502,从第一流表中获取与接收到的第一报文匹配的第一动作指示信息;Step S502: Acquire, from the first flow table, first action indication information that matches the received first packet.
步骤S504,根据第一动作指示信息将与第一报文对应的第一源地址复制到第一状态变量中;Step S504, copying, according to the first action indication information, the first source address corresponding to the first packet into the first state variable;
步骤S506,根据第一状态变量更新用于地址自学习的状态表,其中,状态表中存储有与第一报文对应的第二源地址与第一源地址之间的映射关系;以及Step S506, updating a state table for address self-learning according to the first state variable, wherein the state table stores a mapping relationship between the second source address corresponding to the first packet and the first source address;
步骤S508,根据更新后的状态表更新预设表,其中,预设表用于存储地址自学习的结果。Step S508, updating the preset table according to the updated status table, wherein the preset table is used to store the result of the address self-learning.
在所述步骤中,通过第一流表获取第一源地址信息,并且通过用于地址自学习的状态表获取到第一源地址和第二源地址之间的映射关系,再由状态表去更新存储地址自学习结果的预设表。这样,解决了常规OpenFlow网络由于不支持两层地址的获取和使用而无法支持层叠网所需的待封装外层地址自学习功能的问题。因此,能够有效地进行地址自学习。In the step, the first source address information is obtained by using the first flow table, and the mapping relationship between the first source address and the second source address is obtained through the state table for address self-learning, and then updated by the state table. A preset table for storing address self-learning results. In this way, the problem that the conventional OpenFlow network cannot support the self-learning function of the outer address to be encapsulated required for the cascading network cannot be supported because it does not support the acquisition and use of the two-layer address. Therefore, address self-learning can be performed efficiently.
在一些实施方式中,所述步骤的执行主体可以包括但不限于交换机和计算机终端等。In some embodiments, the execution body of the steps may include, but is not limited to, a switch and a computer terminal or the like.
在一些实施方式中,第一源地址可以是第一报文的入端口,或者是报文的外层源地址;第二源地址可以是第一报文的媒体接入控制(Media Access Control,简称为MAC)地址,也可以是第一报文的内层源地址。In some embodiments, the first source address may be an ingress port of the first packet or an outer source address of the packet; the second source address may be a media access control of the first packet (Media Access Control, Referred to as the MAC address, it can also be the inner source address of the first packet.
在一些实施方式中,在步骤S506中,可以采用多种方式更新状态表。例如,可以从第一报文中提取出第一报文的第二源地址,根据第二源地址及第一状态变量更新状态表。在进行第二源地址的获取时,可以使用键值提取器从第一报文中提取出该报文的第二源地址。In some embodiments, in step S506, the status table can be updated in a variety of ways. For example, the second source address of the first packet may be extracted from the first packet, and the state table may be updated according to the second source address and the first state variable. When the second source address is obtained, the second source address of the packet may be extracted from the first packet by using the key extractor.
在一些实施方式中,在根据第二源地址及第一状态变量更新状态表时,可以通过如下方式进行状态表的更新:在状态表中查找第二源地址,其中,在未查找到第二源地址的情况下,在状态表中创建与第二源地址对应的状态条目,其中,所创建的状态条目用于记录第二源地址及与第一状态变量中携带的第一源地址之间的映射关系;在查找到第二源地址的情况下,判断在状态表中存储的与第二源地址匹配的第三源地址,与第一状态变量中携带的第一源地址是否相同,其中,在状态表中与第二源地址匹配的第三源地址,与第一状态变量中携带的第一源地址不同时,将状态表中的第三源地址替换为第一源地址;在状态表中与第二源地址匹配的第三源地址,与第一状态变量 中携带的第一源地址相同时,可以不对状态表进行处理。In some embodiments, when the status table is updated according to the second source address and the first state variable, the update of the status table may be performed by searching for a second source address in the status table, wherein the second source is not found. In the case of a source address, a state entry corresponding to the second source address is created in the state table, wherein the created state entry is used to record the second source address and the first source address carried in the first state variable a mapping relationship; if the second source address is found, determining whether the third source address that is stored in the state table and matches the second source address is the same as the first source address carried in the first state variable, where The third source address that matches the second source address in the state table is different from the first source address carried in the first state variable, and replaces the third source address in the state table with the first source address; When the third source address matching the second source address in the table is the same as the first source address carried in the first state variable, the state table may not be processed.
在一些实施方式中,在步骤S508中,可以采用多种方式更新预设表。例如,可以在预设表中生成与更新后的状态表中的第二源地址对应的匹配字段;将更新后的状态表中的第一源地址,嵌入到预设表中与匹配字段对应的第二动作指示信息中,其中,第二动作指示信息用于指示按照第一源地址执行预定操作。In some embodiments, the preset table may be updated in various ways in step S508. For example, a matching field corresponding to the second source address in the updated state table may be generated in the preset table; and the first source address in the updated state table is embedded in the preset table corresponding to the matching field. The second action indication information, wherein the second action indication information is used to indicate that the predetermined operation is performed according to the first source address.
在一些实施方式中,在根据更新后的状态表更新预设表之后,还可以接收第二报文,其中,第二报文的目的地址和与第一报文对应的第二源地址相同;根据与目的地址对应的匹配字段从预设表中获取第二动作指示信息;根据第二动作指示信息的指示,按照第一源地址对第二报文执行预定操作。由于第二报文的目的地址与第二源地址相同,则与目的地址对应的匹配字段和与第二源地址对应的匹配字段是相同的,根据与目的地址对应的匹配字段从预设表中获取的动作指示信息,即为前述第二动作指示信息。In some embodiments, after updating the preset table according to the updated status table, the second packet may also be received, where the destination address of the second packet is the same as the second source address corresponding to the first packet; Obtaining second action indication information from the preset table according to the matching field corresponding to the destination address; performing a predetermined operation on the second packet according to the first source address according to the indication of the second action indication information. If the destination address of the second packet is the same as the second source address, the matching field corresponding to the destination address and the matching field corresponding to the second source address are the same, and the matching field corresponding to the destination address is from the preset table. The acquired action indication information is the foregoing second action indication information.
在一些实施方式中,按照第一源地址对第二报文执行预定操作可以有多种方式。例如,可以按照第一源地址封装第二报文。例如,可以给第二报文添加外层封装并使用第一源地址作为报文的目的地址。还可以按照第一源地址输出第二报文,例如,从第一源地址输出,也就是将第二报文从第一源地址输出。In some embodiments, there may be multiple ways to perform a predetermined operation on the second message in accordance with the first source address. For example, the second message may be encapsulated according to the first source address. For example, an outer encapsulation may be added to the second packet and the first source address is used as the destination address of the message. The second message may also be output according to the first source address, for example, outputted from the first source address, that is, the second message is output from the first source address.
在一些实施方式中,所述第一流表,状态表和预设表可以由OpenFlow控制器接收的。例如,在步骤S502之前,可以接收开放流控制器(OpenFlow控制器)下发的第一流表,状态表和预设表;而在步骤S508之后,还可以向开放流控制器上报更新后的预设表。所述下发和上报的操作可以根据需要进行设定。例如,第一流表,状态表和预设表的下发操作可以是基于本设备(例如,OpenFlow交换机)发送的请求消息进行的,也可以是根据预先设定的发送周期进行的,还可以是OpenFlow控制器根据交换机当前的状态(网络情况、处理效率等)主动进行的。预设表的上报操作可以是更新以后立即进行的,也可以是周期性进行的,还可以是满足预设条件(时间条件、网络条件、设备的资源占用条件等)后进行的。In some embodiments, the first flow table, status table, and preset table may be received by an OpenFlow controller. For example, before the step S502, the first flow table, the status table, and the preset table delivered by the OpenFlow controller may be received. After the step S508, the updated pre-process may also be reported to the OpenFlow controller. Set the table. The operations of issuing and reporting can be set as needed. For example, the sending operation of the first flow table, the status table, and the preset table may be performed based on a request message sent by the local device (for example, an OpenFlow switch), or may be performed according to a preset sending period, or may be The OpenFlow controller actively performs the current state of the switch (network conditions, processing efficiency, etc.). The reporting operation of the preset table may be performed immediately after the update, or may be performed periodically, or may be performed after the preset conditions (time conditions, network conditions, resource occupancy conditions of the device, etc.) are met.
在一些实施方式中,预设表可以是第二流表,还可以是组表。预设表的类型可以根据需要进行选择。In some embodiments, the preset table may be a second flow table or a group table. The type of preset table can be selected as needed.
在本公开的示例性实施例中,提供了一种地址自学习的方法。In an exemplary embodiment of the present disclosure, a method of address self-learning is provided.
在本示例性选实施例中所提供的地址自学习的方法可以通过以下方式实现地址自学习:控制器向网络设备下发获取报文状态信息的流表、地址自学习状态表和存储地址自学习结果的流表;允许网络设备接收的报文首先进入获取报文状态信息的流表进行处理,该流表会将报文的状态信息复制到新状态(Next_State),然后使用新状态和报文源地址对地址自学习状态表进行更新;利用地址自学习状态表各条目的匹配键值与状态值对存储地址自学习结果的流表进行更新。The address self-learning method provided in the exemplary embodiment may implement address self-learning in the following manner: the controller sends a flow table, an address self-learning state table, and a storage address to obtain the packet state information from the network device. The flow table of the learning result; the packet that the network device receives is first processed into a flow table that acquires the state information of the packet, and the flow table copies the state information of the packet to a new state (Next_State), and then uses the new state and the report. The source address updates the address self-learning state table; the flow table of the storage address self-learning result is updated by using the matching key value and the state value of each entry in the address self-learning state table.
如图6所示,根据本公开示例性实施例的地址自学习的方法以包括以下步骤:As shown in FIG. 6, a method of address self-learning according to an exemplary embodiment of the present disclosure includes the following steps:
步骤A,控制器向网络设备下发获取报文状态信息的流表、地址自学习状态表和存储地址自学习结果的流表。In step A, the controller sends a flow table, a self-learning state table, and a flow table of the self-learning result of the storage address to the network device.
获取报文状态信息的流表(作用同前述第一流表)用于把报文相关的状态信息(例如,报文的入端口,报文的外层源地址,作用同前述第一源地址)复制到新状态(作用同前述状态信息变量),其中,该流表的匹配字段为“需要地址自学习的报文”,相应的动作为“复制报文状态信息到新状态(Next_State)”(作用同前述第一动作指示信息);地址自学习状态表(作用同前述用于地址自学习的状态表)用于记录报文源地址信息(作用同前述第二源地址)并获取报文状态信息的流表所获取的报文状态信息,其中,该状态表的匹配键值为报文源地址,状态值为报文状态信息;地址自学习状态表利用匹配键值和状态值对存储地址自学习结果的流表进行更新,其中,存储地址自学习结果的流表(作用同前述预设表)的匹配字段为“包含匹配键值的匹配字段”,相应的动作为“以状态值为参数的动作”(作用同前述第二动作指示信息)。The flow table for obtaining the packet status information (acting the same as the foregoing first flow table) is used for the status information related to the packet (for example, the inbound port of the packet, the outer source address of the packet, and the first source address) Copy to a new state (acting the same as the foregoing state information variable), where the matching field of the flow table is "message requiring address self-learning", and the corresponding action is "copy message status information to new state (Next_State)" ( The function is the same as the foregoing first action indication information); the address self-learning state table (acting the same as the foregoing state table for address self-learning) is used to record the source address information of the message (acting the same as the foregoing second source address) and obtain the message state. The packet status information obtained by the flow table of the information, wherein the matching key value of the status table is the source address of the packet, and the status value is the status information of the packet; the address self-learning status table uses the matching key value and the status value to store the address The flow table of the self-learning result is updated, wherein the matching field of the flow table storing the self-learning result of the address (acting with the preset table) is “a matching field containing a matching key value”, and the corresponding action is “ Operation parameter value "(with the effect of a second operation instruction information).
步骤B,允许网络设备接收的报文首先进入获取报文状态信息的流表进行处理,该流表会将报文的状态信息复制到新状态,然后使用新状态和报文源地址对地址自学习状态表进行更新。Step B: The packet received by the network device is first processed into a flow table that obtains the status information of the packet, and the flow table copies the status information of the packet to a new state, and then uses the new state and the source address of the packet to address the address. The learning status table is updated.
报文(作用同前述第一报文)进入获取报文状态信息的流表后,使用匹配字段“需要地址自学习的报文”进行匹配。例如,如果采用通配符作为匹配字段,则表明所有进入网络设备的报文都要进行地址自学习。对于匹配成 功的报文,执行动作“复制报文状态信息到新状态”以将报文的状态信息复制到新状态。键值提取器会从报文中提取出报文源地址,然后用报文源地址和新状态对地址自学习状态表进行更新。这样,地址自学习状态表就记录了地址自学习所获取的报文源地址信息和报文状态信息。After the packet (acting the same as the first packet) enters the flow table for obtaining the packet status information, the matching field "requires address self-learning packet" is used for matching. For example, if a wildcard is used as the matching field, it means that all packets entering the network device are subject to address self-learning. For a message that matches the success, the action "Copy message status information to new status" is executed to copy the status information of the message to the new status. The key extractor extracts the source address of the message from the message, and then updates the address self-learning status table with the source address and the new status of the message. In this way, the address self-learning state table records the source address information and the packet state information of the packet obtained by the address self-learning.
步骤C,利用地址自学习状态表各条目的匹配键值与状态值对存储地址自学习结果的流表进行更新。In step C, the flow table of the storage address self-learning result is updated by using the matching key value and the state value of each entry in the address self-learning state table.
地址自学习状态表各条目的匹配键值与状态值分别记录了地址自学习所获取的报文源地址信息和报文状态信息。利用匹配键值与状态值对存储地址自学习结果的流表进行更新。也就是,用地址自学习状态表的匹配键值去更新存储地址自学习结果的流表中的匹配键值,用地址自学习状态表的状态值去更新存储地址自学习结果的流表中的状态值。如果地址自学习状态表某个条目的匹配键值是存储地址自学习结果的流表中不存在的,则在存储地址自学习结果的流表中增加新的流表条目;如果地址自学习状态表某个条目的匹配键值是存储地址自学习结果的流表中存在的,则更新存储地址自学习结果的流表中的已有流表条目。每当存储地址自学习结果的流表得到更新后,网络设备需要向控制器上报更新后的存储地址自学习结果的流表。The matching key value and the status value of each entry in the address self-learning state table respectively record the source address information and the packet state information of the packet obtained by the address self-learning. The flow table of the storage address self-learning result is updated by using the matching key value and the state value. That is, the matching key value in the address self-learning state table is used to update the matching key value in the flow table of the storage address self-learning result, and the state value of the address self-learning state table is used to update the storage address self-learning result in the flow table. Status value. If the matching key value of an entry in the address self-learning state table does not exist in the flow table of the storage address self-learning result, a new flow table entry is added to the flow table of the storage address self-learning result; if the address self-learning state If the matching key value of an entry of the table exists in the flow table of the storage address self-learning result, the existing flow table entry in the flow table of the storage address self-learning result is updated. When the flow table of the storage address self-learning result is updated, the network device needs to report the flow table of the updated storage address self-learning result to the controller.
下面结合两个实例对本示例性实施例的地址自学习的方法进行说明。The method of address self-learning of the present exemplary embodiment will be described below in conjunction with two examples.
实例1Example 1
图7是根据本公开示例性实施例的示出MAC地址自学习功能的示意图。如图7所示,在本实例中,OpenFlow控制器与OpenFlow交换机执行的步骤如下:FIG. 7 is a schematic diagram showing a MAC address self-learning function, according to an exemplary embodiment of the present disclosure. As shown in Figure 7, in this example, the steps performed by the OpenFlow controller and the OpenFlow switch are as follows:
步骤1,OpenFlow控制器向OpenFlow交换机下发获取报文入端口信息的流表、地址自学习状态表和存储地址自学习结果的流表。Step 1: The OpenFlow controller sends a flow table, a self-learning state table, and a flow table of the self-learning result of the storage address to the OpenFlow switch.
获取报文入端口信息的流表的匹配字段为“通配符”,相应的动作为“复制<报文的入端口>到新状态”;地址自学习状态表的匹配键值为“报文的源MAC地址”,状态值为“报文的入端口”;存储地址自学习结果的流表的匹配字段为“<报文的目的MAC地址>”,相应的动作为“从<报文的出端口>输出”。The matching field of the flow table that obtains the information of the inbound port information is the wildcard. The corresponding action is Copy <incoming port of the packet> to the new state. The matching key of the address self-learning state table is the source of the packet. "MAC address", the status value is "incoming port of the packet"; the matching field of the flow table of the storage address self-learning result is "<destination MAC address of the packet>", and the corresponding action is "from the outbound port of the packet" >Output".
步骤2,允许OpenFlow交换机接收的报文首先进入获取报文入端口信息的流表进行处理,其中,该流表会把报文的入端口信息复制到新状态,然后使用新状态和报文的源MAC地址对地址自学习状态表进行更新。Step 2: The packet received by the OpenFlow switch is first processed into a flow table for obtaining the inbound port information of the packet, where the flow table copies the inbound port information of the packet to a new state, and then uses the new state and the packet. The source MAC address updates the address self-learning status table.
报文进入获取报文入端口信息的流表后,使用匹配字段“通配符”进行匹配。也就是说,所有进入OpenFlow交换机的报文都会匹配成功。对于匹配成功的报文,执行动作“复制<报文的入端口>到新状态”将报文的入端口信息复制到新状态。报文的入端口就是该流表所获取的报文相关状态信息。键值提取器会从报文中提取出报文的源MAC地址,然后用报文的源MAC地址和入端口对地址自学习状态表进行更新。这样,地址自学习状态表就记录了地址自学习所获取的报文的源MAC地址和报文的入端口。After the packet enters the flow table of the port information of the packet, the matching field "wildcard" is used for matching. That is to say, all packets entering the OpenFlow switch will match successfully. For the packets that match successfully, perform the action "Copy <incoming port of the packet> to the new state" to copy the inbound port information of the packet to the new state. The inbound port of the packet is the status information about the packet obtained by the flow table. The key extractor extracts the source MAC address of the packet from the packet, and then updates the address self-learning state table with the source MAC address and the ingress port of the packet. In this way, the address self-learning state table records the source MAC address of the packet obtained by the address self-learning and the ingress port of the packet.
步骤3,利用地址自学习状态表各条目的匹配键值与状态值对存储地址自学习结果的流表进行更新。Step 3: Update the flow table of the storage address self-learning result by using the matching key value and the state value of each entry in the address self-learning state table.
地址自学习状态表各条目的匹配键值与状态值分别记录了地址自学习所获取的报文的源MAC地址和报文的入端口。利用匹配键值与状态值对存储地址自学习结果的流表进行更新。也就是,用地址自学习状态表的报文的源MAC地址去更新存储地址自学习结果的流表中的匹配字段<报文的目的MAC地址>(作用同前述匹配字段),用地址自学习状态表的报文的入端口去更新存储地址自学习结果的流表中的动作参数<报文的出端口>,达到从<报文的出端口>转发报文的目的。如果地址自学习状态表某个条目的报文的源MAC地址是存储地址自学习结果的流表的匹配字段中不存在的,则在存储地址自学习结果的流表中增加新的流表条目,并使用地址自学习状态表中的报文的源MAC地址和报文的入端口来更新所述新增的流表条目;如果地址自学习状态表某个条目的报文的源MAC地址是存储地址自学习结果的流表的匹配字段中存在的,则直接使用地址自学习状态表中的报文的入端口更新存储地址自学习结果的流表中的已有流表条目。The matching key value and the status value of each entry in the address self-learning state table record the source MAC address of the packet obtained by the address self-learning and the ingress port of the packet. The flow table of the storage address self-learning result is updated by using the matching key value and the state value. That is, the source MAC address of the packet in the address self-learning state table is used to update the matching field <destination MAC address of the packet> in the flow table of the self-learning result of the storage address (acting the same as the foregoing matching field), and self-learning by address The ingress port of the packet of the state table is used to update the action parameter <outbound port> of the packet in the flow table of the self-learning result of the storage address to achieve the purpose of forwarding the packet from the <outgoing port of the packet>. If the source MAC address of the packet in the address self-learning state table does not exist in the matching field of the flow table of the storage address self-learning result, add a new flow table entry in the flow table of the storage address self-learning result. And updating the new flow table entry by using the source MAC address of the packet in the address self-learning state table and the ingress port of the packet; if the source MAC address of the packet of an entry in the self-learning state table is If the matching field exists in the flow table of the storage address self-learning result, the existing flow table entry in the flow table of the storage address self-learning result is directly updated by using the ingress port of the packet in the address self-learning state table.
每当存储地址自学习结果的流表得到更新后,OpenFlow交换机需要向OpenFlow控制器上报更新后的存储地址自学习结果的流表。When the flow table of the storage address self-learning result is updated, the OpenFlow switch needs to report the flow table of the updated storage address self-learning result to the OpenFlow controller.
实例2Example 2
图8是根据本公开示例性实施例的示出待封装外层地址自学习功能的示意图。如图8所示,在本实例中,OpenFlow控制器与作为层叠网边缘节点的OpenFlow交换机执行如下步骤:FIG. 8 is a schematic diagram showing an outer address address self-learning function to be encapsulated, according to an exemplary embodiment of the present disclosure. As shown in FIG. 8, in this example, the OpenFlow controller performs the following steps with an OpenFlow switch that is an edge node of the cascading network:
步骤1,OpenFlow控制器向OpenFlow交换机下发获取报文外层源地址信息的流表、地址自学习状态表和存储地址自学习结果的流表。Step 1: The OpenFlow controller sends a flow table, an address self-learning state table, and a flow table for storing the self-learning result of the outer address source information of the packet to the OpenFlow switch.
获取报文外层源地址信息的流表的匹配字段为“报文的入端口为网络侧端口”,相应的动作为“复制<报文的外层源地址>到新状态”;地址自学习状态表的匹配键值为“报文的内层源地址”,状态值为“报文的外层源地址”;存储地址自学习结果的流表的匹配字段为“报文的入端口为用户侧端口+<报文的目的地址>”,也就是同时满足报文的入端口为用户侧端口和报文的目的地址为某个取值,相应的动作为“给报文添加外层封装并使用<报文的外层目的地址>作为报文的外层目的地址”。The matching field of the flow table that obtains the outer source address information of the packet is "the inbound port of the packet is the network side port", and the corresponding action is "copy < outer source address of the packet> to the new state"; address self-learning The matching key of the status table is the inner source address of the packet, and the status value is the outer source address of the packet. The matching field of the flow table that stores the self-learning result is that the inbound port of the packet is the user. The side port + <destination address of the packet>, that is, the inbound port of the packet is the user-side port and the destination address of the packet is a certain value. The corresponding action is to add an outer encapsulation to the packet. Use <outer destination address of the packet> as the outer destination address of the packet."
步骤2,允许OpenFlow交换机接收的报文首先进入获取报文外层源地址信息的流表进行处理,其中,该流表会把报文的外层源地址信息复制到新状态,然后使用新状态和报文的内层源地址对地址自学习状态表进行更新。Step 2: The packet received by the OpenFlow switch is first processed into a flow table for obtaining the outer source address information of the packet, where the flow table copies the outer source address information of the packet to a new state, and then uses the new state. And the inner source address of the message is updated to the address self-learning state table.
报文进到获取报文入端口信息的流表后,使用匹配字段“报文的入端口为网络侧端口”进行匹配,也即OpenFlow交换机从网络侧端口接收的报文会匹配成功,对于匹配成功的报文,执行动作“复制<报文的外层源地址>到新状态”把报文的外层源地址信息复制到新状态,报文的外层源地址就是该流表所获取的报文相关状态信息,而键值提取器会从报文中提取出报文的内层源地址,然后用报文的内层源地址和外层源地址对地址自学习状态表进行更新,地址自学习状态表就记录了地址自学习所获取的报文的内层源地址和报文的外层源地址。After the packet is sent to the flow table of the inbound port information, the matching field is used to match the incoming port of the packet to the network-side port. That is, the packets received by the OpenFlow switch from the network-side port match successfully. For a successful packet, perform the action "Copy <Outer Source Address of the Packet> to the New State" to copy the outer source address information of the packet to the new state. The outer source address of the packet is obtained by the flow table. The message related state information, and the key value extractor extracts the inner source address of the message from the message, and then updates the address self-learning state table with the inner source address and the outer source address of the message, and the address The self-learning state table records the inner source address of the packet obtained by the address self-learning and the outer source address of the packet.
步骤3,利用地址自学习状态表各条目的匹配键值与状态值对存储地址自学习结果的流表进行更新。Step 3: Update the flow table of the storage address self-learning result by using the matching key value and the state value of each entry in the address self-learning state table.
地址自学习状态表各条目的匹配键值与状态值分别记录了地址自学习所获取的报文的内层源地址和报文的外层源地址。利用匹配键值与状态值对存储地址自学习结果的流表进行更新。也就是,用地址自学习状态表的报文的内层源地址去更新存储地址自学习结果的流表中的<报文的目的地址>,用地址自学习状态表的报文的外层源地址去更新存储地址自学习结果的流表中的动作参数<报文的外层目的地址>。如果地址自学习状态表某个条目的报文的内层源地址是存储地址自学习结果的流表的匹配字段中不存在的,则在存储地址自学习结果的流表中增加新的流表条目,并使用地址自学习状态表中的报文的内层源地址和报文的外层源地址来更新所述新增的流表条目;如果地址自学习状态表某个条目的报文的内层源地址是存储地址自学习结果 的流表的匹配字段中存在的,则直接使用地址自学习状态表中的报文的外层源地址来更新存储地址自学习结果的流表中的已有流表条目。The matching key value and the status value of each entry in the address self-learning state table record the inner source address of the packet obtained by the address self-learning and the outer source address of the packet. The flow table of the storage address self-learning result is updated by using the matching key value and the state value. That is, the inner source address of the message in the address self-learning state table is used to update the <destination address of the message in the flow table of the self-learning result of the storage address, and the outer source of the message in the self-learning state table of the address is used. The address is to update the action parameter <outer destination address of the packet> in the flow table of the storage address self-learning result. If the inner source address of the packet in the address self-learning state table does not exist in the matching field of the flow table of the storage address self-learning result, a new flow table is added to the flow table of the storage address self-learning result. Entries, and use the inner source address of the message in the address self-learning state table and the outer source address of the message to update the newly added flow table entry; if the address self-learns the status table of an entry of the message If the inner source address is in the matching field of the flow table in which the address self-learning result is stored, the outer source address of the packet in the address self-learning state table is directly used to update the flow table in the self-learning result of the storage address. There are flow table entries.
每当存储地址自学习结果的流表得到更新后,OpenFlow交换机需要向OpenFlow控制器上报更新后的存储地址自学习结果的流表。When the flow table of the storage address self-learning result is updated, the OpenFlow switch needs to report the flow table of the updated storage address self-learning result to the OpenFlow controller.
除了使用流表来存储地址自学习结果之外,在一些实施方式中,也可以使用组表来存储地址自学习结果。使用组表可以同时存储一个报文的目的地址与多个封装后报文的外层目的地址的映射关系。因此,可以支持地址自学习所获取的报文源地址与多个报文状态的对应,这在层叠网的待封装外层地址自学习功能中是有可能需要的。In addition to using a flow table to store address self-learning results, in some embodiments, a group table can also be used to store address self-learning results. You can use the group table to store the mapping between the destination address of a packet and the outer destination address of multiple encapsulated packets. Therefore, the correspondence between the source address of the packet obtained by the address self-learning and the status of multiple packets can be supported, which may be required in the self-learning function of the outer address of the layer to be encapsulated.
在本公开示例性实施例的所述技术方案中,通过使用流表和状态表分别获取到报文的两个源地址,使得OpenFlow网络可同时支持基于MAC转发网络所需的MAC地址自学习功能和层叠网所需的待封装外层地址自学习功能。In the technical solution of the exemplary embodiment of the present disclosure, the two source addresses of the packet are respectively obtained by using the flow table and the state table, so that the OpenFlow network can simultaneously support the MAC address self-learning function required for the MAC-based forwarding network. And the self-learning function of the outer address to be encapsulated required by the cascading network.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据所述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,也可以通过硬件来实现。但很多情况下前者是更佳的实施方式。基于这样的理解,本公开的技术方案对现有技术做出贡献的部分可以以软件产品的形式体现出来。该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,并且包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本公开各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the embodiment can be implemented by means of software plus a necessary general hardware platform, or can be implemented by hardware. But in many cases the former is a better implementation. Based on such understanding, the portion of the technical solution of the present disclosure that contributes to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as a ROM/RAM, a magnetic disk, an optical disk), and includes a plurality of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the present disclosure. The methods described in the various examples.
实施例2Example 2
根据本公开的一个实施例,还提供了一种地址自学习的装置,该装置用于实现所述实施例及示例性实施方式。在下文中,术语“模块”是指可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是也可以想到以硬件或者软件和硬件的组合来实现。According to an embodiment of the present disclosure, there is also provided an apparatus for address self-learning for implementing the embodiment and the exemplary embodiment. Hereinafter, the term "module" refers to a combination of software and/or hardware that can implement a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, it is also conceivable to implement the hardware or a combination of software and hardware.
图9是根据本公开实施例的地址自学习的装置的结构框图。如图9所示,该装置包括:9 is a structural block diagram of an apparatus for address self-learning according to an embodiment of the present disclosure. As shown in Figure 9, the device includes:
第一获取模块92,用于从第一流表中获取与接收到的第一报文匹配的第一动作指示信息;复制模块94,连接至所述第一获取模块92,用于根据第一动作指示信息将与第一报文对应的第一源地址复制到第一状态变量中;第 一更新模块96,连接至所述复制模块94,用于根据第一状态变量更新用于地址自学习的状态表,其中,状态表中存储有与第一报文对应的第二源地址与第一源地址之间的映射关系;以及第二更新模块98,连接至所述第一更新模块96,用于根据更新后的状态表更新预设表,其中,预设表用于存储地址自学习的结果。The first obtaining module 92 is configured to obtain, from the first flow table, first action indication information that matches the received first packet, and the copying module 94 is connected to the first acquiring module 92, according to the first action. The indication information is copied into the first state variable corresponding to the first message; the first update module 96 is connected to the copy module 94, and is configured to update the address self-learning according to the first state variable. a state table, wherein the state table stores a mapping relationship between the second source address corresponding to the first packet and the first source address; and the second update module 98 is connected to the first update module 96. The preset table is updated according to the updated status table, wherein the preset table is used to store the result of the address self-learning.
在一些实施方式中,第一更新模块96,还可以用于从第一报文中提取出第一报文的第二源地址;并且根据第二源地址及第一状态变量更新状态表。In some embodiments, the first update module 96 is further configured to: extract a second source address of the first packet from the first packet; and update the state table according to the second source address and the first state variable.
图10是根据本公开实施例的地址自学习的装置中的第一更新模块96的结构框图。如图10所示,该第一更新模块96包括:查找单元102,用于在状态表中查找第二源地址;创建单元104,连接至所述查找单元102,用于在未查找到第二源地址的情况下,在状态表中创建与第二源地址对应的状态条目,其中,所创建的状态条目用于记录第二源地址及与第一状态变量中携带的第一源地址之间的映射关系。FIG. 10 is a structural block diagram of a first update module 96 in an apparatus for address self-learning according to an embodiment of the present disclosure. As shown in FIG. 10, the first update module 96 includes: a searching unit 102 for searching for a second source address in the state table; a creating unit 104, connected to the searching unit 102, for not finding the second In the case of a source address, a state entry corresponding to the second source address is created in the state table, wherein the created state entry is used to record the second source address and the first source address carried in the first state variable Mapping relationship.
图11是根据本公开实施例的地址自学习的装置中的第一更新模块96的结构框图。如图11所示,该第一更新模块96还包括:判断单元112,连接至所述查找单元102,用于在状态表中查找第二源地址之后,在查找到第二源地址的情况下,判断在状态表中存储的与第二源地址匹配的第三源地址,与第一状态变量中携带的第一源地址是否相同;替换单元114,连接至所述判断单元112,用于在状态表中与第二源地址匹配的第三源地址,与第一状态变量中携带的第一源地址不同时,将状态表中的第三源地址替换为第一源地址。FIG. 11 is a structural block diagram of a first update module 96 in an apparatus for address self-learning according to an embodiment of the present disclosure. As shown in FIG. 11, the first update module 96 further includes: a determining unit 112, connected to the searching unit 102, for searching for the second source address in the state table, and in the case of finding the second source address Determining whether the third source address that is stored in the state table that matches the second source address is the same as the first source address that is carried in the first state variable; the replacing unit 114 is connected to the determining unit 112, for The third source address in the state table that matches the second source address is different from the first source address carried in the first state variable, and the third source address in the state table is replaced with the first source address.
在一些实施方式中,第二更新模块98,还可以用于在预设表中生成与更新后的状态表中的第二源地址对应的匹配字段;将更新后的状态表中的第一源地址,嵌入到预设表中与匹配字段对应的第二动作指示信息中,其中,第二动作指示信息用于指示按照第一源地址执行预定操作。In some embodiments, the second update module 98 is further configured to generate, in the preset table, a matching field corresponding to the second source address in the updated state table; the first source in the updated state table The address is embedded in the second action indication information corresponding to the matching field in the preset table, where the second action indication information is used to indicate that the predetermined operation is performed according to the first source address.
图12是根据本公开实施例的地址自学习的装置的结构框图。如图12所示,该装置除包括图9所示的所有模块外,还包括:第一接收模块122,用于在根据更新后的状态表更新预设表之后,接收第二报文,其中,第二报文的目的地址和与第一报文对应的第二源地址相同;第二获取模块124,连接至所述第一接收模块122,用于根据与目的地址对应的匹配字段从预设表 中获取第二动作指示信息;执行模块126,连接至所述第二获取模块124,用于根据第二动作指示信息的指示,按照第一源地址对第二报文执行预定操作。FIG. 12 is a structural block diagram of an apparatus for address self-learning according to an embodiment of the present disclosure. As shown in FIG. 12, the device includes, in addition to all the modules shown in FIG. 9, a first receiving module 122, configured to receive a second packet after updating the preset table according to the updated state table, where The second address of the second packet is the same as the second source address corresponding to the first packet. The second obtaining module 124 is connected to the first receiving module 122, and is configured to use the matching field corresponding to the destination address. The second action indication information is obtained in the table. The execution module 126 is connected to the second acquisition module 124, and is configured to perform a predetermined operation on the second message according to the first source address according to the indication of the second action indication information.
在一些实施方式中,执行模块126,还可以用于按照第一源地址封装第二报文;或者,按照第一源地址输出第二报文。In some implementations, the executing module 126 is further configured to encapsulate the second packet according to the first source address; or output the second packet according to the first source address.
图13是根据本公开实施例的地址自学习的装置的结构框图。如图13所示,该装置除包括图9所示的所有模块外,还包括:第二接收模块132,用于在从第一流表中获取与接收到的第一报文匹配的第一动作指示信息之前,接收开放流控制器下发的流表,状态表和预设表;上报模块134,连接至所述第二接收模块132,用于在根据更新后的状态表更新预设表之后,向开放流控制器上报更新后的预设表。FIG. 13 is a structural block diagram of an apparatus for address self-learning according to an embodiment of the present disclosure. As shown in FIG. 13, the device includes, in addition to all the modules shown in FIG. 9, a second receiving module 132, configured to acquire, from the first flow table, a first action that matches the received first packet. Before the indication information, the flow table, the status table and the preset table sent by the OpenFlow controller are received; the reporting module 134 is connected to the second receiving module 132, and is configured to update the preset table according to the updated status table. , report the updated preset table to the open flow controller.
在一些实施方式中,所述预设表可以为第二流表和组表之一。In some embodiments, the preset table may be one of a second flow table and a group table.
需要说明的是,所述各个模块可以通过软件或硬件来实现。当所述各个模块通过硬件实现时,所述模块可以均位于同一处理器中,或者,所述各个模块以任意组合的形式分别位于不同的处理器中。It should be noted that each of the modules may be implemented by software or hardware. When the various modules are implemented by hardware, the modules may all be located in the same processor, or the respective modules may be located in different processors in any combination.
实施例3Example 3
根据本公开的一个实施例,还提供了一种交换机,该交换机用于实现所述实施例及示例性实施方式。According to an embodiment of the present disclosure, there is also provided a switch for implementing the embodiment and the exemplary embodiment.
图14是根据本公开实施例的交换机的结构框图。如图14所示,该交换机包括:处理器142和存储器144,其中,处理器142,用于从第一流表中获取与接收到的第一报文匹配的第一动作指示信息;根据第一动作指示信息将与第一报文对应的第一源地址复制到第一状态变量中;根据第一状态变量更新用于地址自学习的状态表,其中,状态表中存储有第一报文对应的第二源地址与第一源地址之间的映射关系;根据更新后的状态表更新预设表,其中,预设表用于存储地址自学习的结果;以及存储器144,与所述处理器142相连,用于存储第一流表、状态表和预设表。FIG. 14 is a structural block diagram of a switch according to an embodiment of the present disclosure. As shown in FIG. 14, the switch includes: a processor 142 and a memory 144, wherein the processor 142 is configured to obtain, from the first flow table, first action indication information that matches the received first packet; The action indication information is copied to the first state variable corresponding to the first message; the state table for address self-learning is updated according to the first state variable, wherein the first message is stored in the state table. a mapping relationship between the second source address and the first source address; updating the preset table according to the updated state table, wherein the preset table is used to store the result of the address self-learning; and the memory 144, and the processor The 142 is connected to store the first flow table, the status table, and the preset table.
处理器142,还用于从第一报文中提取出第一报文的第二源地址;并且根据第二源地址及第一状态变量更新状态表。The processor 142 is further configured to: extract a second source address of the first packet from the first packet; and update the state table according to the second source address and the first state variable.
在一些实施方式中,处理器142,还用于在状态表中查找第二源地址;在未查找到第二源地址的情况下,在状态表中创建与第二源地址对应的状态 条目,其中,所创建的状态条目用于记录第二源地址及与第一状态变量中携带的第一源地址之间的映射关系。In some embodiments, the processor 142 is further configured to: search for a second source address in the state table; and if the second source address is not found, create a state entry corresponding to the second source address in the state table, The created status entry is used to record a mapping relationship between the second source address and the first source address carried in the first state variable.
在一些实施方式中,处理器142,还用于在状态表中查找第二源地址之后,在查找到第二源地址的情况下,判断在状态表中存储的与第二源地址匹配的第三源地址,与第一状态变量中携带的第一源地址是否相同;在状态表中与第二源地址匹配的第三源地址,与第一状态变量中携带的第一源地址不同时,将状态表中的第三源地址替换为第一源地址。In some embodiments, the processor 142 is further configured to: after searching for the second source address in the state table, determine, in the case that the second source address is found, the first location in the state table that matches the second source address. Whether the third source address is the same as the first source address carried in the first state variable; and the third source address matching the second source address in the state table is different from the first source address carried in the first state variable, Replace the third source address in the status table with the first source address.
在一些实施方式中,处理器142,还用于在预设表中生成与更新后的状态表中的第二源地址对应的匹配字段;将更新后的状态表中的第一源地址,嵌入到预设表中与匹配字段对应的第二动作指示信息中,其中,第二动作指示信息用于指示按照第一源地址执行预定操作。In some implementations, the processor 142 is further configured to generate, in the preset table, a matching field corresponding to the second source address in the updated state table; embedding the first source address in the updated state table And the second action indication information corresponding to the matching field in the preset table, where the second action indication information is used to indicate that the predetermined operation is performed according to the first source address.
图15是根据本公开实施例的交换机的结构框图。如图15所示,除了图14所示的所有模块外,该交换机还包括:第一传输装置152,用于在根据更新后的状态表更新预设表之后,接收第二报文,其中,第二报文的目的地址和与第一报文对应的第二源地址相同,并且15 is a structural block diagram of a switch in accordance with an embodiment of the present disclosure. As shown in FIG. 15, in addition to all the modules shown in FIG. 14, the switch further includes: a first transmission device 152, configured to receive a second packet after updating the preset table according to the updated state table, where The destination address of the second packet is the same as the second source address corresponding to the first packet, and
处理器142连接至所述第一传输装置152,还用于根据与目的地址对应的匹配字段从预设表中获取第二动作指示信息;根据第二动作指示信息的指示,按照第一源地址对第二报文执行预定操作。The processor 142 is connected to the first transmission device 152, and is further configured to: obtain, according to the matching field corresponding to the destination address, the second action indication information from the preset table; according to the indication of the second action indication information, according to the first source address Perform a predetermined operation on the second message.
在一些实施方式中,处理器142,还用于按照第一源地址封装第二报文;或者,按照第一源地址输出第二报文。In some embodiments, the processor 142 is further configured to encapsulate the second packet according to the first source address; or output the second packet according to the first source address.
图16是根据本公开实施例的交换机的结构框图。如图16所示,除了图14所示的所有模块外,该交换机还包括:第二传输装置162,用于在从第一流表中获取与接收到的第一报文匹配的第一动作指示信息之前,接收开放流控制器下发的流表,状态表和预设表;在根据更新后的状态表更新预设表之后,向开放流控制器上报更新后的预设表。16 is a structural block diagram of a switch in accordance with an embodiment of the present disclosure. As shown in FIG. 16, in addition to all the modules shown in FIG. 14, the switch further includes: a second transmission device 162, configured to acquire, from the first flow table, a first action indication that matches the received first message. Before the information, the flow table, the status table, and the preset table sent by the OpenFlow controller are received. After the preset table is updated according to the updated status table, the updated preset table is reported to the OpenFlow controller.
在一些实施方式中,所述预设表可以为第二流表和组表之一。In some embodiments, the preset table may be one of a second flow table and a group table.
实施例4Example 4
根据本公开的一个实施例,还提供了一种存储介质。在本实施例中,所述存储介质可以被设置为存储用于执行以下步骤的程序代码:According to an embodiment of the present disclosure, a storage medium is also provided. In this embodiment, the storage medium may be arranged to store program code for performing the following steps:
S1,从第一流表中获取与接收到的第一报文匹配的第一动作指示信息; S2,根据第一动作指示信息将与第一报文对应的第一源地址复制到第一状态变量中;S3,根据第一状态变量更新用于地址自学习的状态表,其中,状态表中存储有与第一报文对应的第二源地址与第一源地址之间的映射关系;以及S4,根据更新后的状态表更新预设表,其中,预设表用于存储地址自学习的结果。S1. The first action indication information that matches the received first packet is obtained from the first flow table. S2, the first source address corresponding to the first packet is copied to the first state variable according to the first action indication information. And updating a state table for address self-learning according to the first state variable, wherein the state table stores a mapping relationship between the second source address corresponding to the first packet and the first source address; and S4 And updating the preset table according to the updated status table, wherein the preset table is used to store the result of the address self-learning.
在一些实施方式中,存储介质还被设置为存储用于执行以下步骤的程序代码:S31,从第一报文中提取出第一报文的第二源地址;以及S32,根据第二源地址及第一状态变量更新状态表。In some embodiments, the storage medium is further configured to store program code for performing the steps of: S31, extracting a second source address of the first message from the first message; and S32, according to the second source address And the first state variable update status table.
在一些实施方式中,存储介质还被设置为存储用于执行以下步骤的程序代码:In some embodiments, the storage medium is also arranged to store program code for performing the following steps:
S321,在状态表中查找第二源地址;以及S322,在未查找到第二源地址的情况下,在状态表中创建与第二源地址对应的状态条目,其中,所创建的状态条目用于记录第二源地址及与第一状态变量中携带的第一源地址之间的映射关系。S321, searching for a second source address in the state table; and S322, in the case that the second source address is not found, creating a state entry corresponding to the second source address in the state table, where the created state entry is used And mapping a mapping relationship between the second source address and the first source address carried in the first state variable.
在一些实施方式中,存储介质还被设置为存储用于执行以下步骤的程序代码:S323,在状态表中查找第二源地址之后,在查找到第二源地址的情况下,判断在状态表中存储的与第二源地址匹配的第三地址,与第一状态变量中携带的第一源地址是否相同;以及S324,在状态表中与第二源地址匹配的第三地址,与第一状态变量中携带的第一源地址不同时,将状态表中的第三地址替换为第一源地址。In some embodiments, the storage medium is further configured to store program code for performing the following steps: S323, after looking up the second source address in the status table, in the case of finding the second source address, determining the status table The third address stored in the second source address is the same as the first source address carried in the first state variable; and S324, the third address matching the second source address in the state table, and the first When the first source address carried in the state variable is different, the third address in the state table is replaced with the first source address.
在一些实施方式中,存储介质还被设置为存储用于执行以下步骤的程序代码:S41,在预设表中生成与更新后的状态表中的第二源地址对应的匹配字段;以及S42,将更新后的状态表中的第一源地址,嵌入到预设表中与匹配字段对应的第二动作指示信息中,其中,第二动作指示信息用于指示按照第一源地址执行预定操作。In some embodiments, the storage medium is further configured to store program code for performing the following steps: S41, generating a matching field corresponding to the second source address in the updated status table in the preset table; and S42, The first source address in the updated state table is embedded in the second action indication information corresponding to the matching field in the preset table, where the second action indication information is used to indicate that the predetermined operation is performed according to the first source address.
在一些实施方式中,存储介质还被设置为存储用于执行以下步骤的程序代码:S43,在根据更新后的状态表更新预设表之后,接收第二报文,其中,第二报文的目的地址和与第一报文对应的第二源地址相同;S44,根据与目的地址对应的匹配字段从预设表中获取第二动作指示信息;一级S45,根据第二动作指示信息的指示,按照第一源地址对第二报文执行预定操作。In some embodiments, the storage medium is further configured to store program code for performing the following steps: S43, after updating the preset table according to the updated status table, receiving the second message, wherein the second message The destination address is the same as the second source address corresponding to the first packet; S44, the second action indication information is obtained from the preset table according to the matching field corresponding to the destination address; and the first step S45 is performed according to the indication of the second action indication information. And performing a predetermined operation on the second packet according to the first source address.
在一些实施方式中,存储介质还被设置为存储用于执行以下步骤的程序代码:S451,按照第一源地址封装第二报文;或者S452,按照第一源地址输出第二报文。In some embodiments, the storage medium is further configured to store program code for performing the steps of: S451, encapsulating the second message according to the first source address; or S452, outputting the second message according to the first source address.
在一些实施方式中,存储介质还被设置为存储用于执行以下步骤的程序代码:In some embodiments, the storage medium is also arranged to store program code for performing the following steps:
S5,在从第一流表中获取与接收到的第一报文匹配的第一动作指示信息之前,接收开放流控制器下发的流表,状态表和预设表;以及S5: Before obtaining the first action indication information that is matched with the received first packet, the flow table, the state table, and the preset table sent by the OpenFlow controller are received;
S6,在根据更新后的状态表更新预设表之后,向开放流控制器上报更新后的预设表。S6. After updating the preset table according to the updated status table, report the updated preset table to the OpenFlow controller.
在一些实施方式中,所述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。In some embodiments, the storage medium may include, but is not limited to, a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or a magnetic disk. And other media that can store program code.
在一些实施方式中,处理器根据存储介质中已存储的程序代码执行所述实施例中的方法步骤。In some embodiments, the processor performs the method steps in the described embodiments in accordance with stored program code in a storage medium.
通过本公开的实施例,可以解决常规OpenFlow网络由于不支持两层地址的获取和使用而无法支持层叠网所需的待封装外层地址自学习功能的问题,达到有效进行地址自学习的效果。The embodiment of the present disclosure can solve the problem that the conventional OpenFlow network cannot support the self-learning function of the outer address to be encapsulated required for the cascading network because it does not support the acquisition and use of the two-layer address, and achieve the effect of effectively performing address self-learning.
在本公开的实施例中,通过第一流表获取第一源地址信息,通过用于地址自学习的状态表获取到第一源地址和第二源地址之间的映射关系,并且通过状态表去更新存储地址自学习结果的预设表。因此,通过用于地址自学习的状态表进行内层和外层两个源地址的学习,能够支持两层地址的获取和使用。In the embodiment of the present disclosure, the first source address information is obtained by using the first flow table, and the mapping relationship between the first source address and the second source address is obtained by using the state table for address self-learning, and is performed through the state table. Update the preset table of the storage address self-learning results. Therefore, learning the two source addresses of the inner layer and the outer layer through the state table for address self-learning can support the acquisition and use of the two-layer address.
显然,本领域的技术人员应该明白,在本公开的实施例中的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。本公开的实施例不限制于任何特定的硬件和软件结合。It will be apparent to those skilled in the art that the various modules or steps in the embodiments of the present disclosure may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed across multiple computing devices. Optionally, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from this The steps shown or described are performed sequentially, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated into a single integrated circuit module. Embodiments of the present disclosure are not limited to any particular combination of hardware and software.
以上所述仅为本公开的优选实施例而已,并不用于限制本公开,对于本领域的技术人员来说,本公开可以有各种更改和变化。凡在本公开的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本公开的保护范围之内。The above description is only a preferred embodiment of the present disclosure, and is not intended to limit the disclosure, and various changes and modifications may be made to the present disclosure. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and scope of the present disclosure are intended to be included within the scope of the present disclosure.
Claims (26)
- 一种地址自学习的方法,包括:从第一流表中获取与接收到的第一报文匹配的第一动作指示信息;根据所述第一动作指示信息将与所述第一报文对应的第一源地址复制到第一状态变量中;根据所述第一状态变量更新用于地址自学习的状态表,其中,所述状态表中存储有与所述第一报文对应的第二源地址与所述第一源地址之间的映射关系;以及根据更新后的所述状态表更新预设表,其中,所述预设表用于存储所述地址自学习的结果。An address self-learning method, comprising: acquiring first action indication information that matches a received first packet from a first flow table; and corresponding to the first packet according to the first action indication information The first source address is copied into the first state variable; the state table for address self-learning is updated according to the first state variable, wherein the state table stores a second source corresponding to the first message a mapping relationship between the address and the first source address; and updating the preset table according to the updated status table, wherein the preset table is configured to store the result of the address self-learning.
- 根据权利要求1所述的方法,其中,根据所述第一状态变量更新用于地址自学习的状态表的步骤包括:从所述第一报文中提取出所述第一报文的所述第二源地址;以及根据所述第二源地址及所述第一状态变量更新所述状态表。The method of claim 1 wherein the step of updating the state table for address self-learning based on the first state variable comprises extracting the said first message from the first message a second source address; and updating the state table based on the second source address and the first state variable.
- 根据权利要求2所述的方法,其中,根据所述第二源地址及所述第一状态变量更新所述状态表的步骤包括:在所述状态表中查找所述第二源地址;以及在未查找到所述第二源地址的情况下,在所述状态表中创建与所述第二源地址对应的状态条目,其中,所创建的所述状态条目用于记录所述第二源地址及与所述第一状态变量中携带的所述第一源地址之间的所述映射关系。The method of claim 2, wherein the updating the state table based on the second source address and the first state variable comprises: looking up the second source address in the state table; If the second source address is not found, a state entry corresponding to the second source address is created in the state table, wherein the created state entry is used to record the second source address And the mapping relationship with the first source address carried in the first state variable.
- 根据权利要求3所述的方法,其中,在所述状态表中查找所述第二源地址之后,所述方法还包括:在查找到所述第二源地址的情况下,判断在所述状态表中存储的与所述第二源地址匹配的第三地址,与所述第一状态变量中携带的所述第一源地址是否相同;以及在所述状态表中与所述第二源地址匹配的所述第三地址,与所述第一状态变量中携带的所述第一源地址不同时,将所述状态表中的所述第三地址替换为所述第一源地址。The method of claim 3, wherein after the searching for the second source address in the state table, the method further comprises: determining the state in the case that the second source address is found a third address stored in the table that matches the second source address, is the same as the first source address carried in the first state variable; and in the state table and the second source address And matching the third address, when the first source address is different from the first source address, and replacing the third address in the state table with the first source address.
- 根据权利要求1所述的方法,其中,根据更新后的所述状态表更新预 设表的步骤包括:在所述预设表中生成与更新后的所述状态表中的所述第二源地址对应的匹配字段;以及将更新后的所述状态表中的所述第一源地址,嵌入到所述预设表中与所述匹配字段对应的第二动作指示信息中,其中,所述第二动作指示信息用于指示按照所述第一源地址执行预定操作。The method of claim 1, wherein the updating the preset table according to the updated status table comprises: generating and updating the second source in the updated status table in the preset table a matching field corresponding to the address; and the first source address in the updated status table is embedded in the second action indication information corresponding to the matching field in the preset table, where The second action indication information is used to indicate that the predetermined operation is performed according to the first source address.
- 根据权利要求5所述的方法,其中,在根据更新后的所述状态表更新预设表之后,所述方法还包括:接收第二报文,其中,所述第二报文的目的地址和与所述第一报文对应的所述第二源地址相同;根据与所述目的地址对应的匹配字段从所述预设表中获取所述第二动作指示信息;以及根据所述第二动作指示信息的指示,按照所述第一源地址对所述第二报文执行所述预定操作。The method according to claim 5, wherein after updating the preset table according to the updated state table, the method further comprises: receiving a second message, wherein the destination address of the second message is The second source address corresponding to the first packet is the same; the second action indication information is obtained from the preset table according to a matching field corresponding to the destination address; and according to the second action Instructing the information to perform the predetermined operation on the second message according to the first source address.
- 根据权利要求6所述的方法,其中,按照所述第一源地址对所述第二报文执行所述预定操作包括:按照所述第一源地址封装所述第二报文;或者按照所述第一源地址输出所述第二报文。The method of claim 6, wherein performing the predetermined operation on the second packet according to the first source address comprises: encapsulating the second packet according to the first source address; or The first source address outputs the second message.
- 根据权利要求1所述的方法,其中,在从第一流表中获取与接收到的第一报文匹配的第一动作指示信息之前,所述方法还包括:接收开放流控制器下发的所述流表、所述状态表和所述预设表;并且在根据更新后的所述状态表更新预设表之后,所述方法还包括:向所述开放流控制器上报更新后的所述预设表。The method of claim 1, wherein before acquiring the first action indication information that matches the received first message from the first flow table, the method further comprises: receiving the delivery issued by the OpenFlow controller Describe the flow table, the status table, and the preset table; and after updating the preset table according to the updated status table, the method further includes: reporting the updated content to the open flow controller Preset table.
- 根据权利要求1至8中任一项所述的方法,其中,所述预设表为第二流表和组表之一。The method according to any one of claims 1 to 8, wherein the preset table is one of a second flow table and a group table.
- 一种地址自学习的装置,包括:第一获取模块,用于从第一流表中获取与接收到的第一报文匹配的第一动作指示信息;复制模块,用于根据所述第一动作指示信息将与所述第一报文对应的第一源地址复制到第一状态 变量中;第一更新模块,用于根据所述第一状态变量更新用于地址自学习的状态表,其中,所述状态表中存储有与所述第一报文对应的第二源地址与所述第一源地址之间的映射关系;以及第二更新模块,用于根据更新后的所述状态表更新预设表,其中,所述预设表用于存储所述地址自学习的结果。An apparatus for self-learning, comprising: a first acquiring module, configured to acquire, from a first flow table, first action indication information that matches a received first packet; and a copying module, configured to perform, according to the first action The indication information is copied to the first state variable corresponding to the first message, and the first update module is configured to update the state table for address self-learning according to the first state variable, where The state table stores a mapping relationship between the second source address corresponding to the first packet and the first source address, and a second update module, configured to update according to the updated state table. a preset table, wherein the preset table is used to store a result of the address self-learning.
- 根据权利要求10所述的装置,其中,所述第一更新模块,还用于从所述第一报文中提取出所述第一报文的所述第二源地址;并且根据所述第二源地址及所述第一状态变量更新所述状态表。The apparatus according to claim 10, wherein the first update module is further configured to extract the second source address of the first packet from the first packet; The two source addresses and the first state variable update the state table.
- 根据权利要求11所述的装置,其中,所述第一更新模块包括:查找单元,用于在所述状态表中查找所述第二源地址;以及创建单元,用于在未查找到所述第二源地址的情况下,在所述状态表中创建与所述第二源地址对应的状态条目,其中,所创建的所述状态条目用于记录所述第二源地址及与所述第一状态变量中携带的所述第一源地址之间的所述映射关系。The apparatus of claim 11, wherein the first update module comprises: a lookup unit for searching the second source address in the state table; and a creating unit for not finding the In the case of the second source address, a state entry corresponding to the second source address is created in the state table, wherein the created state entry is used to record the second source address and the first The mapping relationship between the first source addresses carried in a state variable.
- 根据权利要求12所述的装置,其中,所述第一更新模块还包括:判断单元,用于在所述状态表中查找所述第二源地址之后,在查找到所述第二源地址的情况下,判断在所述状态表中存储的与所述第二源地址匹配的第三源地址,与所述第一状态变量中携带的所述第一源地址是否相同;以及替换单元,用于在所述状态表中与所述第二源地址匹配的所述第三源地址,与所述第一状态变量中携带的所述第一源地址不同时,将所述状态表中的所述第三源地址替换为所述第一源地址。The apparatus according to claim 12, wherein the first update module further comprises: a determining unit, configured to find the second source address after searching the second source address in the state table In the case, it is determined whether the third source address that is stored in the state table and matches the second source address is the same as the first source address that is carried in the first state variable; When the third source address that matches the second source address in the state table is different from the first source address carried in the first state variable, the location in the state table is The third source address is replaced with the first source address.
- 根据权利要求10所述的装置,其中,所述第二更新模块,还用于在所述预设表中生成与更新后的所述状态表中的所述第二源地址对应的匹配字段;并且将更新后的所述状态表中的所述第一源地址,嵌入到所述预设表中与所述匹配字段对应的第二动作指示信息中,其中,所述第二动作指示信息用于指示按照所述第一源地址执行预定操作。The device according to claim 10, wherein the second update module is further configured to generate, in the preset table, a matching field corresponding to the second source address in the updated state table; And the first source address in the updated state table is embedded in the second action indication information corresponding to the matching field in the preset table, where the second action indication information is used. And instructing to perform a predetermined operation according to the first source address.
- 根据权利要求14所述的装置,还包括:第一接收模块,用于在根据更新后的所述状态表更新预设表之后,接收第二报文,其中,所述第二报文的目的地址和与所述第一报文对应的所述第二源地址相同;第二获取模块,用于根据与所述目的地址对应的匹配字段从所述预设表中获取所述第二动作指示信息;以及执行模块,用于根据所述第二动作指示信息的指示,按照所述第一源地址对所述第二报文执行所述预定操作。The apparatus according to claim 14, further comprising: a first receiving module, configured to receive a second message after updating the preset table according to the updated status table, wherein the purpose of the second message The second acquisition module is configured to acquire the second action indication from the preset table according to a matching field corresponding to the destination address. And an execution module, configured to perform the predetermined operation on the second packet according to the first source address according to the indication of the second action indication information.
- 根据权利要求15所述装置,其中,所述执行模块,还用于按照所述第一源地址封装所述第二报文;或者,按照所述第一源地址输出所述第二报文。The apparatus according to claim 15, wherein the execution module is further configured to encapsulate the second packet according to the first source address; or output the second packet according to the first source address.
- 根据权利要求10至16中任一项所述的装置,还包括:第二接收模块,用于在从第一流表中获取与接收到的第一报文匹配的第一动作指示信息之前,接收开放流控制器下发的所述流表,所述状态表和所述预设表;以及上报模块,用于在根据更新后的所述状态表更新预设表之后,向所述开放流控制器上报更新后的所述预设表。The apparatus according to any one of claims 10 to 16, further comprising: a second receiving module, configured to receive before acquiring the first action indication information that matches the received first message from the first flow table The flow table delivered by the open flow controller, the state table and the preset table; and a reporting module, configured to control the open flow after updating the preset table according to the updated state table The updated preset table is reported.
- 一种交换机,包括:处理器和存储器,其中,所述处理器,用于从第一流表中获取与接收到的第一报文匹配的第一动作指示信息;根据所述第一动作指示信息将与所述第一报文对应的第一源地址复制到第一状态变量中;根据所述第一状态变量更新用于地址自学习的状态表,其中,所述状态表中存储有与所述第一报文对应的第二源地址与所述第一源地址之间的映射关系;根据更新后的所述状态表更新预设表,其中,所述预设表用于存储所述地址自学习的结果;并且所述存储器,用于存储所述第一流表、所述状态表和所述预设表。A switch includes: a processor and a memory, wherein the processor is configured to acquire, from the first flow table, first action indication information that matches the received first message; and according to the first action indication information Copying, to the first state variable, a first source address corresponding to the first message; updating a state table for address self-learning according to the first state variable, where the state table stores a mapping relationship between the second source address corresponding to the first packet and the first source address; updating the preset table according to the updated state table, where the preset table is used to store the address a result of self-learning; and the memory is configured to store the first flow table, the status table, and the preset table.
- 根据权利要求18所述的交换机,其中,所述处理器,还用于从所述第一报文中提取出所述第一报文的所述第二源地址;并且根据所述第二源地 址及所述第一状态变量更新所述状态表。The switch according to claim 18, wherein the processor is further configured to extract the second source address of the first packet from the first packet; and according to the second source The address and the first state variable update the state table.
- 根据权利要求19所述的交换机,其中,所述处理器,还用于在所述状态表中查找所述第二源地址;并且在未查找到所述第二源地址的情况下,在所述状态表中创建与所述第二源地址对应的状态条目,其中,所创建的所述状态条目用于记录所述第二源地址及与所述第一状态变量中携带的所述第一源地址之间的所述映射关系。The switch according to claim 19, wherein said processor is further configured to look up said second source address in said state table; and in the case where said second source address is not found, a state entry corresponding to the second source address is created in the state table, wherein the created state entry is used to record the second source address and the first one carried in the first state variable The mapping relationship between source addresses.
- 根据权利要求20所述的交换机,其中,所述处理器,还用于在所述状态表中查找所述第二源地址之后,在查找到所述第二源地址的情况下,判断在所述状态表中存储的与所述第二源地址匹配的第三源地址,与所述第一状态变量中携带的所述第一源地址是否相同;并且在所述状态表中与所述第二源地址匹配的所述第三源地址,与所述第一状态变量中携带的所述第一源地址不同时,将所述状态表中的所述第三源地址替换为所述第一源地址。The switch according to claim 20, wherein the processor is further configured to: after finding the second source address in the status table, in the case that the second source address is found, determining Whether the third source address that is stored in the state table and matches the second source address is the same as the first source address carried in the first state variable; and in the state table The third source address that is matched by the two source addresses is different from the first source address carried in the first state variable, and the third source address in the state table is replaced with the first source address source address.
- 根据权利要求18所述的交换机,其中,所述处理器,还用于在所述预设表中生成与更新后的所述状态表中的所述第二源地址对应的匹配字段;将更新后的所述状态表中的所述第一源地址,嵌入到所述预设表中与所述匹配字段对应的第二动作指示信息中,其中,所述第二动作指示信息用于指示按照所述第一源地址执行预定操作。The switch according to claim 18, wherein the processor is further configured to generate, in the preset table, a matching field corresponding to the second source address in the updated status table; The first source address in the subsequent state table is embedded in the second action indication information corresponding to the matching field in the preset table, where the second action indication information is used to indicate The first source address performs a predetermined operation.
- 根据权利要求22所述的交换机,还包括:第一传输装置,其中,所述传输装置,用于在根据更新后的所述状态表更新预设表之后,接收第二报文,其中,所述第二报文的目的地址和与所述第一报文对应的所述第二源地址相同;以及所述处理器,还用于根据与所述目的地址对应的匹配字段从所述预设表中获取所述第二动作指示信息;并且根据所述第二动作指示信息的 指示,按照所述第一源地址对所述第二报文执行所述预定操作。The switch according to claim 22, further comprising: a first transmission device, wherein the transmission device is configured to: after updating the preset table according to the updated status table, receive the second message, where The destination address of the second packet is the same as the second source address corresponding to the first packet; and the processor is further configured to use the matching field corresponding to the destination address from the preset Obtaining the second action indication information in the table; and performing the predetermined operation on the second packet according to the first source address according to the indication of the second action indication information.
- 根据权利要求23所述交换机,其中,所述处理器,还用于按照所述第一源地址封装所述第二报文;或者,按照所述第一源地址输出所述第二报文。The switch according to claim 23, wherein the processor is further configured to encapsulate the second packet according to the first source address; or output the second packet according to the first source address.
- 根据权利要求18至24中任一项所述的交换机,还包括:第二传输装置,其中,所述第二传输装置,用于在从第一流表中获取与接收到的第一报文匹配的第一动作指示信息之前,接收开放流控制器下发的所述流表,所述状态表和所述预设表;在根据更新后的所述状态表更新预设表之后,向所述开放流控制器上报更新后的所述预设表。The switch according to any one of claims 18 to 24, further comprising: a second transmission device, wherein the second transmission means is configured to match the received first message from the first flow table Receiving, by the open flow controller, the flow table, the state table, and the preset table before the first action indication information; after updating the preset table according to the updated state table, The open flow controller reports the updated preset table.
- 一种存储介质,设置为存储程序代码,其中,当所述程序代码在处理器上运行时,执行根据权利要求1-9中任一项所述的地址自学习的方法。A storage medium arranged to store program code, wherein the method of address self-learning according to any one of claims 1-9 is performed when the program code is run on a processor.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710132350.7A CN108574637B (en) | 2017-03-07 | 2017-03-07 | Address self-learning method and device and switch |
CN201710132350.7 | 2017-03-07 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018161827A1 true WO2018161827A1 (en) | 2018-09-13 |
Family
ID=63448984
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/077526 WO2018161827A1 (en) | 2017-03-07 | 2018-02-28 | Address self-learning method and device, and switch |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108574637B (en) |
WO (1) | WO2018161827A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109450798A (en) * | 2018-12-13 | 2019-03-08 | 郑州云海信息技术有限公司 | The management method and computer readable storage medium of routing table information |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111343108B (en) * | 2020-02-24 | 2021-10-22 | 苏州盛科通信股份有限公司 | Mac table entry learning forwarding method and device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101123570A (en) * | 2006-08-09 | 2008-02-13 | 华为技术有限公司 | Data forward method and system between multiple operator Ethernet |
CN104468855A (en) * | 2013-09-25 | 2015-03-25 | 阿里巴巴集团控股有限公司 | Method and device for processing ARP message |
WO2016003490A1 (en) * | 2014-06-30 | 2016-01-07 | Nicira, Inc. | Encoding control plane information in transport protocol source port field and applications thereof in network virtualization |
CN106209634A (en) * | 2015-04-30 | 2016-12-07 | 中兴通讯股份有限公司 | The learning method of address mapping relation and device |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
ES2361545B1 (en) * | 2009-02-24 | 2012-05-08 | Universidad De Alcala De Henares | PROCEDURE OF FURNITURE OF DATA SECTIONS AND NETWORK BRIDGE. |
CN102801612B (en) * | 2012-07-06 | 2015-04-22 | 武汉虹信通信技术有限责任公司 | Improved method and system for updating routing information of main engine on exchanging chip |
CN103841019B (en) * | 2012-11-27 | 2018-06-08 | 中兴通讯股份有限公司 | The method and apparatus for returning access shortest path bridging network more |
US10063473B2 (en) * | 2014-04-30 | 2018-08-28 | Brocade Communications Systems LLC | Method and system for facilitating switch virtualization in a network of interconnected switches |
-
2017
- 2017-03-07 CN CN201710132350.7A patent/CN108574637B/en active Active
-
2018
- 2018-02-28 WO PCT/CN2018/077526 patent/WO2018161827A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101123570A (en) * | 2006-08-09 | 2008-02-13 | 华为技术有限公司 | Data forward method and system between multiple operator Ethernet |
CN104468855A (en) * | 2013-09-25 | 2015-03-25 | 阿里巴巴集团控股有限公司 | Method and device for processing ARP message |
WO2016003490A1 (en) * | 2014-06-30 | 2016-01-07 | Nicira, Inc. | Encoding control plane information in transport protocol source port field and applications thereof in network virtualization |
CN106209634A (en) * | 2015-04-30 | 2016-12-07 | 中兴通讯股份有限公司 | The learning method of address mapping relation and device |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109450798A (en) * | 2018-12-13 | 2019-03-08 | 郑州云海信息技术有限公司 | The management method and computer readable storage medium of routing table information |
Also Published As
Publication number | Publication date |
---|---|
CN108574637A (en) | 2018-09-25 |
CN108574637B (en) | 2022-09-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108075956B (en) | Data processing method and device | |
CN102938794B (en) | ARP message forwarding method, switch and controller | |
US10476796B2 (en) | Packet processing method, and device and system | |
US10158561B2 (en) | Data plane learning of bi-directional service chains | |
CN107070691B (en) | Cross-host communication method and system of Docker container | |
US9281955B2 (en) | Interoperability of data plane based overlays and control plane based overlays in a network environment | |
EP3070895B1 (en) | Encapsulation method and system for flow identifier | |
US10263808B2 (en) | Deployment of virtual extensible local area network | |
US20170019373A1 (en) | Method and Device for Processing Data Message | |
CN108964940B (en) | Message sending method and device and storage medium | |
CN106330718B (en) | Method for forwarding multicast message and device | |
US20160330167A1 (en) | Arp Implementation Method, Switch Device, and Control Device | |
WO2016115698A1 (en) | Data packet forwarding method, apparatus and device | |
CN109379241B (en) | Path information determination method and device | |
CN107547346B (en) | Message transmission method and device | |
CN106878181A (en) | A kind of message transmitting method and device | |
EP3313031A1 (en) | Sdn-based arp realization method and apparatus | |
CN109274588A (en) | The processing method and processing device of IP packet | |
US20190215191A1 (en) | Deployment Of Virtual Extensible Local Area Network | |
US9553764B2 (en) | Migration of guest bridge | |
CN105657078B (en) | A kind of data transmission method, device and multitiered network manager | |
WO2018161827A1 (en) | Address self-learning method and device, and switch | |
CN111682968B (en) | Network access management method and system for communication equipment | |
WO2016173196A1 (en) | Method and apparatus for learning address mapping relationship | |
CN107547691B (en) | Address resolution protocol message proxy method and device |
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: 18763930 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 18763930 Country of ref document: EP Kind code of ref document: A1 |