WO2017114363A1 - Packet processing method, bng and bng cluster system - Google Patents
Packet processing method, bng and bng cluster system Download PDFInfo
- Publication number
- WO2017114363A1 WO2017114363A1 PCT/CN2016/112146 CN2016112146W WO2017114363A1 WO 2017114363 A1 WO2017114363 A1 WO 2017114363A1 CN 2016112146 W CN2016112146 W CN 2016112146W WO 2017114363 A1 WO2017114363 A1 WO 2017114363A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- bng
- user
- home
- subsequent
- module
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
- H04L45/745—Address table lookup; Address filtering
- H04L45/7453—Address table lookup; Address filtering using hashing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0654—Management of faults, events, alarms or notifications using network fault recovery
- H04L41/0668—Management of faults, events, alarms or notifications using network fault recovery by dynamic selection of recovery network elements, e.g. replacement by the most appropriate element after failure
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
- H04L67/1044—Group management mechanisms
Definitions
- the embodiments of the present invention relate to a computer network technology, and in particular, to a packet processing method, a BNG, and a BNG cluster system.
- the Broadband Access Server has flexible access authentication, effective address management, powerful user management, and provides flexible and flexible services and control functions.
- the BRAS acts as a broadband access gateway.
- One type of (Broadband NetworkGateway, BNG for short) is widely used in networks.
- a dual-machine BNG or a single virtual broadband access gateway is usually used.
- the dual-machine BNG includes: a primary BNG and a backup BNG; the backup BNG backs up user information in the primary BNG in real time, so that when the primary BNG fails, the backup BNG The service of the primary BNG is taken over; the single-machine vBNG refers to a vBNG deployed in a virtual machine.
- the dual-machine BNG or vBNG in the prior art can only process message messages of a limited number of users, and the system has poor scalability.
- the embodiment of the invention provides a packet processing method, a BNG and a BNG cluster system, which not only enhances the scalability of the system, but also implements automatic load balancing.
- an embodiment of the present invention provides a packet processing method, where the method is applied to a broadband access gateway BNG cluster system;
- the BNG cluster system includes: at least two BNGs, and the at least two BNGs include a first BNG, the first BNG manages at least one user based on a distributed hash table DHT algorithm;
- the method includes:
- the first BNG receives the user message from the first user, and determines whether the first BNG is the home BNG of the first user; the home BNG of the first user is the BNG that manages the first user. ;
- the first BNG processes the user message; if it is determined that the first BNG is not the home BNG of the first user, The first BNG forwards the user packet to the home BNG of the first user according to the P2P routing table, so that the home BNG of the first user processes the user packet; wherein the P2P routing table is used for At least one successor BNG of the first BNG is indicated.
- the first BNG determines whether the first BNG is the home BNG of the first user; If the first BNG is determined to be the home BNG of the first user, the first BNG processes the user message; if it is determined that the first BNG is not the home BNG of the first user, The first BNG forwards the user packet to the home BNG of the first user according to the P2P routing table, so that the home BNG of the first user processes the user packet.
- the BNG cluster system includes at least two BNGs, and of course, may include multiple BNGs, which can enhance the scalability of the system, and not only simplify the network and devices by introducing P2P technology with self-organization. Configuration management and maintenance, as well as automatic load balancing.
- the determining whether the first BNG is the home BNG of the first user includes:
- the first BNG is determined according to the hash value of the first user and the ID of the first BNG; wherein the hash value of the first user is used to uniquely identify the first user, The ID of a BNG is used to uniquely identify the first BNG;
- the hash value of the first user belongs to the ID range of the first BNG, determining that the first BNG is the home BNG of the first user;
- the hash value of the first user does not belong to the ID range of the first BNG, it is determined that the first BNG is not the home BNG of the first user.
- each BNG in the present invention manages at least one user based on the DHT algorithm.
- the first BNG receives the user message, it determines whether the first BNG is the home BNG of the first user. If the home BNG is the first user, the user message is processed; if it is determined that the user is not the home BNG of the first user, the user message is forwarded to the home BNG of the first user. . It can be seen that not only the scalability of the system is enhanced, but also the automatic negative Load balancing.
- the first BNG sends the user packet to the first according to a P2P routing table.
- a user's home BNG forwarding including:
- the first BNG compares the hash value of the first user with the ID of the at least one subsequent BNG; wherein, the ID of each subsequent BNG is used to uniquely identify the successor BNG;
- the hash value of the first user belongs to the ID range of the first subsequent BNG, determining that the first subsequent BNG is the home BNG of the first user, and sending the user packet to the first a subsequent BNG; wherein the first subsequent BNG is a BNG in the at least one subsequent BNG;
- the user message is sent to the second subsequent BNG, so that the second subsequent BNG will be Transmitting the user packet to the home BNG of the first user, where the second subsequent BNG is the minimum value of the difference between the hash value of the first user and the ID of the at least one subsequent BNG. BNG.
- the first BNG according to the P2P routing table, The user packet is forwarded to the home BNG of the first user, including:
- the first BNG encapsulates the user packet, and forwards the encapsulated user packet to the home BNG of the first user according to the P2P routing table.
- the user message is the first user
- the online request message before the determining whether the first BNG is the home BNG of the first user, the method further includes:
- the first BNG determines whether the first user is online, including:
- the identifier information of the first user includes any one or more of the following information: The combination of the source media access control MAC address, the source IP address, and the virtual local area network VLAN tag; the user online list includes: the MAC address of the user who has been online, The user source port of the online user, the user type of the online user, the user status of the online user, the user IP address of the online user, and the user VLAN tag of the online user.
- the method further includes:
- the first BNG forwards the user message to the network.
- the method further includes:
- the first BNG is in real time backing up user information of the second BNG; wherein the second BNG is a predecessor BNG of the first BNG, and the first BNG is a hot backup node of the second BNG;
- the first BNG directly takes over the service of the second BNG
- the first BNG initiates a stabilization process to update topology information.
- the first BNG directly takes over the service of the second BNG, including:
- the first BNG notifies the user of the second BNG of its own MAC address
- the first BNG sends a protocol packet indicating a route update to the network side.
- the hot standby solution of the BNG is realized by introducing the P2P technology, which not only has good scalability, but also enhances the reliability of the system.
- the first BNG receives a user from the first user Before the message BNG, it also includes:
- the first BNG obtains a BNG list, where the BNG list includes: at least one BNG in the BNG cluster system;
- the first BNG is added to the BNG cluster system.
- the first BNG is added to the BNG cluster system, including:
- the first BNG sends a query request to the third BNG; wherein the third BNG is a BNG in the BNG list; the query request is used to: query an ID of a direct successor BNG of the third BNG;
- the first BNG sends a first notification message to the direct successor BNG of the third BNG; the first notification message is used to indicate that the direct successor BNG of the third BNG uses the first BNG as a predecessor BNG;
- the first BNG sends a second notification message to the third BNG, where the second notification message is used to indicate that the third BNG uses the first BNG as a direct successor BNG.
- the method before the sending, by the first BNG, the query request to the third BNG, the method further includes:
- the first BNG calculates an ID of the first BNG according to a DHT algorithm.
- the introduction scheme of BNG is realized by introducing P2P technology, and has good scalability.
- the method further includes:
- the first BNG migrates the saved user information to a fourth BNG; wherein the fourth BNG is a direct successor BNG of the first BNG;
- the first BNG sends a fourth notification message to the fourth BNG; the fourth notification message is used to indicate that the fourth BNG uses the second BNG as a predecessor BNG of the fourth BNG.
- the embodiment of the present invention provides a broadband access gateway BNG, where the BNG is a first BNG, the first BNG belongs to a BNG cluster system, and the BNG cluster system includes: at least two BNGs, the A BNG manages at least one user based on a distributed hash table DHT algorithm; the first BNG includes:
- a receiving module configured to receive a user message from the first user
- a first determining module configured to determine whether the first BNG is a home BNG of the first user; the home BNG of the first user is a BNG that manages the first user;
- a processing module configured to process the user message if the first determining module determines that the first BNG is the home BNG of the first user;
- a forwarding module configured to forward the user packet to the home BNG of the first user according to the P2P routing table, if the first determining module determines that the first BNG is not the home BNG of the first user, The user BNG is processed by the home BNG of the first user; wherein The P2P routing table is used to indicate at least one successor BNG of the first BNG.
- the first determining module is configured to:
- the hash value of the first user belongs to the ID range of the first BNG, determining that the first BNG is the home BNG of the first user;
- the hash value of the first user does not belong to the ID range of the first BNG, it is determined that the first BNG is not the home BNG of the first user.
- the forwarding module is configured to:
- the hash value of the first user belongs to the ID range of the first subsequent BNG, determining that the first subsequent BNG is the home BNG of the first user, and sending the user packet to the first a subsequent BNG; wherein the first subsequent BNG is a BNG in the at least one subsequent BNG;
- the user message is sent to the second subsequent BNG, so that the second subsequent BNG will be Transmitting the user packet to the home BNG of the first user, where the second subsequent BNG is the minimum value of the difference between the hash value of the first user and the ID of the at least one subsequent BNG. BNG.
- the forwarding module is specifically configured to:
- the user message is encapsulated, and the encapsulated user message is forwarded to the home BNG of the first user according to the P2P routing table.
- the BNG further includes:
- a second determining module configured to determine whether the first user is online
- the first determining module uses Determining whether the first BNG is the home BNG of the first user;
- the forwarding module is further configured to forward the user packet to the network.
- the second determining module is specifically configured to:
- the identifier information of the first user includes any one or more of the following information: source media Access control MAC address, source IP address, and virtual local area network VLAN tag.
- the user online list includes: the MAC address of the online user, the user source port of the online user, the user type of the online user, and the user status of the online user.
- the BNG further includes:
- a backup module configured to back up user information of the second BNG in real time; wherein the second BNG is a predecessor BNG of the first BNG, and the first BNG is a hot backup node of the second BNG;
- a takeover module configured to directly take over the service of the second BNG when detecting that the second BNG fails
- An update module that is used to initiate the stabilization process to update topology information.
- the takeover module is configured to:
- a protocol packet indicating a route update is sent to the network side.
- the BNG further includes:
- An obtaining module configured to obtain a BNG list, where the BNG list includes: at least one BNG in the BNG cluster system;
- a module is added for joining the BNG cluster system.
- the adding module is used to:
- the first notification message is used to indicate that the direct successor BNG of the third BNG uses the first BNG as a predecessor BNG;
- the second notification message is used to indicate that the third BNG uses the first BNG as a direct successor BNG.
- the BNG further includes:
- a calculating module configured to calculate an ID of the first BNG according to a DHT algorithm.
- the BNG further includes:
- a migration module configured to migrate the saved user information to a fourth BNG; wherein the fourth BNG is a direct successor BNG of the first BNG;
- a first notification module configured to send a third notification message to the second BNG, where the second BNG is a predecessor BNG of the first BNG, and the third notification message is used to indicate that the second BNG is to be
- the fourth BNG is used as a direct successor BNG of the second BNG;
- a second notification module configured to send a fourth notification message to the fourth BNG, where the fourth notification message is used to indicate that the fourth BNG uses the second BNG as a predecessor BNG of the fourth BNG.
- the embodiment of the present invention provides a broadband access gateway BNG cluster system, including: at least two first BNGs according to any one of the foregoing second aspects, wherein each of the first BNGs Management of at least one user based on a distributed hash table DHT algorithm.
- the method of the present invention is applied to a BNG cluster system including at least two BNGs, wherein each of the BNGs manages at least one user based on a DHT algorithm; when the first BNG in the BNG cluster system receives a user report from the first user The first BNG determines whether the first BNG is the home BNG of the first user; further, if it is determined that the first BNG is the home BNG of the first user, the first The BNG processes the user packet; if it is determined that the first BNG is not the home BNG of the first user, the first BNG sends the user packet to the home BNG of the first user according to the P2P routing table.
- the BNG cluster system includes at least two BNGs, and of course, may also include multiple BNGs, which are visible and enhance the system.
- Scalability while introducing P2P technology with self-organization, not only simplifies configuration management and maintenance of networks and devices, but also automates Load balancing.
- FIG. 1A is a schematic diagram 1 of an application scenario of a packet processing method according to the present invention.
- FIG. 1B is a schematic flowchart of Embodiment 1 of a packet processing method according to the present invention.
- FIG. 1C is a system architecture diagram of a BNG device according to the present invention.
- FIG. 2A is a schematic flowchart 1 of a second embodiment of a packet processing method according to the present invention.
- FIG. 2B is a schematic diagram of a user migration application scenario in a BNG cluster system according to the present invention.
- 2C is a second schematic flowchart of a second embodiment of a packet processing method according to the present invention.
- 2D is a schematic diagram 1 of a BNG cluster system of the present invention.
- Embodiment 3A is a schematic flowchart of Embodiment 3 of a packet processing method according to the present invention.
- 3B is a schematic diagram 2 of a BNG cluster system according to the present invention.
- 3C is a schematic diagram 3 of the BNG cluster system of the present invention.
- 3D is a schematic diagram 4 of the BNG cluster system of the present invention.
- 3E is a schematic diagram 5 of a BNG cluster system of the present invention.
- Embodiment 4 is a schematic flowchart of Embodiment 4 of a packet processing method according to the present invention.
- Figure 5 is a schematic structural view of a first embodiment of a BNG according to the present invention.
- FIG. 6 is a schematic structural view of a second embodiment of a BNG according to the present invention.
- FIG. 7 is a schematic structural view of a third embodiment of a BNG according to the present invention.
- FIG. 8 is a schematic structural view of a fourth embodiment of a BNG according to the present invention.
- FIG. 9 is a schematic structural view of a fifth embodiment of a BNG according to the present invention.
- FIG. 10 is a schematic structural view of a sixth embodiment of a BNG according to the present invention.
- the dual-machine BNG is usually used. Because the processing capability of each BNG is limited, the dual-machine BNG in the prior art can only process message messages of a limited number of users, and the system has poor scalability.
- NFV Network Function Virtualization
- 1) NFV technology hardware high-performance, high-capacity server, switch and storage platform that unifies network equipment to industrial standards
- NFV technology platform standard-based IT virtualization technology, can be instantiated as needed /Migrate to network function to any location
- Application of NFV technology The network function is softwareized and can be flexibly deployed on the virtualization software of the general server.
- vBNG a vBNG in a virtual machine
- the general-purpose server is not designed for data communication forwarding, the general-purpose server is used for data communication.
- the system performance that can be provided when forwarding is limited, especially when the data communication service is superimposed, the performance degradation is greater. Therefore, the system performance of vBras/BNG based on the existing general server is limited, and the single-machine vBNG can support it.
- the number of users is also limited, so the system's scalability is poor.
- a network based on Peer to Peer (P2P) model application layer is usually called a peer-to-peer (P2P) network; in a P2P network environment, thousands of computers connected to each other are in a peer-to-peer position.
- the network generally does not rely on a dedicated centralized server. Each computer in the network can act as both a requester for the network service and a request for other computers to provide resources and services.
- the distribution characteristics of P2P networks increase the robustness of fail-safe by replicating data on multiple nodes. In a pure P2P network, nodes do not need to rely on a central index server to discover data, and the system does not appear to have a single point. collapse.
- a BNG clustering technology based on P2P technology is proposed, which enables the BNG clustering system based on the P2P technology to have good scalability, and simplifies the configuration management and maintenance of the network and the device, and implements automatic load balancing.
- multiple BNGs use a Distributed HashTable (DHT) algorithm to form a distributed BNG, and the user is evenly distributed to the corresponding BNG based on the DHT algorithm.
- DHT Distributed HashTable
- Automatic traffic balancing can be employed.
- the DHT algorithm can be employed Any of the following algorithms: Chord algorithm, CAN algorithm, Pastry algorithm and Tapestry algorithm.
- the BNG in the embodiment of the present invention may be a vBNG, which is a virtualization device.
- the vBNG may be a virtual machine running a program for providing functions of the BNG device, the virtual machine being deployed on a hardware device (for example, a physical server).
- a virtual machine is a complete computer system that runs through a software and has full hardware system functionality running in a fully isolated environment.
- a physical server is virtualized into multiple logical computers through virtualization technology.
- Each logical computer is a virtual machine on a physical server, and each virtual machine can run different operating systems. Therefore, applications of each virtual machine Programs can run in separate operating system spaces.
- the BNG in the embodiment of the present invention may also be a physical BNG, and the program that provides the BNG device function runs on a dedicated hardware platform, where the main hardware platform includes a processor, a transmitter, a receiver, and a circuit.
- the user needs to be managed as data of the BNG.
- the hash value of the user and the identification number (ID) of the first BNG can be calculated by using the first BNG. It may be specified by a management plane (eg, an NFV management and orchestration portion of the NFV framework responsible for all virtual management tasks); wherein the hash value of the user may uniquely identify the user, and the ID of the first BNG may be uniquely identified The first BNG.
- a management plane eg, an NFV management and orchestration portion of the NFV framework responsible for all virtual management tasks
- the first BNG when the hash value of the user is calculated by using the first BNG, optionally, the first BNG is based on attribute information of the user message (source MAC address, source IP address, and virtual local area network) VLAN tag) or the user name of the user (Username) calculates the hash value of the user, as generated by using a DHT algorithm or other algorithm; 1B) when the ID of the first BNG is calculated by the first BNG Optionally, the first BNG calculates its own ID according to the IP address of the loopback interface of the first BNG, such as by using a DHT algorithm or other algorithm; 2) when the user's hash value and the first When the ID of the BNG is specified by the management plane, the hash value of the user is a globally unique ID identifier, and the ID of the first BNG is a globally unique ID identifier that is allocated in consideration of load balancing of each BNG.
- attribute information of the user message source MAC address, source IP address, and virtual local area network) VLAN tag
- the ID of BNG1 is 10 (used to indicate that BNG1 is responsible for users whose user hash value is less than or equal to 10)
- the ID of BNG2 is 20 (used to indicate that BNG2 is responsible for users whose user hash value is greater than 10 and less than or equal to 20)
- BNG3 The ID is 30 (used to indicate that BNG3 is responsible for the user hash value greater than 20 and Users less than or equal to 30).
- FIG. 1A is a schematic diagram of an application scenario of a packet processing method according to the present invention
- FIG. 1B is a packet of the present invention.
- FIG. 1C is a system architecture diagram of the BNG equipment of the present invention.
- the method in this embodiment is applied to a BNG cluster system (a BNG cluster system based on P2P technology composed of BNG1, BNG2, and BNG3 as shown in FIG. 1A);
- the BNG cluster system includes: at least two BNG (BNG1, BNG2, and BNG3 as shown in FIG. 1A), the at least two BNGs include a first BNG (such as any BNG among the three BNGs shown in FIG.
- the BNG1 is used as an example.
- the execution process of the BNG1 is similar.
- the at least two BNGs are connected through physical ports and physical links, or through virtual ports and virtual links.
- connection relationship forming a network connection topology diagram of a star type, a tree type, and a full connection type; wherein the at least two BNGs form a P2P network by using a P2P protocol, and the first BNG is distributed based on
- the hash table DHT algorithm manages at least one user, that is, each BNG in the P2P technology-based BNG cluster system manages at least one user based on a DHT algorithm (such as a function of managing the user's Internet access); the method may include:
- the first BNG receives a user packet from the first user, and determines whether the first BNG is a home BNG of the first user.
- the first BNG receives the user message from the first user (such as the line request message or the management message, etc.) sent by the switch or other BNG, and the above line request message in FIG. 1A is taken as an example for description. Further, determining whether the user message belongs to the first BNG for processing, optionally, determining whether the first BNG is the home BNG of the first user (wherein the first user The home BNG is a BNG that manages the first user.
- the first BNG determines, according to the hash value of the first user and the ID of the first BNG, whether the first BNG is the home BNG of the first user.
- the first BNG compares the hash value of the first user with the ID of the first BNG, and determines whether the self (that is, the first BNG) is the home BNG of the first user.
- the first BNG determines that it is the home BNG of the first user, and performs step S102; if the hash value of the first user does not belong to the ID range of the first BNG (as described above) A user has a hash value of 15, and the ID of the first BNG is 10), and the first BNG determines that it is not the home BNG of the first user, and performs step S103.
- the first BNG may determine, by other means, whether it is the home BNG of the first user, which is not limited in the embodiment of the present invention.
- Step S102 The first BNG processes the user packet.
- the first BNG determines that it is the home BNG of the first user, that is, the first BNG is responsible for managing the first user's Internet access and the like.
- the first BNG processes the user message; for example, if the user message is an online request message and the first user is not online, the first BNG performs a user online process (currently The user is online, the process is similar, as shown by the arrow in the first form of FIG. 1A; if the user message is a management message, the first BNG processes the user message, optionally, for example, if The management packet is a query statistics packet, and the first BNG reads the required statistics and returns the information to the management plane.
- the management packet may also be other packets, correspondingly, the A BNG is processed differently according to different management messages, and the embodiment of the present disclosure does not limit this.
- the BNG equipment system includes: a UserIdentification module, a Connection Management module, an AAA and a user management module, an Address management module, and a Service Control module in the BNG. And an external server external to the BNG; wherein the user identification module, the AAA and the user management module, the address management module, the service control module and the like are implemented under the control coordination of the connection management module, and are implemented by an external server. Access management and service control for broadband users.
- the user identification module is configured to: identify and process various access protocol packets of the user, obtain physical information of the user, and a user name and password in the process of user authentication, thereby providing information basis and security for realizing user access.
- the connection management module is used to coordinate the interaction between the user identification module, the address management module, the AAA and the user management module, and assist in the establishment, maintenance and removal of the user connection;
- AAA generation Abbreviation for Authentication, Authorization, and Accounting; where authentication is the process of identifying the identity of the user; authorization is granted to the corresponding network usage rights based on the user identity after authentication, including quality of service (Quality) Of Service (QoS), bandwidth control, access rights, and user policies; charging is based on the authenticated user identity and uses the corresponding charging policy to record and provide accounting information (time, traffic, location, etc.);
- the address management module is configured to: assign an IP address to the access user, and manage the user IP address to ensure The IP address resource is used reasonably; 5)
- the service control module is used to: control the access rights, bandwidth, QoS, etc.
- the external server includes: responsible for allocating IP addresses to users. Dynamic Host Configuration Protocol (DHCP) server, a policy server responsible for issuing service policies for users, such as a Remote Authentication Dial In User Service (RADIUS) server, and An AAA server that is responsible for authentication, authorization, and accounting for access users, such as a RADIUS server and a Huawei Huawei Terminal Access Controller Access Control System (abbreviation) server.
- DHCP Dynamic Host Configuration Protocol
- RADIUS Remote Authentication Dial In User Service
- abbreviation Huawei Huawei Terminal Access Controller Access Control System
- the BNG user identification module is responsible for processing the user message, extracting the user's physical location information and determining whether access is allowed, and if access is allowed, the BNG connection management is performed.
- the module sends a user connection request;
- connection management module determines whether the user is allowed to access according to conditions such as access restrictions, and if the user is allowed to access, the user identification module responds successfully;
- the user identification module After receiving the successful response from the connection management module, the user identification module notifies the user. Further, the user sends an authentication request message to the user identification module, and the user identification module extracts the authentication information such as the user name from the message, and authenticates. After the information is packaged, it is sent to the connection management module for authentication;
- connection management module forwards the authentication request from the user identification module to the AAA and the user management module;
- the AAA and the user management module perform authentication and authorization according to the authentication scheme and the authorization scheme, and then respond to the connection management module with the authentication result together with the authorization information;
- connection management module applies for an IP address to the address management module
- the address management module allocates an IP address according to the address pool information of the user by using a corresponding address allocation policy (the remote address needs to be allocated to an external DHCP server), and the allocation result is returned to the connection management module;
- connection management module responds to the user identification module together with the IP address, and after the user identification module interacts with the user, the user can go online;
- the AAA and the user management module and the service control module are jointly responsible for controlling the basic services and value-added services used by the user for charging, bandwidth limitation, and QoS.
- the connection management module of the first BNG responds to the user identification module of the first BNG together with the IP address
- the first BNG needs to be updated.
- Information such as user status and IP address.
- the first BNG sends the user packet to the first user according to a P2P routing table.
- the home BNG is forwarded, so that the home BNG of the first user processes the user message.
- the P2P routing table is used to indicate at least one successor BNG of the first BNG (optionally, the subsequent BNG includes: a direct successor BNG and/or an indirect successor BNG of the first BNG);
- the P2P routing table includes: an ID of the L subsequent BNGs of the first BNG and an Internet Protocol IP address of each of the subsequent BNGs, where L is a positive integer; optionally, the L subsequent BNGs It may be the first of the 2 N BNG BNG subsequent, non-negative integer N (such as 4 when L is, N may be 0, 1 and 4, where, L is equal to the value of the numerical size of a N number); for example, when N is 0, the second subsequent BNG 0 representing the first of said first BNG BNG BNG of a subsequent (i.e., immediately subsequent to the first BNG BNG); when N 1, the second one represents a first follow-BNG BNG BNG the first of two subsequent BNG (i.e.
- the L subsequent BNGs may also be other subsequent BNGs of the first BNG determined by other means, which is not limited in this embodiment.
- the P2P routing table is generated by the first BNG based on a DHT algorithm calculation.
- the first BNG determines that it is not the home BNG of the first user
- the first BNG is based on the hash value of the first user and included in the P2P routing table. Determining, by the ID of the at least one successor BNG (ie, L subsequent BNGs), a target BNG whose ID value is closest to the hash value of the first user, and further, the first BNG is included according to the routing table.
- the IP address of the target BNG is sent to the target BNG; optionally, the target BNG is the home BNG of the first user, or may be the same as the first user.
- the BNG that is the closest to the BNG 1) if the target BNG is the home BNG of the first user, the first BNG sends the user message to the home BNG of the first user, so that the The home BNG of the first user directly processes the user message (such as the above-mentioned user online process of the present invention, which is not described herein again); 2) if the target BNG is closest to the first user's home BNG BNG, the target BNG determines whether it is the same as the first BNG The home BNG of the first user (not described here), and so on, until the user message is forwarded to the home BNG of the first user, so that the home BNG of the first user processes the user message (If the above-mentioned user online process is executed in the present invention, it will not be described here).
- the first BNG encapsulates the user message, and forwards the encapsulated user message to the home BNG of the first user according to the P2P routing table.
- the first BNG compares the hash value of the first user with the ID of the at least one subsequent BNG; 1) if the hash value of the first user belongs to the At least one The ID range of the first subsequent BNG in the subsequent BNG (for example, the hash value of the first user is greater than the ID of the predecessor BNG of the first subsequent BNG, and is less than or equal to the ID of the first subsequent BNG,
- the ID of the predecessor BNG is saved in each BNG, and the first subsequent BNG is determined to be the home BNG of the first user, and the user message is sent to the first successor.
- the first subsequent BNG processes the user message; 2) if the hash value of the first user does not belong to an ID range of any one of the at least one subsequent BNG, the Transmitting the user packet to the second subsequent BNG, so that the second subsequent BNG forwards the user packet to the home BNG of the first user; wherein the second subsequent BNG is the first user a BNG corresponding to a minimum difference (positive number) of the IDs in the at least one subsequent BNG (ie, a BNG that is closest to the home BNG of the first user), such as a hash value of the first user 38, the at least one successor BNG includes: BNG2 (ID is 20), BNG3 (ID is 30), and BNG4 (ID is 50), wherein the first If the difference between the hash value of the user and the ID of the BNG3 is the smallest, the BNG3 is the second subsequent BNG, and the user message is sent to the second subsequent BNG, and the second subsequent BNG is in accordance with the The same
- the first BNG determines that it is not the home BNG of the first user (such as a PC), as indicated by the arrow of the second form in FIG. 1A, Determining, by the first BNG, the hash value of the first user and the P2P routing table (including at least the ID of the BNG2 and the IP address of the BNG2) that the hash value of the first user belongs to the ID range of the BNG2 (for example, The first BNG sends the user message to the BNG2 according to the IP address of the BNG2, where the hash value of the first user is greater than the ID of the BNG2 of the BNG2 and is less than or equal to the ID of the BNG2.
- the first BNG encapsulates the user message (such as a line request message) into a user datagram.
- the encapsulated user packet is forwarded to the BNG2 according to the P2P routing table, and further, the BNG2 decapsulates the original of the first user.
- User message ie, user message before encapsulation
- processing the user message such as performing the above invention
- the method of the embodiment of the present invention is applied to a BNG cluster system including at least two BNGs, wherein Each of the BNGs manages at least one user based on a DHT algorithm; when the first BNG in the BNG cluster system receives a user message from the first user, the first BNG determines whether the first BNG is the If the first BNG is determined to be the home BNG of the first user, the first BNG processes the user message; if it is determined that the first BNG is not the And the first BNG forwards the user packet to the home BNG of the first user according to the P2P routing table, so that the home BNG of the first user processes the user packet.
- the BNG cluster system includes at least two BNGs, and of course, may include multiple BNGs, which can enhance the scalability of the system, and at the same time, the introduction of the P2P technology with self-organization is simplified. Configuration management and maintenance of networks and devices, as well as automatic load balancing.
- the home BNG of the first user directly processes the online request message after receiving the online request message. Then, if the home BNG of the first user receives the online request message of the first user that is forwarded by the other BNG, the online receiving message can be directly discarded, and no processing is required.
- the method further includes: the first BNG Determining whether the first user has gone online; determining that the first user is not online.
- the method further includes: if it is determined that the first user is online, the first BNG forwards the user packet to a network.
- the switch sends the user packet (that is, the online request packet) sent by the first user (such as a PC) to the first BNG, optionally, 1) the user sent by the authenticated user. a packet, the switch may forward the user packet to the specified BNG according to the Layer 2 forwarding MAC address entry (optionally including: a MAC address and an egress port). The designated BNG); 2) For the user message sent by the user who has not passed the authentication, the switch sends the user message to any BNG (in this case, the first BNG corresponds to the arbitrary BNG).
- the first BNG corresponds to the arbitrary BNG.
- the first BNG determines whether the first user is online.
- the first BNG is configured according to the identifier information of the first user and a user online table (optionally, the user online table) It includes: the MAC address of the online user, the user source port of the online user, the user type of the online user, the user status of the online user, and the user who has already gone online.
- the IP address and the user VLAN tag of the user that has been online are used to determine whether the first user is online; wherein the identifier information of the first user includes any one or more of the following information: a source MAC address, The source IP address and the virtual local area network VLAN tag; optionally, the first BNG queries the user online table by using the identification information of the first user, and determines whether the user has gone online, 1) if the user goes online If the first user is not online, the step of determining whether the first BNG is the home BNG of the first user is performed in step S101; 2)
- the user online information includes the user information of the first user, and the first BNG is performed, and the first BNG performs normal traffic forwarding, for example, forwarding the user packet to the network.
- the first user may be determined to be online in other manners, which is not limited in the embodiment of the present invention.
- FIG. 2A is a schematic flowchart of a second embodiment of a packet processing method according to the present invention.
- FIG. 2B is a schematic diagram of a user migration application scenario in a BNG cluster system according to the present invention
- FIG. 2C is a second schematic flowchart of a second embodiment of a packet processing method according to the present invention.
- 2D is a first schematic diagram of a BNG cluster system of the present invention.
- the embodiment of the present invention further includes:
- the first BNG backs up user information of the second BNG in real time.
- the second BNG is a predecessor BNG of the first BNG, and the first BNG is a hot backup node of the second BNG.
- real-time backup of user information is performed between each BNG based on the P2P protocol; as shown in FIG. 2B, the first BNG (such as BNG1 in FIG. 2B) backs up the second BNG in real time (as shown in FIG. 2B).
- User information of BNG3 wherein the second BNG (such as BNG3 in FIG. 2D) is a precursor BNG of the first BNG, and the first BNG (such as BNG1 in FIG.
- 2D is the second BNG Hot backup node (ie, direct successor node); optionally, taking the chord protocol as an example, each node has a number of successor nodes (optionally including a direct successor node and at least one indirect successor node), which can be directly
- the successor node acts as a hot standby node
- the indirect successor node acts as a warm backup node (so that when the hot standby node also fails, the warm backup node performs service recovery).
- the first BNG when the first BNG detects that the second BNG is faulty, the first BNG directly takes over the second BNG because the first BNG is a hot standby node of the second BNG.
- BNG service optionally, the first BNG notifies its own MAC address to the a user of the second BNG, so that the user migrates the uplink traffic of the user from the second BNG to the first BNG, and the first BNG sends a free address resolution protocol to the user by using the first BNG.
- the method of the ARP is used to notify the user, and the first BNG sends a protocol packet for indicating the route update to the network side, so as to migrate the downlink traffic of the network side from the second BNG to the First BNG.
- the first BNG may detect whether the second BNG is faulty in an existing manner, and is not repeatedly described in the embodiment of the present invention.
- the first BNG starts a stabilization process to update topology information.
- the first BNG starts the stabilization process to update the topology information.
- the chord protocol is taken as an example, and the BNGs are sequentially started to be stabilized along the chord ring. (Stabilize) process update topology.
- each BNG further backs up user data in real time according to the updated topology information. For example, the hot standby node backs up the user information of the predecessor node corresponding to the node in real time.
- the stabilization process is similar to a standard P2P process, as node n sends a message to its successor node p, which is used to indicate that the successor node p returns the precursor node of the successor node p; node n receives the successor node
- the precursor node of p if the precursor node of the successor node p is still n, indicates that there is no change; if the precursor node of the successor node p is o (between n and p), it indicates that node o is a newly joined node, node n Notify node o, change its precursor to n, and n will modify itself to o.
- the first BNG backs up the user information of the second BNG in real time; wherein the second BNG is the predecessor BNG of the first BNG; further, when the second BNG is detected to be detected In the event of a failure, the first BNG directly takes over the service of the second BNG, and the first BNG initiates the stabilization process to update the topology information.
- the P2P hot standby solution is implemented by introducing the P2P technology. Not only has good scalability, but also the reliability of the system is enhanced.
- FIG. 3A is a schematic flowchart of a third embodiment of a BNG clustering system according to the present invention.
- FIG. 3B is a schematic diagram of a BNG clustering system according to the present invention.
- FIG. 3C is a schematic diagram of a BNG clustering system according to the present invention.
- FIG. 4, FIG. 3E is a schematic diagram 5 of the BNG cluster system of the present invention.
- the embodiment of the present invention further includes:
- the first BNG acquires a BNG list.
- the first BNG obtains a BNG list.
- the management plane determines that the BNG needs to be added, the management plane sends the BNG to be added to the BNG (such as the first BNG).
- the reason for adding a new BNG usually includes the following two situations: 1) Some nodes in the system are overloaded, and a new BNG node needs to be inserted behind the overloaded BNG node to migrate some users of the overloaded BNG node to the new BNG node.
- the new BNG node is used for load sharing
- the new BNG node needs to be inserted into the current topology (such as the tail of the Chord ring).
- the BNG list includes at least: the overloaded BNG node.
- the first BNG is added to the BNG cluster system.
- the first BNG (such as BNG5 in FIG. 3B) is added to the BNG cluster system; optionally, the first BNG is directed to the third BNG (where The third BNG is a BNG in the BNG list, and the BNG1 in FIG. 3B sends a query request (wherein the query request is used to: query the ID of the direct successor BNG of the third BNG);
- the third BNG is the overloaded BNG node when the reason for adding the new BNG is the first case; further, the first BNG is directly followed by the BNG of the third BNG (as shown in FIG. 3B).
- the BNG4 sends a first notification message, where the first notification message is used to indicate that the direct successor BNG of the third BNG uses the first BNG as a predecessor BNG; further, the first BNG is to the first
- the third BNG sends a second notification message, where the second notification message is used to indicate that the third BNG uses the first BNG as a direct successor BNG of the third BNG; that is, the second notification message is used to indicate the location
- the third BNG starts the stabilization process to update the topology information (including the P2P routing table), so that each BNG can learn its own Driving BNG and direct successor BNG information, for example, a chord ring forwards a BNG node to notify the start of the Stabilize process update topology until returning to the first BNG stop, ie as shown in FIG.
- the first BNG is a direct successor BNG of BNG1 as in FIG. 3E, the first BNG backs up user information of its predecessor BNG (such as BNG1 in FIG. 3E) in real time.
- the method further includes: the first BNG calculating an ID of the first BNG according to a DHT algorithm, so as to determine that the first BNG is in a P2P network topology ( a location in the chord ring, and sending the ID of the first BNG to a BNG in the P2P network, so that the BNG retrieves the routing table according to the ID of the first BNG and returns the first BNG The direct successor of the BNG ID.
- the first BNG after the first BNG obtains the BNG list, the first BNG The BNG cluster system is added to the BNG cluster system. It can be seen that, in the embodiment of the present invention, the B2 joining scheme is implemented by introducing the P2P technology, which has good scalability.
- FIG. 4 is a schematic flowchart diagram of Embodiment 4 of a packet processing method according to the present invention.
- the embodiment of the present invention further includes:
- the first BNG migrates the saved user information to the fourth BNG.
- the first BNG when the first BNG receives the message instruction sent by the management plane for indicating the migration user, the first BNG will save the user information (not only the first
- the user information of the BNG itself may also include the backup user information of the precursor BNG of the first BNG to migrate to the fourth BNG; wherein the fourth BNG is a direct successor BNG of the first BNG (the said A direct successor BNG of a BNG is a hot backup node of the first BNG.
- the first BNG sends a third notification message to the second BNG.
- the first BNG sends a third notification message to the second BNG (for the predecessor BNG of the first BNG);
- the third notification message is used to indicate that the second BNG uses the fourth BNG as a direct successor BNG of the second BNG.
- the first BNG sends a fourth notification message to the fourth BNG.
- the first BNG sends a fourth notification message to the fourth BNG; wherein the fourth notification message is used to indicate:
- the fourth BNG uses the second BNG as a precursor BNG of the fourth BNG.
- the first BNG migrates the saved user information to the direct successor BNG of the first BNG; further, the first BNG passes the predecessor BNG to the first BNG and the The direct successor BNG of the first BNG sends a notification message for instructing to update the P2P network topology information (that is, the respective predecessor BNG and the direct successor BNG after the topology is updated).
- the BNG is implemented by introducing the P2P technology.
- the departure plan has good scalability.
- FIG. 5 is a schematic structural view of a first embodiment of a BNG according to the present invention.
- the BNG provided in this embodiment may be a first BNG, and the first BNG belongs to a BNG cluster system; the BNG cluster system includes: at least two BNGs, and the first BNG manages at least one based on a distributed hash table DHT algorithm.
- the BNG 50 provided in this embodiment includes:
- the receiving module 501 is configured to receive a user message from the first user.
- the first determining module 502 is configured to determine whether the first BNG is the home BNG of the first user, and the home BNG of the first user is a BNG that manages the first user.
- the processing module 503 is configured to process the user message if the first determining module determines that the first BNG is the home BNG of the first user;
- the forwarding module 504 is configured to forward the user packet to the home BNG of the first user according to the P2P routing table, if the first determining module determines that the first BNG is not the home BNG of the first user.
- the user BNG is processed by the home BNG of the first user, where the P2P routing table is used to indicate at least one successor BNG of the first BNG.
- the first determining module 502 is configured to:
- the hash value of the first user belongs to the ID range of the first BNG, determining that the first BNG is the home BNG of the first user;
- the hash value of the first user does not belong to the ID range of the first BNG, it is determined that the first BNG is not the home BNG of the first user.
- the forwarding module 504 is configured to:
- the hash value of the first user belongs to the ID range of the first subsequent BNG, determining that the first subsequent BNG is the home BNG of the first user, and sending the user packet to the first a subsequent BNG; wherein the first subsequent BNG is a BNG in the at least one subsequent BNG;
- the user message is sent to the second subsequent BNG, so that the second subsequent BNG will be Transmitting the user packet to the home BNG of the first user, where the second subsequent BNG is the minimum value of the difference between the hash value of the first user and the ID of the at least one subsequent BNG. BNG.
- the forwarding module 504 is specifically configured to:
- Encapsulating the user packet, and using the P2P routing table to encapsulate the encapsulated user packet to the The home BNG of the first user is forwarded.
- FIG. 6 is a schematic structural diagram of Embodiment 2 of the BNG according to the present invention.
- BNG also includes:
- the second determining module 505 is configured to determine whether the first user is online
- the first determining module 502 is configured to determine whether the first BNG is the home BNG of the first user;
- the forwarding module 504 is further configured to forward the user packet to the network.
- the second determining module 505 is specifically configured to:
- the identifier information of the first user includes any one or more of the following information: source media Access control MAC address, source IP address, and virtual local area network VLAN tag.
- the user online list includes: the MAC address of the online user, the user source port of the online user, the user type of the online user, and the user status of the online user.
- the BNG of any of the foregoing embodiments may be used to implement the technical solution in the first embodiment of the packet processing method of the present invention.
- the implementation principle and technical effects are similar, and details are not described herein again.
- FIG. 7 is a schematic structural diagram of Embodiment 3 of the BNG according to the present invention.
- the BNG further includes:
- the backup module 506 is configured to back up user information of the second BNG in real time; wherein the second BNG is a predecessor BNG of the first BNG, and the first BNG is a hot backup node of the second BNG;
- the takeover module 507 is configured to directly take over the service of the second BNG when it is detected that the second BNG fails;
- the update module 508 is configured to start the stabilization process to update the topology information.
- the takeover module 507 is configured to:
- a protocol packet indicating a route update is sent to the network side.
- the BNG of the embodiment of the present invention may be used to perform the technical solution in the second embodiment of the foregoing packet processing method of the present invention, and the implementation principle and the technical effect are similar, and details are not described herein again.
- FIG. 8 is a schematic structural diagram of Embodiment 4 of the BNG according to the present invention.
- the BNG further includes:
- the obtaining module 509 is configured to obtain a BNG list, where the BNG list includes: at least one BNG in the BNG cluster system;
- the module 510 is added to join the BNG cluster system.
- the adding module 510 is configured to:
- the third BNG is a BNG in the BNG list;
- the query request is used to: query an ID of a direct successor BNG of the third BNG;
- the first notification message is used to indicate that the direct successor BNG of the third BNG uses the first BNG as a predecessor BNG;
- the second notification message is used to indicate that the third BNG uses the first BNG as a direct successor BNG.
- the BNG further includes:
- a calculating module configured to calculate an ID of the first BNG according to a DHT algorithm.
- the BNG of the embodiment of the present invention may be used to implement the technical solution in the third embodiment of the foregoing packet processing method of the present invention, and the implementation principle and technical effects are similar, and details are not described herein again.
- FIG. 9 is a schematic structural diagram of Embodiment 5 of the BNG according to the present invention.
- the BNG further includes:
- the migration module 511 is configured to migrate the saved user information to the fourth BNG; wherein the fourth BNG is a direct successor BNG of the first BNG;
- a first notification module 512 configured to send a third notification message to the second BNG, where the second BNG is a predecessor BNG of the first BNG, and the third notification message is used to indicate: the second BNG Using the fourth BNG as a direct successor BNG of the second BNG;
- a second notification module 513 configured to send a fourth notification message to the fourth BNG, where the fourth notification message is used to indicate that the fourth BNG uses the second BNG as a precursor BNG of the fourth BNG .
- the BNG of the embodiment of the present invention can be used to perform the technical solution in the fourth embodiment of the foregoing packet processing method of the present invention, and the implementation principle and the technical effect are similar, and details are not described herein again.
- FIG. 10 is a schematic structural view of a sixth embodiment of a BNG according to the present invention.
- the BNG provided in this embodiment may be a first BNG, and the first BNG belongs to a BNG cluster system; the BNG cluster system includes: At least two BNGs, the first BNG managing at least one user based on a distributed hash table DHT algorithm.
- the BNG 100 provided in this embodiment may include a processor 1001 and a memory 1002.
- the BNG 100 can also include a transceiver 1003 that can be coupled to the processor 1001; wherein the transceiver 1003 is configured to transceive data or messages, the memory 1002 is configured to store execution instructions, and the processor 1001 is configured to perform execution in the memory 1002
- the instructions cause the BNG to perform the operations in any of the above described message processing methods.
- the BNG of this embodiment may be used to perform the technical solution in any of the foregoing packet processing methods of the present invention.
- the implementation principle and technical effects are similar, and details are not described herein again.
- the BNG cluster system includes: at least two first BNGs; wherein each of the first BNGs manages at least one user based on a distributed hash table DHT algorithm;
- the BNG can adopt the structure of the foregoing BNG Embodiments 1 to 6 of the present invention, and correspondingly, the technical solution in any of the foregoing packet processing methods can be executed, and the implementation principle and the technical effects are similar, and details are not described herein again.
- the disclosed apparatus and method may be implemented in other manners.
- the device embodiments described above are merely illustrative.
- the division of the unit is only a logical function division.
- there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
- the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
- the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
- each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
- the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
- the above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium.
- the above software functional unit is stored in a storage medium, including several fingers
- the steps used to cause a computer device (which may be a personal computer, server, or network device, etc.) or a processor to perform the methods described in various embodiments of the present invention.
- the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .
- the aforementioned program can be stored in a computer readable storage medium.
- the program when executed, performs the steps including the foregoing method embodiments; and the foregoing storage medium includes various media that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Theoretical Computer Science (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
本申请要求于2015年12月31日提交中国专利局、申请号为CN201511032561.0、发明名称为“报文处理方法、BNG及BNG集群系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application filed on Dec. 31, 2015, the Chinese Patent Application No. CN201511032561.0, and the invention titled "Message Processing Method, BNG and BNG Cluster System", the entire contents of which are incorporated by reference. Combined in this application.
本发明实施例涉及计算机网络技术,尤其涉及一种报文处理方法、BNG及BNG集群系统。The embodiments of the present invention relate to a computer network technology, and in particular, to a packet processing method, a BNG, and a BNG cluster system.
由于宽带接入服务器(Broadband Remote Access Server,BRAS)具有灵活的接入认证方式、有效的地址管理功能、强大的用户管理功能,且能提供丰富灵活的业务及控制功能,BRAS作为宽带接入网关(Broadband NetworkGateway,简称BNG)的一种类型被广泛运用于网络中。The Broadband Access Server (BRAS) has flexible access authentication, effective address management, powerful user management, and provides flexible and flexible services and control functions. The BRAS acts as a broadband access gateway. One type of (Broadband NetworkGateway, BNG for short) is widely used in networks.
现有技术中,通常采用双机BNG或者单机虚拟带宽接入网关(vitualBroadband Network Gateway,简称vBNG)。其中,双机BNG中包括:一台主用BNG和一台备份BNG;所述备份BNG实时备份所述主用BNG中的用户信息,以便当所述主用BNG发生故障时,所述备份BNG接管所述主用BNG的业务;单机vBNG是指一个虚拟机中部署一个vBNG。In the prior art, a dual-machine BNG or a single virtual broadband access gateway (VBNG) is usually used. The dual-machine BNG includes: a primary BNG and a backup BNG; the backup BNG backs up user information in the primary BNG in real time, so that when the primary BNG fails, the backup BNG The service of the primary BNG is taken over; the single-machine vBNG refers to a vBNG deployed in a virtual machine.
然而,由于每台BNG或vBNG的处理能力有限,因此,现有技术中的双机BNG或者vBNG只能处理有限数量个用户的消息报文,系统的可扩展能力差。However, due to the limited processing capability of each BNG or vBNG, the dual-machine BNG or vBNG in the prior art can only process message messages of a limited number of users, and the system has poor scalability.
发明内容Summary of the invention
本发明实施例提供一种报文处理方法、BNG及BNG集群系统,不仅增强了系统的可扩展性,还实现了自动负载均衡。The embodiment of the invention provides a packet processing method, a BNG and a BNG cluster system, which not only enhances the scalability of the system, but also implements automatic load balancing.
第一方面,本发明实施例提供一种报文处理方法,所述方法应用于宽带接入网关BNG集群系统;所述BNG集群系统包括:至少两个BNG,所述至少两个BNG包括第一BNG,所述第一BNG基于分布式哈希表DHT算法管理至少一个用户;所述方法包括: In a first aspect, an embodiment of the present invention provides a packet processing method, where the method is applied to a broadband access gateway BNG cluster system; the BNG cluster system includes: at least two BNGs, and the at least two BNGs include a first BNG, the first BNG manages at least one user based on a distributed hash table DHT algorithm; the method includes:
所述第一BNG接收来自第一用户的用户报文,并判断所述第一BNG是否为所述第一用户的归属BNG;所述第一用户的归属BNG为管理所述第一用户的BNG;The first BNG receives the user message from the first user, and determines whether the first BNG is the home BNG of the first user; the home BNG of the first user is the BNG that manages the first user. ;
若确定所述第一BNG是所述第一用户的归属BNG,则所述第一BNG处理所述用户报文;若确定所述第一BNG不是所述第一用户的归属BNG,则所述第一BNG根据P2P路由表将所述用户报文向所述第一用户的归属BNG转发,以使所述第一用户的归属BNG处理所述用户报文;其中,所述P2P路由表用于指示所述第一BNG的至少一个后继BNG。If the first BNG is determined to be the home BNG of the first user, the first BNG processes the user message; if it is determined that the first BNG is not the home BNG of the first user, The first BNG forwards the user packet to the home BNG of the first user according to the P2P routing table, so that the home BNG of the first user processes the user packet; wherein the P2P routing table is used for At least one successor BNG of the first BNG is indicated.
本发明中,当所述BNG集群系统中的第一BNG接收来自第一用户的用户报文时,所述第一BNG通过判断所述第一BNG是否为所述第一用户的归属BNG;进一步地,若确定所述第一BNG是所述第一用户的归属BNG,则所述第一BNG处理所述用户报文;若确定所述第一BNG不是所述第一用户的归属BNG,则所述第一BNG根据P2P路由表将所述用户报文向所述第一用户的归属BNG转发,以使所述第一用户的归属BNG处理所述用户报文。可见,本发明中,所述BNG集群系统包括至少两个BNG,当然也可包括多个BNG,可见,增强了系统的可扩展性,同时通过引入具有自组织的P2P技术不仅简化了网络和设备的配置管理和维护,还可实现自动负载均衡。In the present invention, when the first BNG in the BNG cluster system receives the user message from the first user, the first BNG determines whether the first BNG is the home BNG of the first user; If the first BNG is determined to be the home BNG of the first user, the first BNG processes the user message; if it is determined that the first BNG is not the home BNG of the first user, The first BNG forwards the user packet to the home BNG of the first user according to the P2P routing table, so that the home BNG of the first user processes the user packet. It can be seen that, in the present invention, the BNG cluster system includes at least two BNGs, and of course, may include multiple BNGs, which can enhance the scalability of the system, and not only simplify the network and devices by introducing P2P technology with self-organization. Configuration management and maintenance, as well as automatic load balancing.
结合第一方面,在第一方面的第一种可能的实现方式中,所述判断所述第一BNG是否为所述第一用户的归属BNG,包括:With reference to the first aspect, in a first possible implementation manner of the first aspect, the determining whether the first BNG is the home BNG of the first user includes:
所述第一BNG根据所述第一用户的哈希值以及所述第一BNG的ID进行判断;其中,所述第一用户的哈希值用于唯一标识所述第一用户,所述第一BNG的ID用于唯一标识所述第一BNG;The first BNG is determined according to the hash value of the first user and the ID of the first BNG; wherein the hash value of the first user is used to uniquely identify the first user, The ID of a BNG is used to uniquely identify the first BNG;
若所述第一用户的哈希值属于所述第一BNG的ID范围,则确定所述第一BNG是所述第一用户的归属BNG;If the hash value of the first user belongs to the ID range of the first BNG, determining that the first BNG is the home BNG of the first user;
若所述第一用户的哈希值不属于所述第一BNG的ID范围,则确定所述第一BNG不是所述第一用户的归属BNG。If the hash value of the first user does not belong to the ID range of the first BNG, it is determined that the first BNG is not the home BNG of the first user.
可见,本发明中的每个BNG基于DHT算法都管理至少一个用户,当第一BNG收到用户报文时,通过判断所述第一BNG是否为所述第一用户的归属BNG,若确定自身为所述第一用户的归属BNG时,则处理所述用户报文;若确定自身不是所述第一用户的归属BNG时,则将所述用户报文向所述第一用户的归属BNG转发。可见,不仅增强了系统的可扩展性,还可实现自动负 载均衡。It can be seen that each BNG in the present invention manages at least one user based on the DHT algorithm. When the first BNG receives the user message, it determines whether the first BNG is the home BNG of the first user. If the home BNG is the first user, the user message is processed; if it is determined that the user is not the home BNG of the first user, the user message is forwarded to the home BNG of the first user. . It can be seen that not only the scalability of the system is enhanced, but also the automatic negative Load balancing.
结合第一方面或第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,所述第一BNG根据P2P路由表将所述用户报文向所述第一用户的归属BNG转发,包括:With reference to the first aspect or the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the first BNG sends the user packet to the first according to a P2P routing table. A user's home BNG forwarding, including:
所述第一BNG将所述第一用户的哈希值与所述至少一个后继BNG的ID进行比较;其中,每个所述后继BNG的ID用于唯一标识所述后继BNG;The first BNG compares the hash value of the first user with the ID of the at least one subsequent BNG; wherein, the ID of each subsequent BNG is used to uniquely identify the successor BNG;
若所述第一用户的哈希值属于第一后继BNG的ID范围,则确定所述第一后继BNG为所述第一用户的归属BNG,并将所述用户报文发送给所述第一后继BNG;其中,所述第一后继BNG为所述至少一个后继BNG中的BNG;If the hash value of the first user belongs to the ID range of the first subsequent BNG, determining that the first subsequent BNG is the home BNG of the first user, and sending the user packet to the first a subsequent BNG; wherein the first subsequent BNG is a BNG in the at least one subsequent BNG;
若所述第一用户的哈希值不属于所述至少一个后继BNG中任意一个后继BNG的ID范围,则将所述用户报文发送给第二后继BNG,以使所述第二后继BNG将所述用户报文向所述第一用户的归属BNG转发;其中,所述第二后继BNG为所述第一用户的哈希值与所述至少一个后继BNG中ID的差值最小所对应的BNG。If the hash value of the first user does not belong to the ID range of any one of the at least one subsequent BNG, the user message is sent to the second subsequent BNG, so that the second subsequent BNG will be Transmitting the user packet to the home BNG of the first user, where the second subsequent BNG is the minimum value of the difference between the hash value of the first user and the ID of the at least one subsequent BNG. BNG.
结合第一方面、第一方面的第一种至第二种任一种可能的实现方式,在第一方面的第三种可能的实现方式中,所述第一BNG根据P2P路由表将所述用户报文向所述第一用户的归属BNG转发,包括:With reference to the first aspect, the first to the second possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the first BNG, according to the P2P routing table, The user packet is forwarded to the home BNG of the first user, including:
所述第一BNG封装所述用户报文,并根据所述P2P路由表将封装后的用户报文向所述第一用户的归属BNG转发。The first BNG encapsulates the user packet, and forwards the encapsulated user packet to the home BNG of the first user according to the P2P routing table.
结合第一方面、第一方面的第一种至第三种任一种可能的实现方式,在第一方面的第四种可能的实现方式中,若所述用户报文为所述第一用户的上线请求报文,所述判断所述第一BNG是否为所述第一用户的归属BNG之前,还包括:With reference to the first aspect, the first to the third possible implementation manners of the first aspect, in a fourth possible implementation manner of the first aspect, the user message is the first user The online request message, before the determining whether the first BNG is the home BNG of the first user, the method further includes:
所述第一BNG判断所述第一用户是否已经上线;Determining, by the first BNG, whether the first user is online;
确定所述第一用户未上线。It is determined that the first user is not online.
结合第一方面的第四种可能的实现方式,在第一方面的第五种可能的实现方式中,所述第一BNG判断所述第一用户是否已经上线,包括:In conjunction with the fourth possible implementation of the first aspect, in a fifth possible implementation manner of the first aspect, the first BNG determines whether the first user is online, including:
所述第一BNG根据所述第一用户的标识信息以及用户上线表判断所述第一用户是否已经上线;其中,所述第一用户的标识信息包括以下信息中的任意一种或多种信息的组合:源媒体访问控制MAC地址、源IP地址及虚拟局域网VLAN标签;所述用户上线表中包括:已经上线用户的MAC地址、已 经上线用户的用户源端口、已经上线用户的用户类型、已经上线用户的用户状态、已经上线用户的用户IP地址以及已经上线用户的用户VLAN标签。Determining, by the first BNG, whether the first user has been online according to the identification information of the first user and the user online table; wherein the identifier information of the first user includes any one or more of the following information: The combination of the source media access control MAC address, the source IP address, and the virtual local area network VLAN tag; the user online list includes: the MAC address of the user who has been online, The user source port of the online user, the user type of the online user, the user status of the online user, the user IP address of the online user, and the user VLAN tag of the online user.
结合第一方面的第四种或第五种可能的实现方式,在第一方面的第六种可能的实现方式中,所述第一BNG判断所述第一用户是否已经上线之后,还包括:With reference to the fourth or the fifth possible implementation manner of the first aspect, in a sixth possible implementation manner of the first aspect, after the first BNG determines whether the first user is online, the method further includes:
若确定所述第一用户已上线,则所述第一BNG将所述用户报文转发至网络。If it is determined that the first user is online, the first BNG forwards the user message to the network.
结合第一方面、第一方面的第一种至第六种任一种可能的实现方式,在第一方面的第七种可能的实现方式中,所述方法还包括:With reference to the first aspect, the first to the sixth possible implementation of the first aspect, in a seventh possible implementation manner of the first aspect, the method further includes:
所述第一BNG实时备份第二BNG的用户信息;其中,所述第二BNG为所述第一BNG的前驱BNG,所述第一BNG为所述第二BNG的热备份节点;The first BNG is in real time backing up user information of the second BNG; wherein the second BNG is a predecessor BNG of the first BNG, and the first BNG is a hot backup node of the second BNG;
当检查到所述第二BNG发生故障时,所述第一BNG直接接管所述第二BNG的业务;When it is detected that the second BNG fails, the first BNG directly takes over the service of the second BNG;
所述第一BNG启动稳定化过程更新拓扑信息。The first BNG initiates a stabilization process to update topology information.
结合第一方面的第七种可能的实现方式,在第一方面的第八种可能的实现方式中,所述第一BNG直接接管所述第二BNG的业务,包括:In conjunction with the seventh possible implementation of the first aspect, in an eighth possible implementation manner of the first aspect, the first BNG directly takes over the service of the second BNG, including:
所述第一BNG将自身的MAC地址通知给所述第二BNG的用户;The first BNG notifies the user of the second BNG of its own MAC address;
所述第一BNG向网络侧发送用于指示路由更新的协议报文。The first BNG sends a protocol packet indicating a route update to the network side.
可见,本发明中,通过引入P2P技术实现BNG的热备方案,不仅具有良好的可扩展性,同时系统的可靠性增强。It can be seen that, in the present invention, the hot standby solution of the BNG is realized by introducing the P2P technology, which not only has good scalability, but also enhances the reliability of the system.
结合第一方面、第一方面的第一种至第六种任一种可能的实现方式,在第一方面的第九种可能的实现方式中,所述第一BNG接收来自第一用户的用户报文BNG之前,还包括:With reference to the first aspect, the first to sixth possible implementation manners of the first aspect, in a ninth possible implementation manner of the first aspect, the first BNG receives a user from the first user Before the message BNG, it also includes:
所述第一BNG获取BNG列表;其中,所述BNG列表中包括:所述BNG集群系统中的至少一个BNG;The first BNG obtains a BNG list, where the BNG list includes: at least one BNG in the BNG cluster system;
所述第一BNG加入所述BNG集群系统中。The first BNG is added to the BNG cluster system.
结合第一方面的第九种可能的实现方式,在第一方面的第十种可能的实现方式中,所述第一BNG加入所述BNG集群系统中,包括:In conjunction with the ninth possible implementation of the first aspect, in a tenth possible implementation manner of the foregoing aspect, the first BNG is added to the BNG cluster system, including:
所述第一BNG向第三BNG发送查询请求;其中,所述第三BNG为所述BNG列表中的一个BNG;所述查询请求用于:查询所述第三BNG的直接后继BNG的ID; The first BNG sends a query request to the third BNG; wherein the third BNG is a BNG in the BNG list; the query request is used to: query an ID of a direct successor BNG of the third BNG;
所述第一BNG向所述第三BNG的直接后继BNG发送第一通知消息;所述第一通知消息用于指示:所述第三BNG的直接后继BNG将所述第一BNG作为前驱BNG;The first BNG sends a first notification message to the direct successor BNG of the third BNG; the first notification message is used to indicate that the direct successor BNG of the third BNG uses the first BNG as a predecessor BNG;
所述第一BNG向所述第三BNG发送第二通知消息;所述第二通知消息用于指示:所述第三BNG将所述第一BNG作为直接后继BNG。The first BNG sends a second notification message to the third BNG, where the second notification message is used to indicate that the third BNG uses the first BNG as a direct successor BNG.
结合第一方面的第十种可能的实现方式,在第一方面的第十一种可能的实现方式中,所述第一BNG向第三BNG发送查询请求之前,还包括:In conjunction with the tenth possible implementation of the first aspect, in the eleventh possible implementation manner of the foregoing aspect, before the sending, by the first BNG, the query request to the third BNG, the method further includes:
所述第一BNG根据DHT算法计算所述第一BNG的ID。The first BNG calculates an ID of the first BNG according to a DHT algorithm.
可见,本发明中,通过引入P2P技术实现BNG的加入方案,具有良好的可扩展性。It can be seen that, in the present invention, the introduction scheme of BNG is realized by introducing P2P technology, and has good scalability.
结合第一方面、第一方面的第一种至第十一种任一种可能的实现方式,在第一方面的第十二种可能的实现方式中,所述方法还包括:With reference to the first aspect, the first to the eleventh possible implementation manners of the first aspect, in the twelfth possible implementation manner of the first aspect, the method further includes:
所述第一BNG将保存的用户信息迁移至第四BNG;其中,所述第四BNG为所述第一BNG的直接后继BNG;The first BNG migrates the saved user information to a fourth BNG; wherein the fourth BNG is a direct successor BNG of the first BNG;
所述第一BNG向第二BNG发送第三通知消息;其中,所述第二BNG为所述第一BNG的前驱BNG;所述第三通知消息用于指示:所述第二BNG将所述第四BNG作为所述第二BNG的直接后继BNG;Transmitting, by the first BNG, a third notification message to the second BNG, where the second BNG is a predecessor BNG of the first BNG, and the third notification message is used to indicate that the second BNG is to be a fourth BNG as a direct successor BNG of the second BNG;
所述第一BNG向所述第四BNG发送第四通知消息;所述第四通知消息用于指示:所述第四BNG将所述第二BNG作为所述第四BNG的前驱BNG。The first BNG sends a fourth notification message to the fourth BNG; the fourth notification message is used to indicate that the fourth BNG uses the second BNG as a predecessor BNG of the fourth BNG.
第二方面,本发明实施例提供一种宽带接入网关BNG,所述BNG为第一BNG,所述第一BNG属于BNG集群系统;所述BNG集群系统包括:至少两个BNG,所述第一BNG基于分布式哈希表DHT算法管理至少一个用户;所述第一BNG包括:In a second aspect, the embodiment of the present invention provides a broadband access gateway BNG, where the BNG is a first BNG, the first BNG belongs to a BNG cluster system, and the BNG cluster system includes: at least two BNGs, the A BNG manages at least one user based on a distributed hash table DHT algorithm; the first BNG includes:
接收模块,用于接收来自第一用户的用户报文;a receiving module, configured to receive a user message from the first user;
第一判断模块,用于判断所述第一BNG是否为所述第一用户的归属BNG;所述第一用户的归属BNG为管理所述第一用户的BNG;a first determining module, configured to determine whether the first BNG is a home BNG of the first user; the home BNG of the first user is a BNG that manages the first user;
处理模块,用于若所述第一判断模块确定所述第一BNG是所述第一用户的归属BNG,则处理所述用户报文;a processing module, configured to process the user message if the first determining module determines that the first BNG is the home BNG of the first user;
转发模块,用于若所述第一判断模块确定所述第一BNG不是所述第一用户的归属BNG,则根据P2P路由表将所述用户报文向所述第一用户的归属BNG转发,以使所述第一用户的归属BNG处理所述用户报文;其中,所述 P2P路由表用于指示所述第一BNG的至少一个后继BNG。a forwarding module, configured to forward the user packet to the home BNG of the first user according to the P2P routing table, if the first determining module determines that the first BNG is not the home BNG of the first user, The user BNG is processed by the home BNG of the first user; wherein The P2P routing table is used to indicate at least one successor BNG of the first BNG.
结合第二方面,在第二方面的第一种可能的实现方式中,所述第一判断模块用于:In conjunction with the second aspect, in a first possible implementation manner of the second aspect, the first determining module is configured to:
根据所述第一用户的哈希值以及所述第一BNG的ID进行判断;其中,所述第一用户的哈希值用于唯一标识所述第一用户,所述第一BNG的ID用于唯一标识所述第一BNG;Determining, according to the hash value of the first user and the ID of the first BNG, wherein the hash value of the first user is used to uniquely identify the first user, and the ID of the first BNG is used by Uniquely identifying the first BNG;
若所述第一用户的哈希值属于所述第一BNG的ID范围,则确定所述第一BNG是所述第一用户的归属BNG;If the hash value of the first user belongs to the ID range of the first BNG, determining that the first BNG is the home BNG of the first user;
若所述第一用户的哈希值不属于所述第一BNG的ID范围,则确定所述第一BNG不是所述第一用户的归属BNG。If the hash value of the first user does not belong to the ID range of the first BNG, it is determined that the first BNG is not the home BNG of the first user.
结合第二方面或第二方面的第一种可能的实现方式,在第二方面的第二种可能的实现方式中,所述转发模块用于:With the second aspect or the first possible implementation of the second aspect, in a second possible implementation manner of the second aspect, the forwarding module is configured to:
将所述第一用户的哈希值与所述至少一个后继BNG的ID进行比较;其中,每个所述后继BNG的ID用于唯一标识所述后继BNG;Comparing the hash value of the first user with the ID of the at least one subsequent BNG; wherein, the ID of each of the subsequent BNGs is used to uniquely identify the successor BNG;
若所述第一用户的哈希值属于第一后继BNG的ID范围,则确定所述第一后继BNG为所述第一用户的归属BNG,并将所述用户报文发送给所述第一后继BNG;其中,所述第一后继BNG为所述至少一个后继BNG中的BNG;If the hash value of the first user belongs to the ID range of the first subsequent BNG, determining that the first subsequent BNG is the home BNG of the first user, and sending the user packet to the first a subsequent BNG; wherein the first subsequent BNG is a BNG in the at least one subsequent BNG;
若所述第一用户的哈希值不属于所述至少一个后继BNG中任意一个后继BNG的ID范围,则将所述用户报文发送给第二后继BNG,以使所述第二后继BNG将所述用户报文向所述第一用户的归属BNG转发;其中,所述第二后继BNG为所述第一用户的哈希值与所述至少一个后继BNG中ID的差值最小所对应的BNG。If the hash value of the first user does not belong to the ID range of any one of the at least one subsequent BNG, the user message is sent to the second subsequent BNG, so that the second subsequent BNG will be Transmitting the user packet to the home BNG of the first user, where the second subsequent BNG is the minimum value of the difference between the hash value of the first user and the ID of the at least one subsequent BNG. BNG.
结合第二方面、第二方面的第一种至第二种任一种可能的实现方式,在第二方面的第三种可能的实现方式中,所述转发模块具体用于:With reference to the second aspect, the first to the second possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, the forwarding module is specifically configured to:
封装所述用户报文,并根据所述P2P路由表将封装后的用户报文向所述第一用户的归属BNG转发。The user message is encapsulated, and the encapsulated user message is forwarded to the home BNG of the first user according to the P2P routing table.
结合第二方面、第二方面的第一种至第三种任一种可能的实现方式,在第二方面的第四种可能的实现方式中,若所述用户报文为所述第一用户的上线请求报文,所述BNG还包括:With reference to the second aspect, the first to the third possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, if the user message is the first user The online request message, the BNG further includes:
第二判断模块,用于判断所述第一用户是否已经上线;a second determining module, configured to determine whether the first user is online;
若所述第二判断模块确定所述第一用户未上线,则所述第一判断模块用 于判断所述第一BNG是否为所述第一用户的归属BNG;If the second determining module determines that the first user is not online, the first determining module uses Determining whether the first BNG is the home BNG of the first user;
若所述第二判断模块确定所述第一用户已上线,则所述转发模块还用于将所述用户报文转发至网络。If the second determining module determines that the first user is online, the forwarding module is further configured to forward the user packet to the network.
结合第二方面的第四种可能的实现方式,在第二方面的第五种可能的实现方式中,所述第二判断模块具体用于:With reference to the fourth possible implementation of the second aspect, in a fifth possible implementation manner of the second aspect, the second determining module is specifically configured to:
根据所述第一用户的标识信息以及用户上线表判断所述第一用户是否已经上线;其中,所述第一用户的标识信息包括以下信息中的任意一种或多种信息的组合:源媒体访问控制MAC地址、源IP地址及虚拟局域网VLAN标签;所述用户上线表中包括:已经上线用户的MAC地址、已经上线用户的用户源端口、已经上线用户的用户类型、已经上线用户的用户状态、已经上线用户的用户IP地址以及已经上线用户的用户VLAN标签。Determining, according to the identifier information of the first user, the user online, whether the first user is online; wherein the identifier information of the first user includes any one or more of the following information: source media Access control MAC address, source IP address, and virtual local area network VLAN tag. The user online list includes: the MAC address of the online user, the user source port of the online user, the user type of the online user, and the user status of the online user. The IP address of the user who has been online and the user VLAN tag of the user who has been online.
结合第二方面、第二方面的第一种至第五种任一种可能的实现方式,在第二方面的第六种可能的实现方式中,所述BNG还包括:With reference to the second aspect, the first to the fifth possible implementation manner of the second aspect, in a sixth possible implementation manner of the second aspect, the BNG further includes:
备份模块,用于实时备份第二BNG的用户信息;其中,所述第二BNG为所述第一BNG的前驱BNG,所述第一BNG为所述第二BNG的热备份节点;a backup module, configured to back up user information of the second BNG in real time; wherein the second BNG is a predecessor BNG of the first BNG, and the first BNG is a hot backup node of the second BNG;
接管模块,用于当检查到所述第二BNG发生故障时,直接接管所述第二BNG的业务;a takeover module, configured to directly take over the service of the second BNG when detecting that the second BNG fails;
更新模块,用于启动稳定化过程更新拓扑信息。An update module that is used to initiate the stabilization process to update topology information.
结合第二方面的第六种可能的实现方式,在第二方面的第七种可能的实现方式中,所述接管模块用于:In conjunction with the sixth possible implementation of the second aspect, in a seventh possible implementation of the second aspect, the takeover module is configured to:
将自身的MAC地址通知给所述第二BNG的用户;Notifying the user of the second BNG of its own MAC address;
向网络侧发送用于指示路由更新的协议报文。A protocol packet indicating a route update is sent to the network side.
结合第二方面、第二方面的第一种至第五种任一种可能的实现方式,在第二方面的第八种可能的实现方式中,所述BNG还包括:With reference to the second aspect, the first to the fifth possible implementation manner of the second aspect, in an eighth possible implementation manner of the second aspect, the BNG further includes:
获取模块,用于获取BNG列表;其中,所述BNG列表中包括:所述BNG集群系统中的至少一个BNG;An obtaining module, configured to obtain a BNG list, where the BNG list includes: at least one BNG in the BNG cluster system;
加入模块,用于加入所述BNG集群系统中。A module is added for joining the BNG cluster system.
结合第二方面的第八种可能的实现方式,在第二方面的第九种可能的实现方式中,所述加入模块用于:In conjunction with the eighth possible implementation of the second aspect, in a ninth possible implementation manner of the second aspect, the adding module is used to:
向第三BNG发送查询请求;其中,所述第三BNG为所述BNG列表中的 一个BNG;所述查询请求用于:查询所述第三BNG的直接后继BNG的ID;Sending a query request to the third BNG; wherein the third BNG is in the BNG list a BNG; the query request is used to: query an ID of a direct successor BNG of the third BNG;
向所述第三BNG的直接后继BNG发送第一通知消息;所述第一通知消息用于指示:所述第三BNG的直接后继BNG将所述第一BNG作为前驱BNG;Sending a first notification message to the direct successor BNG of the third BNG; the first notification message is used to indicate that the direct successor BNG of the third BNG uses the first BNG as a predecessor BNG;
向所述第三BNG发送第二通知消息;所述第二通知消息用于指示:所述第三BNG将所述第一BNG作为直接后继BNG。Sending a second notification message to the third BNG; the second notification message is used to indicate that the third BNG uses the first BNG as a direct successor BNG.
结合第二方面的第九种可能的实现方式,在第二方面的第十种可能的实现方式中,所述BNG还包括:In conjunction with the ninth possible implementation of the second aspect, in a tenth possible implementation manner of the second aspect, the BNG further includes:
计算模块,用于根据DHT算法计算所述第一BNG的ID。And a calculating module, configured to calculate an ID of the first BNG according to a DHT algorithm.
结合第二方面、第二方面的第一种至第十种任一种可能的实现方式,在第二方面的第十一种可能的实现方式中,所述BNG还包括:With reference to the second aspect, the first to the tenth possible implementation manners of the second aspect, in the eleventh possible implementation manner of the second aspect, the BNG further includes:
迁移模块,用于将保存的用户信息迁移至第四BNG;其中,所述第四BNG为所述第一BNG的直接后继BNG;a migration module, configured to migrate the saved user information to a fourth BNG; wherein the fourth BNG is a direct successor BNG of the first BNG;
第一通知模块,用于向第二BNG发送第三通知消息;其中,所述第二BNG为所述第一BNG的前驱BNG;所述第三通知消息用于指示:所述第二BNG将所述第四BNG作为所述第二BNG的直接后继BNG;a first notification module, configured to send a third notification message to the second BNG, where the second BNG is a predecessor BNG of the first BNG, and the third notification message is used to indicate that the second BNG is to be The fourth BNG is used as a direct successor BNG of the second BNG;
第二通知模块,用于向所述第四BNG发送第四通知消息;所述第四通知消息用于指示:所述第四BNG将所述第二BNG作为所述第四BNG的前驱BNG。a second notification module, configured to send a fourth notification message to the fourth BNG, where the fourth notification message is used to indicate that the fourth BNG uses the second BNG as a predecessor BNG of the fourth BNG.
第三方面,本发明实施例提供一种宽带接入网关BNG集群系统,包括:至少两个如上述第二方面中任一实现方式所述的第一BNG,其中,每个所述第一BNG基于分布式哈希表DHT算法管理至少一个用户。In a third aspect, the embodiment of the present invention provides a broadband access gateway BNG cluster system, including: at least two first BNGs according to any one of the foregoing second aspects, wherein each of the first BNGs Management of at least one user based on a distributed hash table DHT algorithm.
本发明的方法应用于包括至少两个BNG的BNG集群系统,其中,每个所述BNG基于DHT算法管理至少一个用户;当所述BNG集群系统中的第一BNG接收来自第一用户的用户报文时,所述第一BNG判断所述第一BNG是否为所述第一用户的归属BNG;进一步地,若确定所述第一BNG是所述第一用户的归属BNG,则所述第一BNG处理所述用户报文;若确定所述第一BNG不是所述第一用户的归属BNG,则所述第一BNG根据P2P路由表将所述用户报文向所述第一用户的归属BNG转发,以使所述第一用户的归属BNG处理所述用户报文;可见,本发明中,所述BNG集群系统包括至少两个BNG,当然也可包括多个BNG,可见,增强了系统的可扩展性,同时通过引入具有自组织的P2P技术不仅简化了网络和设备的配置管理和维护,还可实现自动 负载均衡。The method of the present invention is applied to a BNG cluster system including at least two BNGs, wherein each of the BNGs manages at least one user based on a DHT algorithm; when the first BNG in the BNG cluster system receives a user report from the first user The first BNG determines whether the first BNG is the home BNG of the first user; further, if it is determined that the first BNG is the home BNG of the first user, the first The BNG processes the user packet; if it is determined that the first BNG is not the home BNG of the first user, the first BNG sends the user packet to the home BNG of the first user according to the P2P routing table. Forwarding, so that the home BNG of the first user processes the user message; it can be seen that, in the present invention, the BNG cluster system includes at least two BNGs, and of course, may also include multiple BNGs, which are visible and enhance the system. Scalability, while introducing P2P technology with self-organization, not only simplifies configuration management and maintenance of networks and devices, but also automates Load balancing.
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, a brief description of the drawings used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any inventive labor.
图1A为本发明报文处理方法的应用场景示意图一;1A is a schematic diagram 1 of an application scenario of a packet processing method according to the present invention;
图1B为本发明报文处理方法实施例一的流程示意图;1B is a schematic flowchart of Embodiment 1 of a packet processing method according to the present invention;
图1C为本发明BNG设备系统架构图;1C is a system architecture diagram of a BNG device according to the present invention;
图2A为本发明报文处理方法实施例二的流程示意图一;2A is a schematic flowchart 1 of a second embodiment of a packet processing method according to the present invention;
图2B为本发明BNG集群系统中的用户迁移应用场景示意图;2B is a schematic diagram of a user migration application scenario in a BNG cluster system according to the present invention;
图2C为本发明报文处理方法实施例二的流程示意图二;2C is a second schematic flowchart of a second embodiment of a packet processing method according to the present invention;
图2D为本发明BNG集群系统的示意图一;2D is a schematic diagram 1 of a BNG cluster system of the present invention;
图3A为本发明报文处理方法实施例三的流程示意图;3A is a schematic flowchart of Embodiment 3 of a packet processing method according to the present invention;
图3B为本发明BNG集群系统的示意图二;3B is a schematic diagram 2 of a BNG cluster system according to the present invention;
图3C为本发明BNG集群系统的示意图三;3C is a schematic diagram 3 of the BNG cluster system of the present invention;
图3D为本发明BNG集群系统的示意图四;3D is a schematic diagram 4 of the BNG cluster system of the present invention;
图3E为本发明BNG集群系统的示意图五;3E is a schematic diagram 5 of a BNG cluster system of the present invention;
图4为本发明报文处理方法实施例四的流程示意图;4 is a schematic flowchart of Embodiment 4 of a packet processing method according to the present invention;
图5为本发明BNG实施例一的结构示意图;Figure 5 is a schematic structural view of a first embodiment of a BNG according to the present invention;
图6为本发明BNG实施例二的结构示意图;6 is a schematic structural view of a second embodiment of a BNG according to the present invention;
图7为本发明BNG实施例三的结构示意图;7 is a schematic structural view of a third embodiment of a BNG according to the present invention;
图8为本发明BNG实施例四的结构示意图;8 is a schematic structural view of a fourth embodiment of a BNG according to the present invention;
图9为本发明BNG实施例五的结构示意图;9 is a schematic structural view of a fifth embodiment of a BNG according to the present invention;
图10为本发明BNG实施例六的结构示意图。FIG. 10 is a schematic structural view of a sixth embodiment of a BNG according to the present invention.
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于 本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. It is a partial embodiment of the invention, and not all of the embodiments. based on All other embodiments obtained by those skilled in the art without creative efforts are within the scope of the present invention.
现有技术中,通常采用双机BNG;由于每台BNG的处理能力有限,因此,现有技术中的双机BNG只能处理有限数量个用户的消息报文,系统的可扩展能力差。In the prior art, the dual-machine BNG is usually used. Because the processing capability of each BNG is limited, the dual-machine BNG in the prior art can only process message messages of a limited number of users, and the system has poor scalability.
随着网络技术发展,运营商基于现代化的虚拟化技术发起网络功能虚拟化(Network Function Virtualization,简称NFV),将网络功能放到云上,对硬件和软件解耦,避免专有设备供应商的绑定,以降低成本、提高部署业务效率及增加敏捷能力。其中,1)NFV技术的硬件:将网络设备统一到工业化标准的高性能、大容量的服务器、交换机和存储平台;2)NFV技术的平台:基于标准的IT虚拟化技术,能根据需要实例化/迁移到网络功能到任意位置;3)NFV技术的应用:网络功能软件化,能够灵活部署在通用服务器的虚拟化软件上。其中,在基于通用服务器的NFV技术中一个重要的研究领域是单机vBNG(即一个虚拟机中部署一个vBNG),由于通用服务器不是专为数据通信转发设计的,该通用服务器用于数据通信的报文转发时所能提供的系统性能有限,尤其是当数据通信业务叠加的越多,其性能下降越大,因此,基于现有通用服务器的vBras/BNG的系统性能有限,单机vBNG所能够支持的用户数量也有限,从而系统的可扩展能力差。With the development of network technology, operators launch Network Function Virtualization (NFV) based on modern virtualization technology, put network functions on the cloud, decouple hardware and software, and avoid proprietary device vendors. Bind to reduce costs, increase deployment efficiency, and increase agility. Among them, 1) NFV technology hardware: high-performance, high-capacity server, switch and storage platform that unifies network equipment to industrial standards; 2) NFV technology platform: standard-based IT virtualization technology, can be instantiated as needed /Migrate to network function to any location; 3) Application of NFV technology: The network function is softwareized and can be flexibly deployed on the virtualization software of the general server. Among them, an important research field in the general server-based NFV technology is stand-alone vBNG (that is, deploying a vBNG in a virtual machine). Since the general-purpose server is not designed for data communication forwarding, the general-purpose server is used for data communication. The system performance that can be provided when forwarding is limited, especially when the data communication service is superimposed, the performance degradation is greater. Therefore, the system performance of vBras/BNG based on the existing general server is limited, and the single-machine vBNG can support it. The number of users is also limited, so the system's scalability is poor.
基于对等(Peer to Peer,简称P2P)模型应用层形成的网络通常称为对等(P2P)网络;在P2P网络环境中,成千上万台彼此连接的计算机都处于对等的地位,整个网络一般来说不依赖专用的集中服务器,网络中的每一台计算机既能充当网络服务的请求者,又对其它计算机的请求作出响应,提供资源和服务。另外,P2P网络的分布特性通过在多节点上复制数据,也增加了防故障的健壮性,并且在纯P2P网络中,节点不需要依靠一个中心索引服务器来发现数据,系统也不会出现单点崩溃。A network based on Peer to Peer (P2P) model application layer is usually called a peer-to-peer (P2P) network; in a P2P network environment, thousands of computers connected to each other are in a peer-to-peer position. The network generally does not rely on a dedicated centralized server. Each computer in the network can act as both a requester for the network service and a request for other computers to provide resources and services. In addition, the distribution characteristics of P2P networks increase the robustness of fail-safe by replicating data on multiple nodes. In a pure P2P network, nodes do not need to rely on a central index server to discover data, and the system does not appear to have a single point. collapse.
本发明实施例中,提出了基于P2P技术的BNG集群技术,使得基于P2P技术的BNG集群系统能够具有良好的可扩展性,同时简化了网络和设备的配置管理和维护,实现自动负载均衡。In the embodiment of the present invention, a BNG clustering technology based on P2P technology is proposed, which enables the BNG clustering system based on the P2P technology to have good scalability, and simplifies the configuration management and maintenance of the network and the device, and implements automatic load balancing.
本发明实施例中,可选地,多台BNG采用分布式哈希表(Distributed HashTable,简称DHT)算法组成一台分布式BNG,基于DHT算法将用户均匀地分配到相应的BNG上,实现了自动流量均衡。可选地,DHT算法可以采用 如下任意算法:Chord算法、CAN算法、Pastry算法和Tapestry算法等。In the embodiment of the present invention, optionally, multiple BNGs use a Distributed HashTable (DHT) algorithm to form a distributed BNG, and the user is evenly distributed to the corresponding BNG based on the DHT algorithm. Automatic traffic balancing. Alternatively, the DHT algorithm can be employed Any of the following algorithms: Chord algorithm, CAN algorithm, Pastry algorithm and Tapestry algorithm.
可选地,本发明实施例中的BNG可以为vBNG,是一种虚拟化设备。具体地说,该vBNG可以是运行有用于提供BNG设备功能的程序的虚拟机(Virtual Machine),所述虚拟机部署在硬件设备上(例如,物理服务器)。虚拟机指通过软件模拟的具有完整硬件系统功能的、运行在一个完全隔离环境中的完整计算机系统。其中,一个物理服务器通过虚拟化技术被虚拟成了多个逻辑计算机,每一个逻辑计算机即是物理服务器上的一个虚拟机,每个虚拟机可以运行不同的操作系统,因此,各个虚拟机的应用程序可以运行在互相独立的操作系统的空间内。Optionally, the BNG in the embodiment of the present invention may be a vBNG, which is a virtualization device. Specifically, the vBNG may be a virtual machine running a program for providing functions of the BNG device, the virtual machine being deployed on a hardware device (for example, a physical server). A virtual machine is a complete computer system that runs through a software and has full hardware system functionality running in a fully isolated environment. Among them, a physical server is virtualized into multiple logical computers through virtualization technology. Each logical computer is a virtual machine on a physical server, and each virtual machine can run different operating systems. Therefore, applications of each virtual machine Programs can run in separate operating system spaces.
可选地,本发明实施例中的BNG还可以为物理BNG,提供BNG设备功能的程序运行在专用的硬件平台上,该主用的硬件平台包括处理器、发送器、接收器和电路等。Optionally, the BNG in the embodiment of the present invention may also be a physical BNG, and the program that provides the BNG device function runs on a dedicated hardware platform, where the main hardware platform includes a processor, a transmitter, a receiver, and a circuit.
本发明实施例中,将用户作为BNG需要管理的数据,可选地,用户的哈希值(Hash Key)和第一BNG的身份标识号(ID)可以通过所述第一BNG计算得到,也可由管理平面(例如,NFV框架中负责所有的虚拟管理任务的NFV管理与编排部分)指定;其中,所述用户的哈希值可唯一标识所述用户,所述第一BNG的ID可唯一标识所述第一BNG。1A)当所述用户的哈希值通过所述第一BNG计算得到时,可选地,所述第一BNG根据所述用户消息报文的属性信息(源MAC地址、源IP地址及虚拟局域网VLAN标签)或者所述用户的用户名(Username)计算所述用户的哈希值,如采用DHT算法或者其他算法生成;1B)当所述第一BNG的ID通过所述第一BNG计算得到时,可选地,所述第一BNG根据所述第一BNG的Loopback接口IP地址计算自身的ID,如采用DHT算法或者其他算法生成;2)当所述用户的哈希值和所述第一BNG的ID都通过管理平面指定时,所述用户的哈希值为全局唯一的ID标识,以及所述第一BNG的ID为在考虑各个BNG的负载均衡的情况下分配的全局唯一的ID标识,如BNG1的ID为10(用于指示BNG1负责用户哈希值小于等于10的用户),BNG2的ID为20(用于指示BNG2负责用户哈希值大于10且小于等于20的用户),BNG3的ID为30(用于指示BNG3负责用户哈希值大于20且小于等于30的用户)。In the embodiment of the present invention, the user needs to be managed as data of the BNG. Optionally, the hash value of the user and the identification number (ID) of the first BNG can be calculated by using the first BNG. It may be specified by a management plane (eg, an NFV management and orchestration portion of the NFV framework responsible for all virtual management tasks); wherein the hash value of the user may uniquely identify the user, and the ID of the first BNG may be uniquely identified The first BNG. 1A) when the hash value of the user is calculated by using the first BNG, optionally, the first BNG is based on attribute information of the user message (source MAC address, source IP address, and virtual local area network) VLAN tag) or the user name of the user (Username) calculates the hash value of the user, as generated by using a DHT algorithm or other algorithm; 1B) when the ID of the first BNG is calculated by the first BNG Optionally, the first BNG calculates its own ID according to the IP address of the loopback interface of the first BNG, such as by using a DHT algorithm or other algorithm; 2) when the user's hash value and the first When the ID of the BNG is specified by the management plane, the hash value of the user is a globally unique ID identifier, and the ID of the first BNG is a globally unique ID identifier that is allocated in consideration of load balancing of each BNG. For example, the ID of BNG1 is 10 (used to indicate that BNG1 is responsible for users whose user hash value is less than or equal to 10), and the ID of BNG2 is 20 (used to indicate that BNG2 is responsible for users whose user hash value is greater than 10 and less than or equal to 20), BNG3 The ID is 30 (used to indicate that BNG3 is responsible for the user hash value greater than 20 and Users less than or equal to 30).
图1A为本发明报文处理方法的应用场景示意图一,图1B为本发明报文 处理方法实施例一的流程示意图,图1C为本发明BNG设备系统架构图。如图1B所示,本实施例的方法应用于BNG集群系统(如图1A所示的由BNG1、BNG2和BNG3组成的基于P2P技术的BNG集群系统);所述BNG集群系统包括:至少两个BNG(如图1A所示的BNG1、BNG2和BNG3),所述至少两个BNG包括第一BNG(如图1A所示的三个BNG中任意BNG,本实施例以下部分以所述第一BNG为BNG1为例进行详细说明,当所述第一BNG为其它BNG时与BNG1的执行过程类似),所述至少两个BNG之间通过物理端口和物理链路连接,或者通过虚拟端口和虚拟链路连接,该连接关系形成星型、树型和全连接型等各种形式的网络连接拓扑图;其中,所述至少两个BNG采用P2P协议组成一个P2P网络,所述第一BNG基于分布式哈希表DHT算法管理至少一个用户,即所述基于P2P技术的BNG集群系统中的每个BNG基于DHT算法管理至少一个用户(如管理该用户的上网等功能);所述方法可以包括:1A is a schematic diagram of an application scenario of a packet processing method according to the present invention, and FIG. 1B is a packet of the present invention. Process flow diagram of the first embodiment of the processing method, and FIG. 1C is a system architecture diagram of the BNG equipment of the present invention. As shown in FIG. 1B, the method in this embodiment is applied to a BNG cluster system (a BNG cluster system based on P2P technology composed of BNG1, BNG2, and BNG3 as shown in FIG. 1A); the BNG cluster system includes: at least two BNG (BNG1, BNG2, and BNG3 as shown in FIG. 1A), the at least two BNGs include a first BNG (such as any BNG among the three BNGs shown in FIG. 1A, and the following part is the first BNG in this embodiment) For details, the BNG1 is used as an example. When the first BNG is another BNG, the execution process of the BNG1 is similar. The at least two BNGs are connected through physical ports and physical links, or through virtual ports and virtual links. a connection, the connection relationship forming a network connection topology diagram of a star type, a tree type, and a full connection type; wherein the at least two BNGs form a P2P network by using a P2P protocol, and the first BNG is distributed based on The hash table DHT algorithm manages at least one user, that is, each BNG in the P2P technology-based BNG cluster system manages at least one user based on a DHT algorithm (such as a function of managing the user's Internet access); the method may include:
S101、所述第一BNG接收来自第一用户的用户报文,并判断所述第一BNG是否为所述第一用户的归属BNG。S101. The first BNG receives a user packet from the first user, and determines whether the first BNG is a home BNG of the first user.
本步骤中,所述第一BNG接收到由交换机或者其它BNG发送的来自第一用户的用户报文(如上线请求报文或者管理报文等,图1A中以上线请求报文为例进行说明);进一步地,确定该用户报文是否属于所述第一BNG进行处理,可选地,通过判断所述第一BNG是否为所述第一用户的归属BNG(其中,所述第一用户的归属BNG为管理所述第一用户的BNG)。In this step, the first BNG receives the user message from the first user (such as the line request message or the management message, etc.) sent by the switch or other BNG, and the above line request message in FIG. 1A is taken as an example for description. Further, determining whether the user message belongs to the first BNG for processing, optionally, determining whether the first BNG is the home BNG of the first user (wherein the first user The home BNG is a BNG that manages the first user.
可选地,所述第一BNG根据所述第一用户的哈希值以及所述第一BNG的ID,判断所述第一BNG是否为所述第一用户的归属BNG。可选地,所述第一BNG根据所述第一用户的哈希值与所述第一BNG的ID进行比较,判断自身(即所述第一BNG)是否为所述第一用户的归属BNG;若所述第一用户的哈希值属于所述第一BNG的ID范围(如所述第一用户的哈希值为15,所述第一BNG的前驱BNG的ID为10,所述第一BNG的ID为20;可见),则所述第一BNG确定自身是所述第一用户的归属BNG,并执行步骤S102;若所述第一用户的哈希值不属于所述第一BNG的ID范围(如所述第一用户的哈希值为15,所述第一BNG的ID为10),则所述第一BNG确定自身不是所述第一用户的归属BNG,并执行步骤S103。当然,所述第一BNG还可通过其它方式判断自身是否为所述第一用户的归属BNG,本发明实 施例中对此并不作限制。Optionally, the first BNG determines, according to the hash value of the first user and the ID of the first BNG, whether the first BNG is the home BNG of the first user. Optionally, the first BNG compares the hash value of the first user with the ID of the first BNG, and determines whether the self (that is, the first BNG) is the home BNG of the first user. If the hash value of the first user belongs to the ID range of the first BNG (if the hash value of the first user is 15, the ID of the predecessor BNG of the first BNG is 10, the first The ID of a BNG is 20; visible The first BNG determines that it is the home BNG of the first user, and performs step S102; if the hash value of the first user does not belong to the ID range of the first BNG (as described above) A user has a hash value of 15, and the ID of the first BNG is 10), and the first BNG determines that it is not the home BNG of the first user, and performs step S103. Of course, the first BNG may determine, by other means, whether it is the home BNG of the first user, which is not limited in the embodiment of the present invention.
步骤S102、所述第一BNG处理所述用户报文。Step S102: The first BNG processes the user packet.
本发明实施例中,若所述第一BNG(如图1A中所示BNG1)确定自身是所述第一用户的归属BNG(即所述第一BNG负责管理所述第一用户的上网等功能),则所述第一BNG处理所述用户报文;例如,若所述用户报文为上线请求报文且所述第一用户未上线,则所述第一BNG执行用户上线流程(与现有用户上线流程类似),如图1A中第一种形式的箭头所示;若所述用户报文为管理报文,则所述第一BNG处理所述用户报文,可选地,例如若所述管理报文为查询统计报文,则所述第一BNG读取出需要的统计信息并返回给管理平面;当然,所述管理报文还可以为其它报文,对应地,所述第一BNG根据管理报文的不同作相应的不同处理,本公开实施例对此并不作限制。In the embodiment of the present invention, if the first BNG (such as BNG1 shown in FIG. 1A) determines that it is the home BNG of the first user, that is, the first BNG is responsible for managing the first user's Internet access and the like. The first BNG processes the user message; for example, if the user message is an online request message and the first user is not online, the first BNG performs a user online process (currently The user is online, the process is similar, as shown by the arrow in the first form of FIG. 1A; if the user message is a management message, the first BNG processes the user message, optionally, for example, if The management packet is a query statistics packet, and the first BNG reads the required statistics and returns the information to the management plane. Of course, the management packet may also be other packets, correspondingly, the A BNG is processed differently according to different management messages, and the embodiment of the present disclosure does not limit this.
如图1C所示,BNG设备系统包括:BNG内部的用户识别(UserIdentification)模块、连接管理(Connection management)模块、AAA及用户管理模块、地址管理(Address management)模块和业务控制(Service control)模块,以及BNG外部的外部服务器;其中,用户识别模块、AAA及用户管理模块、地址管理模块、业务控制模块等功能部件在连接管理模块的控制协调下,并在外部服务器配合下,实现了各种宽带用户的接入管理及业务控制。其中,1)用户识别模块用于:对用户各种接入协议报文的识别与处理、在用户认证过程中获取用户的物理信息以及用户名和密码,从而为实现用户接入提供信息依据和安全保障;2)连接管理模块用于:负责协调用户识别模块、地址管理模块、AAA及用户管理模块等组件之间的交互关系,协助完成用户连接的建立、维护及拆除等功能;3)AAA代为:认证(Authentication)、授权(Authorization)和计费(Accounting)的简称;其中,认证是识别用户身份的过程;授权是根据认证识别后的用户情况授予对应的网络使用权限,包括服务质量(Quality of Service,简称QoS)、带宽控制、访问权限及用户策略等;计费是根据认证后的用户身份采用对应的计费策略并记录、提供计费信息(时长、流量、位置等);4)地址管理模块用于:负责为接入用户分配IP地址,并对用户IP地址进行管理,以确保IP地址资源得到合理使用;5)业务控制模块用于:负责对用户接入业务和增值业务进行访问权限、带宽、QoS等的控制。另外,为便于运营商统一管理资源,BNG需要与其他通信设备(即外部服务器)配合实现其功能,外部服务器包括:用于负责为用户分配IP地 址的动态主机配置协议(Dynamic Host Configuration Protocol,简称DHCP)服务器、用于负责为用户下发业务策略的策略服务器,如远程用户拨号认证系统(Remote Authentication Dial In User Service,简称RADIUS)服务器,以及用于负责对接入用户进行认证、授权和计费的AAA服务器,如RADIUS服务器、华为终端访问控制器访问控制系统(HuaWei Terminal AccessController Access Control System,简称)服务器等。As shown in FIG. 1C, the BNG equipment system includes: a UserIdentification module, a Connection Management module, an AAA and a user management module, an Address management module, and a Service Control module in the BNG. And an external server external to the BNG; wherein the user identification module, the AAA and the user management module, the address management module, the service control module and the like are implemented under the control coordination of the connection management module, and are implemented by an external server. Access management and service control for broadband users. 1) The user identification module is configured to: identify and process various access protocol packets of the user, obtain physical information of the user, and a user name and password in the process of user authentication, thereby providing information basis and security for realizing user access. 2) The connection management module is used to coordinate the interaction between the user identification module, the address management module, the AAA and the user management module, and assist in the establishment, maintenance and removal of the user connection; 3) AAA generation : Abbreviation for Authentication, Authorization, and Accounting; where authentication is the process of identifying the identity of the user; authorization is granted to the corresponding network usage rights based on the user identity after authentication, including quality of service (Quality) Of Service (QoS), bandwidth control, access rights, and user policies; charging is based on the authenticated user identity and uses the corresponding charging policy to record and provide accounting information (time, traffic, location, etc.); 4) The address management module is configured to: assign an IP address to the access user, and manage the user IP address to ensure The IP address resource is used reasonably; 5) The service control module is used to: control the access rights, bandwidth, QoS, etc. of the user access service and the value-added service. In addition, in order to facilitate the unified management of resources by operators, BNG needs to cooperate with other communication devices (ie, external servers) to implement its functions. The external server includes: responsible for allocating IP addresses to users. Dynamic Host Configuration Protocol (DHCP) server, a policy server responsible for issuing service policies for users, such as a Remote Authentication Dial In User Service (RADIUS) server, and An AAA server that is responsible for authentication, authorization, and accounting for access users, such as a RADIUS server and a Huawei Huawei Terminal Access Controller Access Control System (abbreviation) server.
以下结合图1C,对用户上线流程进行详细说明:The user online process is described in detail below with reference to FIG. 1C:
1、当用户发出连接请求报文到达BNG后,BNG的用户识别模块负责处理该用户报文,从中提取用户的物理位置信息并判断是否允许接入,如果允许接入则向该BNG的连接管理模块发用户连接请求;1. After the user sends a connection request message to the BNG, the BNG user identification module is responsible for processing the user message, extracting the user's physical location information and determining whether access is allowed, and if access is allowed, the BNG connection management is performed. The module sends a user connection request;
2、该连接管理模块根据接入限制等条件判断是否允许该用户接入,如果允许该用户接入,给用户识别模块回应成功;2. The connection management module determines whether the user is allowed to access according to conditions such as access restrictions, and if the user is allowed to access, the user identification module responds successfully;
3、用户识别模块接到连接管理模块成功回应后,通知该用户,进一步地,该用户向用户识别模块发认证请求报文,用户识别模块从报文中提取用户名等认证信息,并将认证信息打包后发送给连接管理模块要求认证;3. After receiving the successful response from the connection management module, the user identification module notifies the user. Further, the user sends an authentication request message to the user identification module, and the user identification module extracts the authentication information such as the user name from the message, and authenticates. After the information is packaged, it is sent to the connection management module for authentication;
4、连接管理模块将来自用户识别模块的认证请求转发给AAA及用户管理模块;4. The connection management module forwards the authentication request from the user identification module to the AAA and the user management module;
5、AAA及用户管理模块根据认证方案、授权方案进行认证和授权,然后将认证结果连同授权信息回应给连接管理模块;5. The AAA and the user management module perform authentication and authorization according to the authentication scheme and the authorization scheme, and then respond to the connection management module with the authentication result together with the authorization information;
6、如果认证成功,连接管理模块向地址管理模块申请IP地址;6. If the authentication is successful, the connection management module applies for an IP address to the address management module;
7、地址管理模块根据用户的地址池信息,采用相应的地址分配策略分配IP地址(远端地址需要到外部的DHCP服务器分配),并将分配结果回应给连接管理模块;7. The address management module allocates an IP address according to the address pool information of the user by using a corresponding address allocation policy (the remote address needs to be allocated to an external DHCP server), and the allocation result is returned to the connection management module;
8、连接管理模块将认证结果连同IP地址一起回应给用户识别模块,用户识别模块与用户交互后,用户即可上线;8. The connection management module responds to the user identification module together with the IP address, and after the user identification module interacts with the user, the user can go online;
9、用户上线后,AAA及用户管理模块、业务控制模块共同负责对用户使用的基本业务、增值业务进行计费、带宽限制、QoS等控制。9. After the user goes online, the AAA and the user management module and the service control module are jointly responsible for controlling the basic services and value-added services used by the user for charging, bandwidth limitation, and QoS.
可选地,本发明实施例中,所述第一BNG的连接管理模块将认证结果连同IP地址一起回应给所述第一BNG的用户识别模块之后,进一步地,所述第一BNG还需要更新用户状态与IP地址等信息。Optionally, in the embodiment of the present invention, after the connection management module of the first BNG responds to the user identification module of the first BNG together with the IP address, the first BNG needs to be updated. Information such as user status and IP address.
S103、所述第一BNG根据P2P路由表将所述用户报文向所述第一用户的 归属BNG转发,以使所述第一用户的归属BNG处理所述用户报文。S103. The first BNG sends the user packet to the first user according to a P2P routing table. The home BNG is forwarded, so that the home BNG of the first user processes the user message.
其中,所述P2P路由表用于指示所述第一BNG的至少一个后继BNG(可选地,所述后继BNG包括:所述第一BNG的直接后继BNG和/或间接后继BNG);可选地,所述P2P路由表中包括:所述第一BNG的L个后继BNG的ID以及每个所述后继BNG的互联网协议IP地址,L为正整数;可选地,所述L个后继BNG可以为所述第一BNG的第2N个后继BNG,N为非负整数(如当L为4时,N可以为0、1、2和4,其中,L的数值大小等于N的数值个数);例如当N为0时,所述第一BNG的第20个后继BNG代表所述第一BNG的第1个后继BNG(即所述第一BNG的直接后继BNG);当N为1时,所述第一BNG的第21个后继BNG代表所述第一BNG的第2个后继BNG(即间接后继BNG)。当然,所述L个后继BNG还可以为通过其它方式确定的所述第一BNG的其它后继BNG,本实施例对此并不作限制。可选地,所述P2P路由表为所述第一BNG基于DHT算法计算生成的。The P2P routing table is used to indicate at least one successor BNG of the first BNG (optionally, the subsequent BNG includes: a direct successor BNG and/or an indirect successor BNG of the first BNG); The P2P routing table includes: an ID of the L subsequent BNGs of the first BNG and an Internet Protocol IP address of each of the subsequent BNGs, where L is a positive integer; optionally, the L subsequent BNGs It may be the first of the 2 N BNG BNG subsequent, non-negative integer N (such as 4 when L is, N may be 0, 1 and 4, where, L is equal to the value of the numerical size of a N number); for example, when N is 0, the second subsequent BNG 0 representing the first of said first BNG BNG BNG of a subsequent (i.e., immediately subsequent to the first BNG BNG); when N 1, the second one represents a first follow-BNG BNG BNG the first of two subsequent BNG (i.e. subsequent indirect BNG). Of course, the L subsequent BNGs may also be other subsequent BNGs of the first BNG determined by other means, which is not limited in this embodiment. Optionally, the P2P routing table is generated by the first BNG based on a DHT algorithm calculation.
本发明实施例中,若所述第一BNG确定自身不是所述第一用户的归属BNG,则所述第一BNG根据所述第一用户的哈希值以及所述P2P路由表中所包括的至少一个后继BNG(即L个后继BNG)的ID,确定出ID值与所述第一用户的哈希值最接近的目标BNG,进一步地,所述第一BNG根据所述路由表中所包括的所述目标BNG的IP地址将所述用户报文发送给所述目标BNG;可选地,所述目标BNG为所述第一用户的归属BNG,或者也可为与所述第一用户的归属BNG最相近的BNG;1)若所述目标BNG为所述第一用户的归属BNG,则所述第一BNG将所述用户报文发送给所述第一用户的归属BNG,以使所述第一用户的归属BNG直接处理所述用户报文(如执行本发明上述用户上线流程,此处不再赘述);2)若所述目标BNG为与所述第一用户的归属BNG最相近的BNG,则所述目标BNG按照与所述第一BNG相同的方法确定自身是否为所述第一用户的归属BNG(此处不再赘述),依次类推,直至将所述用户报文转发到所述第一用户的归属BNG,以便所述第一用户的归属BNG处理所述用户报文(如执行本发明上述用户上线流程,此处不再赘述)。可选地,所述第一BNG通过封装所述用户报文,并根据所述P2P路由表将封装后的用户报文向所述第一用户的归属BNG转发。In the embodiment of the present invention, if the first BNG determines that it is not the home BNG of the first user, the first BNG is based on the hash value of the first user and included in the P2P routing table. Determining, by the ID of the at least one successor BNG (ie, L subsequent BNGs), a target BNG whose ID value is closest to the hash value of the first user, and further, the first BNG is included according to the routing table. The IP address of the target BNG is sent to the target BNG; optionally, the target BNG is the home BNG of the first user, or may be the same as the first user. The BNG that is the closest to the BNG; 1) if the target BNG is the home BNG of the first user, the first BNG sends the user message to the home BNG of the first user, so that the The home BNG of the first user directly processes the user message (such as the above-mentioned user online process of the present invention, which is not described herein again); 2) if the target BNG is closest to the first user's home BNG BNG, the target BNG determines whether it is the same as the first BNG The home BNG of the first user (not described here), and so on, until the user message is forwarded to the home BNG of the first user, so that the home BNG of the first user processes the user message (If the above-mentioned user online process is executed in the present invention, it will not be described here). Optionally, the first BNG encapsulates the user message, and forwards the encapsulated user message to the home BNG of the first user according to the P2P routing table.
本步骤中,可选地,所述第一BNG将所述第一用户的哈希值与所述至少一个后继BNG的ID进行比较;1)若所述第一用户的哈希值属于所述至少一 个后继BNG中的第一后继BNG的ID范围(例如,所述第一用户的哈希值大于所述第一后继BNG的前驱BNG的ID,且小于等于所述第一后继BNG的ID,可选地,每个BNG中都保存有其的前驱BNG的ID),则确定所述第一后继BNG为所述第一用户的归属BNG,并将所述用户报文发送给所述第一后继BNG,以使所述第一后继BNG处理所述用户报文;2)若所述第一用户的哈希值不属于所述至少一个后继BNG中任意一个后继BNG的ID范围,则将所述用户报文发送给第二后继BNG,以使所述第二后继BNG将所述用户报文向所述第一用户的归属BNG转发;其中,所述第二后继BNG为所述第一用户的哈希值与所述至少一个后继BNG中ID的差值(正数)最小所对应的BNG(即为与所述第一用户的归属BNG最相近的BNG),例如第一用户的哈希值为38,所述至少一个后继BNG包括:BNG2(ID为20)、BNG3(ID为30)和BNG4(ID为50),其中,所述第一用户的哈希值与BNG3的ID的差值最小,则所述BNG3为所述第二后继BNG,则将所述用户报文发送给第二后继BNG,所述第二后继BNG按照与所述第一BNG相同的方法确定自身是否为所述第一用户的归属BNG(此处不再赘述),依次类推,直至将所述用户报文转发到所述第一用户的归属BNG,以便所述第一用户的归属BNG处理所述用户报文(如执行本发明上述用户上线流程,此处不再赘述)。In this step, optionally, the first BNG compares the hash value of the first user with the ID of the at least one subsequent BNG; 1) if the hash value of the first user belongs to the At least one The ID range of the first subsequent BNG in the subsequent BNG (for example, the hash value of the first user is greater than the ID of the predecessor BNG of the first subsequent BNG, and is less than or equal to the ID of the first subsequent BNG, Optionally, the ID of the predecessor BNG is saved in each BNG, and the first subsequent BNG is determined to be the home BNG of the first user, and the user message is sent to the first successor. a BNG, wherein the first subsequent BNG processes the user message; 2) if the hash value of the first user does not belong to an ID range of any one of the at least one subsequent BNG, the Transmitting the user packet to the second subsequent BNG, so that the second subsequent BNG forwards the user packet to the home BNG of the first user; wherein the second subsequent BNG is the first user a BNG corresponding to a minimum difference (positive number) of the IDs in the at least one subsequent BNG (ie, a BNG that is closest to the home BNG of the first user), such as a hash value of the first user 38, the at least one successor BNG includes: BNG2 (ID is 20), BNG3 (ID is 30), and BNG4 (ID is 50), wherein the first If the difference between the hash value of the user and the ID of the BNG3 is the smallest, the BNG3 is the second subsequent BNG, and the user message is sent to the second subsequent BNG, and the second subsequent BNG is in accordance with the The same method of the first BNG determines whether it is the home BNG of the first user (not described here), and so on, until the user message is forwarded to the home BNG of the first user, so that The user BNG of the first user processes the user message (for example, the above-mentioned user online process is performed in the present invention, and details are not described herein again).
例如,若所述第一BNG(如图1A中所示BNG1)确定自身不是所述第一用户(如PC机)的归属BNG,如图1A中第二种形式的箭头所示,则所述第一BNG根据所述第一用户的哈希值以及P2P路由表(至少包括BNG2的ID和BNG2的IP地址)确定所述第一用户的哈希值属于所述BNG2的ID范围(例如,所述第一用户的哈希值大于BNG2的前驱BNG的ID,且小于等于所述BNG2的ID),则所述第一BNG根据所述BNG2的IP地址将所述用户报文发送给所述BNG2(即为所述第一用户的归属BNG),以使所述BNG2执行用户上线流程;可选地,所述第一BNG将所述用户报文(如上线请求报文)封装到用户数据报协议(User Datagram Protocol,简称UDP)或其它协议中,并根据所述P2P路由表将封装后的用户报文转发到所述BNG2,进一步地,所述BNG2解封装出所述第一用户的原始用户报文(即封装前的用户报文),并处理所述用户报文(如执行本发明上述用户上线流程,此处不再赘述)。For example, if the first BNG (BNG1 as shown in FIG. 1A) determines that it is not the home BNG of the first user (such as a PC), as indicated by the arrow of the second form in FIG. 1A, Determining, by the first BNG, the hash value of the first user and the P2P routing table (including at least the ID of the BNG2 and the IP address of the BNG2) that the hash value of the first user belongs to the ID range of the BNG2 (for example, The first BNG sends the user message to the BNG2 according to the IP address of the BNG2, where the hash value of the first user is greater than the ID of the BNG2 of the BNG2 and is less than or equal to the ID of the BNG2. (that is, the home BNG of the first user), so that the BNG2 performs a user online process; optionally, the first BNG encapsulates the user message (such as a line request message) into a user datagram. In the User Datagram Protocol (UDP) or other protocol, the encapsulated user packet is forwarded to the BNG2 according to the P2P routing table, and further, the BNG2 decapsulates the original of the first user. User message (ie, user message before encapsulation), and processing the user message (such as performing the above invention) The user goes online, and I won't go into details here.)
本发明实施例的方法应用于包括至少两个BNG的BNG集群系统,其中, 每个所述BNG基于DHT算法管理至少一个用户;当所述BNG集群系统中的第一BNG接收来自第一用户的用户报文时,所述第一BNG判断所述第一BNG是否为所述第一用户的归属BNG;进一步地,若确定所述第一BNG是所述第一用户的归属BNG,则所述第一BNG处理所述用户报文;若确定所述第一BNG不是所述第一用户的归属BNG,则所述第一BNG根据P2P路由表将所述用户报文向所述第一用户的归属BNG转发,以使所述第一用户的归属BNG处理所述用户报文;可见,本发明实施例中,所述BNG集群系统包括至少两个BNG,当然也可包括多个BNG,可见,增强了系统的可扩展性,同时通过引入具有自组织的P2P技术不仅简化了网络和设备的配置管理和维护,还可实现自动负载均衡。The method of the embodiment of the present invention is applied to a BNG cluster system including at least two BNGs, wherein Each of the BNGs manages at least one user based on a DHT algorithm; when the first BNG in the BNG cluster system receives a user message from the first user, the first BNG determines whether the first BNG is the If the first BNG is determined to be the home BNG of the first user, the first BNG processes the user message; if it is determined that the first BNG is not the And the first BNG forwards the user packet to the home BNG of the first user according to the P2P routing table, so that the home BNG of the first user processes the user packet. It can be seen that, in the embodiment of the present invention, the BNG cluster system includes at least two BNGs, and of course, may include multiple BNGs, which can enhance the scalability of the system, and at the same time, the introduction of the P2P technology with self-organization is simplified. Configuration management and maintenance of networks and devices, as well as automatic load balancing.
可选地,当所述第一用户的用户报文为广播的上线请求报文时,在所述第一用户的归属BNG在收到所述上线请求报文后直接处理所述上线请求报文后,若所述第一用户的归属BNG再次收到由其它BNG转发过来的所述第一用户的上线请求报文时,可直接丢弃所述上线接收报文,无需重复处理。Optionally, when the user message of the first user is a broadcast online request message, the home BNG of the first user directly processes the online request message after receiving the online request message. Then, if the home BNG of the first user receives the online request message of the first user that is forwarded by the other BNG, the online receiving message can be directly discarded, and no processing is required.
可选地,若所述用户报文为所述第一用户的上线请求报文,所述判断所述第一BNG是否为所述第一用户的归属BNG之前,还包括:所述第一BNG判断所述第一用户是否已经上线;确定所述第一用户未上线。Optionally, if the user packet is an online request message of the first user, and before determining whether the first BNG is the home BNG of the first user, the method further includes: the first BNG Determining whether the first user has gone online; determining that the first user is not online.
可选地,所述第一BNG判断所述第一用户是否已经上线之后,还包括:若确定所述第一用户已上线,则所述第一BNG将所述用户报文转发至网络。Optionally, after the first BNG determines whether the first user is online, the method further includes: if it is determined that the first user is online, the first BNG forwards the user packet to a network.
如图1A所示,交换机将第一用户(如PC机)发送的用户报文(即上线请求报文)发送给第一BNG,可选地,1)对于已经通过认证的用户所发送的用户报文,所述交换机可根据二层转发MAC表项(可选地,包括:MAC地址和出端口)将所述用户报文转发到指定的BNG(此时,所述第一BNG对应所述指定的BNG);2)对于没有通过认证的用户所发送的用户报文,所述交换机将所述用户报文发送给任意BNG(此时,所述第一BNG对应所述任意BNG)。As shown in FIG. 1A, the switch sends the user packet (that is, the online request packet) sent by the first user (such as a PC) to the first BNG, optionally, 1) the user sent by the authenticated user. a packet, the switch may forward the user packet to the specified BNG according to the Layer 2 forwarding MAC address entry (optionally including: a MAC address and an egress port). The designated BNG); 2) For the user message sent by the user who has not passed the authentication, the switch sends the user message to any BNG (in this case, the first BNG corresponds to the arbitrary BNG).
进一步地,所述第一BNG判断所述第一用户是否已经上线,可选地,所述第一BNG根据所述第一用户的标识信息以及用户上线表(可选地,所述用户上线表中包括:已经上线用户的MAC地址、已经上线用户的用户源端口、已经上线用户的用户类型、已经上线用户的用户状态、已经上线用户的用户 IP地址以及已经上线用户的用户VLAN标签)判断所述第一用户是否已经上线;其中,所述第一用户的标识信息包括以下信息中的任意一种或多种信息的组合:源MAC地址、源IP地址及虚拟局域网VLAN标签;可选地,所述第一BNG通过采用所述第一用户的标识信息查询所述用户上线表,判断用户是否已经上线,1)若所述用户上线表中未包括所述第一用户的用户信息,则确定所述第一用户未上线,则执行步骤S101中“判断所述第一BNG是否为所述第一用户的归属BNG”的步骤;2)若所述用户上线表中包括所述第一用户的用户信息,则确定所述第一用户已上线,则所述第一BNG执行正常的流量转发,如将所述用户报文转发至网络。当然,还可通过其他方式判断所述第一用户是否已经上线,本发明实施例中对此并不作限制。Further, the first BNG determines whether the first user is online. Optionally, the first BNG is configured according to the identifier information of the first user and a user online table (optionally, the user online table) It includes: the MAC address of the online user, the user source port of the online user, the user type of the online user, the user status of the online user, and the user who has already gone online. The IP address and the user VLAN tag of the user that has been online are used to determine whether the first user is online; wherein the identifier information of the first user includes any one or more of the following information: a source MAC address, The source IP address and the virtual local area network VLAN tag; optionally, the first BNG queries the user online table by using the identification information of the first user, and determines whether the user has gone online, 1) if the user goes online If the first user is not online, the step of determining whether the first BNG is the home BNG of the first user is performed in step S101; 2) The user online information includes the user information of the first user, and the first BNG is performed, and the first BNG performs normal traffic forwarding, for example, forwarding the user packet to the network. Certainly, the first user may be determined to be online in other manners, which is not limited in the embodiment of the present invention.
图2A为本发明报文处理方法实施例二的流程示意图一,图2B为本发明BNG集群系统中的用户迁移应用场景示意图,图2C为本发明报文处理方法实施例二的流程示意图二,图2D为本发明BNG集群系统的示意图一。在上述图1B所示实施例的基础上,如图2A和图2C所示,本发明实施例还包括:2A is a schematic flowchart of a second embodiment of a packet processing method according to the present invention. FIG. 2B is a schematic diagram of a user migration application scenario in a BNG cluster system according to the present invention, and FIG. 2C is a second schematic flowchart of a second embodiment of a packet processing method according to the present invention. 2D is a first schematic diagram of a BNG cluster system of the present invention. On the basis of the embodiment shown in FIG. 1B, as shown in FIG. 2A and FIG. 2C, the embodiment of the present invention further includes:
S201、所述第一BNG实时备份第二BNG的用户信息。S201. The first BNG backs up user information of the second BNG in real time.
其中,所述第二BNG为所述第一BNG的前驱BNG,所述第一BNG为所述第二BNG的热备份节点。The second BNG is a predecessor BNG of the first BNG, and the first BNG is a hot backup node of the second BNG.
本发明实施例中,基于P2P协议各个BNG之间进行用户信息的实时备份;如图2B所示,所述第一BNG(如图2B中的BNG1)实时备份第二BNG(如图2B中的BNG3)的用户信息,其中,所述第二BNG(如图2D中的BNG3)为所述第一BNG的前驱BNG,所述第一BNG(如图2D中的BNG1)为所述第二BNG的热备份节点(即直接后继节点);可选地,以chord协议为例,每个节点都有若干后继节点(可选地,包括一个直接后继节点和至少一个间接后继节点),可将直接后继节点作为热备份节点,间接后继节点作为温备份节点(以便当热备份节点也发生故障时,该温备份节点进行业务恢复)。In the embodiment of the present invention, real-time backup of user information is performed between each BNG based on the P2P protocol; as shown in FIG. 2B, the first BNG (such as BNG1 in FIG. 2B) backs up the second BNG in real time (as shown in FIG. 2B). User information of BNG3), wherein the second BNG (such as BNG3 in FIG. 2D) is a precursor BNG of the first BNG, and the first BNG (such as BNG1 in FIG. 2D) is the second BNG Hot backup node (ie, direct successor node); optionally, taking the chord protocol as an example, each node has a number of successor nodes (optionally including a direct successor node and at least one indirect successor node), which can be directly The successor node acts as a hot standby node, and the indirect successor node acts as a warm backup node (so that when the hot standby node also fails, the warm backup node performs service recovery).
S202、当检查到所述第二BNG发生故障时,所述第一BNG直接接管所述第二BNG的业务。S202. When it is detected that the second BNG fails, the first BNG directly takes over the service of the second BNG.
本发明实施例中,当第一BNG检查到所述第二BNG发生故障时,由于所述第一BNG为所述第二BNG的热备份节点,则所述第一BNG直接接管所述第二BNG的业务;可选地,所述第一BNG将自身的MAC地址通知给所 述第二BNG的用户,以使所述用户将该用户的上行流量从所述第二BNG迁移到所述第一BNG,如所述第一BNG通过向所述用户发送免费地址解析协议(Address Resolution Protocol,简称ARP)的方式通知所述用户,同时所述第一BNG向网络侧发送用于指示路由更新的协议报文,以将网络侧的下行流量从所述第二BNG迁移到所述第一BNG。可选地,所述第一BNG可通过现有方式检测所述第二BNG是否发生故障,本发明实施例中不再赘述。In the embodiment of the present invention, when the first BNG detects that the second BNG is faulty, the first BNG directly takes over the second BNG because the first BNG is a hot standby node of the second BNG. BNG service; optionally, the first BNG notifies its own MAC address to the a user of the second BNG, so that the user migrates the uplink traffic of the user from the second BNG to the first BNG, and the first BNG sends a free address resolution protocol to the user by using the first BNG. The method of the ARP is used to notify the user, and the first BNG sends a protocol packet for indicating the route update to the network side, so as to migrate the downlink traffic of the network side from the second BNG to the First BNG. Optionally, the first BNG may detect whether the second BNG is faulty in an existing manner, and is not repeatedly described in the embodiment of the present invention.
S203、所述第一BNG启动稳定化过程更新拓扑信息。S203. The first BNG starts a stabilization process to update topology information.
本发明实施例中,在完成用户的接管和流量的切换后,所述第一BNG启动稳定化过程更新拓扑信息,可选地,以chord协议为例,沿着chord环各个BNG依次启动稳定化(Stabilize)过程更新拓扑,在P2P拓扑更新完成后,进一步地,各个BNG按照更新后的拓扑信息实时备份用户数据,如热备份节点实时备份该节点对应的前驱节点的用户信息。可选地,稳定化过程与标准的P2P过程类似,如节点n向其后继节点p发送消息,所述消息用于指示后继节点p返回该后继节点p的前驱节点;节点n收到该后继节点p的前驱节点,如果后继节点p的前驱节点仍然是n,则表明没有变化;如果后继节点p的前驱节点是o(位于n和p之间),则表明节点o是新加入节点,节点n通知节点o,将其前驱修改为n,同时n将自身后继修改为o。In the embodiment of the present invention, after the user's takeover and traffic switching are completed, the first BNG starts the stabilization process to update the topology information. Optionally, the chord protocol is taken as an example, and the BNGs are sequentially started to be stabilized along the chord ring. (Stabilize) process update topology. After the P2P topology update is completed, each BNG further backs up user data in real time according to the updated topology information. For example, the hot standby node backs up the user information of the predecessor node corresponding to the node in real time. Alternatively, the stabilization process is similar to a standard P2P process, as node n sends a message to its successor node p, which is used to indicate that the successor node p returns the precursor node of the successor node p; node n receives the successor node The precursor node of p, if the precursor node of the successor node p is still n, indicates that there is no change; if the precursor node of the successor node p is o (between n and p), it indicates that node o is a newly joined node, node n Notify node o, change its precursor to n, and n will modify itself to o.
本发明实施例中,所述第一BNG通过实时备份第二BNG的用户信息;其中,所述第二BNG为所述第一BNG的前驱BNG;进一步地,当检查到所述第二BNG发生故障时,所述第一BNG直接接管所述第二BNG的业务,并所述第一BNG启动稳定化过程更新拓扑信息;可见,本发明实施例中,通过引入P2P技术实现BNG的热备方案,不仅具有良好的可扩展性,同时系统的可靠性增强。In the embodiment of the present invention, the first BNG backs up the user information of the second BNG in real time; wherein the second BNG is the predecessor BNG of the first BNG; further, when the second BNG is detected to be detected In the event of a failure, the first BNG directly takes over the service of the second BNG, and the first BNG initiates the stabilization process to update the topology information. It can be seen that, in the embodiment of the present invention, the P2P hot standby solution is implemented by introducing the P2P technology. Not only has good scalability, but also the reliability of the system is enhanced.
图3A为本发明报文处理方法实施例三的流程示意图,图3B为本发明BNG集群系统的示意图二,图3C为本发明BNG集群系统的示意图三,图3D为本发明BNG集群系统的示意图四,图3E为本发明BNG集群系统的示意图五。在上述实施例的基础上,如图3A所示,本发明实施例还包括:3A is a schematic flowchart of a third embodiment of a BNG clustering system according to the present invention. FIG. 3B is a schematic diagram of a BNG clustering system according to the present invention. FIG. 3C is a schematic diagram of a BNG clustering system according to the present invention. FIG. 4, FIG. 3E is a schematic diagram 5 of the BNG cluster system of the present invention. On the basis of the foregoing embodiment, as shown in FIG. 3A, the embodiment of the present invention further includes:
S301、所述第一BNG获取BNG列表。S301. The first BNG acquires a BNG list.
本发明实施例中,所述第一BNG获取BNG列表,可选地,当管理平面确定需要加入BNG时,管理平面向待加入BNG(如第一BNG)发送正在运 行的BNG列表;其中,所述BNG列表中包括:所述BNG集群系统中的至少一个BNG。可选地,加入新BNG的原因通常包括如下两种情况:1)系统中有某些节点过载,需要将新BNG节点插入过载BNG节点的后面,将过载BNG节点的部分用户迁移到新BNG节点上(即新BNG节点用于负载分担);2)当上线用户超过了当前分布式BNG所能支持的规格,需要将新BNG节点插入当前拓扑(如chord环的尾部)。对应地,对于第一种情况,所述BNG列表中至少包括:所述过载BNG节点。In the embodiment of the present invention, the first BNG obtains a BNG list. Optionally, when the management plane determines that the BNG needs to be added, the management plane sends the BNG to be added to the BNG (such as the first BNG). A BNG list of rows; wherein the BNG list includes: at least one BNG in the BNG cluster system. Optionally, the reason for adding a new BNG usually includes the following two situations: 1) Some nodes in the system are overloaded, and a new BNG node needs to be inserted behind the overloaded BNG node to migrate some users of the overloaded BNG node to the new BNG node. Up (that is, the new BNG node is used for load sharing); 2) When the online user exceeds the specifications supported by the current distributed BNG, the new BNG node needs to be inserted into the current topology (such as the tail of the Chord ring). Correspondingly, for the first case, the BNG list includes at least: the overloaded BNG node.
S302、所述第一BNG加入所述BNG集群系统中。S302. The first BNG is added to the BNG cluster system.
本发明实施例中,在获取到BNG列表后,所述第一BNG(如图3B中BNG5)便加入所述BNG集群系统中;可选地,所述第一BNG向第三BNG(其中,所述第三BNG为所述BNG列表中的一个BNG,如图3B中BNG1)发送查询请求(其中,所述查询请求用于:查询所述第三BNG的直接后继BNG的ID);可选地,当加入新BNG的原因为上述第一种情况时,所述第三BNG为所述过载BNG节点;进一步地,所述第一BNG向所述第三BNG的直接后继BNG(如图3B中BNG4)发送第一通知消息;所述第一通知消息用于指示:所述第三BNG的直接后继BNG将所述第一BNG作为前驱BNG;进一步地,所述第一BNG向所述第三BNG发送第二通知消息;所述第二通知消息用于指示所述第三BNG将所述第一BNG作为所述第三BNG的直接后继BNG;即所述第二通知消息用于指示所述第三BNG启动稳定化过程更新拓扑信息(包括P2P路由表),从而各个BNG能获知自身的前驱BNG和直接后继BNG等信息,例如沿着chord环向前一个BNG节点通知启动稳定化(Stabilize)过程更新拓扑,直至返回至所述第一BNG停止,即如图3E所示所述第一BNG成功加入该拓扑结构。进一步地,由于所述第一BNG为如图3E中的BNG1的直接后继BNG,则所述第一BNG实时备份其前驱BNG(如图3E中的BNG1)的用户信息。In the embodiment of the present invention, after obtaining the BNG list, the first BNG (such as BNG5 in FIG. 3B) is added to the BNG cluster system; optionally, the first BNG is directed to the third BNG (where The third BNG is a BNG in the BNG list, and the BNG1 in FIG. 3B sends a query request (wherein the query request is used to: query the ID of the direct successor BNG of the third BNG); The third BNG is the overloaded BNG node when the reason for adding the new BNG is the first case; further, the first BNG is directly followed by the BNG of the third BNG (as shown in FIG. 3B). The BNG4) sends a first notification message, where the first notification message is used to indicate that the direct successor BNG of the third BNG uses the first BNG as a predecessor BNG; further, the first BNG is to the first The third BNG sends a second notification message, where the second notification message is used to indicate that the third BNG uses the first BNG as a direct successor BNG of the third BNG; that is, the second notification message is used to indicate the location The third BNG starts the stabilization process to update the topology information (including the P2P routing table), so that each BNG can learn its own Driving BNG and direct successor BNG information, for example, a chord ring forwards a BNG node to notify the start of the Stabilize process update topology until returning to the first BNG stop, ie as shown in FIG. 3E BNG successfully joined the topology. Further, since the first BNG is a direct successor BNG of BNG1 as in FIG. 3E, the first BNG backs up user information of its predecessor BNG (such as BNG1 in FIG. 3E) in real time.
可选地,所述第一BNG向第三BNG发送查询请求之前,还包括:所述第一BNG根据DHT算法计算所述第一BNG的ID,以便确定所述第一BNG在P2P网络拓扑(如chord环)中的位置,并将所述第一BNG的ID发给P2P网络中的某个BNG,以使该BNG根据所述第一BNG的ID通过检索路由表并返回所述第一BNG的直接后继BNG的ID。Optionally, before the first BNG sends the query request to the third BNG, the method further includes: the first BNG calculating an ID of the first BNG according to a DHT algorithm, so as to determine that the first BNG is in a P2P network topology ( a location in the chord ring, and sending the ID of the first BNG to a BNG in the P2P network, so that the BNG retrieves the routing table according to the ID of the first BNG and returns the first BNG The direct successor of the BNG ID.
本发明实施例中,所述第一BNG在获取到BNG列表后,所述第一BNG 便加入所述BNG集群系统中;可见,本发明实施例中,通过引入P2P技术实现BNG的加入方案,具有良好的可扩展性。In the embodiment of the present invention, after the first BNG obtains the BNG list, the first BNG The BNG cluster system is added to the BNG cluster system. It can be seen that, in the embodiment of the present invention, the B2 joining scheme is implemented by introducing the P2P technology, which has good scalability.
图4为本发明报文处理方法实施例四的流程示意图。在上述实施例的基础上,如图4所示,本发明实施例还包括:FIG. 4 is a schematic flowchart diagram of Embodiment 4 of a packet processing method according to the present invention. On the basis of the foregoing embodiment, as shown in FIG. 4, the embodiment of the present invention further includes:
S401、所述第一BNG将保存的用户信息迁移至第四BNG。S401. The first BNG migrates the saved user information to the fourth BNG.
本发明实施例中,可选地,当所述第一BNG接收到管理平面发送的用于指示迁移用户的消息指令时,所述第一BNG将保存的用户信息(不仅仅包括所述第一BNG自身的用户信息,还可能包括所述第一BNG的前驱BNG的备份用户信息)迁移至第四BNG;其中,所述第四BNG为所述第一BNG的直接后继BNG(该所述第一BNG的直接后继BNG为所述第一BNG的热备份节点)。In the embodiment of the present invention, optionally, when the first BNG receives the message instruction sent by the management plane for indicating the migration user, the first BNG will save the user information (not only the first The user information of the BNG itself may also include the backup user information of the precursor BNG of the first BNG to migrate to the fourth BNG; wherein the fourth BNG is a direct successor BNG of the first BNG (the said A direct successor BNG of a BNG is a hot backup node of the first BNG.
S402、所述第一BNG向第二BNG发送第三通知消息。S402. The first BNG sends a third notification message to the second BNG.
本发明实施例中,在将保存的用户信息迁移至所述第四BNG后,所述第一BNG向第二BNG(为所述第一BNG的前驱BNG)发送第三通知消息;其中,所述第三通知消息用于指示:所述第二BNG将所述第四BNG作为所述第二BNG的直接后继BNG。In the embodiment of the present invention, after the saved user information is migrated to the fourth BNG, the first BNG sends a third notification message to the second BNG (for the predecessor BNG of the first BNG); The third notification message is used to indicate that the second BNG uses the fourth BNG as a direct successor BNG of the second BNG.
S403、所述第一BNG向所述第四BNG发送第四通知消息。S403. The first BNG sends a fourth notification message to the fourth BNG.
本发明实施例中,在将保存的用户信息迁移至所述第四BNG后,所述第一BNG向所述第四BNG发送第四通知消息;其中,所述第四通知消息用于指示:所述第四BNG将所述第二BNG作为所述第四BNG的前驱BNG。In the embodiment of the present invention, after the saved user information is migrated to the fourth BNG, the first BNG sends a fourth notification message to the fourth BNG; wherein the fourth notification message is used to indicate: The fourth BNG uses the second BNG as a precursor BNG of the fourth BNG.
本发明实施例中,所述第一BNG将保存的用户信息迁移至所述第一BNG的直接后继BNG;进一步地,所述第一BNG通过分别向所述第一BNG的前驱BNG和所述第一BNG的直接后继BNG发送用于指示更新P2P网络拓扑信息的通知消息(即获知了更新拓扑后各自的前驱BNG和直接后继BNG);可见,本发明实施例中,通过引入P2P技术实现BNG的离开方案,具有良好的可扩展性。In the embodiment of the present invention, the first BNG migrates the saved user information to the direct successor BNG of the first BNG; further, the first BNG passes the predecessor BNG to the first BNG and the The direct successor BNG of the first BNG sends a notification message for instructing to update the P2P network topology information (that is, the respective predecessor BNG and the direct successor BNG after the topology is updated). It can be seen that, in the embodiment of the present invention, the BNG is implemented by introducing the P2P technology. The departure plan has good scalability.
图5为本发明BNG实施例一的结构示意图。本实施例提供的BNG可以为第一BNG,所述第一BNG属于BNG集群系统;所述BNG集群系统包括:至少两个BNG,所述第一BNG基于分布式哈希表DHT算法管理至少一个用
户;如图5所示,本实施例提供的BNG 50包括:FIG. 5 is a schematic structural view of a first embodiment of a BNG according to the present invention. The BNG provided in this embodiment may be a first BNG, and the first BNG belongs to a BNG cluster system; the BNG cluster system includes: at least two BNGs, and the first BNG manages at least one based on a distributed hash table DHT algorithm. use
As shown in FIG. 5, the
接收模块501,用于接收来自第一用户的用户报文;The receiving
第一判断模块502,用于判断所述第一BNG是否为所述第一用户的归属BNG;所述第一用户的归属BNG为管理所述第一用户的BNG;The first determining
处理模块503,用于若所述第一判断模块确定所述第一BNG是所述第一用户的归属BNG,则处理所述用户报文;The
转发模块504,用于若所述第一判断模块确定所述第一BNG不是所述第一用户的归属BNG,则根据P2P路由表将所述用户报文向所述第一用户的归属BNG转发,以使所述第一用户的归属BNG处理所述用户报文;其中,所述P2P路由表用于指示所述第一BNG的至少一个后继BNG。The
可选地,所述第一判断模块502用于:Optionally, the first determining
根据所述第一用户的哈希值以及所述第一BNG的ID进行判断;其中,所述第一用户的哈希值用于唯一标识所述第一用户,所述第一BNG的ID用于唯一标识所述第一BNG;Determining, according to the hash value of the first user and the ID of the first BNG, wherein the hash value of the first user is used to uniquely identify the first user, and the ID of the first BNG is used by Uniquely identifying the first BNG;
若所述第一用户的哈希值属于所述第一BNG的ID范围,则确定所述第一BNG是所述第一用户的归属BNG;If the hash value of the first user belongs to the ID range of the first BNG, determining that the first BNG is the home BNG of the first user;
若所述第一用户的哈希值不属于所述第一BNG的ID范围,则确定所述第一BNG不是所述第一用户的归属BNG。If the hash value of the first user does not belong to the ID range of the first BNG, it is determined that the first BNG is not the home BNG of the first user.
可选地,所述转发模块504用于:Optionally, the
将所述第一用户的哈希值与所述至少一个后继BNG的ID进行比较;其中,每个所述后继BNG的ID用于唯一标识所述后继BNG;Comparing the hash value of the first user with the ID of the at least one subsequent BNG; wherein, the ID of each of the subsequent BNGs is used to uniquely identify the successor BNG;
若所述第一用户的哈希值属于第一后继BNG的ID范围,则确定所述第一后继BNG为所述第一用户的归属BNG,并将所述用户报文发送给所述第一后继BNG;其中,所述第一后继BNG为所述至少一个后继BNG中的BNG;If the hash value of the first user belongs to the ID range of the first subsequent BNG, determining that the first subsequent BNG is the home BNG of the first user, and sending the user packet to the first a subsequent BNG; wherein the first subsequent BNG is a BNG in the at least one subsequent BNG;
若所述第一用户的哈希值不属于所述至少一个后继BNG中任意一个后继BNG的ID范围,则将所述用户报文发送给第二后继BNG,以使所述第二后继BNG将所述用户报文向所述第一用户的归属BNG转发;其中,所述第二后继BNG为所述第一用户的哈希值与所述至少一个后继BNG中ID的差值最小所对应的BNG。If the hash value of the first user does not belong to the ID range of any one of the at least one subsequent BNG, the user message is sent to the second subsequent BNG, so that the second subsequent BNG will be Transmitting the user packet to the home BNG of the first user, where the second subsequent BNG is the minimum value of the difference between the hash value of the first user and the ID of the at least one subsequent BNG. BNG.
可选地,所述转发模块504具体用于:Optionally, the
封装所述用户报文,并根据所述P2P路由表将封装后的用户报文向所述 第一用户的归属BNG转发。Encapsulating the user packet, and using the P2P routing table to encapsulate the encapsulated user packet to the The home BNG of the first user is forwarded.
在上述图5所示的实施例的基础上,图6为本发明BNG实施例二的结构示意图,参照图6,若所述用户报文为所述第一用户的上线请求报文,所述BNG还包括:On the basis of the foregoing embodiment shown in FIG. 5, FIG. 6 is a schematic structural diagram of Embodiment 2 of the BNG according to the present invention. Referring to FIG. 6, if the user packet is an online request message of the first user, BNG also includes:
第二判断模块505,用于判断所述第一用户是否已经上线;The second determining
若所述第二判断模块505确定所述第一用户未上线,则所述第一判断模块502用于判断所述第一BNG是否为所述第一用户的归属BNG;If the second determining
若所述第二判断模块505确定所述第一用户已上线,则所述转发模块504还用于将所述用户报文转发至网络。If the second determining
可选地,所述第二判断模块505具体用于:Optionally, the second determining
根据所述第一用户的标识信息以及用户上线表判断所述第一用户是否已经上线;其中,所述第一用户的标识信息包括以下信息中的任意一种或多种信息的组合:源媒体访问控制MAC地址、源IP地址及虚拟局域网VLAN标签;所述用户上线表中包括:已经上线用户的MAC地址、已经上线用户的用户源端口、已经上线用户的用户类型、已经上线用户的用户状态、已经上线用户的用户IP地址以及已经上线用户的用户VLAN标签。Determining, according to the identifier information of the first user, the user online, whether the first user is online; wherein the identifier information of the first user includes any one or more of the following information: source media Access control MAC address, source IP address, and virtual local area network VLAN tag. The user online list includes: the MAC address of the online user, the user source port of the online user, the user type of the online user, and the user status of the online user. The IP address of the user who has been online and the user VLAN tag of the user who has been online.
上述任一实施例的BNG可以用于执行本发明上述报文处理方法实施例一中的技术方案,其实现原理和技术效果类似,此处不再赘述。The BNG of any of the foregoing embodiments may be used to implement the technical solution in the first embodiment of the packet processing method of the present invention. The implementation principle and technical effects are similar, and details are not described herein again.
在上述图5或图6所示的实施例的基础上,图7为本发明BNG实施例三的结构示意图,参照图7,所述BNG还包括:On the basis of the embodiment shown in FIG. 5 or FIG. 6 , FIG. 7 is a schematic structural diagram of Embodiment 3 of the BNG according to the present invention. Referring to FIG. 7 , the BNG further includes:
备份模块506,用于实时备份第二BNG的用户信息;其中,所述第二BNG为所述第一BNG的前驱BNG,所述第一BNG为所述第二BNG的热备份节点;The
接管模块507,用于当检查到所述第二BNG发生故障时,直接接管所述第二BNG的业务;The
更新模块508,用于启动稳定化过程更新拓扑信息。The
可选地,所述接管模块507用于:Optionally, the
将自身的MAC地址通知给所述第二BNG的用户;Notifying the user of the second BNG of its own MAC address;
向网络侧发送用于指示路由更新的协议报文。A protocol packet indicating a route update is sent to the network side.
本发明实施例的BNG可以用于执行本发明上述报文处理方法实施例二中的技术方案,其实现原理和技术效果类似,此处不再赘述。 The BNG of the embodiment of the present invention may be used to perform the technical solution in the second embodiment of the foregoing packet processing method of the present invention, and the implementation principle and the technical effect are similar, and details are not described herein again.
在上述图5或图6所示的实施例的基础上,图8为本发明BNG实施例四的结构示意图,参照图8,所述BNG还包括:On the basis of the embodiment shown in FIG. 5 or FIG. 6 , FIG. 8 is a schematic structural diagram of Embodiment 4 of the BNG according to the present invention. Referring to FIG. 8 , the BNG further includes:
获取模块509,用于获取BNG列表;其中,所述BNG列表中包括:所述BNG集群系统中的至少一个BNG;The obtaining
加入模块510,用于加入所述BNG集群系统中。The
可选地,所述加入模块510用于:Optionally, the adding
向第三BNG发送查询请求;其中,所述第三BNG为所述BNG列表中的一个BNG;所述查询请求用于:查询所述第三BNG的直接后继BNG的ID;Sending a query request to the third BNG; wherein the third BNG is a BNG in the BNG list; the query request is used to: query an ID of a direct successor BNG of the third BNG;
向所述第三BNG的直接后继BNG发送第一通知消息;所述第一通知消息用于指示:所述第三BNG的直接后继BNG将所述第一BNG作为前驱BNG;Sending a first notification message to the direct successor BNG of the third BNG; the first notification message is used to indicate that the direct successor BNG of the third BNG uses the first BNG as a predecessor BNG;
向所述第三BNG发送第二通知消息;所述第二通知消息用于指示:所述第三BNG将所述第一BNG作为直接后继BNG。Sending a second notification message to the third BNG; the second notification message is used to indicate that the third BNG uses the first BNG as a direct successor BNG.
可选地,所述BNG还包括:Optionally, the BNG further includes:
计算模块,用于根据DHT算法计算所述第一BNG的ID。And a calculating module, configured to calculate an ID of the first BNG according to a DHT algorithm.
本发明实施例的BNG可以用于执行本发明上述报文处理方法实施例三中的技术方案,其实现原理和技术效果类似,此处不再赘述。The BNG of the embodiment of the present invention may be used to implement the technical solution in the third embodiment of the foregoing packet processing method of the present invention, and the implementation principle and technical effects are similar, and details are not described herein again.
在上述图5-图8所示的实施例的基础上,图9为本发明BNG实施例五的结构示意图,参照图9,所述BNG还包括:On the basis of the embodiment shown in FIG. 5 to FIG. 8 , FIG. 9 is a schematic structural diagram of Embodiment 5 of the BNG according to the present invention. Referring to FIG. 9 , the BNG further includes:
迁移模块511,用于将保存的用户信息迁移至第四BNG;其中,所述第四BNG为所述第一BNG的直接后继BNG;The
第一通知模块512,用于向第二BNG发送第三通知消息;其中,所述第二BNG为所述第一BNG的前驱BNG;所述第三通知消息用于指示:所述第二BNG将所述第四BNG作为所述第二BNG的直接后继BNG;a
第二通知模块513,用于向所述第四BNG发送第四通知消息;所述第四通知消息用于指示:所述第四BNG将所述第二BNG作为所述第四BNG的前驱BNG。a
本发明实施例的BNG可以用于执行本发明上述报文处理方法实施例四中的技术方案,其实现原理和技术效果类似,此处不再赘述。The BNG of the embodiment of the present invention can be used to perform the technical solution in the fourth embodiment of the foregoing packet processing method of the present invention, and the implementation principle and the technical effect are similar, and details are not described herein again.
图10为本发明BNG实施例六的结构示意图。本实施例提供的BNG可以为第一BNG,所述第一BNG属于BNG集群系统;所述BNG集群系统包括:
至少两个BNG,所述第一BNG基于分布式哈希表DHT算法管理至少一个用户。如图10所示,本实施例提供的BNG 100可以包括处理器1001和存储器1002。BNG 100还可包括收发器1003,收发器1003可以和处理器1001相连;其中,收发器1003用于收发数据或消息,存储器1002用于存储执行指令,处理器1001用于执行存储器1002中的执行指令使得所述BNG执行上述报文处理方法任意实施例中的操作。FIG. 10 is a schematic structural view of a sixth embodiment of a BNG according to the present invention. The BNG provided in this embodiment may be a first BNG, and the first BNG belongs to a BNG cluster system; the BNG cluster system includes:
At least two BNGs, the first BNG managing at least one user based on a distributed hash table DHT algorithm. As shown in FIG. 10, the
本实施例的BNG可以用于执行本发明上述报文处理方法任意实施例中的技术方案,其实现原理和技术效果类似,此处不再赘述。The BNG of this embodiment may be used to perform the technical solution in any of the foregoing packet processing methods of the present invention. The implementation principle and technical effects are similar, and details are not described herein again.
本发明BNG集群系统的实施例中,所述BNG集群系统包括:至少两个第一BNG;其中,每个所述第一BNG基于分布式哈希表DHT算法管理至少一个用户;所述第一BNG可以采用本发明上述BNG实施例一至实施例六的结构,其对应地,可以执行上述报文处理方法任意实施例中的技术方案,其实现原理和技术效果类似,此处不再赘述。In an embodiment of the BNG cluster system of the present invention, the BNG cluster system includes: at least two first BNGs; wherein each of the first BNGs manages at least one user based on a distributed hash table DHT algorithm; The BNG can adopt the structure of the foregoing BNG Embodiments 1 to 6 of the present invention, and correspondingly, the technical solution in any of the foregoing packet processing methods can be executed, and the implementation principle and the technical effects are similar, and details are not described herein again.
在本发明所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指 令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本发明各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium. The above software functional unit is stored in a storage medium, including several fingers The steps used to cause a computer device (which may be a personal computer, server, or network device, etc.) or a processor to perform the methods described in various embodiments of the present invention. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .
本领域技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。A person skilled in the art can clearly understand that for the convenience and brevity of the description, only the division of each functional module described above is exemplified. In practical applications, the above function assignment can be completed by different functional modules as needed, that is, the device is installed. The internal structure is divided into different functional modules to perform all or part of the functions described above. For the specific working process of the device described above, refer to the corresponding process in the foregoing method embodiment, and details are not described herein again.
本领域普通技术人员可以理解:本文中涉及的第一、第二等各种数字编号仅为描述方便进行的区分,并不用来限制本发明实施例的范围。It is to be understood by those skilled in the art that the claims of the first, second, etc.
本领域普通技术人员可以理解,在本发明的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。It will be understood by those skilled in the art that in various embodiments of the present invention, the size of the sequence numbers of the above processes does not mean the order of execution, and the order of execution of each process should be determined by its function and internal logic, without The implementation of the embodiments of the present invention should be construed as being limited in any way.
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。One of ordinary skill in the art will appreciate that all or part of the steps to implement the various method embodiments described above may be accomplished by hardware associated with the program instructions. The aforementioned program can be stored in a computer readable storage medium. The program, when executed, performs the steps including the foregoing method embodiments; and the foregoing storage medium includes various media that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。 Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, and are not intended to be limiting; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that The technical solutions described in the foregoing embodiments may be modified, or some or all of the technical features may be equivalently replaced; and the modifications or substitutions do not deviate from the technical solutions of the embodiments of the present invention. range.
Claims (19)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201511032561.0 | 2015-12-31 | ||
| CN201511032561.0A CN105704042A (en) | 2015-12-31 | 2015-12-31 | Message processing method, BNG and BNG cluster system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2017114363A1 true WO2017114363A1 (en) | 2017-07-06 |
Family
ID=56226810
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2016/112146 Ceased WO2017114363A1 (en) | 2015-12-31 | 2016-12-26 | Packet processing method, bng and bng cluster system |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN105704042A (en) |
| WO (1) | WO2017114363A1 (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113542013A (en) * | 2021-06-24 | 2021-10-22 | 新华三大数据技术有限公司 | Method, device and equipment for distributing virtualized network function management messages |
| CN114389858A (en) * | 2021-12-24 | 2022-04-22 | 安天科技集团股份有限公司 | Traffic processing method and device, electronic equipment and computer readable storage medium |
| EP4440064A4 (en) * | 2021-12-24 | 2025-03-19 | Huawei Technologies Co., Ltd. | COMMUNICATION METHOD AND APPARATUS, AND COMMUNICATION SYSTEM |
Families Citing this family (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105704042A (en) * | 2015-12-31 | 2016-06-22 | 华为技术有限公司 | Message processing method, BNG and BNG cluster system |
| CN107547318A (en) * | 2016-06-28 | 2018-01-05 | 中兴通讯股份有限公司 | A kind of message transmission control method, device and broadband access system |
| CN106487788B (en) * | 2016-09-30 | 2019-10-29 | 中国联合网络通信集团有限公司 | A kind of user access method, SDN controller, forwarding device and subscriber access system |
| CN112187643B (en) * | 2017-11-28 | 2021-12-10 | 华为技术有限公司 | Packet forwarding method, control plane gateway and user plane gateway |
| CN112737806B (en) * | 2019-10-28 | 2022-05-13 | 华为技术有限公司 | Network traffic migration method and device |
| CN113472676B (en) | 2020-03-31 | 2024-09-06 | 华为技术有限公司 | Network access control method, SDF, CP, UP and network system |
| CN114363285A (en) | 2020-09-28 | 2022-04-15 | 华为技术有限公司 | Address management method, device and system |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20100265824A1 (en) * | 2007-11-09 | 2010-10-21 | Blade Network Technologies, Inc | Session-less Load Balancing of Client Traffic Across Servers in a Server Group |
| CN101969468A (en) * | 2010-10-14 | 2011-02-09 | 广州从兴电子开发有限公司 | Inquiry server cluster system and inquiry method |
| CN104243337A (en) * | 2013-06-09 | 2014-12-24 | 杭州华三通信技术有限公司 | Method and device for cross-cluster load balancing |
| CN105704042A (en) * | 2015-12-31 | 2016-06-22 | 华为技术有限公司 | Message processing method, BNG and BNG cluster system |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20050021836A1 (en) * | 2003-05-01 | 2005-01-27 | Reed Carl J. | System and method for message processing and routing |
| CN100474819C (en) * | 2007-05-17 | 2009-04-01 | 华为技术有限公司 | A deep message detection method, network device and system |
| CN102457568B (en) * | 2010-11-30 | 2013-03-27 | 中国人民解放军国防科学技术大学 | Things information service system and method for processing information on system |
| CN102202228B (en) * | 2011-05-24 | 2012-11-14 | 北京邮电大学 | Method and device for storing and searching video resources |
| CN102868617A (en) * | 2011-07-05 | 2013-01-09 | 中兴通讯股份有限公司 | P2P (peer-to-peer) network routing method and system |
| CN103297352B (en) * | 2012-02-23 | 2017-03-15 | 华为技术有限公司 | A kind of collocation method of access strategy and wideband network gateway |
-
2015
- 2015-12-31 CN CN201511032561.0A patent/CN105704042A/en active Pending
-
2016
- 2016-12-26 WO PCT/CN2016/112146 patent/WO2017114363A1/en not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20100265824A1 (en) * | 2007-11-09 | 2010-10-21 | Blade Network Technologies, Inc | Session-less Load Balancing of Client Traffic Across Servers in a Server Group |
| CN101969468A (en) * | 2010-10-14 | 2011-02-09 | 广州从兴电子开发有限公司 | Inquiry server cluster system and inquiry method |
| CN104243337A (en) * | 2013-06-09 | 2014-12-24 | 杭州华三通信技术有限公司 | Method and device for cross-cluster load balancing |
| CN105704042A (en) * | 2015-12-31 | 2016-06-22 | 华为技术有限公司 | Message processing method, BNG and BNG cluster system |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113542013A (en) * | 2021-06-24 | 2021-10-22 | 新华三大数据技术有限公司 | Method, device and equipment for distributing virtualized network function management messages |
| CN114389858A (en) * | 2021-12-24 | 2022-04-22 | 安天科技集团股份有限公司 | Traffic processing method and device, electronic equipment and computer readable storage medium |
| CN114389858B (en) * | 2021-12-24 | 2023-08-25 | 安天科技集团股份有限公司 | Flow processing method and device, electronic equipment and computer readable storage medium |
| EP4440064A4 (en) * | 2021-12-24 | 2025-03-19 | Huawei Technologies Co., Ltd. | COMMUNICATION METHOD AND APPARATUS, AND COMMUNICATION SYSTEM |
Also Published As
| Publication number | Publication date |
|---|---|
| CN105704042A (en) | 2016-06-22 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12147318B2 (en) | Techniques for replicating state information for high availability | |
| WO2017114363A1 (en) | Packet processing method, bng and bng cluster system | |
| US11128494B2 (en) | Distributed virtual gateway appliance | |
| US10779339B2 (en) | Wireless roaming using a distributed store | |
| US10034201B2 (en) | Stateless load-balancing across multiple tunnels | |
| EP3404878B1 (en) | Virtual network apparatus, and related method | |
| CN103795602B (en) | Network strategy configuration method and device of virtual network | |
| US11398956B2 (en) | Multi-Edge EtherChannel (MEEC) creation and management | |
| US20140068045A1 (en) | Network system and virtual node migration method | |
| WO2015058626A1 (en) | Virtual network function network elements management method, device and system | |
| CN107820043B (en) | Control method, device and system for video surveillance system | |
| US20130297752A1 (en) | Provisioning network segments based on tenant identity | |
| US20220210005A1 (en) | Synchronizing communication channel state information for high flow availability | |
| CN105227541B (en) | A kind of security strategy dynamic migration method and device | |
| CN113364741A (en) | Application access method and proxy server | |
| CN113225252A (en) | Establishment method, processing method and related equipment for Bidirectional Forwarding Detection (BFD) session | |
| CN102316043A (en) | Port virtualization method, switch and communication system | |
| US11528222B2 (en) | Decentralized control plane | |
| WO2022060914A1 (en) | Systems and methods for zero-touch provisioning of a switch in intermediate distribution frames and main distribution frames | |
| CN113545130B (en) | Fast roaming and unified policies for wireless clients using distributed hashing | |
| CN120153359A (en) | Routing in GPU Superclusters | |
| US9736027B2 (en) | Centralized enterprise image upgrades for distributed campus networks | |
| US10931565B2 (en) | Multi-VRF and multi-service insertion on edge gateway virtual machines | |
| EP4272413B1 (en) | Synchronizing communication channel state information for high flow availability | |
| US20250047597A1 (en) | Virtual Network Management Method and Related Apparatus |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16881152 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 16881152 Country of ref document: EP Kind code of ref document: A1 |