CN107294845A - VRRP load-balancing methods and device - Google Patents

VRRP load-balancing methods and device Download PDF

Info

Publication number
CN107294845A
CN107294845A CN201710637578.1A CN201710637578A CN107294845A CN 107294845 A CN107294845 A CN 107294845A CN 201710637578 A CN201710637578 A CN 201710637578A CN 107294845 A CN107294845 A CN 107294845A
Authority
CN
China
Prior art keywords
virtual
mac address
forwarder
virtual mac
equipment
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.)
Pending
Application number
CN201710637578.1A
Other languages
Chinese (zh)
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.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech 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 Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN201710637578.1A priority Critical patent/CN107294845A/en
Publication of CN107294845A publication Critical patent/CN107294845A/en
Pending legal-status Critical Current

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/58Association of routers
    • H04L45/586Association of routers of virtual routers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • 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

Abstract

The application provides a kind of VRRP load-balancing methods and device, applied to the host apparatus in VRRP backup groups, including:It is the mutually different virtual mac address of member device distribution in the VRRP backup groups according to default allocation rule;If receiving the ARP request message that the main frame in LAN is sent, a virtual mac address for having distributed to member device is chosen;Arp reply message is constructed based on the virtual mac address, and the arp reply message is returned to the main frame, so that the member device for being assigned to the virtual mac address is forwarded to the flow of the main frame.Technical scheme can reduce device resource waste, improve the forward efficiency of VRRP backup groups.

Description

