CN113507410A - CGN backup method and device - Google Patents

CGN backup method and device Download PDF

Info

Publication number
CN113507410A
CN113507410A CN202110730340.XA CN202110730340A CN113507410A CN 113507410 A CN113507410 A CN 113507410A CN 202110730340 A CN202110730340 A CN 202110730340A CN 113507410 A CN113507410 A CN 113507410A
Authority
CN
China
Prior art keywords
srv6
backup
instance
backup path
nat
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.)
Granted
Application number
CN202110730340.XA
Other languages
Chinese (zh)
Other versions
CN113507410B (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.)
New H3C Security Technologies Co Ltd
Original Assignee
New H3C Security 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 New H3C Security Technologies Co Ltd filed Critical New H3C Security Technologies Co Ltd
Priority to CN202110730340.XA priority Critical patent/CN113507410B/en
Publication of CN113507410A publication Critical patent/CN113507410A/en
Application granted granted Critical
Publication of CN113507410B publication Critical patent/CN113507410B/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/22Alternate routing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2854Wide area networks, e.g. public data networks
    • H04L12/2856Access arrangements, e.g. Internet access
    • H04L12/2869Operational details of access network equipments
    • H04L12/287Remote access server, e.g. BRAS
    • H04L12/2876Handling of subscriber policies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/44Distributed 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/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses

Abstract

The application provides a CGN backup method and a device, the method is applied to BRAS equipment, and the method comprises the following steps: when a data message from user equipment is received and a fault of a main CGN board card on BRAS equipment is determined, determining a SRv6 backup path of the data message to be forwarded according to an SRv6 backup path generated based on a BGP route issued by at least one received centralized backup device provided with a standby CGN board card and an acquired first instance identifier of a first NAT instance corresponding to a user group to which the user equipment belongs; based on the determined SRv6 backup path, encapsulating an IPv6 header and a Segment Routing Header (SRH) for the data message to obtain a SRv6 message, sending the SRv6 message to the tail node on the determined SRv6 backup path, and realizing related NAT (network address translation) operation on the data message by a standby CGN (Carrier gateway network) board card in the tail node. The method and the device can save network maintenance cost.

Description

CGN backup method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a CGN backup method and apparatus.
Background
At present, in a Network of a distributed deployment Carrier level Network Address Translation (CGN) device, a CGN board is usually set on a Broadband Remote Access Server (BRAS) device in the Network, and the CGN board performs an NAT Translation operation on a source private Internet Protocol (IP) Address of a data packet from a user equipment, that is, translates the data packet into a public Network IP Address, so that the user equipment can Access the Network.
In order to further improve the network reliability of the network, a centralized backup device provided with a CGN board is generally deployed in the network, so that when any BRAS device in the network receives a data packet from any user equipment and determines that the CGN board on the BRAS device has a fault, based on a configured routing drainage policy, a source private network IP address of the data packet is used to drain the data packet to the centralized backup device for performing a related NAT conversion operation.
However, in the above CGN backup method, an administrator needs to deploy a route drainage policy on all devices through which the data packet passes, which results in a large number of route drainage policies being required to be configured, and when the route drainage policy needs to be modified or newly added, the route drainage policy needs to be reconfigured, thereby increasing the network maintenance cost.
Disclosure of Invention
In order to overcome the problems in the related art, the application provides a CGN backup method and a CGN backup device.
According to a first aspect of embodiments of the present application, there is provided a CGN backup method, where the method is applied to a BRAS device, and the method includes:
when a data message from user equipment is received and a fault of a primary CGN board card on the BRAS equipment is determined, determining a SRv6 backup path which needs to forward the data message according to a Segment Routing and Internet Protocol sixth edition (Segment Routing Internet Protocol version6, SRv6) backup path which is generated based on a BGP (Border Gateway Protocol) Routing issued by at least one received centralized backup device provided with the backup CGN board card and an acquired first instance Identifier of a first NAT instance corresponding to a user group to which the user equipment belongs, wherein a source node of each SRv6 backup path is the BRAS equipment, and a tail node of each SRv6 backup path is the centralized backup device corresponding to a Segment Identifier (SID) in attribute information in the BGP Routing used when the BRAS equipment calculates the SRv6 backup path;
based on the determined SRv6 backup path, encapsulating an IPv6 header and a Segment Routing Header (SRH) for the data message to obtain a SRv6 message, and sending the SRv6 message to the tail node on the determined SRv6 backup path, so that when the tail node determines that the destination address in the IPv6 header of the SRv6 message is the SID of the tail node, according to the NAT operation instruction included in the Function field of the SID, searching a second instance identifier corresponding to the SID in the corresponding relation between the locally recorded SID and the second instance identifier of the second NAT instance, and using the second NAT instance corresponding to the second instance identifier searched by the standby CGN board card in the tail node, the data message obtained after the SRv6 message is unpacked is forwarded out after NAT conversion, in the corresponding relationship, different SIDs correspond to different second instance identifiers, and all the SIDs belong to the tail node.
According to a second aspect of the embodiments of the present application, there is provided a CGN backup method, where the method is applied to a centralized backup device, and the method includes:
when an SRv6 message is received and it is determined that a destination address in an IPv6 header of the SRv6 message is a SID of the centralized backup device, according to an NAT operation instruction included in a Function field of the SID, searching for a first instance identifier corresponding to the SID in a correspondence between a locally recorded SID and a first instance identifier of a first NAT instance, where in the correspondence, different SIDs correspond to different first instance identifiers, and all SIDs belong to the centralized backup device;
performing, by using the standby CGN board in the centralized backup device, the NAT conversion on the data packet obtained after decapsulating the SRv6 packet and forwarding the decapsulated data packet by using the first NAT instance corresponding to the found first instance identifier, where in the correspondence, different SIDs correspond to different second instance identifiers, and all the SIDs belong to the tail node;
wherein, the SRv6 message is that when the source BRAS device of the SRv6 message receives the data message from the user equipment and determines that the active CGN board card on the BRAS device has a fault, according to SRv6 backup paths generated based on BGP routes issued by the received at least one centralized backup device provided with the standby CGN board cards, and the obtained first instance identification of the first NAT instance corresponding to the user group to which the user equipment belongs, determining SRv6 backup paths for forwarding the data message, and based on the determined SRv6 backup path, obtaining and forwarding the data message after encapsulating an IPV6 header and a segment routing header SRH, the source node of each SRv6 backup path is the source BRAS device, and the tail node of each SRv6 backup path is a centralized backup device corresponding to the SID in the attribute information in the BGP route used by the source BRAS device to calculate the SRv6 backup path.
According to a third aspect of the embodiments of the present application, there is provided a CGN backup apparatus, where the apparatus is applied to a BRAS device, and the apparatus includes:
a determining module, configured to, when a data packet from a user equipment is received and it is determined that a primary CGN board on the BRAS device fails, determine, according to a SRv6 backup path generated based on a BGP route issued by at least one received centralized backup device provided with a backup CGN board and an obtained first instance identifier of a first NAT instance corresponding to a user group to which the user equipment belongs, a SRv6 backup path to which the data packet needs to be forwarded, where a source node of each SRv6 backup path is the BRAS device, and a tail node of each SRv6 backup path is a centralized backup device corresponding to a SID in attribute information in a BGP route used when the BRAS device calculates the SRv6 backup path;
a sending module, configured to encapsulate, based on the determined SRv6 backup path, an IPv6 header and a segment routing header SRH for the data packet to obtain a SRv6 packet, and sending the SRv6 message to the tail node on the determined SRv6 backup path, so that when the tail node determines that the destination address in the IPv6 header of the SRv6 message is the SID of the tail node, according to the NAT operation instruction included in the Function field of the SID, searching a second instance identifier corresponding to the SID in the corresponding relation between the locally recorded SID and the second instance identifier of the second NAT instance, and using the second NAT instance corresponding to the second instance identifier searched by the standby CGN board card in the tail node, the data message obtained after the SRv6 message is unpacked is forwarded out after NAT conversion, in the corresponding relationship, different SIDs correspond to different second instance identifiers, and all the SIDs belong to the tail node.
According to a fourth aspect of the embodiments of the present application, there is provided a CGN backup apparatus, where the apparatus is applied to a centralized backup device, and the apparatus includes:
a searching module, configured to, when an SRv6 message is received and it is determined that a destination address in an IPv6 header of the SRv6 message is a SID of the centralized backup device, search, according to a NAT operation instruction included in a Function field of the SID, a first instance identifier corresponding to the SID in a correspondence between a locally recorded SID and a first instance identifier of a first NAT instance, where, in the correspondence, different SIDs correspond to different first instance identifiers, and all SIDs belong to the centralized backup device;
a forwarding module, configured to forward, by using the first NAT instance corresponding to the found first instance identifier, the data packet obtained after decapsulating the SRv6 packet after performing NAT conversion on the data packet by using the standby CGN board in the centralized backup device, where in the correspondence, different SIDs correspond to different second instance identifiers, and all the SIDs belong to the tail node;
wherein, the SRv6 message is that when the source BRAS device of the SRv6 message receives the data message from the user equipment and determines that the active CGN board card on the BRAS device has a fault, according to SRv6 backup paths generated based on BGP routes issued by the received at least one centralized backup device provided with the standby CGN board cards, and the obtained first instance identification of the first NAT instance corresponding to the user group to which the user equipment belongs, determining SRv6 backup paths for forwarding the data message, and based on the determined SRv6 backup path, obtaining and forwarding the data message after encapsulating an IPV6 header and a segment routing header SRH, the source node of each SRv6 backup path is the source BRAS device, and the tail node of each SRv6 backup path is a centralized backup device corresponding to the SID in the attribute information in the BGP route used by the source BRAS device to calculate the SRv6 backup path.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
in the embodiment of the application, for a BRAS device, when receiving a data message from any user device, once a failure of a CGN primary board card on the BRAS device is found, a SRv6 backup path on which the data message needs to be forwarded is determined directly according to an SRv6 backup path generated based on a BGP route issued by at least one previously received centralized backup device provided with a backup CGN board card and an acquired first instance identifier of an NAT instance corresponding to a user group to which the user device belongs; and then, the BRAS device finally sends the data message to a centralized backup device serving as a tail node on the determined SRv6 backup path based on the determined SRv6 backup path, the centralized backup device determines a corresponding NAT instance, and the corresponding NAT instance is used for performing NAT conversion on the data message through a standby CGN board in the centralized backup device, and then the data message is forwarded out.
In the CGN backup mode, an administrator does not need to configure a large number of route drainage strategies, so that the network maintenance cost is greatly saved.
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
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic flowchart of a CGN backup method according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a network to which a CGN backup method according to an embodiment of the present disclosure is applied;
fig. 3 is a second schematic flowchart of a CGN backup method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a CGN backup device according to an embodiment of the present disclosure;
fig. 5 is a second schematic structural diagram of a CGN backup device according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
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.
Next, examples of the present application will be described in detail.
An embodiment of the present application provides a CGN backup method, which is applied to a BRAS device, and as shown in fig. 1, the method may include the following steps:
and S11, when receiving the data message from the user equipment and determining that the active CGN board card on the BRAS equipment fails, determining a SRv6 backup path to forward the data message according to a SRv6 backup path generated based on a BGP route issued by at least one centralized backup device provided with the standby CGN board card and the acquired first instance identifier of the first network address translation NAT instance corresponding to the user group to which the user equipment belongs.
In this step, the source node of each SRv6 backup path is a BRAS device, and the tail node of each SRv6 backup path is a centralized backup device corresponding to the segment identification SID in the attribute information in the BGP route used by the BRAS device to calculate the SRv6 backup path.
S12, encapsulating an IPv6 header and a segment routing header SRH for the data message based on the determined SRv6 backup path to obtain a SRv6 message, and sending the SRv6 message to the tail node on the determined SRv6 backup path, so that when the target address in the IPv6 header of the SRv6 message is determined to be the SID of the tail node, according to the NAT operation instruction included in the Function field of the SID, searching a second instance identifier corresponding to the SID in the corresponding relation between the locally recorded SID and the second instance identifier of the second NAT instance, and using the searched second NAT instance corresponding to the second instance identifier through a standby CGN board card in the tail node to perform NAT conversion on the data message obtained after de-encapsulating the SRv6 message and then forwarding the data message.
In this step, in the above correspondence, different SIDs correspond to different second instance identifiers, and all the SIDs belong to the tail node.
Specifically, in the above step S11, the BRAS device may generate SRv6 a backup path by:
aiming at any received BGP route issued by any centralized backup equipment provided with a standby CGN board card, acquiring a second instance identifier and an SID (security identifier) in attribute information from the BGP route;
and generating SRv6 backup paths corresponding to the acquired second instance identifiers based on the acquired SIDs.
In this way, when the BRAS device generates an SRv6 backup path corresponding to the obtained second instance identifier based on the obtained SID, it may optionally generate a SRv6 backup path, or may generate a SRv6 backup path with an optimal path.
It should be noted that, in this embodiment of the present application, for any centralized backup device in a network where a BRAS device is located, where a standby CGN board is disposed, once a NAT instance (also referred to as a second NAT instance) for a user device in a certain user group is configured, the NAT instance corresponds to a SID (the SID may be generated by the centralized backup device itself or configured by an administrator); then, the centralized backup device issues a BGP route for the NAT instance to all the BRAS devices in the network, where the specific content of the BGP route may be an instance identifier of the NAT instance (for example, may be presented by a NAT ID), and the related attribute information is the SID, so that any BRAS device generates a corresponding SRv6 backup path based on the BGP route, and then the backup path is used when its own active CGN board fails, which eliminates the need for an administrator to configure a large number of route diversion policies, thereby greatly saving network maintenance cost.
Here, each NAT instance configured on the centralized backup device may record identification information (e.g., a slot number, etc.) of the CGN board in the centralized backup device, address translation information (e.g., a public network address, a public network port, etc.), and the like; different instance identifications correspond to different SIDs, which, when implemented, can be distinguished by a value in a corresponding Function field (e.g., 16 bits).
In addition, in the step S11, the BRAS device may determine the SRv6 backup path on which the data packet needs to be forwarded by:
the first mode is as follows: searching SRv6 backup paths of which the corresponding second instance identifications are the same as the first instance identifications from all the generated SRv6 backup paths; and determining the found SRv6 backup path as a SRv6 backup path needing to forward the data message.
The method is suitable for the scenario that the naming modes of the BRAS equipment and the NAT instance corresponding to the same user group by the centralized backup equipment in the network are the same.
The second mode is as follows: searching a second instance identifier corresponding to each first instance identifier in a corresponding relation between each first instance identifier on a pre-configured BRAS device and each second instance identifier on at least one centralized backup device; further searching SRv6 backup paths of which the corresponding second instance identifications are found out from all the generated SRv6 backup paths; and determining the found SRv6 backup path as a SRv6 backup path needing to forward the data message.
The method is suitable for the situation that naming modes of the BRAS equipment and the centralized backup equipment in the network are different aiming at the example identifications of the NAT examples corresponding to the same user group.
It should be noted that, in step S12, after the BRAS device sends the SRv6 packet to the tail node on the SRv6 backup path determined, for the tail node, it is known that the destination address in the IPv6 header of the SRv6 packet is the SID of the tail node by analyzing the SRv6 packet, at this time, the tail node searches the second instance identifier corresponding to the SID in the correspondence between the locally recorded SID and the second instance identifier of the second NAT instance according to the NAT operation instruction included in the Function field of the SID, and forwards the data packet obtained after decapsulating the SRv6 packet after performing NAT conversion by using the second instance corresponding to the second instance identifier found by the standby CGN board in the tail node.
It should be further explained that, in the prior art, when receiving a data packet from any user equipment and determining that a CGN board card on the BRAS device has a fault, the BRAS device uses a source private network IP address of the data packet to direct the data packet to a corresponding centralized backup device for performing a related NAT conversion operation, based on a configured routing directing policy. The CGN backup method cannot be applied to a three-Layer Virtual Private Network (L3 VPN) Network or a SRv6 over L3VPN Network.
In order to solve the problem, in the embodiment of the present application, the NAT instances configured on the BRAS device side and the centralized backup device side may both include a VPN instance bound to a corresponding user group, so that the CGN backup method of the present application may be applied to an L3VPN networking or an SRv6 over L3VPN networking, and the application networking application range is expanded. The CGN backup method is described in detail below with reference to specific embodiments.
As shown in fig. 2, it is assumed that a network at least includes a BRAS device 1 and a BRAS device 2 provided with a master CGN board, and a centralized backup device 1 provided with a standby CGN board, and other network devices are not shown. Assume that the centralized backup device 1 is configured with NAT instance 1 (corresponding instance identified as NAT ID1) and SID1, NAT instance 2 (corresponding instance identified as NAT ID2) and SID2, and NAT instance 3 (corresponding instance identified as NAT ID3) and SID3 in this order. The centralized backup device 1 may issue 3 BGP routes in sequence, for example, the content in the first BGP route is NAT ID1, and the attribute information includes SID 1. Here, the SID1, SID2 and SID3 differ only in the value of the corresponding function field, and the length of this field is the same.
Both subsequent BRAS device 1 and BRAS device 2 will receive these 3 BGP routes. When the BRAS device 1 receives the first BGP route case, the BRAS device 1 will obtain the instance identifier (i.e., NAT ID1) and SID (i.e., SID1) in the attribute information from the BGP route; then, based on SID1, BRAS device 1 generates a SRv6 backup path (e.g., path 1) with an optimal path, where the source node of the path is BRAS device 1 and the tail node is centralized backup device 1.
It should be noted that the processing flow of the BRAS device 1 for the other 2 BGP routes is similar to that of the first BGP route, and is not described in detail here.
Next, assuming that the BRAS device 1 receives the data packet 1 with the IPv4 address as the source IP address from the user equipment (not shown in fig. 2) in the network at a certain time, it finds that the active CGN board on the BRAS device 1 fails, and in this case, the BRAS device 1 searches for a SRv6 backup path with a corresponding instance identifier identical to the NAT ID1 from all generated SRv6 backup paths, that is, the path 1; then, BRAS equipment 1 determines path 1 as an SRv6 backup path for forwarding data message 1; finally, based on path 1, BRAS device 1 encapsulates IPv6 header and SRH for data packet 1 to obtain SRv6 packet 1, where the specific encapsulation process is the prior art and is not described in detail herein; finally, BRAS device 1 sends SRv6 message 1 to centralized backup device 1, and the specific sending process is prior art and is not described in detail here.
After receiving SRv6 message 1, subsequent centralized backup device 1 finds that the destination address in the IPv6 header of SRv6 message 1 is an SID (i.e., SID1) of its own, at this time, according to the NAT operation instruction included in the Function field of SID1, centralized backup device 1 searches for an instance identifier corresponding to SID1 in the correspondence between the locally recorded SID and the instance identifier of the NAT instance, that is, finds out NAT ID 1; then, the centralized backup device 1 performs NAT conversion on the data message 1 obtained after decapsulating SRv6 message 1 by using the NAT instance (that is, NAT instance 1) corresponding to the NAT ID1 through the standby CGN board in the centralized backup device, and forwards the data message 1.
An embodiment of the present application further provides a CGN backup method, where the method is applied to a centralized backup device, and as shown in fig. 3, the method may include the following steps:
s31, when the SRv6 message is received and the destination address in the IPv6 header of the SRv6 message is determined to be the SID of the centralized backup device, according to the NAT operation instruction included in the Function field of the SID, searching the first instance identifier corresponding to the SID in the corresponding relationship between the locally recorded SID and the first instance identifier of the first NAT instance.
In this step, in the above correspondence, different SIDs correspond to different first instance identifiers, and all the SIDs belong to the centralized backup device;
and S32, through the standby CGN board card in the centralized backup equipment, using the found first NAT example corresponding to the first example identifier, and forwarding the data message obtained after decapsulating SRv6 message after NAT conversion.
In this step, in the corresponding relationship, different SIDs correspond to different second instance identifiers, and all the SIDs belong to the tail node;
when the source BRAS device of which the SRv6 message is the SRv6 message receives the data message from the user equipment and determines that the active CGN board card on the BRAS device has a fault, according to SRv6 backup paths generated based on BGP routes issued by the received at least one centralized backup device provided with the standby CGN board cards, determining SRv6 backup path for forwarding data message according to the first instance identification of the first NAT instance corresponding to the user group belonging to the user equipment, and based on the determined SRv6 backup path, packaging the data message with an IPV6 head and a Segment Routing Head (SRH) to obtain and forward the data message to the centralized backup device, the source node of each SRv6 backup path is a source BRAS device, and the tail node of each SRv6 backup path is a centralized backup device corresponding to the SID in the attribute information in the BGP route used by the source BRAS device to calculate the SRv6 backup path.
As can be seen from the above technical solutions, in the embodiment of the present application, for a BRAS device, when a data packet from any user device is received, once a failure of a CGN primary board card on the BRAS device is found, a SRv6 backup path that needs to forward the data packet is determined directly according to an SRv6 backup path generated based on a BGP route issued by at least one previously received centralized backup device provided with a backup CGN board card and an obtained first instance identifier of an NAT instance corresponding to a user group to which the user device belongs; and then, the BRAS device finally sends the data message to a centralized backup device serving as a tail node on the determined SRv6 backup path based on the determined SRv6 backup path, the centralized backup device determines a corresponding NAT instance, and the corresponding NAT instance is used for performing NAT conversion on the data message through a standby CGN board in the centralized backup device, and then the data message is forwarded out.
In the CGN backup mode, an administrator does not need to configure a large number of route drainage strategies, so that the network maintenance cost is greatly saved.
Based on the same inventive concept, the present application further provides a CGN backup device, where the CGN backup device is applied to a BRAS device, and a schematic structural diagram of the CGN backup device is shown in fig. 4, and specifically includes:
a determining module 41, configured to, when receiving a data packet from a user equipment and determining that a primary CGN board on the BRAS device fails, determine, according to a SRv6 backup path generated based on a BGP route issued by at least one received centralized backup device provided with a backup CGN board and an obtained first instance identifier of a first NAT instance corresponding to a user group to which the user equipment belongs, a SRv6 backup path to which the data packet needs to be forwarded, where a source node of each SRv6 backup path is the BRAS device, and a tail node of each SRv6 backup path is a centralized backup device corresponding to a SID in attribute information in a BGP route used when the BRAS device calculates the SRv6 backup path;
a sending module 42, configured to encapsulate, based on the determined SRv6 backup path, an IPv6 header and a segment routing header SRH for the data packet, to obtain a SRv6 packet, and send the SRv6 packet to the tail node on the determined SRv6 backup path, so that when the tail node determines that a destination address in the IPv6 header of the SRv6 packet is a SID of the tail node, according to an NAT operation instruction included in a Function field of the SID, in a correspondence between a locally recorded SID and a second instance identifier of a second NAT instance, a second instance identifier corresponding to the SID is searched for by the tail node, and the data packet obtained after decapsulating the SRv6 packet is NAT-converted and forwarded by using a second NAT instance corresponding to the searched second instance identifier through a standby CGN board card in the tail node, where different SIDs correspond to different second instance identifiers in the correspondence, and all SIDs are attributed to the tail node.
Preferably, the apparatus further comprises:
a generation module (not shown in FIG. 4) for generating SRv6 a backup path by:
aiming at any received BGP route issued by any centralized backup equipment provided with a standby CGN board card, acquiring a second instance identifier and an SID (security identifier) in attribute information from the BGP route;
and generating SRv6 backup paths corresponding to the acquired second instance identifiers based on the acquired SIDs.
Preferably, the determining module 41 is specifically configured to determine the SRv6 backup path on which the data packet needs to be forwarded, by the following means:
searching SRv6 backup paths of which the corresponding second instance identifications are the same as the first instance identifications from all generated SRv6 backup paths;
and determining the found SRv6 backup path as a SRv6 backup path needing to forward the data message.
Preferably, the determining module 41 is specifically configured to determine the SRv6 backup path on which the data packet needs to be forwarded, by the following means:
searching a second instance identifier corresponding to each first instance identifier in a pre-configured corresponding relationship between each first instance identifier on the BRAS equipment and each second instance identifier on at least one centralized backup equipment;
further searching SRv6 backup paths of which the corresponding second instance identifications are found out from all the generated SRv6 backup paths;
and determining the found SRv6 backup path as a SRv6 backup path needing to forward the data message.
The present application further provides a CGN backup apparatus, where the apparatus is applied to a centralized backup device, and a schematic structural diagram of the apparatus is shown in fig. 5, and specifically includes:
the searching module 51 is configured to, when an SRv6 message is received and it is determined that a destination address in an IPv6 header of the SRv6 message is a SID of the centralized backup device, search, according to a NAT operation instruction included in a Function field of the SID, a first instance identifier corresponding to the SID in a correspondence between a locally recorded SID and a first instance identifier of a first NAT instance, where in the correspondence, different SIDs correspond to different first instance identifiers, and all SIDs belong to the centralized backup device;
a forwarding module 52, configured to forward, by using the first NAT instance corresponding to the found first instance identifier, the data packet obtained after decapsulating the SRv6 packet after performing NAT conversion on the data packet by using the standby CGN board in the centralized backup device, where in the correspondence, different SIDs correspond to different second instance identifiers, and all the SIDs belong to the tail node;
wherein, the SRv6 message is that when the source BRAS device of the SRv6 message receives the data message from the user equipment and determines that the active CGN board card on the BRAS device has a fault, according to SRv6 backup paths generated based on BGP routes issued by the received at least one centralized backup device provided with the standby CGN board cards, and the obtained first instance identification of the first NAT instance corresponding to the user group to which the user equipment belongs, determining SRv6 backup paths for forwarding the data message, and based on the determined SRv6 backup path, obtaining and forwarding the data message after encapsulating an IPV6 header and a segment routing header SRH, the source node of each SRv6 backup path is the source BRAS device, and the tail node of each SRv6 backup path is a centralized backup device corresponding to the SID in the attribute information in the BGP route used by the source BRAS device to calculate the SRv6 backup path.
As can be seen from the above technical solutions, in the embodiment of the present application, for a BRAS device, when a data packet from any user device is received, once a failure of a CGN primary board card on the BRAS device is found, a SRv6 backup path that needs to forward the data packet is determined directly according to an SRv6 backup path generated based on a BGP route issued by at least one previously received centralized backup device provided with a backup CGN board card and an obtained first instance identifier of an NAT instance corresponding to a user group to which the user device belongs; and then, the BRAS device finally sends the data message to a centralized backup device serving as a tail node on the determined SRv6 backup path based on the determined SRv6 backup path, the centralized backup device determines a corresponding NAT instance, and the corresponding NAT instance is used for performing NAT conversion on the data message through a standby CGN board in the centralized backup device, and then the data message is forwarded out.
In the CGN backup mode, an administrator does not need to configure a large number of route drainage strategies, so that the network maintenance cost is greatly saved.
An electronic device is further provided in an embodiment of the present application, as shown in fig. 6, including a processor 61 and a machine-readable storage medium 62, where the machine-readable storage medium 62 stores machine-executable instructions that can be executed by the processor 61, and the processor 61 is caused by the machine-executable instructions to: and implementing the steps of any CGN backup method.
The machine-readable storage medium may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Alternatively, the machine-readable storage medium may be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In yet another embodiment provided by the present application, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any of the CGN backup methods described above.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (10)

1. A carrier-level network address translation (CGN) backup method is applied to a Broadband Remote Access Server (BRAS) device, and comprises the following steps:
when a data message from user equipment is received and a fault of a primary CGN board card on the BRAS equipment is determined, determining a SRv6 backup path needing to forward the data message according to an SRv6 backup path generated by a Border Gateway Protocol (BGP) route issued based on at least one received centralized backup device provided with standby CGN board cards and an acquired first instance identifier of a first Network Address Translation (NAT) instance corresponding to a user group to which the user equipment belongs, wherein a source node of each SRv6 backup path is the BRAS equipment, and a tail node of each SRv6 backup path identifies a centralized backup device corresponding to a local identifier (SID) in attribute information in the BGP route used when the BRAS equipment calculates the SRv6 backup path;
based on the determined SRv6 backup path, encapsulating an IPv6 header and a Segment Routing Header (SRH) for the data message to obtain a SRv6 message, and sending the SRv6 message to the tail node on the determined SRv6 backup path, so that when the tail node determines that the destination address in the IPv6 header of the SRv6 message is the SID of the tail node, according to the NAT operation instruction included in the Function field of the SID, searching a second instance identifier corresponding to the SID in the corresponding relation between the locally recorded SID and the second instance identifier of the second NAT instance, and using the second NAT instance corresponding to the second instance identifier searched by the standby CGN board card in the tail node, the data message obtained after the SRv6 message is unpacked is forwarded out after NAT conversion, in the corresponding relationship, different SIDs correspond to different second instance identifiers, and all the SIDs belong to the tail node.
2. The method of claim 1, wherein the backup path is generated SRv6 by:
aiming at any received BGP route issued by any centralized backup equipment provided with a standby CGN board card, acquiring a second instance identifier and an SID (security identifier) in attribute information from the BGP route;
and generating SRv6 backup paths corresponding to the acquired second instance identifiers based on the acquired SIDs.
3. The method of claim 2, wherein the SRv6 backup path on which the datagram needs to be forwarded is determined by:
searching SRv6 backup paths of which the corresponding second instance identifications are the same as the first instance identifications from all generated SRv6 backup paths;
and determining the found SRv6 backup path as a SRv6 backup path needing to forward the data message.
4. The method of claim 2, wherein the SRv6 backup path on which the datagram needs to be forwarded is determined by:
searching a second instance identifier corresponding to each first instance identifier in a pre-configured corresponding relationship between each first instance identifier on the BRAS equipment and each second instance identifier on at least one centralized backup equipment;
further searching SRv6 backup paths of which the corresponding second instance identifications are found out from all the generated SRv6 backup paths;
and determining the found SRv6 backup path as a SRv6 backup path needing to forward the data message.
5. A CGN backup method for carrier-level network address translation is applied to a centralized backup device, and comprises the following steps:
when an SRv6 message is received and it is determined that a destination address in an IPv6 header of the SRv6 message is a segment identifier SID of the centralized backup device, according to a network address translation NAT operation instruction included in a Function field of the SID, searching for a first instance identifier corresponding to the SID in a correspondence between the locally recorded SID and a first instance identifier of a first NAT instance, where in the correspondence, different SIDs correspond to different first instance identifiers, and all SIDs belong to the centralized backup device;
performing, by using the standby CGN board in the centralized backup device, the NAT conversion on the data packet obtained after decapsulating the SRv6 packet and forwarding the decapsulated data packet by using the first NAT instance corresponding to the found first instance identifier, where in the correspondence, different SIDs correspond to different second instance identifiers, and all the SIDs belong to the tail node;
when the SRv6 message is the SRv6 message, when receiving the data message from the user equipment and determining that the primary CGN board on the BRAS device fails, the BRAS device of the source broadband remote access server (SRv 6) message determines a SRv6 backup path to which the data message needs to be forwarded according to a SRv6 backup path generated based on a BGP route issued by at least one received centralized backup device provided with a backup CGN board and an obtained first instance identifier of a first NAT instance corresponding to a user group to which the user equipment belongs, and encapsulates an IPV6 header and a segment route header SRH for the data message and forwards the data message to the centralized backup device based on the determined SRv6 backup path, where a source node of each SRv6 backup path is the source BRAS device, and a tail node of each SRv6 backup path is a centralized node corresponding to an SID in attribute information in a BGP route used when the source BRAS device calculates the BGP route of the segment SRv6 backup path A backup device.
6. A carrier-level network address translation CGN backup apparatus, applied to a broadband remote access server BRAS device, the apparatus comprising:
a determining module, configured to, when a data packet from a user equipment is received and it is determined that a primary CGN board on the BRAS device fails, determine, according to an SRv6 backup path generated based on a border gateway protocol BGP route issued by at least one received centralized backup device provided with a backup CGN board and an obtained first instance identifier of a first network address translation NAT instance corresponding to a user group to which the user equipment belongs, a SRv6 backup path to which the data packet needs to be forwarded, where a source node of each SRv6 backup path is the BRAS device, and a tail node of each SRv6 backup path identifies, for the BRAS device, a centralized backup device corresponding to a segment identifier SID in attribute information in a BGP route used when the BRAS device calculates the SRv6 backup path;
a sending module, configured to encapsulate, based on the determined SRv6 backup path, an IPv6 header and a segment routing header SRH for the data packet, to obtain a SRv6 packet, and send the SRv6 packet to a tail node on the determined SRv6 backup path, so that when the tail node determines that a destination address in the IPv6 header of the SRv6 packet is a SID of the tail node, according to an NAT operation instruction included in a Function field of the SID, in a correspondence between a locally recorded SID and a second instance identifier of a second NAT instance, a second instance identifier corresponding to the SID is searched for by the tail node, and the data packet obtained after decapsulating the SRv6 packet is subjected to NAT conversion and forwarded through a standby CGN board in the tail node, where different SIDs correspond to different second instance identifiers in the correspondence, and all SIDs are attributed to the tail node.
7. The apparatus of claim 6, further comprising:
a generation module to generate SRv6 a backup path by:
aiming at any received BGP route issued by any centralized backup equipment provided with a standby CGN board card, acquiring a second instance identifier and an SID (security identifier) in attribute information from the BGP route;
and generating SRv6 backup paths corresponding to the acquired second instance identifiers based on the acquired SIDs.
8. The apparatus according to claim 7, wherein the determining module is specifically configured to determine the SRv6 backup path on which the data packet needs to be forwarded by:
searching SRv6 backup paths of which the corresponding second instance identifications are the same as the first instance identifications from all generated SRv6 backup paths;
and determining the found SRv6 backup path as a SRv6 backup path needing to forward the data message.
9. The apparatus according to claim 7, wherein the determining module is specifically configured to determine the SRv6 backup path on which the data packet needs to be forwarded by:
searching a second instance identifier corresponding to each first instance identifier in a pre-configured corresponding relationship between each first instance identifier on the BRAS equipment and each second instance identifier on at least one centralized backup equipment;
further searching SRv6 backup paths of which the corresponding second instance identifications are found out from all the generated SRv6 backup paths;
and determining the found SRv6 backup path as a SRv6 backup path needing to forward the data message.
10. A carrier-grade network address translation CGN backup apparatus, applied to a centralized backup device, the apparatus comprising:
a searching module, configured to, when an SRv6 message is received and it is determined that a destination address in an IPv6 header of the SRv6 message is a segment identifier SID of the centralized backup device, search, according to an NAT operation instruction included in a Function field of the SID, a first instance identifier corresponding to the SID in a correspondence between a locally recorded SID and a first instance identifier of a first NAT instance, where, in the correspondence, different SIDs correspond to different first instance identifiers, and all SIDs belong to the centralized backup device;
a forwarding module, configured to forward, by using the first NAT instance corresponding to the found first instance identifier, the data packet obtained after decapsulating the SRv6 packet after performing NAT conversion on the data packet by using the standby CGN board in the centralized backup device, where in the correspondence, different SIDs correspond to different second instance identifiers, and all the SIDs belong to the tail node;
when the SRv6 message is the SRv6 message, when receiving the data message from the user equipment and determining that the primary CGN board on the BRAS device fails, the BRAS device of the source broadband remote access server determines, according to a SRv6 backup path generated based on a BGP route issued by at least one centralized backup device provided with a backup CGN board and the obtained first instance identifier of the first NAT instance for Network Address Translation (NAT) corresponding to the user group to which the user equipment belongs, a SRv6 backup path to which the data message needs to be forwarded, and based on the determined SRv6 backup path, encapsulates an IPV6 header and a segment route header SRH for the data message, obtains and forwards the data message to the centralized backup device, where a source node of each SRv6 backup path is the source BRAS device, and a tail node of each SRv6 backup path is a tail node in attribute information in the BGP route used when the source BRAS device calculates the BGP SRv6 backup path for the source BRAS device And the centralized backup device corresponding to the SID.
CN202110730340.XA 2021-06-29 2021-06-29 CGN backup method and device Active CN113507410B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110730340.XA CN113507410B (en) 2021-06-29 2021-06-29 CGN backup method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110730340.XA CN113507410B (en) 2021-06-29 2021-06-29 CGN backup method and device

Publications (2)

Publication Number Publication Date
CN113507410A true CN113507410A (en) 2021-10-15
CN113507410B CN113507410B (en) 2023-04-07

Family

ID=78009523

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110730340.XA Active CN113507410B (en) 2021-06-29 2021-06-29 CGN backup method and device

Country Status (1)

Country Link
CN (1) CN113507410B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113965506A (en) * 2021-11-01 2022-01-21 南京熊猫汉达科技有限公司 Gateway backup method and system

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102647486A (en) * 2012-04-28 2012-08-22 华为技术有限公司 Address distributing method, address distributing equipment and address distributing system
US20130290561A1 (en) * 2010-12-29 2013-10-31 Huawei Technologies Co., Ltd. Method and device for providing user information to cgn device
US20150109995A1 (en) * 2013-10-23 2015-04-23 Cisco Technology, Inc. Node selection in virtual evolved packet core
CN107017998A (en) * 2016-01-27 2017-08-04 中国电信股份有限公司 Method and system for realizing CGN flexibility backups
WO2017152596A1 (en) * 2016-03-09 2017-09-14 中兴通讯股份有限公司 Method and device for protecting p2mp main tunnel node
CN108200223A (en) * 2017-12-28 2018-06-22 新华三技术有限公司 Carrier class networks address-translating device CGN backup methods and device
CN109587009A (en) * 2018-12-28 2019-04-05 北京华为数字技术有限公司 The method and apparatus for configuring seamless two-way converting detection SBFD mechanism
US20200127913A1 (en) * 2018-10-22 2020-04-23 Cisco Technology, Inc., A California Corporation Packet Network Interworking Including Segment Routing
CN111541613A (en) * 2020-04-27 2020-08-14 鹏城实验室 Data processing method based on SRv6 and related equipment

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130290561A1 (en) * 2010-12-29 2013-10-31 Huawei Technologies Co., Ltd. Method and device for providing user information to cgn device
CN102647486A (en) * 2012-04-28 2012-08-22 华为技术有限公司 Address distributing method, address distributing equipment and address distributing system
WO2013159641A1 (en) * 2012-04-28 2013-10-31 华为技术有限公司 Address allocation method, device, and system
US20150109995A1 (en) * 2013-10-23 2015-04-23 Cisco Technology, Inc. Node selection in virtual evolved packet core
CN107017998A (en) * 2016-01-27 2017-08-04 中国电信股份有限公司 Method and system for realizing CGN flexibility backups
WO2017152596A1 (en) * 2016-03-09 2017-09-14 中兴通讯股份有限公司 Method and device for protecting p2mp main tunnel node
CN108200223A (en) * 2017-12-28 2018-06-22 新华三技术有限公司 Carrier class networks address-translating device CGN backup methods and device
US20200127913A1 (en) * 2018-10-22 2020-04-23 Cisco Technology, Inc., A California Corporation Packet Network Interworking Including Segment Routing
CN109587009A (en) * 2018-12-28 2019-04-05 北京华为数字技术有限公司 The method and apparatus for configuring seamless two-way converting detection SBFD mechanism
CN111541613A (en) * 2020-04-27 2020-08-14 鹏城实验室 Data processing method based on SRv6 and related equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
陈元谋等: "城域网CGN部署方式探讨", 《数字通信世界》 *
黄鹏: "电信运营商IPv6 NAT444备份方案", 《电信工程技术与标准化》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113965506A (en) * 2021-11-01 2022-01-21 南京熊猫汉达科技有限公司 Gateway backup method and system
CN113965506B (en) * 2021-11-01 2023-02-28 南京熊猫汉达科技有限公司 Gateway backup method and system

Also Published As

Publication number Publication date
CN113507410B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
US11374862B2 (en) Packet sending and processing method and apparatus, PE node, and node
EP3544240B1 (en) Data processing
CN110971433B (en) Method, device and system for acquiring SRv6 tunnel information
US10237230B2 (en) Method and system for inspecting network traffic between end points of a zone
US10205657B2 (en) Packet forwarding in data center network
US9992106B2 (en) Generating a host route
US10476795B2 (en) Data packet forwarding
WO2016055027A1 (en) Table entry in software defined network
US10084706B2 (en) Method and device for processing service function chaining
CN106559292A (en) A kind of broad band access method and device
CN108718269B (en) Message processing method and device
US10848457B2 (en) Method and system for cross-zone network traffic between different zones using virtual network identifiers and virtual layer-2 broadcast domains
US10020954B2 (en) Generic packet encapsulation for virtual networking
CN106878136B (en) Message forwarding method and device
CN105591907B (en) A kind of route obtaining method and device
CN109379241B (en) Path information determination method and device
US9317431B2 (en) Address generator, address generation method, and encapsulation-decapsulation device
US10855733B2 (en) Method and system for inspecting unicast network traffic between end points residing within a same zone
CN113507410B (en) CGN backup method and device
CN108306825B (en) Equivalent forwarding table item generation method and VTEP device
CN110391984B (en) Message forwarding method and device
EP4060949A1 (en) Method for reducing routing loops, apparatus and system
CN107896188A (en) Data forwarding method and device
CN116418632A (en) Message processing method, device, equipment and machine-readable storage medium
CN106656810B (en) MAC address learning method and device

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