CN113132500B - Address allocation method, device, network equipment and storage medium - Google Patents

Address allocation method, device, network equipment and storage medium Download PDF

Info

Publication number
CN113132500B
CN113132500B CN201911398382.7A CN201911398382A CN113132500B CN 113132500 B CN113132500 B CN 113132500B CN 201911398382 A CN201911398382 A CN 201911398382A CN 113132500 B CN113132500 B CN 113132500B
Authority
CN
China
Prior art keywords
address
router
unassigned
main
pools
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911398382.7A
Other languages
Chinese (zh)
Other versions
CN113132500A (en
Inventor
宫碧莲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Huawei Digital Technologies Co Ltd
Original Assignee
Beijing Huawei Digital Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Huawei Digital Technologies Co Ltd filed Critical Beijing Huawei Digital Technologies Co Ltd
Priority to CN201911398382.7A priority Critical patent/CN113132500B/en
Publication of CN113132500A publication Critical patent/CN113132500A/en
Application granted granted Critical
Publication of CN113132500B publication Critical patent/CN113132500B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5061Pools of addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/29Flow control; Congestion control using a combination of thresholds

Abstract

The application discloses an address allocation method, an address allocation device, network equipment and a storage medium, and belongs to the technical field of communication. In the application, when a terminal accesses a network through a VRRP group, a master router in the VRRP group can preferentially select an address to be allocated to the terminal from unassigned addresses included in a master address pool configured under a target domain, so that when the master router does not fail, the total flow of data flows flowing through a link between the master router and a standby router can be reduced, the bandwidth of the link is saved, and the bandwidth wasted on the link can be reduced.

Description

Address allocation method, device, network equipment and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to an address allocation method, an address allocation device, a network device, and a storage medium.
Background
Currently, services such as 4G services, voice over internet protocol (voice over Internet protocol, VOIP) services, etc. have increasingly higher reliability requirements for network devices, i.e. high reliability has become a fundamental requirement for network devices. For the edge router bearing multiple services, as the edge router bears the functions of up and down in the network, namely, the edge router is connected with the core network in an up mode, the three-layer routing function is realized, and the convergence layer is connected in a down mode, so that the terminal access function is realized. Thus, the reliability of the edge router can be guaranteed by deploying a VRRP-group, typically through a virtual routing redundancy protocol (virtual router redundancy protocol, VRRP). In the dual hot standby scenario of the edge router, one VRRP group includes one main router and one standby router, the terminal can access the network by accessing the VRRP group, and both routers can store the user information corresponding to the terminal, so as to ensure that the user service is not interrupted when the traffic is switched to the standby router due to some network or link faults. In order to ensure that a terminal can successfully access a network, an address needs to be selected from an address pool configured by a VRRP group to be allocated to the terminal.
In the related art, one domain (domain) may be configured for one service, a plurality of address pools may be configured under one domain, and terminals accessing the VRRP-group and belonging to the same service may share the address pools under one domain. In addition, one address pool may be configured as a master address pool for one router in the VRRP-set, while being a standby address pool on the other router, i.e. one address pool is master to each other on both routers. When a terminal accesses a network, a target domain may be determined from a plurality of domains configured by the VRRP group according to a service type of a service currently required to be performed by the terminal. And determining a first target address pool comprising unassigned addresses according to the configuration sequence from a plurality of address pools configured under the target domain, and selecting one address from the unassigned addresses comprising the target address pool to be assigned to the terminal. Since the target address pool may be a standby address pool on the primary router, and a primary address pool on the standby router, that is, the standby router has a high priority for the network side, the data stream from the network side is sent to the standby router first, then sent to the primary router through the protection tunnel, and then sent to the terminal by the primary router. Wherein a protection tunnel refers to a communication link between the two routers.
In the related art, the bandwidth of the protection tunnel is limited, and when the data stream from the network side still flows through the protection tunnel on the premise that the access side link of the main router has no fault, the unnecessary wasted bandwidth on the protection tunnel is wasted, and the traffic on the protection tunnel may be excessive to lose the data stream, so that the service of the user is damaged.
Disclosure of Invention
The application provides an address allocation method, an address allocation device, network equipment and a storage medium, which can solve the problem that the address allocation method in the related art wastes the protection tunnel bandwidth. The technical scheme is as follows:
in a first aspect, there is provided an address allocation method, a VRRP group including a primary router and a backup router, the method comprising: the main router receives an access request from a target terminal, wherein the access request carries service information; the master router determines a target domain from a plurality of domains configured by the VRRP group according to the service information, wherein one or more master address pools are configured under the target domain; if there are unassigned addresses in the one or more primary address pools, the primary router may select an address from the unassigned addresses to assign to the target terminal.
In the scheme of sharing address pools by a dual hot standby, namely, the scheme of sharing address pools by a master router and a standby router in a VRRP group, the address pools are based on service planning, one service can be correspondingly configured with one domain, a plurality of address pools can be configured under one domain, and terminals which access the VRRP group and belong to the same service can share the address pools under one domain.
In this application, a terminal that needs to access to a network through the VRRP group at present may be referred to as a target terminal, and the target terminal may send an access request to the VRRP group, where the access request may carry service information.
In the application, the corresponding relation between the service and the domain can be stored in the main router, and the main router can determine the target domain according to the corresponding relation and the service information carried by the received access request.
After determining the target domain, the master router indicates that the target terminal can be allocated an address from one or more master address pools if there are unassigned addresses in the one or more master address pools configured under the target domain. In this case, the master router may select an address from the unassigned addresses to be assigned to the target terminal.
Optionally, one or more spare address pools are also configured under the target domain; the master router determines a target domain from a plurality of domains configured by the VRRP group according to the service information, and then comprises: if there is no unassigned address in the one or more primary address pools and there is an unassigned address in the one or more backup address pools, the primary router may select an address from the unassigned addresses included in the one or more backup address pools to assign to the target terminal.
That is, the master router determines that the master address pool configured under the target domain has been allocated, and in this case, the master router may allocate an address to the target terminal from the backup address pool configured under the target domain.
Optionally, if there are unassigned addresses in the one or more primary address pools, the primary router selects an address from the unassigned addresses to assign to the target terminal, including: the main router can count the total flow of the data flow flowing on the link between the main router and the standby router; if the total traffic of the data stream flowing over the link between the primary router and the backup router exceeds a traffic threshold and there are unassigned addresses in the one or more primary address pools, the primary router may select an address from the unassigned addresses to assign to the target terminal.
In this application, the master router may also count the total traffic of the data flows flowing on the link between itself and the standby router. It should be noted that, the link may be a link formed by any route reachable between the primary router and the standby router, where the link may be used to successfully route the data stream on the network side to the terminal, so as to ensure that the service of the terminal is not damaged.
In this application, if the total traffic of the data stream flowing on the link between the primary router and the backup router exceeds the traffic threshold, it means that it is currently necessary to minimize the data stream flowing on the link. In this case, if the master router determines that there are unassigned addresses in one or more master address pools configured under the target domain, the master router may select an address from the unassigned addresses to be assigned to the target terminal.
That is, in the case where the bandwidth of the link between the primary router and the backup router is insufficient, the primary router may preferentially allocate an address to the terminal from the primary address pool configured under the target domain.
Optionally, in the present application, if the total traffic of the data flow flowing on the link between the primary router and the backup router exceeds the traffic threshold, there is no unassigned address in the one or more primary address pools and there is an unassigned address in the one or more backup address pools, the primary router selects an address from the unassigned addresses included in the one or more backup address pools to be assigned to the target terminal.
That is, when the bandwidth of the link between the primary router and the backup router is insufficient, the primary router may allocate an address to the terminal preferentially from the primary address pool configured under the target domain, and after the primary address pool configured under the target domain is allocated, allocate an address to the terminal from the backup address pool configured under the target domain.
Optionally, after determining the target domain from the domains configured by the VRRP group according to the service information, the master router further includes: if there is no unassigned address in the pool of addresses configured under the target domain and there is an unassigned address in the pool of addresses configured under the remaining domains of the plurality of domains other than the target domain, the master router may select one address from the unassigned addresses included in the pool of addresses configured under the remaining domains to be assigned to the target terminal.
That is, after the address pools configured under the target domain are all allocated, the master router may also allocate an address to the target terminal from the address pools configured under the remaining domains. Before the address pool configured under the target domain is allocated, the master router may preferentially allocate an address to the target terminal from the master address pool configured under the target domain.
Optionally, after determining the target domain from the domains configured by the VRRP group according to the service information, the master router further includes: the main router counts the total flow of the data flow flowing through the link between the main router and the standby router; if the total traffic of the data stream flowing over the link between the primary router and the backup router exceeds a traffic threshold, there is no unassigned address in the one or more primary address pools, and there is an unassigned address in a primary address pool configured under a domain of the plurality of domains other than the target domain, the primary router may select an address from the unassigned addresses included in the primary address pool configured under the remaining domains to be assigned to the target terminal.
Optionally, after the primary router counts total traffic of data flows flowing through the link between itself and the standby router, the method further includes: if the total traffic of the data stream flowing over the link between the primary router and the backup router exceeds a traffic threshold, there is no unassigned address in the one or more primary address pools, there is no unassigned address in the primary address pool configured under the remaining domain, and there is an unassigned address in the one or more backup address pools configured under the target domain, the primary router may select an address from the unassigned addresses included in the one or more backup address pools to assign to the target terminal.
That is, after the total traffic of the data flows flowing through the link between the primary router and the backup router exceeds the traffic threshold, the priority order of the primary router for assigning addresses to the terminals may be: a main address pool configured under the target domain, a main address pool configured under the residual domain, a standby address pool configured under the target domain, and a standby address pool configured under the residual domain.
Optionally, after the primary router counts total traffic of data flows flowing through the link between itself and the standby router, the method further includes: if the total traffic of the data stream flowing on the link between the primary router and the backup router exceeds the traffic threshold, there is no unassigned address in the address pool under the target domain, there is no unassigned address in the primary address pool configured under the remaining domain, and there is an unassigned address in the backup address pool configured under the remaining domain, the primary router may select an address from the unassigned addresses included in the backup address pool configured under the remaining domain to be assigned to the target terminal.
That is, after the total traffic of the data flows flowing through the link between the primary router and the backup router exceeds the traffic threshold, the priority order of the primary router for assigning addresses to the terminals may be: a main address pool configured under the target domain, a standby address pool configured under the target domain, a main address pool configured under the residual domain, and a standby address pool configured under the residual domain.
Before the total traffic of the data flow flowing through the link between the primary router and the standby router exceeds the traffic threshold, the primary router may assign addresses from the destination domain to the terminals in the configuration order, or may preferentially assign addresses from the primary address pool configured under the destination domain to the terminals.
In a second aspect, there is provided an address allocation apparatus having a function of implementing the address allocation method behavior in the first aspect described above. The address allocation device comprises at least one module for implementing the address allocation method provided in the first aspect.
In a third aspect, a network device is provided, the network device comprising a processor and a memory for storing a program for executing the address allocation method provided in the first aspect, and for storing data involved in implementing the address allocation method provided in the first aspect. The processor is configured to execute a program stored in the memory. The operating means of the memory device may further comprise a communication bus for establishing a connection between the processor and the memory.
In a fourth aspect, a computer readable storage medium is provided, in which instructions are stored which, when run on a computer, cause the computer to perform the address allocation method of the first aspect described above.
In a fifth aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the address allocation method of the first aspect described above.
The technical effects obtained in the second, third, fourth and fifth aspects are similar to the technical effects obtained in the corresponding technical means in the first aspect, and are not described in detail herein.
The technical scheme that this application provided can bring following beneficial effect at least:
in the application, when a terminal accesses a network through a VRRP group, a master router in the VRRP group can preferentially select an address to be allocated to the terminal from unassigned addresses included in a master address pool configured under a target domain, so that under the condition that the master router does not fail, the total flow of data flows flowing through a link between the master router and a standby router can be reduced, the bandwidth of the link is saved, and the bandwidth wasted on the link can be reduced.
Drawings
Fig. 1 is a system architecture diagram related to an address allocation method according to an embodiment of the present application;
FIG. 2 is a flowchart of an address allocation method according to an embodiment of the present application;
FIG. 3 is a flowchart of another address allocation method according to an embodiment of the present application;
FIG. 4 is a flowchart of yet another address assignment method provided by an embodiment of the present application;
FIG. 5 is a flowchart of yet another address assignment method provided by an embodiment of the present application;
FIG. 6 is a flowchart of yet another address assignment method provided by an embodiment of the present application;
FIG. 7 is a flowchart of yet another address assignment method provided by an embodiment of the present application;
FIG. 8 is a flowchart of yet another address assignment method provided by an embodiment of the present application;
FIG. 9 is a flowchart of yet another address assignment method provided by an embodiment of the present application;
FIG. 10 is a flowchart of yet another address assignment method provided by an embodiment of the present application;
fig. 11 is a schematic structural diagram of an address allocation device according to an embodiment of the present application;
FIG. 12 is a schematic diagram of another address allocation device according to an embodiment of the present disclosure;
fig. 13 is a schematic structural diagram of a network device according to an embodiment of the present application;
Fig. 14 is a schematic structural diagram of another network device according to an embodiment of the present application;
fig. 15 is a schematic structural diagram of an interface board in the network device shown in fig. 14 according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Fig. 1 is a system architecture diagram related to an address allocation method according to an embodiment of the present application. Referring to fig. 1, the system architecture includes two routers 101 and a terminal 102. Any two devices in the system architecture can be connected in a wired or wireless manner for communication.
Two routers in the system architecture are in the same VRRP group, one router is a master router of the VRRP group, and the other router is a standby router of the VRRP group. The VRRP group is configured with a plurality of domains, each domain is configured with a plurality of address pools, the address pools configured under any two domains are different or exist the same, and each address pool comprises one or more addresses. For one address pool, the address pool may be configured as a primary address pool under one domain on one of the routers of the VRRP-set, while being configured as a backup address pool under the corresponding domain on the other router. Thus, one or more primary address pools and one or more standby address pools can be configured under one domain of each router, and the address pools under the same domain of the two routers are primary and standby.
The terminal 102 may send an access request to the master router, and the master router may select, according to service information carried by the access request, an address from an address pool configured under the target domain to allocate to the terminal 102, so that the terminal 102 may access the network to perform service communication after allocating to the address. In addition, the master router may store the user information corresponding to the terminal 102 and synchronize the user information to the standby router, so as to ensure that the standby router can continue to bear the service of the user when the VRRP group switches between the master router and the standby router, that is, ensure that the service of the user is not interrupted.
In some embodiments, the system architecture may further include other routers, where in the system architecture may include multiple VRRP groups, where each VRRP group may include a master router and a standby router, and a standby router in one VRRP group may be a master router in another VRRP group, where each master router may implement the address allocation method provided by the embodiments of the present application.
In some embodiments, the system architecture may further include a network switching device, which may act as a switching device in the convergence layer, through which the terminal 102 may access the VRRP-group. The system architecture may also include a plurality of routers in the core network that may route data flows on the network side to router 101.
In the embodiment of the present application, the terminal 102 may be a mobile phone, a computer, a server, or other devices.
Fig. 2 is a flowchart of an address allocation method according to an embodiment of the present application. In the embodiment of the application, the VRRP group comprises a main router and a standby router, and the method is applied to the main router of the VRRP group. Referring to fig. 2, the method includes the following steps.
Step 201: the main router receives an access request from a target terminal, wherein the access request carries service information.
In the embodiment of the application, in the scheme of sharing address pools by a dual hot standby, that is, in the scheme of sharing address pools by a master router and a standby router in a VRRP group, the address pools are based on service planning, a service can be correspondingly configured with a domain, a plurality of address pools can be configured under a domain, and terminals accessing the VRRP group and belonging to the same service can share the address pools under a domain.
In this embodiment of the present application, a terminal that needs to access a network through the VRRP group at present may be referred to as a target terminal. The target terminal may send an access request to the VRRP group, which may carry traffic information, and the master router of the VRRP group may receive and respond to the access request.
The service information carried by the access request sent by the target terminal may include a service identifier. If the target terminal needs to perform the VOIP service, the service identifier may be a field such as VOIP, or a service number or a character string that may be uniquely specified in advance and may identify the VOIP service, which is not limited in the embodiment of the present application.
Step 202: the master router determines a target domain from a plurality of domains configured by the VRRP group according to the service information, wherein one or more master address pools are configured under the target domain.
In this embodiment of the present application, the corresponding relationship between the service identifier and the domain identifier may be stored in the master router, and the master router may determine the target domain according to the corresponding relationship and the service information carried by the received access request.
Step 203: if there are unassigned addresses in the one or more primary address pools, the primary router selects an address from the unassigned addresses to assign to the target terminal.
In the embodiment of the application, one or more main address pools and one or more standby address pools can be configured under the target domain. If there are unassigned addresses in one or more primary address pools configured under the target domain, it means that the target terminal can also be assigned an address from the one or more primary address pools. In this case, the master router may select an address from the unassigned addresses to be assigned to the target terminal.
Optionally, after determining the target domain, the master router may sequentially search the master address pool with unassigned addresses in the target domain from the multiple address pools configured under the target domain according to the configuration sequence of the address pools configured under the target domain. If there is an unassigned address in at least one of the primary address pools configured under the target domain, the primary router may use the first found primary address pool with the unassigned address as the target primary address pool, or may use any one of the found primary address pools with the unassigned address as the target primary address pool. The primary router may select an address from the unassigned addresses included in the target primary address pool to assign to the target terminal.
In this embodiment of the present application, configuration information of each address pool is stored in the master router, where the configuration information may carry an address pool role identifier, and the address pool role identifier may be used to indicate whether the corresponding address pool is a master address pool or a backup address pool. The primary router may determine whether the corresponding address pool is a primary address pool or a backup address pool based on the address pool role identification in the stored configuration information.
Alternatively, the primary router may indicate that the corresponding address pool is configured as a backup address pool by using a backup address pool identifier, and the primary address pool may not be identified, so that if the address pool role carried by the configuration information of one address pool is identified as a backup address pool identifier, the primary router may determine that the address pool is configured as a backup address pool, and if the address pool role carried by the configuration information of one address pool is identified as empty, that is, not carrying a backup address pool identifier, the primary router may determine that the address pool is configured as a primary address pool.
Illustratively, the backup address pool identifier may be 'rui-slave', that is, the address pool of which the configuration information carries 'rui-slave' is the backup address pool, and the address pool of which the configuration information does not carry 'rui-slave' is the primary address pool. Or the backup address pool identifier may be another designated identifier, which is not limited in this embodiment of the present application.
Alternatively, the master router may use a master address pool identifier to indicate that the corresponding address pool is configured as a master address pool, and the backup address pool is not identified, so that if the address pool role carried by the configuration information of one address pool is identified as the master address pool identifier, the master router may determine that the address pool is configured as the backup address pool, and if the address pool role carried by the configuration information of one address pool is identified as null, that is, the backup address pool is not carried by the configuration information of one address pool, the master router may determine that the address pool is configured as the backup address pool.
For example, the primary address pool identifier may be 'master', that is, an address pool whose configuration information carries 'master' is a primary address pool, and an address pool whose configuration information does not carry 'master' is a backup address pool. Or the primary address pool identifier may be another specified identifier, which is not limited in this embodiment of the present application.
Optionally, the primary router may carry a primary address pool identifier or a backup address pool identifier in the configuration information of each address pool, that is, the address pool role identifier carried by the configuration information of the address pool is not null, so if the address pool role identifier carried by the configuration information of one address pool is the primary address pool identifier, the primary router may determine that the address pool is configured as the primary address pool, and if the address pool role identifier carried by the configuration information of one address pool is the backup address pool identifier, it may determine that the address pool is configured as the backup address pool.
Illustratively, the primary address pool identifier may be 'master', and the standby address pool identifier may be 'rui-slave', if the address pool role carried by the configuration information of one address pool is identified as 'master', which indicates that the address pool is configured as the primary address pool, and if the address pool role carried by the configuration information of one address pool is identified as 'rui-slave', which indicates that the address pool is configured as the standby address pool. Or may use other forms of information as the address pool role identifier, which is not limited by the embodiments of the present application.
In this embodiment of the present application, the master router may further store an address pool allocation identifier corresponding to each address pool, where the address pool allocation identifier may be used to indicate whether an unallocated address exists in the corresponding address pool, and the master router may determine, according to the stored address pool allocation identifier, whether the unallocated address exists or does not exist in the corresponding address pool.
Illustratively, the address pool allocation identifier may be 0 or 1, where an address pool allocation identifier of 1 may indicate that there is an unallocated address in the corresponding address pool, and an address pool allocation identifier of 0 may indicate that there is no unallocated address in the corresponding address pool. If the address pool allocation identifier corresponding to one of the master address pools found by the master router is 1, the master router may determine that there is an unallocated address in the master address pool. Alternatively, the address pool allocation identifier may be used to indicate whether there is an unallocated address in the corresponding address pool, or whether there is an unallocated address in the address pool may be recorded in other manners, which is not limited in the embodiment of the present application.
In this embodiment of the present application, the master router may determine, according to the configuration order of the address pools configured under the target domain, a target master address pool from a plurality of address pools configured under the target domain according to the address pool role identifier in the stored configuration information of the address pools and the address pool allocation identifier corresponding to the stored address pools.
Alternatively, in the embodiment of the present application, one or more address segments may be configured in one address pool, and one address segment may include one or more allocable addresses. Based on this, the primary router, after determining the target primary address pool, may select an address from among the unassigned addresses comprised by the one or more address segments configured by the target primary address pool to assign to the target terminal.
In this embodiment of the present application, after determining the target primary address pool, the primary router may sequentially search, from one or more address segments configured in the target primary address pool, for an address segment having an unassigned address, may use, as the target address segment, a first address segment including the unassigned address, or may use, as the target address segment, a address segment including the most number of address segments including the unassigned address, or may use, as the target address segment, any one of the address segments including the unassigned address, which is found. The master router may select an address from the unassigned addresses included in the target address network segment to assign to the target terminal.
Optionally, in the embodiment of the present application, a network segment allocation identifier corresponding to the address network segment may also be stored in the master router, where the network segment allocation identifier may be used to indicate whether an unallocated address exists in the corresponding address network segment. Based on this, the master router may determine the target address segment in the target master address pool from the stored segment allocation identities.
Illustratively, the segment allocation identifier may be 0 or 1, where a segment allocation identifier of 1 may indicate whether there is an unassigned address in the corresponding address segment and a segment allocation identifier of 0 may indicate that there is no unassigned address in the corresponding address segment. If the network segment allocation identifier corresponding to one address network segment searched by the master router is 1, the master router can determine that an unallocated address exists in the address network segment. Alternatively, the network segment allocation identifier may be used to indicate whether there is an unallocated address in the corresponding address network segment, or may be used to indicate whether there is an unallocated address in the address network segment in other manners, which is not limited in the embodiment of the present application.
Illustratively, as shown below, the configuration information of the address pools pool1 and pool2 stored on the master router, assume that the address pool of the configuration information carrying the backup address pool identifier 'rui-slave' is a backup address pool, and the address pool of the configuration information not carrying the 'rui-slave' is a master address pool. It can be seen that pool1 is configured as a pool of backup addresses and pool2 is configured as a pool of primary addresses. In addition, in the configuration information of pool1, 'gateway 100.65.160.1 255.255.240.0' may represent a default gateway configured for pool1, 'section 0 100.65.160.2 100.65.167.254' may represent a first address segment configured for pool1, and 'section 1 100.65.168.2 100.65.175.254' may represent a second address segment configured for pool 1. In the configuration information of pool2, 'gateway 100.65.176.1 255.255.240.0' may represent a default gateway configured for pool2, 'section 0 100.65.176.2 100.65.183.254' may represent a first address field configured for pool2, and 'section 1 100.65.184.2 100.65.191.254' may represent a second address field configured for pool 2. Assuming that the segment allocation identifier is 1 may indicate whether there is an unassigned address in the corresponding address segment, the segment allocation identifier is 0 may indicate that there is no unassigned address in the corresponding address segment, the target primary address pool determined by the primary router is pool2, the segment allocation identifier of the first address segment in the target primary address pool is 0, and the segment allocation identifier of the second address segment is 1, the second address segment 'section 1 100.65.184.2 100.65.191.254' in the target primary address pool may be determined as the target address segment, and one unassigned address is selected from the address segments to be allocated to the target terminal.
Alternatively, in the embodiment of the present application, after determining the destination address network segment, the master router may select, from the destination address network segment, the first unassigned address to be allocated to the destination terminal, or select any one address to be allocated to the destination terminal in the order of one or more addresses included in the destination address network segment, which is not limited in the embodiment of the present application.
It should be noted that one or more addresses in each address segment may be consecutive addresses.
From the foregoing, one or more backup address pools are also configured under the target domain. If there is no unassigned address in the one or more primary address pools and there is an unassigned address in the one or more backup address pools, the primary router selects an address from the unassigned addresses included in the one or more backup address pools to assign to the target terminal.
In an embodiment of the present application, if the master router determines that there is no unallocated address in the one or more primary address pools according to the foregoing method, the master router may further determine whether there is an unallocated address in the one or more backup address pools according to the foregoing method. If there are unassigned addresses in the one or more pool of backup addresses, it means that the target terminal can currently be assigned an address from the one or more pool of backup addresses. In this case, the master router may select an address from the unassigned addresses included in the one or more backup address pools to assign to the target terminal.
Optionally, after determining that no allocatable address exists in the one or more primary address pools under the target domain, the primary router may sequentially search for a standby address pool with an unallocated address under the target domain from a plurality of address pools configured under the target domain according to a configuration order of the address pools configured under the target domain. If there is an unassigned address in the one or more backup address pools, the primary router may use the first backup address pool found to have the unassigned address as a target backup address pool, or may use any one of the backup address pools found to have the unassigned address as a target backup address pool. The primary router may select an address from the unassigned addresses included in the pool of target addresses to assign to the target terminal.
From the foregoing, the configuration information of each address pool is stored in the master router, and the configuration information may carry the address pool role identifier. Based on this, the master router may determine whether the corresponding address pool is a backup address pool according to the address pool role identification in the stored configuration information of the address pool. It should be noted that, in the embodiment of the present application, the method for determining the backup address pool by the master router may refer to the foregoing related description, and will not be described herein again.
In addition, the main router can also store address pool allocation identifiers corresponding to the address pools, and the main router can determine whether unallocated addresses exist in the corresponding address pools according to the stored address pool allocation identifiers. It should be noted that, in the embodiment of the present application, the method for determining whether the unassigned address exists in the backup address pool by the master router may refer to the foregoing related description, and will not be repeated herein.
Based on the foregoing description, the master router may determine, according to the configuration order of the address pools configured under the target domain, the target backup address pools of the plurality of address pools configured under the target domain according to the address pool role identifier in the configuration information of the stored address pools and the address pool allocation identifier corresponding to the stored address pools.
From the foregoing, it will be appreciated that one or more address segments may be configured in an address pool, and that an address segment may include one or more allocable addresses. Based on this, the primary router, after determining the destination address pool, may select an address from among unassigned addresses comprised by one or more address segments configured by the destination address pool to assign to the destination terminal.
In this embodiment of the present application, after determining the target backup address pool, the master router may sequentially search, from one or more address segments configured in the target backup address pool, for an address segment having an unassigned address, and may use, as the target address segment, the first address segment that includes the unassigned address, or may use, as the target address segment, any one of the address segments that includes the unassigned address, or may use, as the target address segment, the address segment that includes the largest number of the unassigned addresses that is searched. The master router may select an address from the unassigned addresses included in the target address network segment to assign to the target terminal.
From the foregoing, the master router may further store a network segment allocation identifier corresponding to the address network segment, and based on this, the master router may determine the target address network segment in the target address pool according to the stored network segment allocation identifier. It should be noted that, in the embodiment of the present application, the method for determining the target address segment in the target address pool by the master router according to the segment allocation identifier may refer to the foregoing related description, which is not repeated herein.
It should be noted that, in one possible implementation manner, the method of allocating addresses from the primary address pool preferentially may be implemented by deploying a new command on the primary router in advance. If the new command is deployed on the main router, the main router can identify whether the address pool configured under the target domain is a main address pool or a standby address pool according to the new command and the related method, and preferentially allocate addresses to the target terminals from the main address pool.
Wherein a command identifier may be specified in advance to indicate whether the new command is deployed on the corresponding router. For example, a global variable may be specified to indicate whether the new command is deployed on the corresponding router, e.g., a global variable equal to 1 may indicate that the new command is deployed on the corresponding router, and a global variable equal to 0 may indicate that the new command is deployed on the corresponding router.
In another possible implementation, the priority of the primary address pool and the priority of the backup address pool configured under the target domain may be specified to be higher and lower by previously specifying the priority of the address pool configured under the target domain on the primary router. Or the priority can be assigned to each address pool, and the priority of the main address pool is ensured to be higher than that of the standby address pool. Thus, the master router can implement a method of preferentially allocating addresses from the master address pool according to the priorities of the respective address pools under the target domain.
It should be noted that, in the embodiment of the present application, if the VRRP group is switched between the active router and the standby router, the active router after the switching may also implement the address allocation method described above.
Fig. 3 is a flowchart of another address allocation method according to an embodiment of the present application. Referring to fig. 3, first, a master router may receive an access request of a target terminal, the access request carrying service information, and the master router may determine a target domain according to the service information. Then, the master router may determine whether a new addition command is deployed, if yes, determine whether there is an unassigned address in the master address pool configured under the target domain according to the new addition command, that is, determine whether the address included in the master address pool configured under the target domain is assigned, if no, select, according to the configuration order, an address pool having an unassigned address from the address pools configured under the target domain, and select, from the address pools, an unassigned address to be assigned to the target terminal. If the new command is deployed on the main router and there is an unassigned address in the main address pool configured under the target domain, then an unassigned address can be selected from the main address pool configured under the target domain and assigned to the target terminal. If the new command is deployed on the main router and there is no unassigned address in the main address pool configured under the target domain, then an unassigned address can be selected from the standby address pool configured under the target domain to be assigned to the target terminal.
It should be noted that, under normal circumstances, the priority of a route issued by the VRRP group to the network side is related to the master and slave address pools, if one address pool is configured as the master address pool on the master router, the priority of the route issued by the master router related to the address pool is higher, and if one address pool is configured as the slave address pool on the master router, the priority of the route issued by the master router related to the address pool is lower. For example, the primary address pool issues a route COST value of 10, and the standby address pool issues a route COST value of 20. For a terminal to which an address is assigned from the master address pool of the master router, a data stream from the network side may be routed to the master router and then forwarded to the terminal by the master router. For a terminal that allocates an address from the backup address pool of the primary router, because the address pools on the primary router and the backup router are primary and backup to each other, the address of the terminal belongs to the primary address pool on the backup router, at this time, a data stream from the network side may be routed to the backup router first, then forwarded to the primary router by the backup router through a link between the primary router and the backup router, and then forwarded to the terminal by the primary router.
If the network side link of the main router fails, the main router and the standby router can be switched, and the priority of the route related to the main address pool is released to the network side by the main router before switching, which is updated to be low in priority, and the priority of the route related to the standby address pool is released, which is kept unchanged. For example, the primary address pool published route COST value is updated to 65535, and the standby address pool published route COST value remains unchanged, still at 20. For a terminal that allocates an address from the primary address pool of the primary router before the handover, the data flow from the network side may be routed to the primary router after the handover and then forwarded to the terminal by the primary router after the handover. For a terminal that allocates an address from the backup address pool of the master router before the handover, the data stream from the network side may also be routed to the master router after the handover, and then forwarded to the terminal by the master router after the handover. The network-side link of the master router may refer to a link directly connected to the core network and the master router.
If the access side link of the main router fails, the routing priority issued to the network side by each address pool is kept unchanged. For a terminal that allocates an address from the primary address pool of the primary router, the data flow from the network side may be routed to the primary router first, then forwarded by the primary router to the standby router through the link between the primary and standby routers, and then forwarded by the standby router to the terminal. For a terminal that allocates an address from a backup address pool of a primary router, a data stream from a network side may be routed to the backup address pool and then forwarded to the terminal by the backup router. The access side link of the master router may refer to a link directly connected to the terminal by the master router or a link directly connected to the convergence layer.
It should be noted that, the link between the primary router and the standby router may be a link formed by a path reachable by any one of the two routers, for example, the link may be a link directly connected between the primary router and the standby router, or may also be a link indirectly connected through one or more routers in the network side. The link between the primary router and the backup router may be understood as a protection tunnel between the two routers.
That is, when the access side link of the primary router fails, the service of the user can be ensured not to be affected by the link between the primary router and the standby router. And when the primary router does not fail, the data stream is still forwarded through the link between the primary and the secondary routers, which wastes the bandwidth of the link between the primary and the secondary routers. In the technical scheme provided by the application, when the main router does not fail, the main router can allocate the address to the target terminal preferentially from the main address pool under the target domain, so that unnecessary bandwidth waste on links between the main router and the standby router can be reduced, and the bandwidth of the links between the main router and the standby router is saved.
In summary, in this embodiment of the present application, when a terminal accesses a network through a VRRP group, a primary router in the VRRP group may preferentially select an address from unassigned addresses included in a primary address pool configured under a target domain to be allocated to the terminal, so when the primary router does not fail, the total traffic of a data flow flowing through a link between the primary and secondary routers may be reduced, and the bandwidth of the link between the primary and secondary routers is saved, that is, the bandwidth wasted on the link between the primary and secondary routers may be reduced.
Fig. 4 is a flowchart of an address allocation method according to an embodiment of the present application. In the embodiment of the application, the VRRP group comprises a main router and a standby router, and the method is applied to the main router of the VRRP group. Referring to fig. 4, the method includes the following steps.
Step 401: the master router receives an access request from a target terminal, wherein the access request carries service information, and the master router determines a target domain from a plurality of domains configured by the VRRP group according to the service information.
In this embodiment, step 401 may be implemented with reference to the descriptions related to step 201 and step 202 in the foregoing embodiment, which is not described herein.
Step 402: the master router counts the total traffic of the data flows flowing over the links between itself and the standby routers.
In the embodiment of the application, since the bandwidth of the link between the master router and the standby router is limited, and the link is not only used for transmitting the data streams of the VRRP-set, in a complex network, the link may also be used for transmitting the data streams of other devices at the same time. To save bandwidth on the link, the primary router may also count the total traffic of the data flows flowing on the link between itself and the backup router after determining the target domain.
Optionally, in the embodiment of the present application, the information of each data flow flowing through the link may be stored in the master router, and the master router may count the total traffic of the data flows flowing through the link according to the stored information of each data flow. Wherein the information of the data stream may comprise a traffic size of the corresponding data stream.
Step 403: if the total traffic of the data stream flowing on the link between the main router and the standby router exceeds the traffic threshold and there is an unassigned address in one or more main address pools configured under the target domain, the main router selects an address from the unassigned addresses to be assigned to the target terminal.
In the embodiment of the application, if the total traffic of the data stream flowing through the link between the main router and the standby router exceeds the traffic threshold, it is indicated that it is currently required to minimize the data stream flowing through the link. In this case, if the master router determines that there are unassigned addresses in one or more master address pools configured under the target domain, the master router may select an address from the unassigned addresses to be assigned to the target terminal.
It should be noted that the flow threshold may be a preset parameter. In addition, the implementation manner in which the master router selects an address to be allocated to the target terminal from the unassigned addresses included in the one or more master address pools configured under the target domain may refer to the relevant description in the foregoing embodiment, which is not repeated herein.
Optionally, in the embodiment of the present application, if the total traffic of the data flow flowing on the link between the primary router and the backup router exceeds the traffic threshold, there is no unassigned address in one or more primary address pools under the target domain, and there is an unassigned address in one or more backup address pools under the target domain, the primary router selects an address from the unassigned addresses included in the one or more backup address pools to be allocated to the target terminal.
In the embodiment of the present application, if the total traffic of the data flow flowing through the link between the primary router and the backup router exceeds the traffic threshold, and there is no unassigned address in the one or more primary address pools configured under the target domain, the primary router may assign an address to the target terminal from the one or more backup address pools configured under the target domain. That is, in this case, if there are unassigned addresses in the one or more backup address pools, the router may select an address from the unassigned addresses included in the one or more backup address pools to assign to the target terminal.
It should be noted that, the implementation manner of selecting, by the master router, an address to be allocated to the target terminal from unallocated addresses included in one or more backup address pools configured under the target domain may refer to the relevant description in the foregoing embodiment, which is not described herein again.
The foregoing describes that, when the total traffic of the data flow flowing through the link between the primary router and the backup router exceeds the traffic threshold, the primary router may preferentially allocate an address from the primary address pool under the target domain to the target terminal, and then allocate an address from the backup address pool under the target domain to the target terminal. It should be noted that, if the total traffic of the data flows flowing through the link between the primary router and the standby router does not exceed the traffic threshold, the primary router may allocate addresses from the address pool under the target domain to the target terminal according to the configuration sequence, or may preferentially allocate addresses from the primary address pool under the target domain to the target terminal.
Fig. 5 is a flowchart of still another address allocation method according to an embodiment of the present application. Referring to fig. 5, a master router may receive an access request of a target terminal, the access request carrying service information from which the master router may determine a target domain. Then, the master router can count the total traffic of the data flow flowing on the link between itself and the standby router, and determine whether the total traffic exceeds a traffic threshold. If the total traffic does not exceed the traffic threshold, the master router may select an address from a pool of addresses configured under the target domain in the configuration order to assign to the target terminal. If the total traffic exceeds the traffic threshold, the primary router may identify a primary address pool and a backup address pool configured under the target domain, and determine whether there are unassigned addresses in one or more primary address pools configured under the target domain. If there are unassigned addresses in the one or more primary address pools, the primary router may select an unassigned address from the one or more primary address pools to assign to the target terminal. If there are no unassigned addresses in the one or more primary address pools, the primary router may select an unassigned address from one or more backup address pools configured under the target domain to the target terminal.
In summary, in this embodiment of the present application, when a terminal accesses a network through a VRRP group, a master router in the VRRP group may preferentially select an address from unassigned addresses included in a master address pool configured under a target domain to be allocated to the terminal, so when the master router does not fail, the total traffic of a data flow flowing through a protection tunnel may be reduced, and the bandwidth of the protection tunnel may be saved, that is, the bandwidth wasted on the protection tunnel may be reduced.
Fig. 6 is a flowchart of an address allocation method according to an embodiment of the present application. In the embodiment of the application, the VRRP group comprises a main router and a standby router, and the method is applied to the main router of the VRRP group. Referring to fig. 6, the method includes the following steps.
Step 601: the master router receives an access request from a target terminal, wherein the access request carries service information, and the master router determines a target domain from a plurality of domains configured by the VRRP group according to the service information.
In this embodiment of the present application, step 601 may be implemented with reference to the descriptions related to step 201 and step 202 in the foregoing embodiments, which is not described herein again.
Step 602: if there is no unassigned address in the pool of addresses configured under the target domain and there is an unassigned address in the pool of addresses configured under the remaining domains of the plurality of domains other than the target domain, the master router selects an address from the unassigned addresses included in the pool of addresses configured under the remaining domains to be assigned to the target terminal.
In this embodiment of the present application, the VRRP group where the master router is located may be configured with multiple domains, and each domain may be configured with one or more address pools, and each address pool may be configured as a primary address pool or a backup address pool. Based on this, after the primary router determines the target domain from the plurality of domains configured by the VRRP-group, it can determine whether there is an unassigned address in the primary address pool or the backup address pool configured under the target domain according to the relevant description in the foregoing embodiment. If the master router determines that there are no unassigned addresses in both the primary and backup address pools configured under the target domain, the master router may determine that there are no unassigned addresses in both the address pools configured under the target domain.
In the case that there is no unassigned address in the pool of addresses configured under the target domain, the master router may choose to assign an address to the target terminal from the pool of addresses configured under the remaining domains of the plurality of domains other than the target domain. That is, in this case, if there is an unassigned address in the address pool configured under the remaining domains of the plurality of domains other than the target domain, the master router may select one address from the unassigned addresses included in the address pool configured under the remaining domains to be assigned to the target terminal.
In some embodiments, the primary and backup address pools under the plurality of domains configured on the primary router are also bound under a remote backup service (remote backup service, RBS) configured on the primary router, i.e. the primary and backup address pools under the RBS are identical to the primary and backup address pools under the plurality of domains of the primary router, based on which the primary router may choose to assign an address to the target terminal from among the unassigned addresses comprised in the address pool configured under the RBS if the primary router determines that none of the address pools configured under the target domain exist.
Optionally, the master router may store a domain allocation identifier corresponding to each domain in the plurality of domains, where the domain allocation identifier is used to indicate whether an address pool under the corresponding domain has been allocated. The master router may determine whether there is an unassigned address in the address pool configured under the remaining domains other than the target domain according to the domain allocation identification.
Illustratively, the domain allocation identifier may be 0 or 1, where a domain allocation identifier of 0 may indicate that the address pool configured under the corresponding domain is allocated, and a domain allocation identifier of 1 may indicate that the address pool configured under the corresponding domain is not allocated.
Alternatively, as can be seen from the description of the foregoing embodiment, the master router may store address pool allocation identifiers corresponding to the address pools, and based on this, the master router may determine whether there is an unassigned address in the address pools configured under the remaining domains according to the stored address pool allocation identifiers corresponding to the address pools configured under the remaining domains.
Alternatively, when the master router allocates an address to the target terminal from the address pool configured under the remaining domain, the address may be preferentially allocated to the target terminal from the master address pool configured under the remaining domain. That is, if there is an unassigned address in the primary address pool configured under the remaining domains, the primary router selects one address from the unassigned addresses included in the primary address pool configured under the remaining domains to assign to the target terminal. If there is no unassigned address in the primary address pool configured under the remaining domain, and there is an unassigned address in the backup address pool configured under the remaining domain, the primary router selects an address from the unassigned addresses included in the backup address pool configured under the remaining domain to assign to the target terminal.
In the embodiment of the application, the master router can determine whether unallocated addresses exist in the master address pools configured under the remaining domains according to the stored address pool allocation identifier and the address pool role identifier. The master router may search for domains having unassigned addresses in the master address pool configured under the remaining domains in sequence according to the configuration sequence of each domain, and the master router may select one address from the unassigned addresses included in the master address pool configured under the first domain that is searched for to be assigned to the target terminal.
Optionally, in some embodiments, the master router may sequentially search whether the address pool configured under the remaining domains has an unallocated address according to the configuration sequence of each domain, and the master router may select an address from the unallocated addresses included in the address pool configured under the first searched domain to allocate the address to the target terminal, or the master router may also select an address from the unallocated addresses included in the address pool configured under any one of the searched domains to allocate the address to the target terminal.
In the embodiment of the present application, after determining which domain of the remaining domains is configured to allocate an address to the target terminal from the address pool, the master router may also allocate an address to the target terminal from the address pool configured under the domain determined in the remaining domains, with reference to the foregoing method for preferentially allocating an address from the master address pool from the address pool configured under the target domain. That is, if there is an unassigned address in the determined under-domain configured master address pool, the master router selects an address from the unassigned addresses included in the determined under-domain configured master address pool to assign to the target terminal. If the unassigned address does not exist in the primary address pool of the determined under-domain configuration, and the unassigned address exists in the backup address pool of the determined under-domain configuration, the primary router selects an address from the unassigned addresses included in the backup address pool of the determined under-domain configuration to be assigned to the target terminal.
Fig. 7 is a flowchart of still another address allocation method according to an embodiment of the present application. Referring to fig. 7, a master router may receive an access request of a target terminal, the access request carrying traffic information from which the master router may determine a target domain. Then, the master router can judge whether the address pool configured under the target domain is allocated according to the stored domain allocation identifier, if not, the master router can allocate an address to the target terminal preferentially from the master address pool configured under the target domain. If the address pool configured under the target domain has been allocated, the master router may allocate an address to the target terminal from the address pools configured under the remaining domains.
Fig. 8 is a flowchart of still another address allocation method according to an embodiment of the present application. Referring to fig. 8, a master router may receive an access request of a target terminal, the access request carrying service information from which the master router may determine a target domain. Then, the master router can judge whether the address pool configured under the target domain is allocated according to the stored domain allocation identifier, if not, the master router can allocate an address to the target terminal preferentially from the master address pool configured under the target domain. If the address pool configured under the target domain is already allocated, the master router may preferentially allocate an address to the target terminal from the master address pool configured under the remaining domains.
In summary, in this embodiment of the present application, when a terminal accesses a network through a VRRP group, if there is an unassigned address in an address pool configured under a target domain, a master router may preferentially select an address from a master address pool configured under the target domain to allocate the address to the terminal, so when the master router does not fail, the total traffic of a data flow flowing through a protection tunnel may be reduced, and the bandwidth of the protection tunnel may be saved, that is, the bandwidth wasted on the protection tunnel may be reduced. If no unallocated address exists in the address pool configured under the target domain, the master router can select an address from unallocated addresses included in the address pools configured under the remaining domains in the plurality of domains to be allocated to the terminal, so that when the terminal expands frequently, the address pool configured under the target domain does not need to be changed frequently, that is, the address pool configured under the target domain does not need to be added frequently, and the terminal can be ensured to be accessed to the network successfully.
Fig. 9 is a flowchart of an address allocation method according to an embodiment of the present application. In the embodiment of the application, the VRRP comprises a main router and a standby router, and the method is applied to the main router of the VRRP group. Referring to fig. 9, the method includes the following steps.
Step 901: the master router receives an access request from a target terminal, wherein the access request carries service information, and the master router determines a target domain from a plurality of domains configured by the VRRP group according to the service information.
In this embodiment of the present application, step 901 may be implemented with reference to the descriptions related to step 201 and step 202 in the foregoing embodiment, which is not described herein.
Step 902: the master router counts the total traffic of the data flows flowing over the links between itself and the standby router.
In this embodiment, step 902 may be implemented with reference to the description of step 402 in the foregoing embodiment, which is not described herein.
Step 903: if the total traffic of the data stream flowing on the link between the primary router and the standby router exceeds the traffic threshold, there is no unassigned address in one or more primary address pools configured under the target domain, and there is an unassigned address in a primary address pool configured under a domain other than the target domain in the plurality of domains, the primary router selects an address from the unassigned addresses included in the primary address pools configured under the remaining domains to be assigned to the target terminal.
In this embodiment of the present application, if the total traffic of the data flows flowing through the links between the primary router and the backup router exceeds the traffic threshold, and there is no unassigned address in the primary address pool configured under the target domain, in this case, if the primary router assigns an address to the target terminal from the backup address pool configured under the target domain, then the data flows on the network side still flow through the links between the backup routers, that is, further waste the bandwidth on the links. Based on this, in this case, the master router may choose to assign an address to the target terminal preferentially from the master address pool configured under the remaining domains. That is, if there is an unassigned address in the primary address pool configured under the remaining domain, the primary router may select an address from the unassigned addresses included in the primary address pool configured under the remaining domain to be assigned to the target terminal.
It should be noted that, the method for selecting, by the master router, an address to be allocated to the target terminal from the unassigned addresses included in the master address pool configured under the remaining domains may refer to the related description in the foregoing embodiment, which is not repeated herein.
Step 904: if the total traffic of the data stream flowing on the link between the primary router and the backup router exceeds the traffic threshold, there is no unassigned address in one or more primary address pools configured under the target domain, there is no unassigned address in the primary address pools configured under the remaining domain, and there is an unassigned address in one or more backup address pools configured under the target domain, the primary router selects an address from the unassigned addresses included in the one or more backup address pools to assign to the target terminal.
In the embodiment of the application, if the master router determines that no unallocated address exists in the master address pool configured under the target domain and the master address pools configured under the remaining domains, the master router may select one address from the backup address pools configured under the target domain to be allocated to the target terminal.
It should be noted that, the method for the master router to select an address from the unassigned addresses included in the standby address pool configured under the target domain and assign the address to the target terminal may refer to the related description in the foregoing embodiment, which is not repeated herein.
Optionally, if the total traffic of the data flow flowing over the link between the primary router and the backup router exceeds the traffic threshold, there is no unassigned address in the one or more primary address pools, there is no unassigned address in the primary address pool configured under the remaining domain, there is no unassigned address in the one or more backup address pools configured under the target domain, and there is an unassigned address in the backup address pool configured under the remaining domain, the primary router selects an address from the unassigned addresses included in the backup address pool configured under the remaining domain to assign to the target terminal.
It should be noted that, the method for the master router to select an address from the unassigned addresses included in the standby address pool configured under the remaining domain and assign the address to the target terminal may refer to the related description in the foregoing embodiment, which is not repeated herein.
Fig. 10 is a flowchart of still another address allocation method according to an embodiment of the present application. Referring to fig. 10, a master router may receive an access request of a target terminal, the access request carrying service information from which the master router may determine a target domain. Then, the master router may count the total traffic of the data flows flowing through the links between the master router and the standby router, and if the total traffic does not exceed the traffic threshold, the master router may assign addresses to the target terminals from the address pool configured under the target domain according to the configuration sequence. If the total flow exceeds the flow threshold, the main router can identify a main address pool and a standby address pool configured under the target domain according to the address pool role identification in the configuration information, judge whether the main address pool configured under the target domain is allocated, and if the main address pool configured under the target domain is not allocated, the main router can allocate an address to the target terminal from unallocated addresses included in the main address pool configured under the target domain. If the main address pool configured under the target domain is already allocated, the main router can judge whether the main address pool configured under the residual domain is already allocated, and if the main address pool configured under the residual domain is not already allocated, the main router can allocate an address to the target terminal from the main address pool configured under the residual domain. If the main address pool configured under the remained domain is distributed, the main router can judge whether the standby address pool configured under the target domain is distributed, if not, the main router can distribute the address to the target terminal from the standby address pool configured under the target domain. If the backup address pool configured under the target domain is already allocated, the master router may allocate an address to the target terminal from the backup address pools configured under the remaining domains.
That is, in the embodiment of the present application, before the total traffic of the data flow flowing through the link between the primary router and the standby router exceeds the traffic threshold, the primary router may allocate an address from the destination domain to the terminal according to the configuration sequence, or preferentially allocate an address from the primary address pool configured under the destination domain to the terminal. After the total traffic of the data stream flowing through the link between the primary router and the standby router exceeds the traffic threshold, the priority order of the primary router for assigning addresses to the terminals may be: a main address pool configured under the target domain, a main address pool configured under the residual domain, a standby address pool configured under the target domain, and a standby address pool configured under the residual domain.
Optionally, if the total traffic of the data flow flowing on the link between the primary router and the backup router exceeds the traffic threshold, there is no unassigned address in the address pool under the target domain, there is no unassigned address in the primary address pool configured under the remaining domain, and there is an unassigned address in the backup address pool configured under the remaining domain, the primary router selects one address from the unassigned addresses included in the backup address pool configured under the remaining domain to assign to the target terminal.
That is, in the embodiment of the present application, before the total traffic of the data flow flowing through the link between the primary router and the standby router exceeds the traffic threshold, the primary router may allocate an address from the destination domain to the terminal according to the configuration sequence, or preferentially allocate an address from the primary address pool configured under the destination domain to the terminal. After the total traffic of the data stream flowing through the link between the primary router and the standby router exceeds the traffic threshold, the priority order of the primary router for assigning addresses to the terminals may be: a main address pool configured under the target domain, a standby address pool configured under the target domain, a main address pool configured under the residual domain, and a standby address pool configured under the residual domain.
In the above description, the method for allocating the address to the terminal by the main router in the scenario of the dual hot standby shared address pool is introduced. In the embodiment of the application, a method for allocating the address to the terminal by the router in a scene of not being dual-machine hot standby is also provided. In a scenario where there is no backup router, that is, only one router allocates an address to a terminal, where address pools under multiple domains configured by the router are not allocated to the backup, the router may allocate addresses to the terminal according to a configuration sequence under a target domain, and after the addresses in the address pools configured under the target domain are allocated, the addresses may be allocated to the terminal from a global address pool, so that when the terminal expands frequently, the configuration of the address pools under the target domain does not need to be changed frequently, that is, the address pools under the target domain do not need to be increased frequently, and it may also be ensured that the terminal may successfully access the network.
In summary, in this embodiment of the present application, when a terminal accesses a network through a VRRP group, if there is an unassigned address in an address pool configured under a target domain, a master router may preferentially select an address from a master address pool configured under the target domain to allocate the address to the terminal, so when the master router does not fail, the total traffic of a data flow flowing through a protection tunnel may be reduced, and the bandwidth of the protection tunnel may be saved, that is, the bandwidth wasted on the protection tunnel may be reduced. If no unallocated address exists in the address pools configured under the target domain, the master router in the VRRP group can select an address to be allocated to the terminal from unallocated addresses included in the address pools configured under the remaining domains in the plurality of domains, so that when the terminal expands frequently, the address pools configured under the target domain do not need to be changed frequently, that is, the address pools configured under the target domain do not need to be added frequently, and the terminal can be ensured to be accessed to the network successfully.
Fig. 11 is a schematic structural diagram of an address allocation device provided in an embodiment of the present application, where the address allocation device may be implemented by software, hardware, or a combination of both, and may be part or all of a network device, which may be a router shown in fig. 1. In the embodiment of the present application, the VRRP-group includes a master router and a standby router, and the apparatus 1100 is applied to the master router. Referring to fig. 11, the apparatus 1100 includes: a receiving module 1101, a determining module 1102 and an address allocating module 1103.
The receiving module 1101 is configured to receive an access request from a target terminal, where the access request carries service information. Specific implementation may refer to step 201 in the embodiment of fig. 2.
A determining module 1102, configured to determine a target domain from a plurality of domains configured by the VRRP group according to the service information, where one or more primary address pools are configured under the target domain. Specific implementation may refer to step 202 in the embodiment of fig. 2
An address allocation module 1103 is configured to select an address from the unassigned addresses to be allocated to the target terminal if there are unassigned addresses in the one or more primary address pools. Specific implementation may refer to step 203 in the embodiment of fig. 2.
Optionally, one or more spare address pools are also configured under the target domain;
the address allocation module 1103 is further configured to:
if there is no unassigned address in the one or more primary address pools and there is an unassigned address in the one or more backup address pools, selecting an address from the unassigned addresses included in the one or more backup address pools to assign to the target terminal.
Optionally, referring to fig. 12, the apparatus 1100 further includes:
a statistics module 1104 is configured to count total traffic of data flows flowing through the link between the primary router and the standby router. Specific implementation may refer to step 402 in the embodiment of fig. 4.
The address allocation module 1103 is further configured to:
if the total traffic of the data stream flowing on the link between the primary router and the backup router exceeds a traffic threshold and there is an unassigned address in the one or more primary address pools, an address is selected from the unassigned addresses to be assigned to the target terminal. Specific implementation may refer to step 403 in the embodiment of fig. 4.
Optionally, the address allocation module 1103 is further configured to:
if there is no unassigned address in the pool of addresses configured under the target domain and there is an unassigned address in the pool of addresses configured under the remaining domains of the plurality of domains other than the target domain, selecting an address from the unassigned addresses included in the pool of addresses configured under the remaining domains to be assigned to the target terminal. Specific implementation may refer to step 602 in the embodiment of fig. 6.
Optionally, the apparatus 1100 further includes:
the statistics module is used for counting the total flow of the data flow flowing on the link between the main router and the standby router;
the address allocation module is also used for:
if the total traffic of the data stream flowing on the link between the primary router and the backup router exceeds a traffic threshold, there is no unassigned address in the one or more primary address pools, and there is an unassigned address in the primary address pool configured under the remaining domains of the plurality of domains other than the target domain, then one address is selected from the unassigned addresses included in the primary address pool configured under the remaining domains to be assigned to the target terminal. Specific implementation may refer to step 903 in the fig. 9 embodiment.
Optionally, the address allocation module 1103 is further configured to:
if the total traffic of the data stream flowing over the link between the primary router and the backup router exceeds a traffic threshold, there is no unassigned address in the one or more primary address pools, there is no unassigned address in the primary address pool configured under the remaining domain, and there is an unassigned address in the one or more backup address pools configured under the target domain, then an address is selected from the unassigned addresses included in the one or more backup address pools to be assigned to the target terminal. Specific implementation may refer to step 904 in the fig. 9 embodiment.
Optionally, the address allocation module 1103 is further configured to:
and if the total traffic of the data flow flowing through the link between the main router and the standby router exceeds the traffic threshold, no unassigned address exists in the address pool under the target domain, no unassigned address exists in the main address pool configured under the residual domain, and no unassigned address exists in the standby address pool configured under the residual domain, selecting one address from the unassigned addresses included in the standby address pool configured under the residual domain to be assigned to the target terminal.
In summary, in this embodiment of the present application, when a terminal accesses a network through a VRRP group, a master router in the VRRP group may preferentially select an address from unassigned addresses included in a master address pool configured under a target domain to be allocated to the terminal, so when the master router does not fail, the total traffic of a data flow flowing through a link between the master router and a standby router may be reduced, and the bandwidth of the link may be saved, that is, the bandwidth wasted on the link may be reduced.
It should be noted that: in the address allocation device provided in the above embodiment, only the division of the above functional modules is used as an example, and in practical application, the above functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to perform all or part of the functions described above. In addition, the address allocation apparatus and the address allocation method provided in the foregoing embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
Fig. 13 is a schematic structural diagram of a network device according to an embodiment of the present application, where the network device may be a router in the VRRP group in any of the foregoing embodiments. The network device 1300 may be a switch, router, or other network device that forwards messages. In this embodiment, the network device 1300 includes: a main control board 1310, an interface board 1330, and an interface board 1340. In the case of multiple interface boards, a switching fabric (not shown) may be included, which is used to complete the data exchange between the interface boards (also called line cards or service boards).
The main control board 1310 is used for performing functions such as system management, equipment maintenance, protocol processing, etc. Interface boards 1330 and 1340 are used to provide various business interfaces (e.g., POS interfaces, GE interfaces, ATM interfaces, etc.) and to enable forwarding of data streams. The main control board 1310 mainly has 3 kinds of functional units: the system comprises a system management control unit, a system clock unit and a system maintenance unit. The main control board 1310, the interface board 1330 and the interface board 1340 are connected with the system back board through a system bus to realize intercommunication. The interface board 1330 includes one or more processors 1331 thereon. The processor 1331 is used for controlling and managing the interface board, communicating with the central processor on the main control board, and forwarding the data stream. Memory 1332 on interface board 1330 is used to store forwarding entries and processor 1331 forwards data streams by looking up forwarding entries stored in memory 1332.
The interface board 1330 includes one or more network interfaces 1333 for receiving data streams or other information transmitted by terminals or other devices of the network and processing such data streams or data as directed by a processor 1331. The specific implementation process is not repeated here one by one.
It will be appreciated that, as shown in fig. 13, a plurality of interface boards are included in the present embodiment, and a distributed forwarding mechanism is adopted, under which the operation on the interface board 1340 is substantially similar to that of the interface board 1330, so that a detailed description is omitted for brevity. Furthermore, it is understood that the processors 1331 and/or 1341 of the interface board 1330 of fig. 13 may be dedicated hardware or chips, such as network processors or application specific integrated circuits (application specific integrated circuit), to implement the above-described functions, i.e., a manner of processing the forwarding plane with dedicated hardware or chips. A specific implementation of dedicated hardware or chips using a network processor may be referred to the embodiment shown in fig. 14 below. In other embodiments, the processors 1331 and/or 1341 may also employ general-purpose processors, such as general-purpose CPUs, to perform the functions described above.
In addition, it should be noted that the main control board may have one or more blocks, and the main control board and the standby main control board may be included when there are multiple blocks. The interface board may have one or more pieces, the more data processing capabilities of the device, the more interface boards are provided. Under the condition of a plurality of interface boards, the interface boards can communicate through one or a plurality of exchange network boards, and load sharing redundancy backup can be realized jointly when a plurality of interface boards exist. Under the centralized forwarding architecture, the device can be used for processing the service data of the whole system without a switching network board. Under the distributed forwarding architecture, the device comprises a plurality of interface boards, and can realize data exchange among the plurality of interface boards through the exchange network board, thereby providing high-capacity data exchange and processing capacity. Therefore, the data access and processing power of the network devices of the distributed architecture is greater than that of the devices of the centralized architecture. The specific architecture employed is not limited in any way herein, depending on the specific networking deployment scenario.
In particular embodiments, memory 1332 may be read-only Memory (ROM), random-access Memory (random access Memory, RAM), electrically erasable programmable read-only Memory (EEPROM), optical disks including (compact disc read-only Memory, CD-ROM), compact disks, laser disks, digital versatile disks, blu-ray disks, etc.), magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 1332 may be separate and coupled to the processor 1331 via a communication bus. The memory 1332 may also be integrated with the processor 8131.
In a specific embodiment, the network interface 1333 may be a device using any transceiver or the like for communicating with other devices or communication networks, such as ethernet, radio access network (radio access network, RAN), wireless local area network (wirelesslocal area networks, WLAN), etc. Network interface 1333 includes a wired network interface and may also include a wireless network interface. The wired network interface may be, for example, an ethernet interface. The ethernet interface may be an optical interface, an electrical interface, or a combination thereof. The wireless network interface may be a wireless local area network (wireless local area networks, WLAN) interface, a cellular network communication interface, a combination thereof, or the like.
In some embodiments, the network device may include multiple processors, each of which may be a single-core processor or a multi-core processor. A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
In some embodiments, the memory 1332 is used to store program codes for performing the aspects of the present application, and the processor 1331 may execute the program codes stored in the memory 1332. The program code may include one or more software modules, for example, when the network device is a master router, the program code may include a receiving module and an address allocation module, where the receiving module is configured to receive an access request of a terminal, and the address allocation module is configured to allocate an address to the terminal according to an address allocation method provided by an embodiment of the present application.
Fig. 14 is a schematic structural diagram of another network device provided in an embodiment of the present application, where the network device may be a router in the VRRP group in any of the foregoing embodiments. In this embodiment, the network device 1400 includes: a main control board 1410, an interface board 1430, a switch board 1420 and an interface board 1440. The main control board 1410 is used for performing functions such as system management, device maintenance, and protocol processing. The switch fabric 1420 is used to perform data exchanges between interface boards (interface boards also referred to as line cards or traffic boards). Interface boards 1430 and 1440 are used to provide various service interfaces (e.g., POS interface, GE interface, ATM interface, etc.) and to enable forwarding of data packets. The control plane is composed of the control units of the main control board 1410, the control units on the interface boards 1430 and 1440, and so on. The main control board 1410 is mainly provided with 3 types of functional units: the system comprises a system management control unit, a system clock unit and a system maintenance unit. The main control board 1410, the interface boards 1430 and 1440 and the switching network board 1420 are connected to the system back board through a system bus to realize intercommunication. The central processor 1431 on the interface board 1430 is configured to control and manage the interface board and communicate with the central processor on the main control board. The forwarding table entry memory 1434 on the interface board 1430 is used to store forwarding table entries, and the network processor 1432 performs forwarding of the data stream by looking up the forwarding table entries stored in the forwarding table entry memory 1434.
The physical interface card 1433 of the interface board 1430 is used to receive data streams or other data sent by terminals or other devices. The specific implementation process is not repeated here one by one.
The network processor 1432 is configured to process the received data stream, etc., and specific functions of the network processor 1432 are not described herein one by one.
It will be appreciated that, as shown in fig. 14, the present embodiment includes a plurality of interface boards, and a distributed forwarding mechanism is adopted, under which operations on the interface board 1440 are substantially similar to those of the interface board 1430, and for brevity, will not be described again. Further, as described above, the functions of network processors 1432 and 1442 in fig. 14 may be implemented instead with application specific integrated circuits (applicationspecific integrated circuit).
In addition, it should be noted that the main control board may have one or more blocks, and the main control board and the standby main control board may be included when there are multiple blocks. The interface board may have one or more pieces, the more data processing capabilities of the device, the more interface boards are provided. The physical interface card on the interface board may also have one or more pieces. The switching network board may not be provided, or may be provided with one or more blocks, and load sharing redundancy backup can be jointly realized when the switching network board is provided with the plurality of blocks. Under the centralized forwarding architecture, the device can be used for processing the service data of the whole system without a switching network board. Under the distributed forwarding architecture, the device can have at least one switching network board, and data exchange among a plurality of interface boards is realized through the switching network board, so that high-capacity data exchange and processing capacity are provided. Therefore, the data access and processing power of the network devices of the distributed architecture is greater than that of the devices of the centralized architecture. The specific architecture employed is not limited in any way herein, depending on the specific networking deployment scenario.
Fig. 15 is a schematic structural diagram of an interface board 1440 in the network device shown in fig. 14 according to an embodiment of the present application, where the network device where the interface board 1440 is located may be a router in the VRRP group in any of the embodiments. The interface board 1440 may include a physical interface card (physical interface card, PIC) 1530, a network processor (network processor, NP) 1510, and a traffic management module (traffic management) 1520.
Wherein, PIC: and the physical interface card (physical interface card) is used for realizing the docking function of the physical layer, the original flow enters the interface board of the network equipment, and the processed message is sent out from the PIC card.
The network processor NP1510 is configured to implement forwarding processing of a packet. Specifically, the processing of the uplink message includes: processing a message input interface, acquiring a time stamp, classifying an uplink flow, searching a forwarding table, packaging measurement information and copying the message; and (3) processing a downlink message: forwarding table lookup, downstream classification, timestamp acquisition, measurement information encapsulation, out-interface processing, and the like.
Traffic Management (TM) is used for realizing QoS, line speed forwarding, high-capacity cache, queue management and other functions. Specifically, the upstream traffic management includes: uplink Qos processing (such as congestion management and queue scheduling, etc.) and slicing processing; the downstream traffic management includes: packet processing, multicast replication, and downstream Qos processing (e.g., congestion management and queue scheduling, etc.).
It will be appreciated that in the case of a network device having multiple interface boards 1440, the multiple interface boards 1440 may communicate over the switching network 1550.
It should be noted that, fig. 15 only shows a schematic processing flow or a module inside the NP, and the processing sequence of each module in the specific implementation is not limited to this, and other modules or processing flows may be deployed in actual applications as required. The comparison of the examples is not limited.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the processes or functions described in accordance with embodiments of the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, data subscriber line (digitalsubscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital versatile disk (digital versatiledisc, DVD)), or a semiconductor medium (e.g., solid State Disk (SSD)), etc. It is noted that the computer readable storage medium mentioned in the present application may be a non-volatile storage medium, in other words, may be a non-transitory storage medium.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above embodiments are provided for the purpose of not limiting the present application, but rather, any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application are intended to be included within the scope of the present application.

