CN110048953A - A kind of load sharing method, device and router - Google Patents

A kind of load sharing method, device and router Download PDF

Info

Publication number
CN110048953A
CN110048953A CN201910361892.0A CN201910361892A CN110048953A CN 110048953 A CN110048953 A CN 110048953A CN 201910361892 A CN201910361892 A CN 201910361892A CN 110048953 A CN110048953 A CN 110048953A
Authority
CN
China
Prior art keywords
router
public network
address
network address
sub
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910361892.0A
Other languages
Chinese (zh)
Other versions
CN110048953B (en
Inventor
章靠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Information Technologies Co Ltd
Original Assignee
New H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN201910361892.0A priority Critical patent/CN110048953B/en
Publication of CN110048953A publication Critical patent/CN110048953A/en
Application granted granted Critical
Publication of CN110048953B publication Critical patent/CN110048953B/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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • H04L45/028Dynamic adaptation of the update intervals, e.g. event-triggered updates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables
    • 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/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The disclosure provides a kind of load sharing method, device and router, comprising: the public network address pond being locally pre-configured is divided into multiple sub- public network address ponds;In the multiple sub- public network address pond, the first sub- public network address pond used in this router is selected;The the first address pool routing for carrying the first sub- public network address pond to the publication of public network equipment generates the first route table items so that public network equipment is routed based on first address pool;The destination address of first route table items is the first sub- public network address pond, the address that next-hop is the first router;The default route configured in the first router is distributed to access device, so that the access device is based on the default route and generates default route list item, the next-hop of the default route list item is the address of the first router.The method provided using the disclosure, may be implemented load balancing.

Description

A kind of load sharing method, device and router
Technical field
This disclosure relates to computer communication field more particularly to a kind of load sharing method, device and router.
Background technique
NAT (Network Address Translation, network address translation) is to solve IP (Internet Protocol Address, Internet protocol address) address shortage and the technology that introduces.By in the network using private net address NAT device is disposed at edge, is converted to the address information carried in heading, so that the accessible public affairs of the node in private network Net.
It is generally included in existing NAT conversion networking: access device, router and public network equipment.Access device with Private user host is connected.The flow that subscriber's main station can be sent to public network by access device is transmitted to router device.Router is set It is standby upper configured with CGN (Carrier-Grade Network Address Translation, the network address turn of carrier-class Change) plate, the CGN plate of router device can carry out NAT conversion to the flow, and the flow after NAT is converted is sent to public network and sets It is standby.
Summary of the invention
In view of this, the disclosure provides a kind of load sharing method and device, to realize load balancing.
Specifically, the disclosure is achieved by the following technical solution:
According to the disclosure in a first aspect, providing a kind of load sharing method, the method is applied in the first router, The first router is the router in the router group with NAT conversion function, is pre-configured in the first router empty Quasi- functional area, the virtual service mouth are used to monitor the state of the CGN plate in the first router, configure in the first router There is default route, the outgoing interface of the default route is the virtual service mouth, which comprises
The public network address pond being locally pre-configured is divided into multiple sub- public network address ponds;
In the multiple sub- public network address pond, the first sub- public network address pond used in this router is selected;
The first address pool routing that the first sub- public network address pond is carried to the publication of public network equipment, so that public network equipment base It is routed in first address pool, generates the first route table items;The destination address of first route table items is the first sub- public network Address pool, the address that next-hop is the first router;
The default route configured in the first router is distributed to access device, so that the access device is based on being somebody's turn to do Default route generates default route list item, and the next-hop of the default route list item is the address of the first router.
According to the second aspect of the disclosure, a kind of load balancing device is provided, described device is applied in the first router, The first router is the router in the router group with NAT conversion function, is pre-configured in the first router empty Quasi- functional area, the virtual service mouth are used to monitor the state of the CGN plate in the first router, configure in the first router There is default route, the outgoing interface of the default route is the virtual service mouth, and described device includes:
Division unit, the public network address pond for will locally be pre-configured are divided into multiple sub- public network address ponds;
Selecting unit, for selecting the first sub- public network used in this router in the multiple sub- public network address pond Address pool;
First release unit, for carrying the first address pool road in the first sub- public network address pond to the publication of public network equipment By generating the first route table items so that public network equipment is routed based on first address pool;The destination of first route table items Location is the first sub- public network address pond, the address that next-hop is the first router;
Second release unit, for the default route configured in the first router to be distributed to access device, so that The access device is based on the default route and generates default route list item, and the next-hop of the default route list item is described first The address of router.
According to the third aspect of the disclosure, a kind of router, including processor and machine readable storage medium are provided, it is described Machine readable storage medium is stored with the machine-executable instruction that can be executed by the processor, and the processor is by the machine Device executable instruction promotes to execute method as described in relation to the first aspect.
According to the fourth aspect of the disclosure, a kind of machine readable storage medium is provided, the machine readable storage medium is deposited Machine-executable instruction is contained, when being called and being executed by processor, the machine-executable instruction promotes the processor to hold Capable method as described in relation to the first aspect.
It seen from the above description, can will be positive when access device is when receiving the positive flow of subscriber's main station transmission Traffic sharing carries out NAT conversion on the different routers into router group.
When public network equipment receives the reverse flow for being sent to private network, reverse flow can be also forwarded to this by public network equipment The positive flow of reverse flow carries out the router of NAT conversion, to carry out NAT conversion to the reverse flow by the router.
Detailed description of the invention
Fig. 1 is a kind of networking schematic diagram of NAT conversion networking shown in one exemplary embodiment of the disclosure;
Fig. 2 is a kind of flow chart of load sharing method shown in one exemplary embodiment of the disclosure;
Fig. 3 is a kind of schematic diagram for load sharing method that one exemplary embodiment of the disclosure provides;
Fig. 4 is a kind of hardware block diagram of router shown in one exemplary embodiment of the disclosure;
Fig. 5 is a kind of block diagram of load balancing device shown in one exemplary embodiment of the disclosure.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
It is only to be not intended to be limiting the disclosure merely for for the purpose of describing particular embodiments in the term that the disclosure uses. The "an" of the singular used in disclosure and the accompanying claims book, " described " and "the" are also intended to including majority Form, unless the context clearly indicates other meaning.It is also understood that term "and/or" used herein refers to and wraps It may be combined containing one or more associated any or all of project listed.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the disclosure A little information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other out.For example, not departing from In the case where disclosure range, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as One information.Depending on context, word as used in this " if " can be construed to " ... when " or " when ... When " or " in response to determination ".
It is generally included in existing NAT conversion networking: access device, router and public network equipment.Access device with Private user host is connected.The flow that subscriber's main station can be sent to public network by access device is transmitted to router device.Router is set It is standby upper configured with CGN (Carrier-Grade Network Address Translation, the network address turn of carrier-class Change) plate, the CGN plate of router device can carry out NAT conversion to the flow, and the flow after NAT is converted is sent to public network and sets It is standby.
But access device is connected with a large amount of subscriber's main station, when access device sets a large amount of subscriber's main station access public network Standby flow is forwarded to router device and carries out NAT conversion, will greatly increase the workload of router device, reduces road By the working performance of device equipment.
It is a kind of networking schematic diagram of NAT conversion networking shown in one exemplary embodiment of the disclosure referring to Fig. 1, Fig. 1.
Networking shown in FIG. 1 includes: public network equipment, router group, access device, subscriber's main station.Certainly in practical application In, NAT conversion networking may also include other equipment, only illustratively illustrate here, without specifically defined.
It wherein, include multiple router devices in router group.Each router device includes CGN plate, for carrying out NAT conversion.For example, the router can be CR (Core Router, core router) equipment etc., here only illustratively Illustrate, without specifically defined.
Above-mentioned access device, is connected with subscriber's main station, the access for subscriber's main station.The access device may include BRAS (Broadband Remote Access Server, Broadband Remote Access Server) equipment, here only to access device into Row illustratively illustrates, without specifically defined.
In networking shown in Fig. 1, subscriber's main station is connected with access device, each routing in access device and router group Device equipment is connected.Each router device in router group is connected with public network equipment.
It should be noted that the flow for being sent to public network is referred to as positive flow by the disclosure, the flow from public network to private network Referred to as reverse flow.Positive flow is corresponding with reverse flow, and the reverse flow of positive flow refers to: the destination of reverse flow Location and port numbers are the source address and source port after forward direction flow NAT conversion.
The disclosure is directed to a kind of load sharing method, which needs to realize following two kinds of functions.
Function 1: when BRAS equipment receive subscriber's main station transmission positive flow when, positive traffic sharing can be arrived NAT conversion is carried out on different routers in router group.
For example, BRAS equipment is connected with subscriber's main station 1 and subscriber's main station 2.It include router 101 and routing in router group Device 102.
When BRAS equipment receives the positive flow 1 of subscriber's main station 1, positive flow 1 can be distributed to router 101 into Row NAT conversion.When BRAS equipment receives the positive flow 2 of subscriber's main station 2, positive flow 2 can be distributed to router 102 Carry out NAT conversion.
Function 2: when public network equipment receives the reverse flow for being sent to private network, public network equipment can also be forwarded reverse flow The router of NAT conversion is carried out to the positive flow to the reverse flow, is turned with carrying out NAT to the reverse flow by the router It changes.
For example, still by taking the example in function 1 as an example, it is public when public network equipment receives the reverse flow 1 of positive flow 1 Reverse flow 1 can be returned to router 101 by net equipment, carry out NAT conversion to reverse flow 1 by router 101.When public network is set When the standby reverse flow 2 for receiving positive flow 2, reverse flow 2 can be returned to router 102 and carry out NAT turns by public network equipment It changes.
The load sharing method of disclosure offer is provided.
Referring to fig. 2, Fig. 2 is a kind of flow chart of load sharing method shown in one exemplary embodiment of the disclosure, the party Method may include step as follows.This method can be applicable in the first router in router group shown in FIG. 1, the first via It can be any router in router group by device.
Step 201: the public network address pond being locally pre-configured is divided into multiple sub- public network address ponds by the first router.
In an optional implementation manner, the first router can be based on the router number in router group, to public affairs Net address pond is divided, so that the every sub- public network address pond marked off is corresponding with each router respectively.For details, reference can be made to Step 2011 is to step 2012.
Step 2011: the first router determines the router number N in the router group.
In an optional implementation manner, developer is pre- as configuration information using the router number in router group It first configures on each router.
The first router can determine the router number N in router group by reading local configuration information.
In another optional implementation, each router in router group can interact itself each other Information, so that the information that each router can be sent based on other routers, determines the router in router group Number N.
Certainly, above-mentioned that only " the first router determines the router number N in router group " is illustratively said It is bright, without specifically defined.
Step 2012: the public network address pond being locally pre-configured is divided into N number of sub- public network address pond by the first router.
When realizing, each of router group router is configured with identical public network address pond.
The public network address pond being locally configured can be divided into N number of sub- public network address pond by the first router.
In another optional implementation, the first router can divide public network address pond according to preset rules, so that Router can correspond to one or more sub- public network address pond.
Here only the division methods in public network address pond are illustratively illustrated, without specifically defined.
Step 202: the first router selects the first son used in this router in the multiple sub- public network address pond Public network address pond.
When realizing, each router in router group has been preconfigured serial number.The first router can be in the N In a sub- public network address pond, sub- public network address pool corresponding with the first router serial number is selected, as the first sub- public network address Pond.
In selection, the first router can determine ranking of the first router in router group based on the serial number of itself.
In addition, N number of sub- public network address pond also has sequence.
Ranking and the consistent sub- public network address pond of ranking of the first router in router group may be selected in the first router As the first sub- public network address pond.
For example, include 3 routers in router group, respectively router 201, router 202 and router 203, Middle hypothesis router 201 is the first router.It is assumed that the serial number 1 of router 201, the serial number 2 of router 202, router 203 serial number 3.
Assuming that the public network address pond being pre-configured is divided into 3 sub- public network address ponds, the sequence in this 3 sub- public network address ponds It is followed successively by sub- public network address pond 1, sub- public network address pond 2 and sub- public network address 3.
Router 201 can determine ranking of the router 201 in router group based on the serial number (i.e. serial number 1) of itself It is first, meanwhile, router 201 can determine that ranking of the sub- public network address pond 1 in 3 sub- public network address ponds is first, because This router 201 can be by sub- public network address pond 1 as the first sub- public network address pond used in router 201.
Certainly, the corresponding first sub- public network address of other algorithms selection the first router can also be used in the first router, this In only illustratively illustrate, without specifically defined.
Step 203: the first router carries first address pool in the first sub- public network address pond to the publication of public network equipment Routing generates the first route table items so that public network equipment is routed based on first address pool;The purpose of first route table items Address is the first sub- public network address pond, the address that next-hop is the first router.
When realizing, the first router carries first address pool in the first sub- public network address pond to the publication of public network equipment Routing.
Public network equipment can learn the first address pool road and in local routing table after receiving first address pool routing The first route table items of middle generation.The destination address of first route table items be the first sub- public network address pond, next-hop be this first The address of router.
It should be noted that public network equipment can receive the third address of other routers (such as the second router) publication Pond routing (third address pool routing carries the second router in the second subaddressing pond of N number of subaddressing Chi Zhongxuan), public network Equipment can generate third route table items based on third address pool routing.The destination address of the third route table items is that the second son is public Net address pond, next-hop are the address of the second router.
Based on same principle, public network equipment can form N number of route table items, and N number of route table items are corresponding with N number of router. The destination address of each route table items is the sub- public network address pond that the corresponding router of the route table items is selected, and next-hop is The address of the router.
Above-mentioned function 2 may be implemented by routing table thereon in public network equipment.Specifically, public network equipment is receiving reversely After flow 1, due to source of the destination address of the reverse flow 1 positive flow 1 corresponding with the reverse flow 1 after NAT is converted Address is identical, so reverse flow 1 can hit the corresponding route table items of router for carrying out NAT conversion to positive flow 1, public network Reverse flow 1 can be sent to the router based on the route table items and carry out NAT conversion by equipment.
Step 204: allocating default routing in the first router is distributed to access device by the first router, so that described Access device is based on the default route and generates default route list item, the next-hop of the default route list item be the first via by The address of device.
It should be noted that being configured with virtual service mouth in the first router, the virtual service mouth is for track (monitoring) the The state of CGN plate on one router.Default route, the destination address of the default route are configured in the first router 0.0.0.0/0, outgoing interface is virtual service mouth.
When realizing, which can be distributed to access device by the first router.
Access device can learn the default route after receiving the default route, and generate default route list item.Its In, the destination address of the default route list item of generation is 0.0.0.0/0, and next-hop is the address of the first router.
It should be noted that the default route that access device can be issued based on other routers in router group, respectively Generation destination address is 0.0.0.0/0, and next-hop is the default route list item of the address of other routers.Access device will be based on The default route list item of the default route of each router device publication merges, and generates default route list item of equal value.The equivalence is silent The destination address for recognizing route table items is 0.0.0.0/0.The equivalence default route list item includes N number of next-hop of equal value, is respectively directed to N number of router device in router group.
Access device, which is based on the equivalent route list item, can realize function 1 mentioned above.Specifically, when access device receives When to the positive flow for being sent to public network, positive flow can hit default route list item of equal value, and access device can default road in equivalence By selecting a next hop router in the next-hop of equal value of list item, and the forward direction flow is sent to the next-hop road selected NAT conversion is carried out by device, to realize the load balancing of positive flow.
It should be noted that specific restriction is not carried out to the timing of step 201 and step 205 here, as long as meeting logic ?.
In addition, the disclosure additionally provides the operation of reply CGN plate failure when the CGN plate failure in the first router:
In the disclosure, when the virtual service mouth track in the first router is to CGN plate failure on this router, The first revocation message that the first router can be routed to the public network equipment and access device publication for first address pool.
Public network equipment can delete the first route table items in local routing table when receiving the first revocation message.
First revocation message can be transmitted to the second router when receiving the first revocation message by access device.It should First revocation message carries the first sub- public network address pond.The second router described here refer in router group except this first Any router in other routers except router.
The second router, can by the first sub- public network of the first revocation message carrying after receiving the first revocation message Location pond is divided into N-1 public network address section, and in N-1 public network address section with selecting corresponding first public network of the second router Location section, and routed to the second address pool that public network equipment publication carries the first public network address section, so that the public affairs Net equipment is based on second address pool routing and generates secondary route list item, and the destination address of the secondary route list item is first public Net address section, next-hop are the address of the second router
In addition, when the virtual service mouth track in the first router is to CGN plate failure on this router, the first via The revocation message for being directed to the default route can be also issued to the access device from device, so that the access device is based on described The revocation message of default route, by the default router table entry deletion
When the CGN plate fault recovery in the first router, the disclosure is additionally provided for the CGN plate in the first router The operation of fault recovery:
When determining the CGN plate fault recovery in this first router by the virtual service mouth in the first router, the One router can issue again the first address pool routing to the public network equipment and access device.
Public network equipment can be regenerated described after receiving first address pool routing based on first address pool routing First route table items.
After access device receives first address pool routing, described the can be given by the first address pool routing forwarding Two routers.
After the second router receives the first address pool routing of access device forwarding, it can be issued to public network equipment and be directed to institute State the second revocation message of the second address pool routing.Public network equipment can be based on the second revocation message, by the secondary route table Entry deletion.
In addition, determining the CGN plate fault recovery in this first router by the virtual service mouth in the first router When, the first router can issue again allocating default in the first router to the access device and route, so that described connect Enter equipment and the default route list item is regenerated based on default route generation.
In addition, hereinbefore mentioning: the second router selects the second sub- public network address in N number of sub- public network address pond Pond.The third address for carrying the second sub- public network address pond can be routed and be distributed to public network equipment by the second router.Public network equipment can It is routed based on the third address pool and generates third route table items.The destination address of the third route table items is the second sub- public network address Pond, next-hop are the address of the second router.
When the CGN plate failure in the second router, the second router can be directed to access device and network equipment publication The third of third address pool routing cancels message.The network equipment, can be by third routing table after receiving third revocation message Entry deletion.
Second revocation message can be transmitted to the first router after receiving the second revocation message by access device.
The third can be cancelled the second son carried in message after receiving the second revocation message by the first router Public network address pond is divided into N-1 public network address section, in N-1 public network address section, selects this first router corresponding Two public network address sections.
The first router carries the 4th address pool routing of the second public network address section to the publication of public network equipment, so that public Net equipment is routed based on the 4th address pool, generates the 4th route table items;The destination address of 4th route table items is second Public network address section, next-hop are the address of the first router.
When the CGN plate fault recovery in the second router, the second router can be to public network equipment and access device again Issue the routing of third address pool.
Public network equipment produces third route table items after receiving third address pool routing.
Access device, can be by third address pool routing forwarding to the first router after receiving the routing of third address pool. For the first router when receiving the routing of third address pool, the publication of Xiang Suoshu public network equipment is for the 4th address pool routing 4th revocation message, so that public network equipment is based on the 4th revocation message and deletes the 4th route table items.
In addition, the disclosure additionally provide for have in the router group new router be added or router group in have The operation that router leaves:
When the first router detects that router is added in the router group or has in the router group have routing When device leaves, the number A of current router in the router group is determined, and the public network address pond is divided into A son public affairs Net address pond.
The first router can select the sub- public network address pond of third used in this router in A sub- public network address ponds, Then the first router can issue the first revocation message routed for first address pool to the public network equipment, so that institute Public network equipment is stated to delete first route table items based on the first revocation message.
The first router also carries the 5th address pool routing in the sub- public network address pond of the third to the publication of public network equipment, with It routes public network equipment based on the 5th address pool, generates the 5th route table items;The destination address of 5th route table items is The sub- public network address pond of third, next-hop are the address of the first router.
It should be noted that the first router can realize that " the first router detects the routing in the following way Being added in router or the router group in device group has router to leave ".
In an optional implementation manner, when be added in router or router group in router group have router from When opening, developer can modify the router number N of the router group recorded in configuration information.Than being routed if any one When router group is added in device, the router number of the router group recorded in configuration information is revised as N+1 by developer.
The first router can read the router number in the router group recorded in the configuration information, determine to route Device group has router addition or router group to have router to leave.
In another optional implementation, when there is router addition in router group, the router being newly added can Message is added in other routers publication into router group, and the first router is after receiving the addition message, it may be determined that road By having router addition in device group.
When having router to leave in router group, the router that leaves can also other routers hair into router group Cloth leave group message, the first router is after receiving the leave group message, it may be determined that has router to leave in router group.
Certain the first router can also realize that " the first router, which detects in the router group, to be added by other means Entering in router or the router group has router to leave ", only illustratively illustrate here, without specifically limiting It is fixed.
Seen from the above description, when have in router group router failure, router failure restore, the road router Zu Zhongyou When being left by device addition and router, by updating route table items and public network equipment route table items on access device, automatically Realize that positive flow is carried out load balancing in each normal router of current router group by access device.
It include below two router devices, access devices for BRAS equipment to participate in the router group that NAT is converted, And Fig. 3 is combined, the load sharing method provided the disclosure is described in detail.
It is a kind of schematic diagram for load sharing method that one exemplary embodiment of the disclosure provides referring to Fig. 3, Fig. 3.
As shown in figure 3, the router group for participating in NAT conversion includes two router devices, respectively router 301 and road By device 302.
Router 301 is connected with BRAS equipment 301, and router 302 is connected with BRAS equipment 301, router 301 and public network Equipment 301 is connected, and router 302 is also connected with public network equipment 301.
Router 301 is configured with CGN plate 301, is configured with CGN plate 302 on router 302.Router 301 and router Identical public network address pond is configured on 302, it is assumed that public network address pond is 190.0.0.0/30.
Virtual service mouth 301 is pre-configured on router 301, which can be with track router 301 On CGN301 plate state, and default route 1 is configured on router 301, the destination address of the default route 1 is 0.0.0.0/0, outgoing interface is the virtual service mouth 301.
Similarly, virtual service mouth 302 has been pre-configured on router 302, which can be routed with track The state of CGN302 plate on device 302, and default route 2 is configured on router 302, the destination of the default route 2 Location is 0.0.0.0/0, and outgoing interface is the virtual service mouth 302.
Router 301 and router 302 have been preconfigured serial number, such as the serial number 1 of router 301, router 302 Serial number 2.
Embodiment 1:
Step 301: router can determine the router quantity N in the router group for participating in NAT conversion.
In an optional implementation manner, developer can be in advance by the router quantity N (i.e. 2) in router group As configuration information, it is pre-configured on router 301 and router 302.
The configuration information can be read in router 301, obtains the router quantity (i.e. 2) in router group.
In another optional implementation, the information of itself, Mei Gelu can be interacted between each router The information of other routers can be got by device, each router is determined to route by the information of other routers of acquisition Router quantity in device group.
For example, router 301 and router 302 can interact the information of itself, router 301 can be based on router 302 Information, determine in router group include 2 routers.
Similarly, router 302 also can determine that include 2 routers in router group.
Step 302: the public network address pond of local record can be divided into N number of sub- public network address pond by router.
In this example, since the router quantity N in router group is 2, so router 301 can be by local record Public network address pond is divided into 2 sub- public network address ponds, the two sub- public network address ponds are respectively sub- public network address pond 1, sub- public network Address pool 2.
Similarly, the public network address pond stored on router 302 can be also divided into sub- 1 He of public network address pond by router 302 Sub- public network address pond 2.
Wherein, sub- public network address pond 1 is 190.0.0.0/31, and sub- public network address pond 2 is 190.0.0.4/31.
Step 303: router can obtain sub- public network address in the sub- public network address pond marked off based on the serial number of itself Pond, and the sub- public network address pond is determined as the sub- public network address pond that router 301 uses.
When realizing, router 301 can determine ranking of itself serial number in each router, and then, router 301 can be Ranking and the consistent sub- public network address pond of ranking of the router 301 in each router are selected in sub- public network address pond, as Sub- public network address pond used in the router 301.
For example, in this example, one shares 2 routers in router group, the serial number 1 of router 301, then router 301 are ordered as first in router group.
It is assumed that the sequence in two sub- public network address ponds are as follows: sub- public network address pond 1, sub- public network address pond 2.
Since sub- public network address pond 1 is ordered as first in two sub- public network address ponds.
So router 301 can be by sub- public network address pond 1 as sub- public network address pond used in router 301.Here Sub- public network address pond used in router 301 refers to that router 301 carries out NAT conversion using the sub- public network address pond.
Similarly, router 302 can be by sub- public network address pond 2 as sub- public network address pond used in router 302.
Step 304: the routing for carrying the sub- public network address pond itself used can be distributed to public network equipment by router.
When realizing, router 301 can issue the address pool routing 1 for carrying 190.0.0.0/30 to public network equipment, public Net equipment produces route table items 1 in the address pool routing 1 that study to router 301 is issued.Route table items 1 can be such as table 301 The second row shown in, the destination addresses of route table items 1 is 190.0.0.0/30, and next-hop is the IP address of router 301.
Similarly, router 302 also carries the address pool routing 2 of 190.0.0.4/30 to the publication of public network equipment, and public network is set When the standby address pool routing 2 sent in study to router 302, route table items 2 are produced.Route table items 2 can be such as the of table 301 Shown in three rows, the destination address of route table items 2 is 190.0.0.4/30, and next-hop is the IP address of router 302.
Table 301
Wherein, table 301 is the routing table in public network equipment, the second behavior route table items 1 in table 301, third behavior road By list item 2, certainly, according to practical application, which may also include other route table items, may also include other in route table items Option only illustratively illustrates without specifically defined here.
Step 304: the default route of itself configuration can be distributed to BRAS equipment 301 by router.
When realizing, the default route 1 of itself configuration can be distributed to BRAS equipment 301, BRAS equipment by router 301 301 can learning router 301 issue default route 1.
Similarly, the default route 2 of itself configuration can be distributed to BRAS equipment 301 by router 302, and BRAS equipment 301 can The default route 2 that learning router 302 is issued.
The default route that the default route 1 and router 302 that BRAS equipment 301 is issued by learning router 301 are issued 2, the default route list item of equal value with next-hop of equal value is generated, the equivalence default route list item is as shown in the second row of table 302. The equivalence default route list item, which is used to indicate, to be sent to the flow of public network and can be sent to router by the equivalence next-hop list item 301 or router 302.
Table 302
The lower load balancing that flow how is realized using table 301 and table 302 is described below.
Here the flow for being sent to public network is referred to as positive flow, reverse flow will be referred to as from the flow of public network. Positive flow is corresponding with reverse flow, and the destination address and destination slogan of positive flow are the corresponding reverse flows of forward direction flow The source address and source port number of amount.
It is assumed that can be hit under the equivalence in table 302 when BRAS equipment 301 receives the positive flow 1 for being sent to public network One skip list item.BRAS equipment 301 can select next-hop according to certain algorithm (such as hash algorithm etc.).For example it selects down One IP address jumped as router 301.At this moment, positive flow 1 can be sent to router 301 by BRAS equipment 301.
Router 301 can carry out NAT conversion to positive flow 1 using sub- public network address pond 1 (i.e. 190.0.0.0/31), raw Session is converted at the NAT for positive flow 1.
Positive flow 1 after router 301 can convert NAT is sent to public network equipment.
When public network equipment receives the reverse flow 1 of positive flow 1, (destination address of reverse flow 1 does for positive flow 1 Source address after NAT conversion, so the destination address of reverse flow 1 is in the network segment shown in 190.0.0.0/31) when, public network equipment Reverse flow 1 can be sent to router 301, by router 301 based on route table items 1 shown in the second row in table 301 NAT based on positive flow 1 converts session, carries out NAT conversion to reverse flow 1, and the reverse flow 1 after NAT is converted returns Back to BRAS equipment 301, to be forwarded by BRAS equipment 301.
Seen from the above description, on the one hand, the default route of itself is distributed to downstream by router 301 and router 302 BRAS equipment 301 pass through default route list item of equal value so that BRAS equipment 301 may learn default route list item of equal value It will be sent on the flow load sharing to router 301 and router 302 of public network.
On the other hand, router 301 and router 302 respectively use respective sub- public network address pond, so that router 301 NAT conversion respectively can be carried out to the flow that BRAS shares using the sub- public network address pond of self maintained with router 302.
The third aspect, router 301 and router 302 will include that the sub- public network address pond routing itself used is distributed to Public network equipment allows public network equipment to form the routing table as shown in table 301, so that public network equipment can will be routed for some The reverse flow that device does the positive flow of NAT conversion returns to the router, is still NAT to the reverse flow by the router and turns It changes, this can guarantee that reverse flow remains to find corresponding router progress NAT conversion.For example, public network equipment can part reverse flow Amount 1 is sent to router 301 by table 301 and carries out NAT conversion.Wherein, positive flow 1 of the router 301 to the reverse flow 1 NAT conversion is carried out.
Embodiment 2:
On the basis of embodiment 1, when virtual service mouth 1track to CGN 301 failure of plate on router 301, road The revocation of default route 1 that outgoing interface is the virtual service mouth 1 can be fallen by device 301.In addition, router 301 can be to BRAS equipment 301 send the revocation message 1 for being directed to default route 1.BRAS can will be routed after receiving the revocation message 1 of the default route 1 The next-hop of equal value in equivalent route list item in table 302 is that the next-hop of the IP address of router 301 is deleted.At this point, BRAS Routing table in equipment 301 is as shown in table 303.
Table 303
In addition, router 301 can be also directed to the router 301 to public network equipment and the publication of BRAS equipment 301 The revocation message 2 of address pool routing 1 (i.e. the address pool routing of carrying 190.0.0.0/31).The revocation message 2 carries 190.0.0.0/31.In addition, router 301 also records and has router 301 used sub- public network address pond 1 is (i.e. before failure 190.0.0.0/31)
After when upstream, public network equipment receives the revocation message 2, public network equipment can will be in local routing table (i.e. table 301) (i.e. destination address is 190.0.0.0/31 to the deletion of route table items 1, and next-hop is that the route table items of the address of router 301 are deleted Except).
In addition, the revocation message can reach BRAS equipment 301, the revocation message 2 is sent to routing by BRAS equipment 301 Device 302.
Router 302 is after receiving the route withdraw message 2, it may be determined that router 301 is unavailable.Router 302 can The sub- public network address pond 1 (i.e. 190.0.0.0/31) carried in message 2 will be cancelled and be divided into N-1 public network address section (due to N= 2, so being divided into a public network address section, which is 190.0.0.0/31.Due to current router Only one router 302 in group, so it is first that router 302 ranks in current router group, the public network address section Ranking be also first, so router 302 can be using the public network address section as public network address section used in oneself.
Then, router 302 can upstream device publication carry 190.0.0.0/31 address pool routing 3, upstream public network Equipment can learn address pool routing 3, generate route table items 3, the destination of route table items 3 when receiving address pool routing 3 Location is 190.0.0.0/31, and next-hop is the IP address of router 302.
It should be noted that since (destination address 190.0.0.0/31, next-hop are router 302 to route table items 3 IP address) with route table items 2 (destination address 190.0.0.4/31, next-hop be router 302 IP address) next-hop It is identical, a route table items are generated so two route table items can be merged.(destination address for merging route table items out is 190.0.0.0/30, outgoing interface is the IP address of router 302).Routing table in upstream public network equipment such as 304 institute of table at this time Show.
Destination address Next-hop
190.0.0.0/30 The IP address of router 302
Table 304
In flow forwarding, when BRAS equipment 301 is receiving the positive flow 2 for being sent to public network equipment, if positive flow 2 When hitting table 303, it can be used and NAT conversion is carried out to positive flow 2 in public network address pond 190.0.0.0/30, and establish NAT meeting Positive flow 2 is sent to public network equipment by words, router 302.
When public network equipment receives the reverse flow 2 of positive flow 2, (destination address of reverse flow 2 is positive flow 2 Source address, therefore the destination address of reverse flow 2 is in the network segment of the 190.0.0.0/30) when, public network equipment can pass through table 304, reverse flow 2 is sent to router 302, NAT conversion is done to reverse flow 2 by router 302, and NAT is converted Reverse flow 2 afterwards is sent to BRAS equipment 301, to be forwarded reverse flow 2 by BRAS equipment 301.
Seen from the above description, when the router failure in the router group for participating in NAT conversion, come through the above way The default route list item of equal value in the routing table and BRAS equipment 301 in public network equipment is updated, can make BRAS equipment 301 will Flow is sent on the normal router in router group and carries out load balancing, carries out NAT conversion to flow by normal router. Meanwhile when public network equipment receives reverse flow, reverse flow can be forwarded to target by local routing table by public network equipment NAT conversion is carried out on router (destination router is the router that NAT conversion is carried out to the positive flow of reverse flow).
Embodiment 3:
On the basis of embodiment 2, when virtual service mouth 1track to the CGN plate fault recovery on router 301, road The default route 1 that outgoing interface is the virtual service mouth 1 is produced by device 301.The destination address of default route 1 is 0.0.0.0/0, Outgoing interface is the virtual service mouth 1.
Router 301 can issue the default route 1 to BRAS equipment 301, and router 301 can learn the default route 1, It is that the default route list item of equal value that purpose address is 0.0.0.0/0 generates next-hop of equal value in the routing table shown in table 303 (i.e. the IP address of router 301) generates the route table items of next-hop of equal value as shown in table 301.
In addition, sub- public network address pond 1 used in front of 301 failure of router that router 301 can be read local record, Then, router 301 can issue again the address pool routing for carrying 190.0.0.0/30 to public network equipment and BRAS equipment 301 1, public network equipment produces route table items 1 in the address pool routing 1 that study to router 301 is issued.Route table items 1 can be such as Shown in second row of table 301, the destination addresses of route table items 1 is 190.0.0.0/30, and next-hop is the IP of router 301 Location.
Address pool can be routed 1 and be transmitted to router 302 by BRAS equipment 301 when receiving address pool routing 1.Road By device 302 when receiving the address pool routing 1 that router 301 is issued, it may be determined that the fault recovery of router 301.Router 302 can send the revocation message 3 for address pool routing 3 to public network equipment.Public network equipment, can after receiving revocation message 3 By route table items 3, (i.e. destination address is 190.0.0.0/31, and next-hop is the IP address of router 302 in local routing table Route table items 3) delete.
After public network equipment adds route table items 2 on table 304 and deletes route table items 3, the routing table of formation such as 301 institute of table Show.
Seen from the above description, when 301 fault recovery of router, BRAS equipment 301 and public affairs are updated using aforesaid way Routing table in net equipment, so that BRAS equipment carries out the load balancing of forward stream amount on router 301 and router 302, Public network equipment is allowed to carry out load balancing to reverse flow on router 301 and router 302.
Embodiment 4:
Assuming that participating in increasing router 303 in the router group of NAT conversion newly.The serial number 3 of newly-increased router 303.
1) it is directed to router 301:
When router 301 detects that (for example router 301 receives disappearing for newly-increased router 303 to newly-increased router 303 Breath) when, router 301 can redefine the router number (i.e. 3) in current router group.
Public network address pond can be divided into 3 sub- public network address ponds by router 301, i.e., sub- public network address 11, sub- public network Location pond 12 and sub- public network address pond 13.
Router 301 can redefine sub- public network address pond used in oneself.
When determining, due to the serial number 1 of router 301, router 301 be can determine from the sequence in router group It is first, the sequence in sub- public network address pond are as follows: sub- public network address pond 11, sub- public network address pond 12 and sub- public network address pond 13, Since sequence of the sub- public network address pond 11 in sub- public network address pond is also first.So router 301 can choose sub- public network The sub- public network address pond currently used as itself of address pool 11.
Similarly, router 302 selects the sub- public network address pond that sub- public network address 12 is used as itself, and router 303 selects Select the sub- public network address 13 sub- public network address pond currently used as itself.
Router 301 can issue the revocation that 1 (including 190.0.0.0/31) is routed for address pool to public network equipment Message 2.Public network equipment, can be by the 1 (table of route table items in local routing table (i.e. table 301) after receiving the revocation message 2 The second row route table items in 301) it deletes.
In addition, it (includes sub- public network address in address pool routing 4 that router 301 can issue address pool routing 4 to public network equipment Pond 11).Public network equipment can learned addresses pond routing 4, in local routing table generate route table items 4, the destination of route table items 4 Location is sub- public network address pond 11, and next-hop is the IP address of router 301.
Similarly, router 302 can be issued to public network equipment and route 2 (including 190.0.0.4/31) for address pool Cancel message 3.Public network equipment, can be by the route table items 2 in local routing table (i.e. table 301) after receiving the revocation message 3 (the third line route table items in table 301) are deleted.
In addition, it (includes sub- public network address in address pool routing 5 that router 302 can issue address pool routing 5 to public network equipment Pond 12).Public network equipment can learned addresses pond routing 5, in local routing table generate route table items 5, the destination of route table items 5 Location is sub- public network address pond 12, and next-hop is the IP address of router 302.
Similarly, it (includes sub- public network address in address pool routing 6 that router 303 can issue address pool routing 6 to public network equipment Pond 13).Public network equipment can learned addresses pond routing 6, in local routing table generate route table items 6, the destination of route table items 6 Location is sub- public network address pond 13, and next-hop is the IP address of router 303.
At this point, the routing table in public network equipment is as shown in table 305.
Destination address Next-hop
Sub- public network address pond 11 The IP address of router 301
Sub- public network address pond 12 The IP address of router 302
Sub- public network address pond 13 The IP address of router 303
Table 305
In addition, be pre-configured with virtual service mouth 3 on router 303, virtual service mouth 3 can be on track router 303 CGN3, and router 303 is also configured with default route 3, and the destination address of default route 3 is 0.0.0.0/0, and outgoing interface is void Quasi- functional area 3.
The default route 3 can be distributed to BRAS equipment 301 by router 303, and BRAS equipment 301 can learn default route 3, New next-hop of equal value (the i.e. IP of router 303 is generated in the next-hop of equal value of the equivalent route list item shown in table 302 Location).At this point, the routing table in BRAS equipment 301 is as shown in table 306.
Table 306
Seen from the above description, when increasing router in router group, 301 He of BRAS equipment is updated using aforesaid way Routing table in public network equipment, so that BRAS equipment carries out forward stream amount on router 301, router 302 and router 303 Load balancing, public network equipment bears reverse flow on router 301, router 302 and router 303 Load is shared.
Referring to fig. 4, Fig. 4 is a kind of hardware block diagram of router shown in one exemplary embodiment of the disclosure.
The router includes: communication interface 401, processor 402, machine readable storage medium 403 and bus 404;Wherein, Communication interface 401, processor 402 and machine readable storage medium 403 complete mutual communication by bus 404.Processor 402 by reading and executing the executable finger of machine corresponding with the control logic of load balancing in machine readable storage medium 403 It enables, above-described load sharing method can be performed.
Machine readable storage medium 403 referred to herein can be any electronics, magnetism, optics or other physical stores Device may include or store information, such as executable instruction, data, etc..For example, machine readable storage medium may is that easily Lose memory, nonvolatile memory or similar storage medium.Specifically, machine readable storage medium 403 can be RAM (Radom Access Memory, random access memory), flash memory, memory driver (such as hard disk drive), solid state hard disk, Any kind of storage dish (such as CD, DVD) perhaps similar storage medium or their combination.
It is a kind of block diagram of load balancing device shown in one exemplary embodiment of the disclosure referring to Fig. 5, Fig. 5.The device It can be applicable on router, described device is applied in the first router, and the first router is with NAT conversion function Router in router group, is pre-configured virtual service mouth in the first router, and the virtual service mouth is for monitoring the The state of CGN plate on one router is configured with default route in the first router, and the outgoing interface of the default route is institute Virtual service mouth is stated, described device includes:
Division unit 501, the public network address pond for will locally be pre-configured are divided into multiple sub- public network address ponds;
Selecting unit 502, in the multiple sub- public network address pond, selecting the first son used in this router public Net address pond;
First release unit 503, for carrying first address in the first sub- public network address pond to the publication of public network equipment Pond routing generates the first route table items so that public network equipment is routed based on first address pool;The mesh of first route table items Address be the first sub- public network address pond, the address that next-hop is the first router;
Second release unit 504, for the default route configured in the first router to be distributed to access device, with So that the access device is based on the default route and generate default route list item, the next-hop of the default route list item is described the The address of one router.
Optionally, the division unit 501, for determining the router number N in the router group;N is positive integer; The public network address pond being locally pre-configured is divided into N number of sub- public network address pond.
Optionally, each of described router group router is pre-configured with serial number;
The selecting unit 502 selects the first son used in this router public in the multiple sub- public network address pond When net address pond, specifically for selecting corresponding with the serial number of the first router in the N number of sub- public network address pond marked off Sub- public network address pond, as the first sub- public network address pond.
Optionally, described device further include:
Fault processing unit 505 (is not shown in Figure 5), for listening to this road when the virtual service mouth on this router When by CGN plate failure on device, Xiang Suoshu public network equipment and access device publication are for the first of first address pool routing Message is cancelled, so that the public network equipment is based on the first revocation message and deletes first route table items, and so that institute The second router that the first revocation message is transmitted in the router group by access device is stated, so that the secondary route The first sub- public network address pond that first revocation message carries is divided into N-1 public network address section by device, and in N-1 public network address The corresponding first public network address section of selection the second router in section, and first public network is carried to public network equipment publication Second address pool of address field routes, so that the public network equipment is based on second address pool routing and generates secondary route list item, The destination address of the secondary route list item is the first public network address section, and next-hop is the address of the second router;And The revocation message of the default route is directed to access device publication, so that the access device is based on the default route Revocation message, by the default router table entry deletion.
Optionally, described device further include:
Fault recovery unit 506 (is not shown) in Fig. 5, for determining on this router by the virtual service mouth When CGN plate fault recovery, Xiang Suoshu public network equipment and access device issue the first address pool routing again, so that the public affairs Net equipment is based on first address pool routing and regenerates first route table items, and so that the access device will be described First address pool routing forwarding gives the second router, is directed to described second from the second router to the publication of public network equipment Second revocation message of address pool routing, so that the public network equipment is based on the second revocation message, by the secondary route table Entry deletion;And Xiang Suoshu access device issues the default route configured in the first router again, so that the access Equipment is based on default route generation and regenerates the default route list item.
Optionally, the revocation processing unit 507 (being not shown in Fig. 5), in receiving the router group When the third for the routing of third address pool of the second router publication cancels message, by what is carried in third revocation message Second sub- public network address pond is divided into N-1 public network address section;Wherein, the third address pool routing includes the secondary route The second sub- public network address pond that device equipment is selected in N number of sub- public network address pond;The third revocation message is by described Virtual service mouth publication in the GCN plate failure listened in the second router in the second router;At the N-1 In public network address section, the corresponding second public network address section of this router is selected;Second public network is carried to the publication of public network equipment 4th address pool of address field routes, so that public network equipment is routed based on the 4th address pool, generates the 4th route table items;It is described The destination address of 4th route table items is the second public network address section, and next-hop is the address of the first router.
Optionally, the revocation processing unit 507, for when receive access device forwarding from described the When routing for third address pool of two routers, the publication of Xiang Suoshu public network equipment are directed to the 4th of the 4th address pool routing Message is cancelled, so that public network equipment is based on the 4th revocation message and deletes the 4th route table items;Wherein, the third address pool Routing hair in the CGN plate fault recovery listened in the second router by the virtual service mouth of the second router Cloth.
Optionally, described device further include:
Member's maintenance unit 508 (is not shown) in Fig. 5, for when detect in the router group be added router or Have when thering is router to leave in the router group, the public network address pond is divided into multiple sub- public network address ponds;Described In multiple sub- public network address ponds, the sub- public network address pond of third used in this router is selected;Needle is issued to the public network equipment To the first revocation message of first address pool routing, so that the public network equipment is based on the first revocation message for described the One route table items are deleted;And the 5th address pool routing in the sub- public network address pond of the third is carried to the publication of public network equipment, with It routes public network equipment based on the 5th address pool, generates the 5th route table items;The destination address of 5th route table items is The sub- public network address pond of third, next-hop are the address of the first router.
The function of each unit and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus Realization process, details are not described herein.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit The unit of explanation may or may not be physically separated, and component shown as a unit can be or can also be with It is not physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to actual The purpose for needing to select some or all of the modules therein to realize disclosure scheme.Those of ordinary skill in the art are not paying Out in the case where creative work, it can understand and implement.
The foregoing is merely the preferred embodiments of the disclosure, not to limit the disclosure, all essences in the disclosure Within mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of disclosure protection.

Claims (11)

1. a kind of load sharing method, which is characterized in that the method is applied in the first router, and the first router is Router in router group with NAT conversion function is pre-configured virtual service mouth in the first router, described virtual Functional area is used to monitor the state of the CGN plate in the first router, is configured with default route, the default in the first router The outgoing interface of routing is the virtual service mouth, which comprises
The public network address pond being locally pre-configured is divided into multiple sub- public network address ponds;
In the multiple sub- public network address pond, the first sub- public network address pond used in this router is selected;
The first address pool routing in the first sub- public network address pond is carried to the publication of public network equipment, so that public network equipment is based on being somebody's turn to do The routing of first address pool, generates the first route table items;The destination address of first route table items is the first sub- public network address Pond, the address that next-hop is the first router;
The default route configured in the first router is distributed to access device, so that the access device is based on the default Routing generates default route list item, and the next-hop of the default route list item is the address of the first router.
2. the method according to claim 1, wherein the public network address pond being locally pre-configured is divided into multiple sons Public network address pond, comprising:
Determine the router number N in the router group;N is positive integer;
The public network address pond being locally pre-configured is divided into N number of sub- public network address pond.
3. according to the method described in claim 2, it is characterized in that, each of described router group router is pre-configured with Serial number;
It is described in the multiple sub- public network address pond, select the first sub- public network address pond used in this router, comprising:
In the N number of sub- public network address pond marked off, sub- public network address pond corresponding with the serial number of the first router is selected, is made For the first sub- public network address pond.
4. the method stated according to claim 2, which is characterized in that the method also includes:
When the virtual service mouth on this router listens to the CGN plate failure on this router, Xiang Suoshu public network equipment and connect Enter equipment publication for the first revocation message of first address pool routing, so that the public network equipment is based on first revocation Message deletes first route table items, and so that the first revocation message is transmitted to the road by the access device By the second router in device group, so that the second router draws the first sub- public network address pond that the first revocation message carries It is divided into N-1 public network address section, and selects the corresponding first public network address section of the second router in N-1 public network address section, And the second address pool routing of the first public network address section is carried to public network equipment publication, so that the public network equipment It is routed based on second address pool and generates secondary route list item, the destination address of the secondary route list item is the first public network address Section, next-hop are the address of the second router;And
The revocation message of the default route is directed to access device publication, so that the access device is based on the default The revocation message of routing, by the default router table entry deletion.
5. according to the method described in claim 4, it is characterized in that, the method also includes:
When determining the CGN plate fault recovery on this router by the virtual service mouth, Xiang Suoshu public network equipment and access Equipment issues the first address pool routing again, so that the public network equipment is based on first address pool routing and regenerates institute State the first route table items, and so that the access device gives the first address pool routing forwarding to the second router, The the second revocation message routed from the second router to the publication of public network equipment for second address pool, so that the public affairs Net equipment is based on the second revocation message, and the secondary route list item is deleted;And
The default route configured in the first router is issued again to the access device, so that the access device is based on Default route generation regenerates the default route list item.
6. according to the method described in claim 2, it is characterized in that, the method also includes:
Message is cancelled in the third for the routing of third address pool for receiving the second router publication in the router group When, the third is cancelled into the second sub- public network address pond carried in message and is divided into N-1 public network address section;Wherein, described The routing of third address pool includes the second sub- public network that the second router equipment is selected in N number of sub- public network address pond Address pool;The third revocation message is by the virtual service mouth in the second router on listening to the second router GCN plate failure when issue;
In the N-1 public network address section, the corresponding second public network address section of this router is selected;
The 4th address pool routing of the second public network address section is carried to the publication of public network equipment so that public network equipment be based on this The routing of four address pools, generates the 4th route table items;The destination address of 4th route table items is the second public network address section, next Jump the address for the first router.
7. according to the method described in claim 6, it is characterized in that, the method also includes:
When receive access device forwarding from the second router for the routing of third address pool when, to institute The publication of public network equipment is stated for the 4th revocation message of the 4th address pool routing, is removed so that public network equipment is based on the described 4th It sells message and deletes the 4th route table items;
Wherein, the third address pool routing is listening to the second router by the virtual service mouth of the second router On CGN plate fault recovery when issue.
8. the method according to claim 1, wherein the method also includes:
When detect router is added in the router group or have there is router to leave in the router group when, will be described Public network address pond is divided into multiple sub- public network address ponds;
In the multiple sub- public network address pond, the sub- public network address pond of third used in this router is selected;
The the first revocation message routed to public network equipment publication for first address pool, so that the public network equipment base First route table items are deleted in the first revocation message;And
The 5th address pool routing in the sub- public network address pond of the third is carried to the publication of public network equipment, so that public network equipment is based on being somebody's turn to do The routing of 5th address pool, generates the 5th route table items;The destination address of 5th route table items is for the sub- public network of the third Location pond, next-hop are the address of the first router.
9. a kind of load balancing device, which is characterized in that described device is applied in the first router, and the first router is Router in router group with NAT conversion function is pre-configured virtual service mouth in the first router, described virtual Functional area is used to monitor the state of the CGN plate in the first router, is configured with default route, the default in the first router The outgoing interface of routing is the virtual service mouth, and described device includes:
Division unit, the public network address pond for will locally be pre-configured are divided into multiple sub- public network address ponds;
Selecting unit, for selecting the first sub- public network address used in this router in the multiple sub- public network address pond Pond;
First release unit, for carrying the first address pool routing in the first sub- public network address pond to the publication of public network equipment, So that public network equipment is routed based on first address pool, the first route table items are generated;The destination address of first route table items For the first sub- public network address pond, the address that next-hop is the first router;
Second release unit, for the default route configured in the first router to be distributed to access device, so that described Access device is based on the default route and generates default route list item, the next-hop of the default route list item be the first via by The address of device.
10. a kind of router, which is characterized in that including processor and machine readable storage medium, the machine readable storage is situated between Matter is stored with the machine-executable instruction that can be executed by the processor, and the processor is promoted by the machine-executable instruction Make to execute such as any one of claim 1 to 8 the method.
11. a kind of machine readable storage medium, which is characterized in that the machine readable storage medium is stored with the executable finger of machine It enables, when being called and being executed by processor, the machine-executable instruction promotes the processor to execute such as claim 1 to 8 Any one the method.
CN201910361892.0A 2019-04-30 2019-04-30 Load sharing method, device and router Active CN110048953B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910361892.0A CN110048953B (en) 2019-04-30 2019-04-30 Load sharing method, device and router

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910361892.0A CN110048953B (en) 2019-04-30 2019-04-30 Load sharing method, device and router

Publications (2)

Publication Number Publication Date
CN110048953A true CN110048953A (en) 2019-07-23
CN110048953B CN110048953B (en) 2021-11-23

Family

ID=67280495

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910361892.0A Active CN110048953B (en) 2019-04-30 2019-04-30 Load sharing method, device and router

Country Status (1)

Country Link
CN (1) CN110048953B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101141494A (en) * 2007-10-12 2008-03-12 杭州华三通信技术有限公司 Method for settling resource allocation conflict under load sharing condition
CN101599899A (en) * 2009-07-06 2009-12-09 杭州华三通信技术有限公司 The access method of employing network address translation (NAT) device for supporting multi-networking and equipment
CN103841026A (en) * 2014-02-21 2014-06-04 烽火通信科技股份有限公司 VPN route managing system and method of router IP protocol stack
CN105245638A (en) * 2012-04-28 2016-01-13 华为技术有限公司 Address distribution method, equipment and system
US20160249076A1 (en) * 2006-09-13 2016-08-25 Nagravision S.A. Method for transmitting services information in different types of broadcasting networks and unit for processing said information
CN105916167A (en) * 2015-11-25 2016-08-31 北京邮电大学 Communication method using SWAN development protocol on hostapd platform
CN109194575A (en) * 2018-08-23 2019-01-11 新华三技术有限公司 Route selection method and device
CN109495593A (en) * 2017-09-11 2019-03-19 中兴通讯股份有限公司 Address distribution method and system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160249076A1 (en) * 2006-09-13 2016-08-25 Nagravision S.A. Method for transmitting services information in different types of broadcasting networks and unit for processing said information
CN101141494A (en) * 2007-10-12 2008-03-12 杭州华三通信技术有限公司 Method for settling resource allocation conflict under load sharing condition
CN101599899A (en) * 2009-07-06 2009-12-09 杭州华三通信技术有限公司 The access method of employing network address translation (NAT) device for supporting multi-networking and equipment
CN105245638A (en) * 2012-04-28 2016-01-13 华为技术有限公司 Address distribution method, equipment and system
CN103841026A (en) * 2014-02-21 2014-06-04 烽火通信科技股份有限公司 VPN route managing system and method of router IP protocol stack
CN105916167A (en) * 2015-11-25 2016-08-31 北京邮电大学 Communication method using SWAN development protocol on hostapd platform
CN109495593A (en) * 2017-09-11 2019-03-19 中兴通讯股份有限公司 Address distribution method and system
CN109194575A (en) * 2018-08-23 2019-01-11 新华三技术有限公司 Route selection method and device

Also Published As

Publication number Publication date
CN110048953B (en) 2021-11-23

Similar Documents

Publication Publication Date Title
CN103891216B (en) The method and system that in structural path exchange network, the FHRP of gateway load balance optimizes
US8995451B2 (en) Systems and methods for network routing in a multiple backbone network architecture
CN104426681B (en) The distributed multicast of endpoint
US8811398B2 (en) Method for routing data packets using VLANs
EP2027679B1 (en) Routing multicast traffic
CN101667970B (en) Protection switching method and equipment thereof
CN104954182B (en) A kind of method and apparatus for configuring Virtual Server Cluster
CN106105162A (en) Load equalizer based on switch
EA003155B1 (en) Private network access point router for interconnecting among internet route providers
CN104811400A (en) Distributed network apparatus
CN108809847A (en) Realize the method, apparatus and network system of load balancing
CN106059946A (en) Message forwarding method and message forwarding device
CN110417665A (en) A kind of the EVPN group network system and method for the more Fabric scenes of data center
CN101330411B (en) Method and system for simulating large-scale network topological
CN103259720B (en) A kind of data transmission method and equipment based on MTR
US9054981B2 (en) System and methods for identifying and remedying traffic imbalances and inequities between networks
US9497122B2 (en) System and methods for identifying and remedying traffic imbalances and inequities between networks
JP6062388B2 (en) COMMUNICATION SYSTEM, COMMUNICATION CONTROL METHOD, AND CONTROL DEVICE
CN103179032A (en) Method and device for route backup
CN110048953A (en) A kind of load sharing method, device and router
CN108259205A (en) A kind of route issuing method and the network equipment
CN105959220B (en) The method and device that routing table issues
Ghoda et al. A survey on data center network virtualization
Luttringer et al. A Fast-Convergence Routing of the Hot-Potato
CN108173767A (en) A kind of message forwarding method and device based on VLAN-IF interface duplexes

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
TR01 Transfer of patent right

Effective date of registration: 20230619

Address after: 310052 11th Floor, 466 Changhe Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: H3C INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 310052 Changhe Road, Binjiang District, Hangzhou, Zhejiang Province, No. 466

Patentee before: NEW H3C TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right