CN112838986B - Service chain generation method and device, electronic equipment and storage medium - Google Patents

Service chain generation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112838986B
CN112838986B CN201911157266.6A CN201911157266A CN112838986B CN 112838986 B CN112838986 B CN 112838986B CN 201911157266 A CN201911157266 A CN 201911157266A CN 112838986 B CN112838986 B CN 112838986B
Authority
CN
China
Prior art keywords
port
flow table
service node
switch
state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911157266.6A
Other languages
Chinese (zh)
Other versions
CN112838986A (en
Inventor
陈晓帆
翟云箭
古亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN201911157266.6A priority Critical patent/CN112838986B/en
Publication of CN112838986A publication Critical patent/CN112838986A/en
Application granted granted Critical
Publication of CN112838986B publication Critical patent/CN112838986B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/302Route determination based on requested QoS
    • H04L45/306Route determination based on the nature of the carried application
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/42Centralised routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/64Routing or path finding of packets in data switching networks using an overlay routing layer

Abstract

The application discloses a method, a device, equipment and a medium for generating a service chain, wherein the method comprises the following steps: acquiring a logic flow table issued by an SDN controller; the logic flow table is a service chain logic flow table generated according to the logic port reported by the switch and a preset service node; acquiring a port state of a physical port of a switch connected with a preset service node and a link state between a current switch and other switches in a logic flow table by using a pre-deployed MLAG application; determining an actual physical port corresponding to a logical port in a logical flow table according to the port state; and generating a target service chain according to the determined physical port and the obtained link state. According to the method, the physical port state and the link state are not required to be sensed by an upper SDN controller, the arrangement and the generation process of the service chain are not required to be participated by the upper controller, the service chain can be automatically arranged and generated at the bottom layer, the timeliness of the service chain generation is effectively guaranteed, and the working efficiency is improved.

Description

Service chain generation method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for generating a service chain, an electronic device, and a computer-readable storage medium.
Background
When the data message is transmitted in the traditional network, the data message needs to pass through various service nodes, so that the network can be ensured to provide safe, quick and stable network service for users according to design requirements. A Service Chain (Service Chain), that is, a form in which network traffic passes through the Service nodes (mainly referring to security devices such as firewalls, load balancing, third-party security devices, etc.) in a predetermined sequence required by Service logic, may be understood as a Service form.
When a service chain of a conventional network is changed and expanded, the network topology needs to be changed, and the configuration of network equipment needs to be performed again. Service chains and network topologies are tightly coupled and complex to deploy. On this basis, SDN-based service chaining occurs at the same time. Whether in an SDN Overlay data center environment, by virtue of the advantages of SDN and NFV technologies, or in a switch hardware deployment scene supporting openflow protocol in a traditional network environment, the SFC of SDN deployment is greatly developed.
Achieving high availability of security nodes is crucial, whether in legacy networks or in SDNs. In conventional networks, a highly available implementation of the security node is implemented using the MLAG protocol. The switch realizes automatic switching through state change of the port, but the service chain of the traditional network needs to change the network topology and re-configure the network equipment when changing and expanding, and flexible arrangement cannot be realized. In an SDN, whether a hardware service chain scene or a data center scene is adopted, the high availability of nodes of a safety device is realized by reading a port state through a controller, updating a service chain flow table or realizing MLAG on the SDN controller, an OpenFlow switch sends an MLAG message sent by the safety device to the controller through Packet _ in information, the controller analyzes the content of the MLAG message, and then a flow table and a group table are arranged according to the content of the message to realize the high availability.
However, in the research process, the applicant finds that both the above two ways need to control upper layer perception of the layer and rearrange the service chain and issue the flow table, which results in very low timeliness when the service node relates to a large number of service chains.
Disclosure of Invention
The application aims to provide a service chain generation method and device, an electronic device and a computer readable storage medium, so that timeliness of service chain generation is effectively guaranteed, and working efficiency is improved.
In order to achieve the above object, the present application provides a service chain generation method, including:
acquiring a logic flow table issued by an SDN controller; the logic flow table is a service chain logic flow table generated according to a logic port reported by the switch and a preset service node;
acquiring a port state of a switch physical port connected with the preset service node and a link state between the current switch and other switches in the logic flow table by using a pre-deployed MLAG application;
determining an actual physical port corresponding to a logical port in the logical flow table according to the port state;
and generating a target service chain according to the determined physical port and the link state.
Optionally, the obtaining, by using a pre-deployed MLAG application, a port state of a physical port of a switch connected to the preset service node includes:
determining a first service node supporting a master-standby mode in the logic flow table;
determining a main port connected with the main equipment of the first service node and a standby port connected with the standby equipment of the first service node;
and acquiring the port states of the main port and the standby port by using a pre-deployed MLAG application.
Optionally, the determining, according to the port state, an actual physical port corresponding to a logical port in the logical flow table includes:
if the port state of the main port is normal, determining that an actual physical port corresponding to a logical port in the logical flow table is the main port;
and if the port state of the main port is abnormal and the port state of the standby port is normal, determining that the actual physical port corresponding to the logical port in the logical flow table is the standby port.
Optionally, the method further includes:
and if the port states of the main port and the standby port are both abnormal, switching the first service node to a bypass state.
Optionally, the obtaining, by using a pre-deployed MLAG application, a port state of a physical port of the switch connected to the preset service node includes:
determining a second service node supporting a dual active mode in the logical flow table;
determining all switch physical ports connected with all devices of the second service node;
acquiring port states of all switch physical ports by using a pre-deployed MLAG application;
the determining an actual physical port corresponding to a logical port in the logical flow table according to the port state includes:
and determining the physical port with the normal port state in the physical ports of all the switches as a target physical port corresponding to the logical port in the logical flow table.
Optionally, the generating a target service chain according to the determined physical port and the determined link state includes:
determining a front service node and a rear service node of the second service node according to service logic;
generating a plurality of non-repeated target service chains which are sequentially connected with any one device of the front service node, the second service node and the rear service node based on all the target physical ports and the link states; the number of the target service chains is the same as the number of the target physical ports.
Optionally, after generating the target service chain according to the determined physical port and the determined link state, the method further includes:
if any port in the target physical ports is monitored to be abnormal, determining other ports except the current abnormal port from all the target physical ports;
and leading the network traffic of the current abnormal port to the other ports in a load distribution mode.
To achieve the above object, the present application provides a service chain generating apparatus, including:
the flow table acquisition module is used for acquiring a logic flow table issued by the SDN controller; the logic flow table is a service chain logic flow table generated according to a logic port reported by the switch and a preset service node;
a state obtaining module, configured to obtain, by using a pre-deployed MLAG application, a port state of a switch physical port connected to the preset service node and a link state between the current switch and another switch in the logical flow table;
a port determining module, configured to determine, according to the port state, an actual physical port corresponding to a logical port in the logical flow table;
and the service chain generating module is used for generating a target service chain according to the determined physical port and the link state.
To achieve the above object, the present application provides an electronic device including:
a memory for storing a computer program;
a processor for implementing the steps of any of the service chain generation methods disclosed above when executing the computer program.
To achieve the above object, the present application provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any one of the service chain generation methods disclosed in the foregoing disclosure.
According to the scheme, the service chain generation method provided by the application comprises the following steps: acquiring a logic flow table issued by an SDN controller; the logic flow table is a service chain logic flow table generated according to a logic port reported by the switch and a preset service node; acquiring a port state of a switch physical port connected with the preset service node and a link state between the current switch and other switches in the logic flow table by using a pre-deployed MLAG application; determining an actual physical port corresponding to a logical port in the logical flow table according to the port state; and generating a target service chain according to the determined physical port and the link state. As can be seen from the above, in the application, the SDN controller only needs to generate the service chain logical flow table according to the logical port and the preset service node, and then the switch can obtain the physical port state and the link state between the switches by using the pre-deployed MLAG application, and determine the physical port based on the physical port state, so as to generate the actual target service chain according to the determined physical port and the obtained link state, the two states do not need to be sensed by the upper-layer SDN controller, and the scheduling and generating processes of the service chain do not need to be participated in by the upper-layer controller, which can be automatically implemented at the bottom layer, thereby effectively guaranteeing the timeliness of service chain generation and improving the working efficiency.
The application also discloses a service chain generating device, an electronic device and a computer readable storage medium, which can also realize the technical effects.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a service chain generation method disclosed in an embodiment of the present application;
fig. 2 is a flowchart of a specific implementation of a service chain generation method disclosed in an embodiment of the present application;
fig. 3 is a schematic diagram of a specific implementation of a service chain generation method disclosed in an embodiment of the present application;
fig. 4 is a flowchart of another specific implementation of a service chain generation method disclosed in an embodiment of the present application;
fig. 5 is a schematic diagram of a service chain generation method disclosed in an embodiment of the present application in a specific implementation scenario;
fig. 6 is a structural diagram of a service chain generation apparatus disclosed in an embodiment of the present application;
FIG. 7 is a block diagram of an electronic device according to an embodiment of the disclosure;
fig. 8 is a block diagram of another electronic device disclosed in the embodiments of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the prior art, when a service chain of a conventional network is changed and expanded, a network topology needs to be changed, and configuration of network devices needs to be performed again. Service chains and network topologies are tightly coupled and complex to deploy. In the SDN, it is necessary to read a port state through a controller, update a service chain flow table, or analyze MLAG packet contents through the controller, and then arrange the flow table and a group table according to the packet contents. Both the two modes need to control the upper layer perception of the layer, and rearrange the service chain and issue the flow table. The timeliness can be very slow when the service nodes are involved in a particularly large number of service chains.
Therefore, the embodiment of the application discloses a service chain generation method, which guarantees timeliness of service chain generation and improves working efficiency.
Referring to fig. 1, a method for generating a service chain disclosed in the embodiment of the present application includes:
s101: acquiring a logic flow table issued by an SDN controller; the logic flow table is a service chain logic flow table generated according to a logic port reported by the switch and a preset service node;
in the embodiment of the application, an SDN (software defined network) controller acquires a logic port reported by a switch in advance, acquires a service node through which network traffic needs to pass, and generates a service chain logic flow table according to the logic port and the service node. The logical ports reported by the switch are logical ports generated correspondingly according to physical ports, and the physical ports may include physical ports of the switch in a service chain and/or physical ports of functional components in the service chain. Service Function Chain (SFC) refers to a technology for connecting physical/virtual functional components, mainly including functional components from L4 to L7, such as firewall, VPN, etc., in series in a certain order, so that a specific flow passes through the functional components in a predetermined order. After the logic flow table of the service chain is generated according to the logic port reported by the switch and the arrangement of the preset service node, the SDN controller issues the logic flow table to the switch.
S102: acquiring a port state of a switch physical port connected with the preset service node and a link state between the current switch and other switches in the logic flow table by using a pre-deployed MLAG application;
in a specific implementation, the MLAG application is deployed in the switch in advance. The MLAG is a mechanism for implementing cross-device link aggregation, and can implement link aggregation among multiple devices, thereby improving link reliability to a device level. The method can specifically support that after an MLAG member port fails, the peer-link can be disconnected from the other side member port, so that the flow bypasses, and the peer-link is a connecting line between two switches and is used for a link channel when the MLAG is in cross-link communication; the method can support normal equipment to continuously forward the message after the single equipment is powered off.
It should be noted that, in the MLAG application in the embodiment of the present application, a heartbeat surviving module is written in advance, so that a state of a physical port where a switch in which the MLAG application is deployed is connected to a preset service node and a surviving state of a connection link between the switch and another switch in a logical flow table can be obtained.
It should be noted that, in this step, the process of acquiring the physical port state of the switch and the process of acquiring the link state between the switches may be performed concurrently; or the port state of the physical port of the switch can be obtained first, and then the link state between the current switch and other switches can be obtained; the link state between the current switch and other switches can be obtained first, and then the port state of the physical port of the switch can be obtained. That is, the execution sequence of the two acquisition processes may be determined and adjusted according to an actual scene, which is not specifically limited in this embodiment.
S103: determining an actual physical port corresponding to a logical port in the logical flow table according to the port state;
in this step, after the port state of the physical port is obtained, the logical port in the logical flow table may be mapped to an actual physical port based on the port state. For example, if there are two actual physical ports corresponding to the logical port and the two physical ports are active and standby, after the states of the two physical ports are obtained, if the main port is in a survival state, the main port may be determined as the actual physical port; if the primary port is in an abnormal state, the standby port can be determined as an actual physical port.
Specifically, the port survival state represents that the port is in an effective state and can work normally; the port abnormity represents that the equipment cannot be connected in an induction mode, the port cannot work normally or the port is abnormal.
S104: and generating a target service chain according to the determined physical port and the link state.
It can be understood that, after mapping the logical port to the actual physical port, a final target service chain may be generated based on the link state of the connection link between the physical port and the switch obtained through the determination, and the target service chain is issued to the preset service node, so as to control the specific network traffic to be transmitted according to the sequence set by the target service chain.
According to the above scheme, the service chain generation method provided by the application includes: acquiring a logic flow table issued by an SDN controller; the logic flow table is a service chain logic flow table generated according to a logic port reported by the switch and a preset service node; acquiring a port state of a switch physical port connected with the preset service node and a link state between the current switch and other switches in the logic flow table by using a pre-deployed MLAG application; determining an actual physical port corresponding to a logical port in the logical flow table according to the port state; and generating a target service chain according to the determined physical port and the link state. As can be seen from the above, in the application, the SDN controller only needs to generate the service chain logical flow table according to the logical port and the preset service node, and then the switch can obtain the physical port state and the link state between the switches by using the pre-deployed MLAG application, and determine the physical port based on the physical port state, so as to generate the actual target service chain according to the determined physical port and the obtained link state, the two states do not need to be sensed by the upper layer SDN controller, the scheduling and generating processes of the service chain do not need to be participated in by the upper layer controller, and can be automatically implemented at the bottom layer, thereby effectively guaranteeing the timeliness of service chain generation and improving the working efficiency.
The embodiment of the application discloses a specific implementation mode of a service chain generation method, and compared with the previous embodiment, the embodiment further describes and optimizes the technical scheme. Referring to fig. 2, specifically:
s201: acquiring a logic flow table issued by an SDN controller; the logic flow table is a service chain logic flow table generated according to a logic port reported by the switch and a preset service node;
s202: determining a first service node supporting a master/standby mode in the logic flow table;
s203: determining a main port connected with the main equipment of the first service node and a standby port connected with the standby equipment of the first service node;
s204: acquiring port states of the main port and the standby port by using a pre-deployed MLAG application;
s205: if the port state of the main port is normal, determining that an actual physical port corresponding to a logical port in the logical flow table is the main port;
s206: if the port state of the main port is abnormal and the port state of the standby port is normal, determining that an actual physical port corresponding to a logical port in the logical flow table is the standby port;
s207: acquiring link states between the current switch and other switches in the logic flow table by using a pre-deployed MLAG application;
s208: and generating a target service chain according to the determined actual physical port and the link state so as to control the network flow to be transmitted according to the target service chain.
In the embodiment of the application, after the switch acquires the logical flow table, a first service node supporting the active/standby mode is determined, and the first service node has a main device and a backup device. It can be understood that, since the service node supports the active/standby mode, there are usually two or more entity devices to implement backup, and thus there may be multiple physical ports. In order to simplify the service chain arrangement process of the controller, the switch generates a logical port corresponding to a physical port of the service node supporting the active/standby mode, and the SDN controller may generate a service chain logical flow table based on the logical port.
After the first service node is determined, a main port connected with the main device of the first service node and a standby port connected with the backup device are further determined, port states of the main port and the standby port are obtained by utilizing MLAG application monitoring in the switch, and an actual physical port corresponding to a logic port in a logic flow table is determined according to the port states. Specifically, if the state of the master port is normal, it indicates that the master device is available, and the logical port of the first service node in the logical flow table may be replaced with the master port, so as to generate a final actually available target service chain; if the state of the main port is abnormal, it indicates that the main device is abnormal and cannot work normally, and if the state of the standby port is normal at the same time, the standby device can be used to take over the service of the main device, that is, the logic port of the first service node in the logic flow table can be replaced by the standby port. In a preferred embodiment, if the port states of the primary port and the standby port are both abnormal, the first service node may be switched to the bypass state. bypass can realize that after the safety equipment or the functional component corresponding to a certain service node is invalid, the safety equipment or the functional component is skipped, so that the specific network flow is not influenced by other service nodes on a service chain.
The embodiments of the present application are explained below with a specific example. As shown in fig. 3, the AF device specifically refers to a virtual firewall, which can provide network protection and traffic cleaning functions and support the active/standby mode. Firstly, configuring two physical ports of an OpenFlow switch to form a master-standby mode of an MLAG port, hiding two physical ports connected with AF, reporting a logic port to an SDN controller, and generating and issuing a logic flow table AC- > AF (logic port) - > AD by the SDN controller according to the configuration of service personnel. The MLAG application deployed in the OpenFlow switch converts the logical port into an actual physical port according to the logical flow table issued by the controller.
For example, a logical flow table for AC- > AF (logical port) segments: when the MLAG main port is in a survival state, replacing an AF (logic port) with an MLAG main (AF main) so as to generate a corresponding actual physical flow table AC- > MLAG main (AF main); and the physical flow table corresponding to the logic flow table of the AF (logic port) > AD section is MLAG main (AF main) > peerlink- > AD.
In specific implementation, the MLAG application is used for monitoring the state change of the MLAG main and standby ports in real time. When the main port of the MLAG is hung, rearranging the logic flow table AC- > AF (logic port) - > AD, wherein the rearranged physical flow table is AC- > peerlink- > MLAG standby (AF standby) - > AD. And when the MLAG main port is effective, switching to the flow table of AC- > MLAG main (AF main) - > peerlink- > AD again.
When two ports of two MLAGs connected with the AF device, namely an MLAG main port and an MLAG standby port, are hung up, the automatic Bypass AF device generates a flow table AC- > AD. When peerlink fails, only the forwarding of the MLAG main port is guaranteed. When a single OpenFlow switch is down, the MLAG port of the alive switch works normally, and the normal device continues to forward the message.
It should be noted that, when the two physical ports of the OpenFlow switch are configured to form the main/standby mode of the MLAG port, the physical ports may be configured to be the main/standby MLAG mode by receiving an LACP protocol packet sent by the switch by using a protocol processing module in the MLAG application.
The embodiment of the present application discloses another specific implementation of the service chain generation method, and compared with the previous embodiment, the embodiment further describes and optimizes the technical solution. Referring to fig. 4, specifically:
s301: acquiring a logic flow table issued by an SDN controller; the logic flow table is a service chain logic flow table generated according to a logic port reported by the switch and a preset service node;
s302: determining a second service node supporting a dual active mode in the logical flow table;
s303: determining all switch physical ports connected with all devices of the second service node;
s304: acquiring port states of all switch physical ports by using a pre-deployed MLAG application;
s305: determining a physical port with a normal port state in all the switch physical ports as a target physical port corresponding to a logical port in the logical flow table;
s306: acquiring link states between the current switch and other switches in the logic flow table by using a pre-deployed MLAG application;
s307: determining a front service node and a rear service node of the second service node according to service logic;
s308: generating a plurality of non-repeated target service chains which are sequentially connected with any one device of the front service node, the second service node and the rear service node based on all the target physical ports and the link states so as to control the network flow to be transmitted according to the target service chains; the number of the target service chains is the same as the number of the target physical ports.
In the embodiment of the application, after the switch acquires the logical flow table, the switch determines a second service node supporting the dual active mode in the logical flow table. The second service node may correspond to a plurality of devices, and the plurality of devices operate online at the same time. The switch may generate one logical port corresponding to a plurality of physical ports of the plurality of devices and report the logical port to the SDN controller, so that the SDN controller generates a service chaining logical flow table based on the logical port.
Further, after the second service node is determined, all switch physical ports connected to all devices of the second service node may be determined, port states of all physical ports are monitored and obtained by using an MLAG application pre-deployed in the switch, and then the logical ports in the logical flow table are replaced with corresponding physical ports based on the port states, so as to generate the target service chain. Specifically, a physical port with a normally available port state in all switch physical ports connected to all devices of the second service node may be determined as a target physical port, and the logical ports corresponding to the second service node in the logical flow table are sequentially replaced with all target physical ports with a normally available port state, so as to generate a plurality of non-repeating target service chains, where the number of the target service chains is the same as the number of the target physical ports, and the number of the target physical ports is the number of devices that normally survive in all devices representing the second service node.
In a specific implementation, a front service node and a back service node of the second service node may be determined first, and multiple non-repetitive target service chains sequentially connecting any normal surviving device of the front service node and the second service node and the back service node may be generated based on all target physical ports and link states. The preposed service node and the postposed service node specifically refer to: when the flow is transmitted according to the service flow logic, the flow is transmitted from a previous service node to a second service node, and the service node is a preposed service node of the second service node; the traffic is transmitted from the second service node to the next service node, which is the post-service node of the second service node.
As a preferred implementation manner, in the embodiment of the present application, a physical port of a service node supporting a dual active mode may be configured to be in a load balancing mode, so that traffic flows uniformly through multiple devices of the service node. If any one of the target physical ports is detected to be abnormal in the operation process after the service chain is generated, determining other ports except the current abnormal port from all the target physical ports, and guiding the network traffic of the current abnormal port to other ports in a load distribution mode so as to realize load balancing.
The embodiments of the present application are explained below with a specific example. As shown in fig. 3, the upper layer SDN controller issues a logical flow table AC- > AF (logical interface) - > AD, where the AF device supports a dual active mode. For a flow table of AC- > AF (logical interface) segment, the MLAG application needs to distribute a matching entry flow table to two AF devices through a Group table. The Group table is a function table of an OpenFlow protocol, and is used for realizing functions of broadcasting, load balancing and the like. The matching item flow table can adopt a Select mode of a Group table for realizing load balancing, and comprises an input port for connecting the AC equipment, a weight for setting the port, any combination of a source IP address, a destination IP address, a source port number, a destination port number and a protocol, and the matching item flow table is calculated and output to different output ports through a Hash algorithm. For flow tables of AF (logical port) - > AD segment, two flow tables will be generated: the first flow table is a flow table from a port of the AF device connected with the MLAG main to the AD device through peerlink; and the other flow table is from the port of the AF device connected with the MLAG device to the AD device.
When the MLAG main port is hung, the generated flow table cannot be changed, the Group table of the OpenFlow switch can automatically guide the flow loaded to the MLAG main port to other normal ports of the MLAG to be output, load balance is achieved, upper layer perception is not needed in the switching process, and efficiency is improved.
On the basis of any of the above embodiments, in the embodiments of the present application, an OpenFlow stacking technology may be further used to stack multiple entity OpenFlow switches, and for an upper-layer SDN controller, only one intermediate logical OpenFlow switch exists.
As shown in fig. 5, in a specific implementation scenario, the AF device and the AC device both support a master-standby mode, the two switches are in a symmetric mode, the two switches are configured to present a logical OpenFlow switch to the upper controller, and the SDN controller issues the logical flow table AC- > AF to the logical OpenFlow switch.
Further, the MLAG application pre-deployed in the switch arranges and issues the flow table according to the logic flow table issued by the SDN controller. And when the AF main device and the AC main device are alive, issuing the logical flow table to the AF main device and the AC main device, wherein the OpenFlow switch connected to the MLAG device port does not issue the flow table to the AF backup device and the AC backup device. When the MLAG main port of the AC main device is hung down, the MLAG standby port is enabled, and the flow table is switched to the flow table of the AC standby port- > peerlink- > AF main port.
In a preferred embodiment, a keep-alive mechanism is set between the MLAG applications, that is, after an OpenFlow switch on any side is hung, if the hung OpenFlow switch is a switch on the MLAG main port side, the MLAG application on the MLAG standby port side generates a flow table AF standby- > AC standby; if the suspended OpenFlow switch is a switch on the side of the MLAG standby port, the flow table does not need to be changed.
It can be understood that, in the embodiment of the present application, a specific MLAG port in the OpenFlow switch may also be configured as a load balancing mode, so as to implement load distribution of network traffic.
In the following, a service chain generating apparatus provided in an embodiment of the present application is introduced, and a service chain generating apparatus described below and a service chain generating method described above may be referred to each other.
Referring to fig. 6, a service chain generating apparatus provided in an embodiment of the present application includes:
a flow table acquiring module 401, configured to acquire a logic flow table issued by the SDN controller; the logic flow table is a service chain logic flow table generated according to a logic port reported by the switch and a preset service node;
a state obtaining module 402, configured to obtain, by using a pre-deployed MLAG application, a port state of a switch physical port connected to the preset service node and a link state between the current switch and another switch in the logical flow table;
a port determining module 403, configured to determine, according to the port state, an actual physical port corresponding to a logical port in the logical flow table;
a service chain generating module 404, configured to generate a target service chain according to the determined physical port and the determined link state.
For the specific implementation processes of the modules 401 to 404, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
The present application further provides an electronic device, and referring to fig. 7, an electronic device provided in an embodiment of the present application includes:
a memory 100 for storing a computer program;
the processor 200, when executing the computer program, may implement the steps provided by the above embodiments.
Specifically, the memory 100 includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer readable instructions, and the internal memory provides an environment for the operating system and the computer readable instructions in the non-volatile storage medium to run. The processor 200 may be a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor or other data Processing chip in some embodiments, and provides computing and controlling capabilities for an electronic device, and when executing a computer program stored in the memory 100, the steps of the service chain generation method disclosed in any of the foregoing embodiments may be implemented.
On the basis of the above embodiment, as a preferred implementation, referring to fig. 8, the electronic device further includes:
and an input interface 300 connected to the processor 200, for acquiring computer programs, parameters and instructions imported from the outside, and storing the computer programs, parameters and instructions into the memory 100 under the control of the processor 200. The input interface 300 may be connected to an input device for receiving parameters or instructions manually input by a user. The input device may be a touch layer covered on a display screen, or may be a key, a track ball or a touch pad arranged on a terminal housing, or may be a keyboard, a touch pad or a mouse, etc.
A display unit 400, connected to the processor 200, for displaying data processed by the processor 200 and for displaying a visualized user interface. The display unit 400 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch panel, or the like.
The network port 500 is connected to the processor 200, and is configured to perform communication connection with external terminal devices. The communication technology adopted by the communication connection can be a wired communication technology or a wireless communication technology, such as a mobile high definition link (MHL) technology, a Universal Serial Bus (USB), a High Definition Multimedia Interface (HDMI), a wireless fidelity (WiFi), a bluetooth communication technology, a low power consumption bluetooth communication technology, an ieee802.11 s-based communication technology, and the like.
While fig. 8 illustrates only an electronic device having the assembly 100 and 500, those skilled in the art will appreciate that the configuration illustrated in fig. 8 is not intended to be limiting of electronic devices and may include fewer or more components than those illustrated, or some components may be combined, or a different arrangement of components.
The present application also provides a computer-readable storage medium, which may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk. The storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the service chain generation method disclosed in any of the preceding embodiments.
In the application, the SDN controller only needs to generate a service chain logic flow table according to the logic port and the preset service node, the switch can acquire a physical port state and a link state between the switches by using a pre-deployed MLAG application, the physical port is determined based on the physical port state, an actual target service chain is generated according to the determined physical port and the acquired link state, the two states do not need to be sensed by an upper-layer SDN controller, the arranging and generating processes of the service chain do not need to be participated by the upper-layer controller, the service chain can be automatically realized at the bottom layer, the timeliness of service chain generation is effectively guaranteed, and the working efficiency is improved.
The embodiments are described in a progressive mode in the specification, the emphasis of each embodiment is on the difference from the other embodiments, and the same and similar parts among the embodiments can be referred to each other. For the system disclosed by the embodiment, the description is relatively simple because the system corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the description of the method part. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A service chain generation method, comprising:
acquiring a logic flow table issued by an SDN controller; the logic flow table is a service chain logic flow table generated according to a logic port reported by the switch and a preset service node;
acquiring a port state of a switch physical port connected with the preset service node and a link state between the current switch and other switches in the logic flow table by using an MLAG application pre-deployed in the switch;
determining an actual physical port corresponding to a logical port in the logical flow table according to the port state;
and generating a target service chain according to the determined physical port and the link state.
2. The method according to claim 1, wherein the obtaining, by using a pre-deployed MLAG application, the port status of the physical port of the switch connected to the preset service node includes:
determining a first service node supporting a master/standby mode in the logic flow table;
determining a main port connected with the main equipment of the first service node and a standby port connected with the standby equipment of the first service node;
and acquiring the port states of the main port and the standby port by using a pre-deployed MLAG application.
3. The method according to claim 2, wherein the determining, according to the port state, an actual physical port corresponding to a logical port in the logical flow table includes:
if the port state of the main port is normal, determining that an actual physical port corresponding to a logical port in the logical flow table is the main port;
and if the port state of the main port is abnormal and the port state of the standby port is normal, determining that the actual physical port corresponding to the logical port in the logical flow table is the standby port.
4. The service chain generation method of claim 3, further comprising:
and if the port states of the main port and the standby port are both abnormal, switching the first service node to a bypass state.
5. The method according to claim 1, wherein the obtaining, by using a pre-deployed MLAG application, the port status of the physical port of the switch connected to the preset service node includes:
determining a second service node supporting a dual active mode in the logic flow table;
determining all switch physical ports connected with all devices of the second service node;
acquiring port states of all switch physical ports by using a pre-deployed MLAG application;
the determining an actual physical port corresponding to a logical port in the logical flow table according to the port state includes:
and determining the physical port with the normal port state in the physical ports of all the switches as a target physical port corresponding to the logical port in the logical flow table.
6. The method according to claim 5, wherein the generating a target service chain according to the determined physical port and the determined link state comprises:
determining a front service node and a rear service node of the second service node according to service logic;
generating a plurality of non-repeated target service chains which are sequentially connected with any one device of the front service node, the second service node and the rear service node based on all the target physical ports and the link states; the number of the target service chains is the same as the number of the target physical ports.
7. The method according to claim 5 or 6, wherein after generating the target service chain according to the determined physical port and the determined link state, the method further comprises:
if any port in the target physical ports is monitored to be abnormal, determining other ports except the current abnormal port from all the target physical ports;
and leading the network traffic of the current abnormal port to the other ports in a load distribution mode.
8. An apparatus for generating a service chain, comprising:
the flow table acquisition module is used for acquiring a logic flow table issued by the SDN controller; the logic flow table is a service chain logic flow table generated according to a logic port reported by the switch and a preset service node;
a state obtaining module, configured to obtain, by using an MLAG application pre-deployed in the switch, a port state of a switch physical port connected to the preset service node and a link state between the current switch and another switch in the logical flow table;
a port determining module, configured to determine, according to the port state, an actual physical port corresponding to a logical port in the logical flow table;
and the service chain generating module is used for generating a target service chain according to the determined physical port and the link state.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the service chain generation method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the service chain generation method according to any one of claims 1 to 7.
CN201911157266.6A 2019-11-22 2019-11-22 Service chain generation method and device, electronic equipment and storage medium Active CN112838986B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911157266.6A CN112838986B (en) 2019-11-22 2019-11-22 Service chain generation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911157266.6A CN112838986B (en) 2019-11-22 2019-11-22 Service chain generation method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112838986A CN112838986A (en) 2021-05-25
CN112838986B true CN112838986B (en) 2022-09-30

Family

ID=75922856

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911157266.6A Active CN112838986B (en) 2019-11-22 2019-11-22 Service chain generation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112838986B (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105763606B (en) * 2016-02-04 2019-04-09 新华三技术有限公司 A kind of method and system of service chaining agent polymerization
EP3552352A4 (en) * 2016-12-08 2020-11-11 Hewlett-Packard Enterprise Development LP A framework for universally specified affinity topologies with partial path invalidation and generalized network flows
CN109547439B (en) * 2018-11-26 2021-04-27 奇安信科技集团股份有限公司 Processing method and device for service node access network

Also Published As

Publication number Publication date
CN112838986A (en) 2021-05-25

Similar Documents

Publication Publication Date Title
CN105379044B (en) Power negotiations in daisy-chained system
CN102821044B (en) Method and device for configuring server cluster
US10346271B2 (en) Manage power supply units and modularized automatic transfer switches
JP6588446B2 (en) Low complexity and low power distribution system
US20150016277A1 (en) Interconnect error notification system
CN103404165A (en) Automated infrastructure management systems and methods for enabling real time energy management
JP6408723B2 (en) Forced discharge of bulk capacitors in power receiving devices
JP5916263B2 (en) Power source device chip, power source device, and PoE system and method
CN105340230A (en) Virtual chassis topology management
US9110861B2 (en) Managing host computing devices with a host control component
JP6564327B2 (en) Configuring interaction control in a multi-controller network
US11573917B2 (en) Low latency computing architecture
CA2911354A1 (en) Load power device, system and method of load control and management employing load identification
US9477282B2 (en) Power source equipment and power supply method thereof
CN108650337B (en) Server detection method, system and storage medium
CN112838986B (en) Service chain generation method and device, electronic equipment and storage medium
US20140204953A1 (en) Communication System and Network Relay Device
CN106209634B (en) Learning method and device of address mapping relation
CN102938699A (en) Method and device for balanced power supply
JP6228822B2 (en) Network management control device, network management control system, and network management control method
JP5488087B2 (en) Control system, control device, composite switch device, and control method
CN113254205B (en) Load balancing system, method and device, electronic equipment and storage medium
WO2017215672A1 (en) Power supply method and power supply device in poe system
CN115004640A (en) Equipment power consumption management system, method, equipment and storage medium
US10057137B1 (en) Cable discovery with visual display of a network topology

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant