Disclosure of Invention
In view of this, the present invention provides an MEC bypass system and method to solve the problem that a large amount of network configurations need to be modified when the MEC bypass is deployed at present.
Specifically, the invention is realized by the following technical scheme:
the invention provides an MEC bypass system, wherein a first switch, a mobile edge technology MEC server and a second switch in the system are interconnected through a two-layer link to form a main link; the first switch and the second switch are interconnected through a two-layer link to form a standby link;
the first switch is used for receiving an uplink GTP message from a base station and sending the uplink GTP message to the MEC server from a main port of the main link;
the MEC server is used for receiving the uplink GTP message sent by the first switch, removing an outer IP (Internet protocol) head, a UDP (user datagram protocol) head and a GTP (general packet access control) head of the uplink GTP message to obtain an uplink two-layer data message if the uplink GTP message hits an uplink application ACL (access control list) forwarding table item, and sending the uplink two-layer data message to a local service server from a local port; if the uplink GTP message does not hit the uplink application ACL forwarding table item, forwarding the uplink GTP message to the second switch from a public network port;
and the second switch is used for receiving the uplink GTP message forwarded by the MEC server, learning an outer-layer source MAC address of the uplink GTP message, and forwarding the uplink GTP message to a public network according to an outer-layer destination MAC address of the uplink GTP message.
Based on the same conception, the invention also provides an MEC bypass method, which is applied to a first switch in the MEC bypass system; the first switch, the MEC server and the second switch are interconnected through a second layer of link to form a main link; the first switch and the second switch are interconnected through a two-layer link to form a standby link; the method comprises the following steps:
receiving an uplink GTP message from a base station;
sending the uplink GTP message to the MEC server from a main port of the main link, so that when the MEC server receives the uplink GTP message, if the uplink GTP message hits an uplink application ACL forwarding table item, removing an outer IP (Internet protocol) head, a UDP (user Datagram protocol) head and a GTP head of the uplink GTP message to obtain an uplink two-layer data message, and sending the uplink two-layer data message to a local service server from a local port; and if the uplink GTP message does not hit the uplink application ACL forwarding table item, forwarding the uplink GTP message to the second switch from a public network port so that the second switch learns the outer-layer source MAC address of the uplink GTP message when receiving the uplink GTP message, and forwarding the uplink GTP message to a public network according to the outer-layer destination MAC address of the uplink GTP message.
Based on the same conception, the invention also provides a switch, which comprises a memory, a processor, a communication interface and a communication bus;
the memory, the processor and the communication interface are communicated with each other through the communication bus;
the memory is used for storing a computer program;
the processor is configured to execute the computer program stored in the memory, and the processor 72 implements any step of the MEC bypass method when executing the computer program.
Based on the same concept, the present invention also provides a computer readable storage medium having stored therein a computer program which, when executed by a processor, implements any of the steps of the MEC bypass method described above.
Therefore, the method can receive the uplink GTP message from the base station through the first switch in the MEC bypass system, and send the uplink GTP message to the MEC server from the main port of the main link of the MEC server and the second switch connected with the first switch, and if the uplink GTP message received by the MEC server hits an uplink application ACL forwarding table item, the outer IP head, the UDP head and the GTP head of the uplink GTP message are removed to obtain an uplink two-layer data message, and then the uplink two-layer data message is sent to the service server; and if the uplink GTP message does not hit the uplink application ACL forwarding table item, forwarding the uplink GTP message to the second switch from the public network port so that the second switch learns the outer-layer source MAC address of the uplink GTP message and forwards the uplink GTP message to the public network according to the outer-layer destination MAC address of the uplink GTP message. Compared with the prior art, the method and the device can realize the two-layer forwarding of the GTP message by deploying the two-layer switch and setting the ACL forwarding table entry on the MEC server, so that other equipment in the network is not required to be modified, and the configuration operation of bypass deployment of the MEC is simplified.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In order to solve the problems, the invention provides an MEC bypass system and a method, the invention can receive an uplink GTP message from a base station through a first switch in the MEC bypass system, the uplink GTP message is sent to an MEC server from a main port of a main link of a first switch connecting an MEC server and a second switch, if the uplink GTP message received by the MEC server hits an uplink application ACL forwarding table item, an outer layer IP head, a UDP head and a GTP head of the uplink GTP message are removed to obtain an uplink two-layer data message, and then the uplink two-layer data message is sent to a service server; and if the uplink GTP message does not hit the uplink application ACL forwarding table item, forwarding the uplink GTP message to the second switch from the public network port so that the second switch learns the outer-layer source MAC address of the uplink GTP message and forwards the uplink GTP message to the public network according to the outer-layer destination MAC address of the uplink GTP message. Compared with the prior art, the method and the device can realize the two-layer forwarding of the GTP message by deploying the two-layer switch and setting the ACL forwarding table entry on the MEC server, so that other equipment in the network is not required to be modified, and the configuration operation of bypass deployment of the MEC is simplified.
Fig. 2 is a schematic structural diagram of an MEC bypass system in an exemplary embodiment of the present invention, in which a link between a first switch and an MEC server and a second switch is an active link, a link between the first switch and the second switch is a standby link, a port connected to the active link on the first switch is a primary port, and a port connected to the standby link is a standby port. The main port and the standby port of the first switch can be communicated only by enabling the first switch, and the first switch can select a main link or a standby link to forward a message by enabling the main port or the standby port; two ports connected with the active link and the standby link on the second switch are enabled all the time, so that the message forwarded by the first switch can be received when any one of the active link or the standby link is normal. The first switch and the second switch may be carrier class devices. Specifically, the method comprises the following steps:
when the first switch determines to receive the uplink GTP message from the base station, the uplink GTP message may be sent from the primary port of the active link to the MEC server.
For the MEC server, in the network of this embodiment, the MEC server receives two types of uplink GTP messages, one type is a public network service message addressed to a public network, and the other type is a private network service message addressed to a local network. When the MEC server receives the uplink GTP message sent by the first switch, matching may be performed according to a preset uplink application ACL forwarding entry and the uplink GTP message, and if the uplink GTP message hits the uplink application ACL forwarding entry, it may be considered that the uplink GTP message is a local private network service message, so that an outer IP header, a UDP header, and a GTP header of the uplink GTP message may be removed to obtain an uplink two-layer data message, and then the uplink two-layer data message is sent from a local port to a local service server according to a destination MAC address in the uplink two-layer data message; if the uplink GTP packet does not hit the uplink application ACL forwarding entry, the uplink GTP packet may be considered to be a public network service packet addressed to a public network, and thus the uplink GTP packet may be forwarded from a public network port to the second switch.
It should be noted that the uplink application ACL forwarding table entry and the downlink application ACL forwarding table entry may be matched through quintuple information of the message, or a source IP address or a destination IP address, which is not limited herein.
When receiving the uplink GTP message forwarded by the MEC server, the second switch may learn an outer source MAC address of the uplink GTP message, and forward the uplink GTP message to a public network according to an outer destination MAC address of the uplink GTP message.
The foregoing embodiment is a forwarding process of the MEC bypass system for the uplink GTP packet, where if the downlink GTP packet is received, the forwarding process specifically includes:
when the second switch receives a downlink GTP message from the public network, the second GTP message may be forwarded to the MEC server according to the learned MAC address entry.
For the MEC server, in the network of this embodiment, the MEC server receives two types of downlink messages, one is a public network service message from a public network, that is, a downlink GTP message, and the other is a local private network service message, that is, a downlink two-layer data message. When the MEC server receives a downlink two-layer data message sent by a local service server, if the downlink two-layer data message hits a downlink application ACL forwarding table item, adding an outer IP (Internet protocol) head, a UDP (user Datagram protocol) head and a GTP head to the downlink two-layer data message to obtain a downlink GTP message, and then sending the downlink GTP message to the first switch; and when receiving a downlink GTP message from the second switch, if the downlink GTP message does not hit a downlink application ACL forwarding table, forwarding the downlink GTP message to the first switch.
When determining to receive the downlink GTP packet forwarded by the MEC server, the first switch may forward the downlink GTP packet to the base station, regardless of a packet from a public network or a packet from a local of the MEC server.
The MEC server of the invention can guide the two-layer forwarding of the GTP message by setting the uplink application ACL forwarding table entry and the downlink application ACL forwarding table entry, and simultaneously distinguish the public network service and the private network service by the ACL rule, thereby leading the equipment such as a base station in the network environment and the like not to modify the current configuration and simplifying the operation amount of operators.
As an embodiment, link state monitoring may be performed between the first switch and the MAC server through a BFD (Bidirectional Forwarding Detection) packet (the BFD packet may also be replaced with a CFD (Connectivity Fault Detection) packet), and if the first switch does not receive the BFD packet sent by the MEC server, it indicates that the active link fails, so that the main port may be refreshed as a standby port of the standby link (i.e., the standby port is disabled), and a notification packet is sent to the second switch; and if the second switch receives the notification message sent by the first switch, the second switch ages the MAC address table entry of the second switch and learns the MAC address table entry again. Therefore, if the active link fails, the uplink GTP packet may be forwarded to the a device in the IPRAN network through the standby link (first switch → second switch).
If the subsequent first switch can receive the BFD message sent by the MEC server, it indicates that the primary link is recovered to normal, so that the standby port can be refreshed to the primary port (i.e. the primary port can be enabled, the standby port can be disabled), and a notification message is sent to the second switch; and if the second switch receives the notification message sent by the first switch, the second switch ages the MAC address table entry of the second switch and learns the MAC address table entry again. Therefore, if the active link is recovered to be normal, the uplink GTP packet may be forwarded to the a device in the ip ran network through the active link (the first switch → the MEC server → the second switch).
According to the embodiment, the MEC bypass system can still forward through the standby link even when the MEC server fails, so that the stability of the network is ensured.
Referring to fig. 3, a processing flow diagram of an MEC bypass method in an exemplary embodiment of the invention is shown, the method is applied to a first switch in an MEC bypass system; the first switch, the mobile edge technology MEC server and the second switch are interconnected through a two-layer link to form a main link; the first switch and the second switch are interconnected through a two-layer link to form a standby link; the method comprises the following steps:
step 301, receiving an uplink GTP message from a base station;
step 302, sending the uplink GTP message from the main port of the main link to the MEC server, so that when the MEC server receives the uplink GTP message, if the uplink GTP message hits an uplink application ACL forwarding entry, an outer IP header, a UDP header, and a GTP header of the uplink GTP message are removed to obtain an uplink two-layer data message, and the uplink two-layer data message is sent from a local port to a local service server; and if the uplink GTP message does not hit the uplink application ACL forwarding table item, forwarding the uplink GTP message to the second switch from a public network port so that the second switch learns the outer-layer source MAC address of the uplink GTP message when receiving the uplink GTP message, and forwarding the uplink GTP message to a public network according to the outer-layer destination MAC address of the uplink GTP message.
As an embodiment, for a downlink service message, receiving a downlink GTP message forwarded by the MEC server, where the downlink GTP message is obtained by adding an outer IP header, a UDP header, and a GTP header to a downlink two-layer data message sent by a local service server when the downlink two-layer data message hits a downlink application ACL forwarding entry sent by the MEC server, or the downlink GTP message is a downlink GTP message from the second switch and forwarded by the MEC server and not hit the downlink application ACL forwarding entry; and forwarding the downlink GTP message to the base station.
As an embodiment, if the first switch does not receive the BFD packet sent by the MEC server, the primary port is refreshed to be the standby port of the standby link, and a notification packet is sent to the second switch, so that after the second switch receives the notification packet, the MAC address table entry of the second switch is aged, and MAC address table entry learning is performed again. If the first switch subsequently receives the BFD message sent by the MEC server, the standby port is refreshed to be the main port, and a notification message is sent to the second switch, so that the second switch ages the MAC address table entry of the second switch after receiving the notification message, and the MAC address table entry learning is carried out again.
In order to make the objects, technical solutions and advantages of the present invention more apparent, please refer to fig. 1 and 4 for further detailed description of the solution of the present invention.
Please refer to fig. 4, which is an interaction flowchart of the MEC bypass in the embodiment of the present invention, when a first switch and a second switch are deployed, an active link may be established between the first switch, the second switch, and the MEC server first, where a main port of the active link on the first switch is P0; a backup link is established between the first switch and the second switch, the backup port of the backup link on the first switch being P1. And configuring an uplink application ACL forwarding table entry and a downlink application ACL forwarding table entry on the MEC server.
The specific interaction process is as follows:
step 401, the first switch receives an uplink GTP message of the mobile public network service sent from the base station, enables the main port, and then forwards the uplink GTP message MEC to the MEC server through the main link shown in fig. 1;
step 402, when receiving the uplink GTP message, the MEC server determines whether the uplink GTP message hits an uplink application ACL forwarding entry, and if not, goes to step 403; if yes, go to step 405;
step 403, when the uplink GTP message does not hit the uplink application ACL forwarding table entry, it indicates that the uplink GTP message is a public network service, so that the uplink GTP message is forwarded to the second switch from the public network port, and step 404 is performed;
step 404, after receiving the uplink GTP message, the second switch learns the source MAC address, and forwards the uplink GTP message to the device a of the public network according to the destination MAC address;
step 405, when the uplink GTP message hits the uplink application ACL forwarding table entry, it indicates that the uplink GTP message is a private network service, so that after removing the outer IP header, UDP header, and GTP header from the uplink GTP message, the internal uplink two-layer data message is forwarded to the local service server from the local port;
step 406, the second switch receives a downlink GTP message sent from the public network, forwards the downlink GTP message to the MEC server, and goes to step 407;
step 407, the MEC server receives the downlink GTP message forwarded by the second switch, determines that the downlink GTP message hits the downlink application ACL forwarding table entry, which indicates that the downlink GTP message is a public network service, and therefore forwards the downlink GTP message to the first switch, and goes to step 408;
step 408, when receiving the downlink GTP message forwarded by the MEC server, the first switch forwards the downlink GTP message to the base station;
step 409, the MEC server receives the downlink layer two data packet forwarded by the local service server, determines that the downlink layer two data packet hits the downlink application ACL forwarding table entry, and indicates that the downlink layer two data packet is a private network service, so that the downlink layer two data packet is encapsulated into a downlink GTP packet by adding an outer IP header, a UDP header, and a GTP header, and then forwards the downlink GTP packet to the first switch, and goes to step 410;
step 410, when receiving the downlink GTP message forwarded by the MEC server, the first switch forwards the downlink GTP message to the base station.
According to the MEC bypass process, the invention provides high telecom level reliability of MEC deployment under the 4G network architecture by deploying the two-layer switch, and simultaneously, the technical difficulty of MEC software providers is reduced without modifying any configuration of the existing network.
Based on the same concept, the present invention also provides a switch, as shown in fig. 5, including a memory 51, a processor 52, a communication interface 53, and a communication bus 54; wherein, the memory 51, the processor 52 and the communication interface 53 communicate with each other through the communication bus 54;
the memory 51 is used for storing computer programs;
the processor 52 is configured to execute the computer program stored in the memory 51, and when the processor 52 executes the computer program, any step of the MEC bypass method provided in the embodiment of the present disclosure is implemented.
The present invention also provides a computer-readable storage medium having a computer program stored therein, where the computer program is executed by a processor to implement any one of the steps of the MEC bypass method provided by the embodiments of the present disclosure.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for embodiments of the network device and the computer-readable storage medium, since they are substantially similar to the method embodiments, the description is relatively simple, and in relation to the description, reference may be made to some portions of the description of the method embodiments.
In summary, the present invention may receive an uplink GTP message from a base station through a first switch in an MEC bypass system, and send the uplink GTP message from a main port of a main link where the first switch connects an MEC server and a second switch to the MEC server, where if the uplink GTP message received by the MEC server hits an uplink application ACL forwarding entry, an outer IP header, a UDP header, and a GTP header of the uplink GTP message are removed to obtain an uplink two-layer data message, and then the uplink two-layer data message is sent to a service server; and if the uplink GTP message does not hit the uplink application ACL forwarding table item, forwarding the uplink GTP message to the second switch from the public network port so that the second switch learns the outer-layer source MAC address of the uplink GTP message and forwards the uplink GTP message to the public network according to the outer-layer destination MAC address of the uplink GTP message. Compared with the prior art, the method and the device can realize the two-layer forwarding of the GTP message by deploying the two-layer switch and setting the ACL forwarding table entry on the MEC server, so that other equipment in the network is not required to be modified, and the configuration operation of bypass deployment of the MEC is simplified.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.