VRRP load-balancing methods and device
Technical field
The application is related to communication technical field, more particularly to a kind of VRRP load-balancing methods and device.
Background technology
Can be by office based on VRRP (Virtual Router Redundancy Protocol, Virtual Router Redundacy Protocol) The set of router of domain net is virtually a VRRP backup group, equivalent to one virtual router.Main frame in LAN is only needed Its default gateway is set to the virtual ip address of the virtual router, you can regard the virtual router as gateway and local Net external network is communicated.But in VRRP backup groups, the flow of the main frame generally only in host apparatus local area network enters Row forwarding, and stand-by equipment is then in idle state, cannot participate in flow forwarding, causes device resource to waste, VRRP backup groups Forward efficiency it is relatively low.
The content of the invention
In view of this, the application provides a kind of VRRP load-balancing methods and device, is provided with solving equipment in correlation technique Source is wasted, the problem of forward efficiency of VRRP backup groups is relatively low.
Specifically, the application is achieved by the following technical solution:
In a first aspect, the application provides a kind of VRRP load-balancing methods, methods described is applied in VRRP backup groups Host apparatus, methods described includes:
Be according to default allocation rule member device in the VRRP backup groups with distributing mutually different Virtual MAC Location;
If receiving the ARP request message that the main frame in LAN is sent, choose one and distributed to member device Virtual mac address;
Arp reply message is constructed based on the virtual mac address, and the arp reply message is returned to the main frame, with The member device for being assigned to the virtual mac address is set to forward the flow of the main frame.
Second aspect, the application provides a kind of VRRP load balancing apparatus, and described device is applied in VRRP backup groups Host apparatus, described device includes:
Allocation unit, for being that the member device in the VRRP backup groups distributes mutually not phase according to default allocation rule Same virtual mac address;
Unit is chosen, for when receiving the ARP request message of the transmission of the main frame in LAN, choosing one and having distributed Virtual mac address to member device;
Structural unit, for constructing arp reply message based on the virtual mac address, and it is described to main frame return Arp reply message, so that the member device for being assigned to the virtual mac address is forwarded to the flow of the main frame.
Analyze above-mentioned technical proposal to understand, the host apparatus in VRRP backup groups can be all in the VRRP backup groups Member device distributes mutually different virtual mac address, while host apparatus is receiving the ARP of the transmission of the main frame in LAN During request message, the virtual mac address for being also based on distributing for member device constructs arp reply message and returns to the master Machine, so that being assigned to the member device of the virtual mac address can forward to the flow of the main frame.Using such side Formula, can increase the number of devices that flow forwarding is participated in the VRRP backup groups, reduce device resource and waste, and improve VRRP backups The forward efficiency of group.
Brief description of the drawings
Fig. 1 is a kind of VRRP group-network constructions figure;
Fig. 2 is a kind of flow chart of VRRP load-balancing methods shown in the exemplary embodiment of the application one;
Fig. 3 is a kind of hardware configuration of VRRP load balancing apparatus place equipment shown in the exemplary embodiment of the application one Figure;
Fig. 4 is a kind of block diagram of VRRP load balancing apparatus shown in the exemplary embodiment of the application one.
Embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related to During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the application.On the contrary, they be only with it is such as appended The example of the consistent apparatus and method of some aspects be described in detail in claims, the application.
It is the purpose only merely for description specific embodiment in term used in this application, and is not intended to be limiting the application. " one kind ", " described " and "the" of singulative used in the application and appended claims are also intended to including majority Form, unless context clearly shows that other implications.It is also understood that term "and/or" used herein refers to and wrapped 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 application A little information should not necessarily be limited by these terms.These terms are only used for same type of information being distinguished from each other out.For example, not departing from In the case of the application scope, the first information can also be referred to as the second information, similarly, and the second information can also be referred to as One information.Depending on linguistic context, word as used in this " if " can be construed to " ... when " or " when ... When " or " in response to determining ".
Fig. 1 is refer to, is a kind of VRRP group-network constructions figure., can be by office based on VRRP in the group-network construction shown in Fig. 1 The set of router of domain net is virtually a VRRP backup group, equivalent to one virtual router, the route in VRRP backup groups Device shares a virtual ip address and a virtual mac address.Main frame 1, main frame 2 and main frame 3 in LAN can be lacked Save gateway and be set to the virtual ip address, you can the virtual router is communicated as gateway with LAN external network.
Host apparatus in VRRP backup groups receive the transmission of the main frame in LAN for the virtual ip address During ARP request message, the main frame in LAN can be returned to based on virtual mac address construction arp reply message.It is follow-up main With equipment receive the main frame in LAN send target MAC (Media Access Control) address be the virtual mac address message when, can forward The message, i.e. host apparatus can be forwarded with the flow of the main frame in local area network.
In correlation technique, the flow of the main frame in host apparatus local area network generally only in VRRP backup groups is turned Hair, and the stand-by equipment in VRRP backup groups is then in idle state, cannot participate in flow forwarding, causes device resource to waste, The forward efficiency of VRRP backup groups is relatively low.
The application provides a kind of VRRP load-balancing methods and device, to reduce device resource waste, improves VRRP backups The forward efficiency of group.
Fig. 2 is refer to, is a kind of flow chart of VRRP load-balancing methods shown in the exemplary embodiment of the application one.Should The host apparatus that method can apply in VRRP backup groups, comprises the following steps:
Step 201:It is mutually different for the member device distribution in the VRRP backup groups according to default allocation rule Virtual mac address.
Step 202:If receiving the ARP request message that the main frame in LAN is sent, choose one and distributed to The virtual mac address of member device.
Step 203:Arp reply message is constructed based on the virtual mac address, and the ARP is returned to the main frame and is answered Message is answered, so that the member device for being assigned to the virtual mac address is forwarded to the flow of the main frame.
In the present embodiment, the host apparatus in VRRP backup groups, which can be generated first, includes the void of multiple virtual mac address The virtual mac address quantity intended in MAC Address group, the virtual mac address group can be with the member device in the VRRP backup groups (including host apparatus and stand-by equipment) quantity is identical, can also be different from the member device quantity in the VRRP backup groups.Its In, what host apparatus can be sent based on the stand-by equipment in the VRRP backup groups received is used to notice the logical of VRRP states Message is accused, the member device quantity in the VRRP backup groups is obtained.
Specifically, for the ease of being made a distinction to virtual mac address, host apparatus can generate void as shown in table 1 below Intend MAC Address:
Table 1
Wherein, VRID can be considered as the mark of VRRP backup groups, can voluntarily be configured by user.Sequence number can then be considered as void Intend the mark of MAC Address, can one by one increase since 1.
By taking the VRRP group-network constructions shown in Fig. 1 as an example, the VRRP backup groups shown in Fig. 1 include host apparatus, standby set Standby 1 and 2 three member devices of stand-by equipment.With reference to virtual mac address as listed in Table 1, the Virtual MAC of host apparatus generation It is virtual that group of addresses can include 00-00-5E-00-01-01,00-00-5E-00-02-01 and 00-00-5E-00-03-01 tri- MAC Address.
In the present embodiment, host apparatus is after the virtual mac address group is generated, point that can be pre-set according to user With rule, mutually different virtual mac address is distributed for the member device in the VRRP backup groups.Host apparatus can be according to this Allocation rule is that this equipment distributes virtual mac address, can also directly or the stand-by equipment in the VRRP backup groups are received It is that the stand-by equipment distributes virtual mac address according to the allocation rule during MAC Address distribution request of transmission.Wherein, distribution rule It can then include:The minimum virtual mac address of sequence number numerical value is distributed to the host apparatus in the VRRP backup groups;Based on sequence number The size order of numerical value and the size order of stand-by equipment priority, it is virtual for the stand-by equipment distribution in the VRRP backup groups MAC Address etc..
Continue by taking the VRRP group-network constructions shown in Fig. 1 as an example, host apparatus generation include 00-00-5E-00-01-01, Can be this after the virtual mac address group of tri- virtual mac address of 00-00-5E-00-02-01 and 00-00-5E-00-03-01 Equipment distribution virtual mac address 00-00-5E-00-01-01.Assuming that the priority of stand-by equipment 1 is preferential higher than stand-by equipment 2 Level, host apparatus can distribute virtual mac address 00-00-5E-00-02-01 for stand-by equipment 1, and be distributed for stand-by equipment 2 Virtual mac address 00-00-5E-00-03-01.
In actual applications, the virtual mac address quantity in the virtual mac address group of host apparatus generation, generally with this Member device quantity in VRRP backup groups is equal, can so ensure that each member device in the VRRP backup groups is distributed There is a virtual mac address.
In the present embodiment, member of the host apparatus in a certain virtual mac address to be distributed to the VRRP backup groups sets After standby, the virtual mac address can be labeled as having distributed.Host apparatus is receiving being directed to for the transmission of the main frame in LAN During the ARP request message of the virtual ip address of the VRRP backup groups, a Virtual MAC for having distributed to member device can be chosen Address, that is, it is virtual mac address to choose a mark.Host apparatus, can be with after the virtual mac address is selected Arp reply message is constructed based on the virtual mac address, and the arp reply message is returned to the main frame.Subsequently, can be by distributing Turned to the target MAC (Media Access Control) address that the member device of the virtual mac address is sent to the main frame for the message of the virtual mac address Hair, i.e., forward to the flow of the main frame.
Host apparatus can randomly select the virtual mac address for having distributed to a member device construction arp reply message. However, participating in the member device quantity that flow is forwarded to increase, the effect of VRRP load balancing is lifted, host apparatus can be Each virtual mac address is set using mark, and this is defaulted as being not used using mark.Host apparatus is based on a certain Virtual MAC After address architecture arp reply message, the use mark of the virtual mac address can be revised as having used.Host apparatus is connecing When receiving the ARP request message that main frame in LAN is sent, can preferentially choose a use be designated it is untapped virtual MAC Address constructs arp reply message and returns to the main frame, so that being assigned to the member device of the virtual mac address to this The flow of main frame is forwarded.On the other hand, exist it is multiple using be designated untapped virtual mac address when, it is primary to set It is standby to choose the minimum virtual mac address construction arp reply message of sequence number numerical value.
Continue by taking the VRRP group-network constructions shown in Fig. 1 as an example, host apparatus receive main frame 1 transmission be directed to the VRRP During the ARP request message of the virtual ip address of backup group, due to now 00-00-5E-00-01-01,00-00-5E-00-02-01 Use mark with tri- virtual mac address of 00-00-5E-00-03-01 is unused, therefore host apparatus can choose sequence The minimum virtual mac address 00-00-5E-00-01-01 construction arp reply messages of number value, and the ARP should to the return of main frame 1 Message is answered, while virtual mac address 00-00-5E-00-01-01 use mark can be revised as having used by host apparatus. Because the member device for being assigned to virtual mac address 00-00-5E-00-01-01 is host apparatus, therefore subsequently can be by primary Pair the target MAC (Media Access Control) address that equipment is sent to main frame 1 forwards for virtual mac address 00-00-5E-00-01-01 message, i.e., The flow of main frame 1 is forwarded.
Similarly, ARP request of the host apparatus in the virtual ip address for the VRRP backup groups for receiving the transmission of main frame 2 During message, due to the use mark of now two virtual mac address of 00-00-5E-00-02-01 and 00-00-5E-00-03-01 Still it is unused, therefore host apparatus can choose the minimum virtual mac address of sequence number numerical value from the two virtual mac address 00-00-5E-00-02-01 constructs arp reply message, and returns to the response message to main frame 2.Due to being assigned to Virtual MAC Location 00-00-5E-00-02-01 member device is stand-by equipment 1, therefore subsequently can be by flow of the stand-by equipment 1 to main frame 2 Forwarded.
As seen from the above-described embodiment, the host apparatus in VRRP backup groups can be all members in the VRRP backup groups Equipment distributes mutually different virtual mac address, while host apparatus is receiving the ARP request of the transmission of the main frame in LAN During message, the virtual mac address for being also based on distributing for member device constructs arp reply message and returns to the main frame, from And the member device for being assigned to the virtual mac address is forwarded the flow of the main frame.Adopt in such a way, can To increase the number of devices that flow forwarding is participated in the VRRP backup groups, reduce device resource and waste, improve VRRP backup groups Forward efficiency.
In order to ensure the stability of customer service, it can introduce virtual in above-mentioned VRRP load-balancing methods Transponder mechanism.Specifically, host apparatus, can be with base after according to above-mentioned allocation rule for this equipment distribution virtual mac address Active Virtual Forwarder is created in the virtual mac address being assigned to.On the other hand, stand-by equipment exists in above-mentioned VRRP backup groups Detect when not yet creating Active Virtual Forwarder in this equipment, MAC Address distribution request can be sent to host apparatus.It is primary Equipment can distribute virtual mac address when receiving the MAC Address distribution request for the stand-by equipment.The stand-by equipment exists After the virtual mac address for receiving host apparatus distribution, animated virtual can be created based on the virtual mac address being assigned to and turned Send out device.
In the present embodiment, the member device in the VRRP backup groups is creating work based on the virtual mac address being assigned to After dynamic Virtual Forwarder, virtual mac address notification packet, the void can be sent to other member devices in the VRRP backup groups Intend carrying virtual used in its virtual mac address being assigned to, the i.e. Active Virtual Forwarder in MAC Address notification packet MAC Address, other member devices in the VRRP backup groups are advertised to by the virtual mac address of the Active Virtual Forwarder. In another example, the member device can change the above-mentioned source MAC for being used to notice the notification packet of VRRP states For the virtual mac address, virtual mac address notification packet and other member devices for being sent in the VRRP backup groups are used as.
The Virtual MAC that correspondingly, other member devices of the member device in the VRRP backup groups are received are sent During the notification packet of location, it can create based on the virtual mac address carried in the virtual mac address notification packet and monitor virtual turn Device is sent out, the monitoring Virtual Forwarder can be to monitoring using the Active Virtual Forwarder of the virtual mac address.
Continue by taking the VRRP group-network constructions shown in Fig. 1 as an example, host apparatus can be based on the virtual mac address being assigned to 00-00-5E-00-01-01 creates Active Virtual Forwarder 1, and sends carrying Virtual MAC to stand-by equipment 1 and stand-by equipment 2 Address 00-00-5E-00-01-01 virtual mac address notification packet.Stand-by equipment 1 can be based on the Virtual MAC being assigned to Location 00-00-5E-00-02-01 creates Active Virtual Forwarder 2, and sends carrying Virtual MAC to host apparatus and stand-by equipment 2 Address 00-00-5E-00-02-01 virtual mac address notification packet.Stand-by equipment 2 can be based on the Virtual MAC being assigned to Location 00-00-5E-00-03-01 creates Active Virtual Forwarder 3, and sends carrying Virtual MAC to host apparatus and stand-by equipment 1 Address 00-00-5E-00-03-01 virtual mac address notification packet.
Host apparatus can be based on Virtual MAC when receiving the virtual mac address notification packet of the transmission of stand-by equipment 1 Address 00-00-5E-00-02-01, which is created, monitors Virtual Forwarder 2;Lead in the virtual mac address for receiving the transmission of stand-by equipment 2 When accusing message, it can be created based on virtual mac address 00-00-5E-00-03-01 and monitor Virtual Forwarder 3.Stand-by equipment 1 exists When receiving the virtual mac address notification packet of host apparatus transmission, virtual mac address 00-00-5E-00-01- can be based on 01 creates monitoring Virtual Forwarder 1;, can be based on void when receiving the virtual mac address notification packet of the transmission of stand-by equipment 2 Intend MAC Address 00-00-5E-00-03-01 and create monitoring Virtual Forwarder 3.Stand-by equipment 2 is receiving host apparatus transmission During virtual mac address notification packet, it can be created based on virtual mac address 00-00-5E-00-01-01 and monitor Virtual Forwarder 1;When receiving the virtual mac address notification packet of the transmission of stand-by equipment 1, virtual mac address 00-00-5E- can be based on 00-02-01, which is created, monitors Virtual Forwarder 2.
In general, the Virtual Forwarder created in host apparatus is as shown in table 2 below, and what is created in stand-by equipment 1 is virtual Transponder is as shown in table 3 below, and the Virtual Forwarder created in stand-by equipment 2 is as shown in table 4 below:
Table 2
Table 3
Table 4
Wherein, monitoring transponder can monitor virtual mac address identical Active Virtual Forwarder.Citing comes Say, the monitoring Virtual Forwarder 1 in Active Virtual Forwarder 1 and stand-by equipment 1 and stand-by equipment 2 in host apparatus is used Virtual mac address be 00-00-5E-00-01-01, i.e. monitoring Virtual Forwarder 1 in stand-by equipment 1 and stand-by equipment 2 Active Virtual Forwarder 1 in host apparatus can be monitored, for example:Track work(can be utilized by monitoring Virtual Forwarder The state of energy monitoring activity Virtual Forwarder, to find Active Virtual Forwarder failure in time.
In the present embodiment, when monitoring Virtual Forwarder listens to the event of virtual mac address identical Active Virtual Forwarder During barrier, it can be determined that this monitoring Virtual Forwarder virtual mac address identical in the VRRP backup groups is monitored in transponder Priority whether highest.If the highest priority of this monitoring Virtual Forwarder, this monitoring Virtual Forwarder can be upgraded For Active Virtual Forwarder.Subsequently, the flow of the main frame can be entered as the member device where this monitoring Virtual Forwarder Row forwarding.
Continue by taking the VRRP group-network constructions shown in Fig. 1 as an example, when the monitoring in stand-by equipment 1 and stand-by equipment 2 virtually turns When hair device 1 listens to 1 failure of Active Virtual Forwarder in host apparatus, the two can enter between monitoring Virtual Forwarder 1 Row role is elected, and the monitoring Virtual Forwarder 1 of the highest priority elected is upgraded into Active Virtual Forwarder 1.Assuming that The priority of monitoring Virtual Forwarder 1 in stand-by equipment 1, it is preferential higher than the monitoring Virtual Forwarder 1 in stand-by equipment 2 Level, then the monitoring Virtual Forwarder 1 in stand-by equipment 1 can be upgraded to Active Virtual Forwarder 1.Now, stand-by equipment 1 In Virtual Forwarder it is as shown in table 5 below:
Table 5
Subsequently, stand-by equipment 1 can be not only virtual mac address 00-00-5E- to the target MAC (Media Access Control) address that main frame 1 is sent 00-01-01 message is forwarded, and can also be virtual mac address 00-00-5E- to the target MAC (Media Access Control) address that main frame 2 is sent 00-02-01 message is forwarded, i.e., stand-by equipment 1 can be forwarded to the flow of main frame 1 and main frame 2 simultaneously.
In the present embodiment, virtual mac address identical Active Virtual Forwarder and monitoring are virtual in the VRRP backup groups Precedence information can be exchanged periodically between transponder.Virtual mac address identical activity is detected when monitoring Virtual Forwarder When the priority of Virtual Forwarder is less than the priority of this monitoring Virtual Forwarder, this monitoring Virtual Forwarder can be set to Active Virtual Forwarder, is forwarded with the flow to the main frame, and the Active Virtual Forwarder can then be converted to monitoring void Intend transponder.
Member device in the VRRP backup groups is creating Active Virtual Forwarder based on the virtual mac address being assigned to Afterwards, the priority of the Active Virtual Forwarder can be set to limit priority, for example:The priority value of Virtual Forwarder 0-255 is generally in the range of, the member device, can be with after Active Virtual Forwarder is created based on the virtual mac address being assigned to The priority of the Active Virtual Forwarder is set to 255, to ensure the Active Virtual Forwarder in virtual mac address identical Highest priority in Active Virtual Forwarder and monitoring Virtual Forwarder.Assuming that the Active Virtual Forwarder (is referred to as former activity Virtual Forwarder) failure, and it is identical and monitoring Virtual Forwarder of highest priority (is referred to as New activity empty by virtual mac address Intend transponder) take over its work, then it is preferential due to former Active Virtual Forwarder after former Active Virtual Forwarder fault recovery Level highest, therefore former Active Virtual Forwarder can also revert to actual Active Virtual Forwarder, and New activity is virtually forwarded Device can then revert to monitoring Virtual Forwarder, and former Active Virtual Forwarder is monitored.
Continue by taking the VRRP group-network constructions shown in Fig. 1 as an example, the fault recovery of Active Virtual Forwarder 1 in host apparatus Afterwards, the Active Virtual Forwarder 1 being higher than due to the priority of the Active Virtual Forwarder 1 in host apparatus in stand-by equipment 1 is (former Monitor Virtual Forwarder 1) and stand-by equipment 2 in monitoring Virtual Forwarder 1, therefore the Active Virtual Forwarder in host apparatus 1 can revert to actual Active Virtual Forwarder 1, i.e., the flow of main frame 1 can subsequently be forwarded by host apparatus.And Active Virtual Forwarder 1 in stand-by equipment 1 can then revert to monitoring Virtual Forwarder 1, and to the activity in host apparatus Virtual Forwarder 1 is monitored, i.e., follow-up stand-by equipment 1 can still be forwarded to the flow of main frame 2, but not again to main frame 1 flow is forwarded.
Embodiment with foregoing VRRP load-balancing methods is corresponding, and present invention also provides VRRP load balancing apparatus Embodiment.
The embodiment of the application VRRP load balancing apparatus can be applied on the host apparatus in VRRP backup groups.Device Embodiment can be realized by software, can also be realized by way of hardware or software and hardware combining.Exemplified by implemented in software, It is to be calculated by the processor of equipment where it by corresponding in nonvolatile memory as the device on a logical meaning Machine programmed instruction reads what operation in internal memory was formed.For hardware view, as shown in figure 3, equal for the application VRRP loads A kind of hardware structure diagram of host apparatus in VRRP backup groups where weighing apparatus device, except the processor shown in Fig. 3, internal memory, net Outside network interface and nonvolatile memory, the usual root of host apparatus in the VRRP backup groups in embodiment where device According to the actual functional capability of the VRRP load balancing, other hardware can also be included, this is repeated no more.
Fig. 4 is refer to, is a kind of block diagram of VRRP load balancing apparatus shown in the exemplary embodiment of the application one.The dress Put on 400 host apparatus that can be applied in the VRRP backup groups shown in Fig. 3, including:
Allocation unit 401, for being that the member device in the VRRP backup groups distributes mutual according to default allocation rule The virtual mac address differed;
Unit 402 is chosen, for when receiving the ARP request message of the transmission of the main frame in LAN, having chosen one Distribute to the virtual mac address of member device;
Structural unit 403, for constructing arp reply message based on the virtual mac address, and returns to institute to the main frame Arp reply message is stated, so that the member device for being assigned to the virtual mac address is forwarded to the flow of the main frame.
In an optional embodiment, the allocation unit 401 can include:
First distribution subelement 4011, for being that this equipment distributes virtual mac address according to the default allocation rule, And Active Virtual Forwarder is created based on the virtual mac address being assigned to;
Second distribution subelement 4012, the MAC sent for the stand-by equipment in the VRRP backup groups are received It is the stand-by equipment distribution virtual mac address, so that the stand-by equipment is virtual based on what is be assigned to during the distribution request of location MAC Address create Active Virtual Forwarder, the MAC Address distribution request by the stand-by equipment in this equipment is detected not Sent when creating Active Virtual Forwarder.
In another optional embodiment, described device 400 can also include:
Transmitting element 404, for after the Active Virtual Forwarder is created, into the VRRP backup groups other into Member's equipment sends virtual mac address notification packet, and be assigned to described virtual is carried in the virtual mac address notification packet MAC Address;
Creating unit 405, the Virtual MAC sent for other member devices in the VRRP backup groups are received During the notification packet of location, based on the virtual mac address carried in the virtual mac address notification packet, create and monitor virtual forwarding Device, to monitor the Active Virtual Forwarder using the virtual mac address.
In another optional embodiment, described device 400 can also include:
Judging unit 406, for listening to virtual mac address identical Active Virtual Forwarder when monitoring Virtual Forwarder During failure, judge that this monitoring Virtual Forwarder virtual mac address identical in the VRRP backup groups monitors Virtual Forwarder In priority whether highest;
First setting unit 407, during for highest priority in this monitoring Virtual Forwarder, this monitoring is virtually forwarded Device is set to Active Virtual Forwarder, is forwarded with the flow to the main frame.
In another optional embodiment, described device 400 can also include:
Second setting unit 408, for turning when monitoring Virtual Forwarder detects virtual mac address identical animated virtual When the priority for sending out device is less than the priority of this monitoring Virtual Forwarder, this monitoring Virtual Forwarder is set to animated virtual and turned Device is sent out, is forwarded with the flow to the main frame.
The function of unit and the implementation process of effect specifically refer to correspondence step in the above method in said apparatus Implementation process, will not be repeated here.
For device embodiment, because it corresponds essentially to embodiment of the method, so related part is real referring to method Apply the part explanation of example.Device embodiment described above is only schematical, wherein described be used as separating component The unit of explanation can be or may not be physically separate, and the part shown as unit can be or can also It is not physical location, you can with positioned at a place, or can also be distributed on multiple NEs.Can be according to reality Selection some or all of module therein is needed to realize the purpose of application scheme.Those of ordinary skill in the art are not paying In the case of going out creative work, you can to understand and implement.
The preferred embodiment of the application is the foregoing is only, not to limit the application, all essences in the application God is with principle, and any modification, equivalent substitution and improvements done etc. should be included within the scope of the application protection.

Claims (10)

1. a kind of VRRP load-balancing methods, it is characterised in that methods described is applied to the host apparatus in VRRP backup groups, institute The method of stating includes:
It is the mutually different virtual mac address of member device distribution in the VRRP backup groups according to default allocation rule;
If receiving the ARP request message that the main frame in LAN is sent, the void for having distributed to member device is chosen Intend MAC Address;
Arp reply message is constructed based on the virtual mac address, and the arp reply message is returned to the main frame, so that point The member device for being fitted on the virtual mac address is forwarded to the flow of the main frame.
2. according to the method described in claim 1, it is characterised in that described to be backed up according to default allocation rule for the VRRP Member device in group distributes mutually different virtual mac address, including:
It is that this equipment distributes virtual mac address according to the default allocation rule, and based on the Virtual MAC being assigned to Location creates Active Virtual Forwarder;
It is the stand-by equipment in the MAC Address distribution request that the stand-by equipment in receiving the VRRP backup groups is sent Virtual mac address is distributed, so that the stand-by equipment creates Active Virtual Forwarder, institute based on the virtual mac address being assigned to MAC Address distribution request is stated to be sent when not creating Active Virtual Forwarder in detecting this equipment by the stand-by equipment.
3. method according to claim 2, it is characterised in that methods described also includes:
After the Active Virtual Forwarder is created, other member devices into the VRRP backup groups are with sending Virtual MAC The virtual mac address being assigned to is carried in location notification packet, the virtual mac address notification packet;
In the virtual mac address notification packet that other member devices in receiving the VRRP backup groups are sent, based on institute The virtual mac address carried in virtual mac address notification packet is stated, creates and monitors Virtual Forwarder, with to using described virtual The Active Virtual Forwarder of MAC Address is monitored.
4. method according to claim 3, it is characterised in that methods described also includes:
When monitoring Virtual Forwarder listens to virtual mac address identical Active Virtual Forwarder failure, judge that this monitoring is empty Intend transponder in the VRRP backup groups virtual mac address identical monitor Virtual Forwarder in priority whether highest;
If the highest priority of this monitoring Virtual Forwarder, this monitoring Virtual Forwarder is set to animated virtual forwarding Device, is forwarded with the flow to the main frame.
5. method according to claim 3, it is characterised in that methods described also includes:
The priority of virtual mac address identical Active Virtual Forwarder is detected less than this monitoring void when monitoring Virtual Forwarder When intending the priority of transponder, this monitoring Virtual Forwarder is set to Active Virtual Forwarder, with the flow to the main frame Forwarded.
6. a kind of VRRP load balancing apparatus, it is characterised in that described device is applied to the host apparatus in VRRP backup groups, institute Stating device includes:
Allocation unit, for being that the member device in the VRRP backup groups distributes mutually different according to default allocation rule Virtual mac address;
Unit is chosen, for when receiving the ARP request message of the transmission of the main frame in LAN, choosing one and distributing into The virtual mac address of member's equipment;
Structural unit, is answered for constructing arp reply message based on the virtual mac address, and returning to the ARP to the main frame Message is answered, so that the member device for being assigned to the virtual mac address is forwarded to the flow of the main frame.
7. device according to claim 6, it is characterised in that the allocation unit includes:
First distribution subelement, for being that this equipment distributes virtual mac address according to the default allocation rule, and is based on dividing The virtual mac address being fitted on creates Active Virtual Forwarder;
Second distribution subelement, the MAC Address distribution sent for the stand-by equipment in the VRRP backup groups are received please It is the stand-by equipment distribution virtual mac address when asking, so that the stand-by equipment is based on the virtual mac address wound being assigned to Active Virtual Forwarder is built, the MAC Address distribution request does not create activity by the stand-by equipment in this equipment is detected Sent during Virtual Forwarder.
8. device according to claim 7, it is characterised in that described device also includes:
Transmitting element, for after the Active Virtual Forwarder is created, other member devices into the VRRP backup groups Send in virtual mac address notification packet, the virtual mac address notification packet and carry the virtual mac address being assigned to;
Creating unit, the virtual mac address notice sent for other member devices in the VRRP backup groups are received During message, based on the virtual mac address carried in the virtual mac address notification packet, create and monitor Virtual Forwarder, with right Monitored using the Active Virtual Forwarder of the virtual mac address.
9. device according to claim 8, it is characterised in that described device also includes:
Judging unit, for when monitor Virtual Forwarder listen to virtual mac address identical Active Virtual Forwarder failure when, Judge that this monitoring Virtual Forwarder virtual mac address identical in the VRRP backup groups monitors preferential in Virtual Forwarder Level whether highest;
First setting unit, during for highest priority in this monitoring Virtual Forwarder, this monitoring Virtual Forwarder is set For Active Virtual Forwarder, forwarded with the flow to the main frame.
10. method according to claim 8, it is characterised in that described device also includes:
Second setting unit, for detecting virtual mac address identical Active Virtual Forwarder when monitoring Virtual Forwarder When priority is less than the priority of this monitoring Virtual Forwarder, this monitoring Virtual Forwarder is set to Active Virtual Forwarder, Forwarded with the flow to the main frame.
CN201710637578.1A 2017-07-31 2017-07-31 VRRP load-balancing methods and device Pending CN107294845A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710637578.1A CN107294845A (en) 2017-07-31 2017-07-31 VRRP load-balancing methods and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710637578.1A CN107294845A (en) 2017-07-31 2017-07-31 VRRP load-balancing methods and device

Publications (1)

Publication Number Publication Date
CN107294845A true CN107294845A (en) 2017-10-24

Family

ID=60103865

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710637578.1A Pending CN107294845A (en) 2017-07-31 2017-07-31 VRRP load-balancing methods and device

Country Status (1)

Country Link
CN (1) CN107294845A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107911291A (en) * 2017-11-28 2018-04-13 中国移动通信集团湖北有限公司 VRRP routers switching method, router, VRRP active-standby switch system and storage medium
CN110809304A (en) * 2019-11-01 2020-02-18 北京星河亮点技术股份有限公司 Method for forwarding data stream message in network and network system
CN112995349A (en) * 2019-12-12 2021-06-18 中兴通讯股份有限公司 Address management method, server, and computer-readable storage medium
CN113381930A (en) * 2020-03-09 2021-09-10 瞻博网络公司 Group load balancing for virtual router redundancy

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140321265A1 (en) * 2013-04-29 2014-10-30 Telefonaktiebolaget L M Ericsson (Publ) Fast traffic recovery in vrrp based routers
CN105743781A (en) * 2016-01-11 2016-07-06 杭州华三通信技术有限公司 VRRP load balancing method and VRRP load balancing device
CN105847143A (en) * 2016-06-06 2016-08-10 北京博维亚讯技术有限公司 VRRP (virtual router redundancy protocol)-based load balancing method and system
CN106161272A (en) * 2016-08-31 2016-11-23 迈普通信技术股份有限公司 Realize method and the routing device of VRRP load balancing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140321265A1 (en) * 2013-04-29 2014-10-30 Telefonaktiebolaget L M Ericsson (Publ) Fast traffic recovery in vrrp based routers
CN105743781A (en) * 2016-01-11 2016-07-06 杭州华三通信技术有限公司 VRRP load balancing method and VRRP load balancing device
CN105847143A (en) * 2016-06-06 2016-08-10 北京博维亚讯技术有限公司 VRRP (virtual router redundancy protocol)-based load balancing method and system
CN106161272A (en) * 2016-08-31 2016-11-23 迈普通信技术股份有限公司 Realize method and the routing device of VRRP load balancing

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107911291A (en) * 2017-11-28 2018-04-13 中国移动通信集团湖北有限公司 VRRP routers switching method, router, VRRP active-standby switch system and storage medium
CN110809304A (en) * 2019-11-01 2020-02-18 北京星河亮点技术股份有限公司 Method for forwarding data stream message in network and network system
CN112995349A (en) * 2019-12-12 2021-06-18 中兴通讯股份有限公司 Address management method, server, and computer-readable storage medium
CN112995349B (en) * 2019-12-12 2023-07-04 中兴通讯股份有限公司 Address management method, server, and computer-readable storage medium
CN113381930A (en) * 2020-03-09 2021-09-10 瞻博网络公司 Group load balancing for virtual router redundancy
CN113381930B (en) * 2020-03-09 2022-10-25 瞻博网络公司 Group load balancing for virtual router redundancy

Similar Documents

Publication Publication Date Title
CN100456694C (en) Method and apparatus for providing network connector
TWI724106B (en) Business flow control method, device and system between data centers
US6754220B1 (en) System and method for dynamically assigning routers to hosts through a mediator
CN101404621B (en) Method and routing device for implementing VRRP load balance
US7929420B2 (en) Method and apparatus for learning VRRP backup routers
CN1826773B (en) Distributing and balancing traffic flow in a virtual gateway
CN102223365B (en) User access method and device based on SSL (Secure Socket Layer) VPN (Virtual Private Network) gateway cluster
CN101316236B (en) Vrrp backup group load sharing method and router
CN102726021B (en) Data center network architecture flexibly
CN105610632B (en) Virtual network equipment and related method
WO2017114017A1 (en) Computer device, system and method for implementing load balancing
US6330605B1 (en) Proxy cache cluster
US8549120B2 (en) System and method for location based address assignment in the distribution of traffic in a virtual gateway
CN102821044B (en) Method and device for configuring server cluster
CN107294845A (en) VRRP load-balancing methods and device
US20100027420A1 (en) Dynamic distribution of virtual machines in a communication network
CN102025630A (en) Load balancing method and load balancing system
CN107995123A (en) A kind of SiteServer LBS and method based on interchanger
CN101005452A (en) Method and system for communication between IP devices
EP2939401B1 (en) Method for guaranteeing service continuity in a telecommunication network and system thereof
CN103200093B (en) A kind of method and apparatus improving the handling property of many VRRP backup group
CN110474802A (en) Equipment switching method and device, service system
CN100521603C (en) Method for realizing high-usability of network security equipment under cluster mode
CN103259740A (en) Load balancing processing method and device
CN112311907A (en) ARP request response method, load balancing equipment and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20171024

RJ01 Rejection of invention patent application after publication