Claims (16)

1. An address allocation method, wherein a virtual router redundancy protocol VRRP-set comprises a primary router and a backup router, the method comprising:
the main router receives an access request from a target terminal, wherein the access request carries service information;
the main router determines a target domain from a plurality of domains configured by the VRRP group according to the service information, wherein an address pool is configured under each domain in the plurality of domains, one or more main address pools are configured under the target domain, and the one or more main address pools are also configured as a standby address pool of the standby router under the target domain;
If there are unassigned addresses in the one or more primary address pools, the primary router selects an address from the unassigned addresses to assign to the target terminal.
2. The method of claim 1, wherein one or more backup address pools are further configured under the target domain;
the main router determines a target domain from a plurality of domains configured by the VRRP group according to the service information, and then comprises the following steps:
if there is no unassigned address in the one or more primary address pools and there is an unassigned address in the one or more backup address pools, the primary router selects an address from the unassigned addresses included in the one or more backup address pools to assign to the target terminal.
3. The method of claim 1, wherein the master router selecting an address from the unassigned addresses to assign to the target terminal if there are unassigned addresses in the one or more master address pools, comprising:
the main router counts the total flow of the data flow flowing on the link between the main router and the standby router;
if the total traffic of the data flow flowing on the link between the main router and the standby router exceeds a traffic threshold and unassigned addresses exist in the one or more main address pools, the main router selects one address from the unassigned addresses to be assigned to the target terminal.
4. A method according to any one of claims 1-3, wherein the master router, based on the traffic information, after determining a target domain from a plurality of domains configured by the VRRP-set, further comprises:
if there is no unassigned address in the address pool configured under the target domain, and there is an unassigned address in the address pools configured under the remaining domains in the plurality of domains except the target domain, the master router selects one address from the unassigned addresses included in the address pools configured under the remaining domains to be assigned to the target terminal.
5. The method of claim 1, wherein after the master router determines a target domain from the plurality of domains configured by the VRRP-set based on the traffic information, further comprising:
the main router counts the total flow of the data flow flowing on the link between the main router and the standby router;
if the total traffic of the data flow flowing on the link between the main router and the standby router exceeds a traffic threshold, there is no unassigned address in the one or more main address pools, and there is an unassigned address in the main address pool configured under the remaining domains of the plurality of domains other than the target domain, the main router selects one address from the unassigned addresses included in the main address pool configured under the remaining domains to be assigned to the target terminal.
6. The method of claim 5, wherein after the primary router counts total traffic of data flows flowing over the link between itself and the backup router, further comprising:
if the total traffic of the data flow flowing on the link between the main router and the standby router exceeds a traffic threshold, there is no unassigned address in the one or more main address pools, there is no unassigned address in the main address pool configured under the remaining domains, and there is an unassigned address in the one or more standby address pools configured under the target domains, the main router selects one address from the unassigned addresses included in the one or more standby address pools to be assigned to the target terminal.
7. The method of claim 5, wherein after the primary router counts total traffic of data flows flowing over the link between itself and the backup router, further comprising:
and if the total traffic of the data flow flowing on the link between the main router and the standby router exceeds a traffic threshold, no unassigned address exists in the address pool under the target domain, no unassigned address exists in the main address pool configured under the residual domain, and no unassigned address exists in the standby address pool configured under the residual domain, the main router selects one address from the unassigned addresses included in the standby address pool configured under the residual domain to be assigned to the target terminal.
8. An address allocation apparatus, wherein a VRRP-set comprises a master router and a backup router, the apparatus being for use in the master router, the apparatus comprising:
the receiving module is used for receiving an access request from a target terminal, wherein the access request carries service information;
a determining module, configured to determine a target domain from a plurality of domains configured by the VRRP group according to the service information, where an address pool is configured under each domain in the plurality of domains, and one or more primary address pools are configured under the target domain, and the one or more primary address pools are further configured as a backup address pool of the backup router under the target domain;
and the address allocation module is used for selecting one address from the unassigned addresses to be allocated to the target terminal if the unassigned addresses exist in the one or more main address pools.
9. The apparatus of claim 8, wherein one or more backup address pools are further configured under the target domain;
the address allocation module is further configured to:
and if the unallocated addresses do not exist in the one or more main address pools and the unallocated addresses exist in the one or more standby address pools, selecting one address from the unallocated addresses included in the one or more standby address pools to be allocated to the target terminal.
10. The apparatus of claim 8, wherein the apparatus further comprises:
the statistics module is used for counting the total flow of the data flow flowing through the link between the main router and the standby router;
the address allocation module is further configured to:
and if the total traffic of the data flow flowing on the link between the main router and the standby router exceeds a traffic threshold value and unassigned addresses exist in the one or more main address pools, selecting one address from the unassigned addresses to be assigned to the target terminal.
11. The apparatus of any of claims 8-10, wherein the address assignment module is further to:
and if no unassigned address exists in the address pool configured under the target domain, and unassigned addresses exist in the address pools configured under the remaining domains except the target domain in the plurality of domains, selecting one address from the unassigned addresses included in the address pools configured under the remaining domains to be assigned to the target terminal.
12. The apparatus of claim 8, wherein the apparatus further comprises:
the statistics module is used for counting the total flow of the data flow flowing through the link between the main router and the standby router;
The address allocation module is further configured to:
and if the total traffic of the data flow flowing through the link between the main router and the standby router exceeds a traffic threshold, no unassigned address exists in the one or more main address pools, and unassigned addresses exist in the main address pools configured under the remaining domains except the target domain in the plurality of domains, selecting one address from the unassigned addresses included in the main address pools configured under the remaining domains to be assigned to the target terminal.
13. The apparatus of claim 12, wherein the address assignment module is further to:
and if the total traffic of the data flow flowing through the link between the main router and the standby router exceeds a traffic threshold, no unassigned addresses exist in the one or more main address pools, no unassigned addresses exist in the main address pools configured under the remaining domains, and unassigned addresses exist in the one or more standby address pools configured under the target domain, selecting one address from the unassigned addresses included in the one or more standby address pools to be assigned to the target terminal.
14. The apparatus of claim 12, wherein the address assignment module is further to:
And if the total traffic of the data flow flowing on the link between the main router and the standby router exceeds a traffic threshold, no unassigned address exists in the address pool under the target domain, no unassigned address exists in the main address pool configured under the residual domain, and no unassigned address exists in the standby address pool configured under the residual domain, selecting one address from the unassigned addresses included in the standby address pool configured under the residual domain to be assigned to the target terminal.
15. A network device, the network device comprising a processor and a memory;
the memory is used for storing a program for executing the method of any one of claims 1-7 and storing data related to implementing the method of any one of claims 1-7;
the processor is configured to execute a program stored in the memory.
16. A computer-readable storage medium, characterized in that the storage medium has stored therein a computer program which, when executed by a processor, implements the steps of the method of any of claims 1-7.
CN201911398382.7A 2019-12-30 2019-12-30 Address allocation method, device, network equipment and storage medium Active CN113132500B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911398382.7A CN113132500B (en) 2019-12-30 2019-12-30 Address allocation method, device, network equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911398382.7A CN113132500B (en) 2019-12-30 2019-12-30 Address allocation method, device, network equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113132500A CN113132500A (en) 2021-07-16
CN113132500B true CN113132500B (en) 2024-02-02

Family

ID=76768114

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911398382.7A Active CN113132500B (en) 2019-12-30 2019-12-30 Address allocation method, device, network equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113132500B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104243625A (en) * 2013-06-08 2014-12-24 中国移动通信集团河南有限公司 IP address distribution method and device
CN105743781A (en) * 2016-01-11 2016-07-06 杭州华三通信技术有限公司 VRRP load balancing method and VRRP load balancing device
CN105791462A (en) * 2016-04-28 2016-07-20 锐捷网络股份有限公司 Method, system and DHCP server for realizing load balance of network equipment
CN107911291A (en) * 2017-11-28 2018-04-13 中国移动通信集团湖北有限公司 VRRP routers switching method, router, VRRP active-standby switch system and storage medium
CN109672758A (en) * 2017-10-13 2019-04-23 中兴通讯股份有限公司 Address distribution method, access server and computer storage medium
CN110620683A (en) * 2019-08-30 2019-12-27 华为技术有限公司 Message sending method, device and system applied to distributed router networking

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9948503B2 (en) * 2015-10-23 2018-04-17 Hughes Network Systems, Llc Gateway redundancy protocol for communications networks

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104243625A (en) * 2013-06-08 2014-12-24 中国移动通信集团河南有限公司 IP address distribution method and device
CN105743781A (en) * 2016-01-11 2016-07-06 杭州华三通信技术有限公司 VRRP load balancing method and VRRP load balancing device
CN105791462A (en) * 2016-04-28 2016-07-20 锐捷网络股份有限公司 Method, system and DHCP server for realizing load balance of network equipment
CN109672758A (en) * 2017-10-13 2019-04-23 中兴通讯股份有限公司 Address distribution method, access server and computer storage medium
CN107911291A (en) * 2017-11-28 2018-04-13 中国移动通信集团湖北有限公司 VRRP routers switching method, router, VRRP active-standby switch system and storage medium
CN110620683A (en) * 2019-08-30 2019-12-27 华为技术有限公司 Message sending method, device and system applied to distributed router networking

Also Published As

Publication number Publication date
CN113132500A (en) 2021-07-16

Similar Documents

Publication Publication Date Title
WO2021027949A1 (en) Routing method and device
KR20170060102A (en) Data forwarding method, device and system in software-defined networking
CN111263373B (en) Data processing method, controller and forwarding equipment
CN105706401A (en) Hierarchical routing with table management across hardware modules
CN110061855B (en) Service processing method, system and device
CN113132229A (en) Segment identifier determination method and device
WO2016194089A1 (en) Communication network, communication network management method and management system
CN113079090A (en) Traffic transmission method, node and system
CN113381936A (en) Network information processing method and device and network equipment
CN108574635B (en) Routing priority configuration method, device and controller
CN114157600A (en) Method, equipment and system for forwarding message
CN113132500B (en) Address allocation method, device, network equipment and storage medium
US11652707B2 (en) Network management system and method
WO2022017099A1 (en) Communication method, cp device, and nat device
WO2022166465A1 (en) Message processing method and related apparatus
CN117319343A (en) Policy routing implementation method, device and storage medium
CN112152899B (en) Data processing method and device based on network slice
CN112751766B (en) Message forwarding method and system, related equipment and chip
CN113595915A (en) Method for forwarding message and related equipment
CN112203302A (en) Access equipment configuration method and network management system
Lashgari et al. A shared-path shared-compute planning strategy for a resilient hybrid C-RAN
US20030206518A1 (en) Public access separation in a virtual networking environment
CN115242698A (en) Message forwarding method, device, network equipment and storage medium
CN112751768A (en) Service message forwarding method, device and computer storage medium
CN115242699A (en) Message transmission method, slice generation method, device and system

Legal Events

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