Summary of the invention
The invention provides the method and apparatus that flow sends in a kind of VRRP networking, realize flow load sharing balanced in the VRRP networking.
The present invention provides the method that flow sends in a kind of Virtual Router Redundancy Protocol VRRP networking, and the VRRP group in the said VRRP networking comprises a plurality of convergence-level equipment, and each convergence-level equipment has different separately MAC Addresss; This method further comprises:
Access device sends the ARP request message to said VRRP group, receives the arp reply message of the expansion of said VRRP group transmission, and the arp reply message of said expansion carries a plurality of MAC Addresss;
Said access device is set up the ARP list item according to the arp reply message of said expansion, stores said a plurality of MAC Address, and writes down each self-corresponding bandwidth use value of said a plurality of MAC Address;
When said access device need be to said VRRP group transmitted traffic, search said ARP list item, select dedicated bandwidth is minimum or remaining bandwidth is maximum MAC Address as gateway MAC Address and transmitted traffic.
Said access device is set up the ARP list item according to the arp reply message of said expansion, stores said a plurality of MAC Address, and writes down each self-corresponding bandwidth use value of said a plurality of MAC Address and comprise:
Said access device obtains the corresponding a plurality of MAC Addresss in IP address and said IP address of said VRRP group according to the arp reply message of said expansion;
Said access device is set up the ARP list item and is stored the corresponding a plurality of MAC Addresss in said IP address and said IP address; Also comprise dedicated bandwidth or remaining bandwidth field in the said ARP list item, be used to write down each MAC Address corresponding dedicated bandwidth or remaining bandwidth.
Said access device writes down each self-corresponding bandwidth use value of said a plurality of MAC Address and comprises:
When said access device during to said VRRP group transmitted traffic, said access device obtains the bandwidth that said flow takies, in said ARP list item, increase said flow target MAC (Media Access Control) address dedicated bandwidth or reduce the remaining bandwidth of said MAC Address;
When said access device stops to send said flow, said access device in said ARP list item, reduce said flow target MAC (Media Access Control) address dedicated bandwidth or increase the remaining bandwidth of said MAC Address.
Said access device obtains the bandwidth that said flow takies, and the dedicated bandwidth or the remaining bandwidth that reduces said MAC Address that in said ARP list item, increase the target MAC (Media Access Control) address of said flow comprise:
The initial value of the dedicated bandwidth of all MAC Addresss in the said ARP list item of said access device is set to 0, bandwidth that said flow is taken and said dedicated bandwidth and as new dedicated bandwidth;
Perhaps
The initial value of the remaining bandwidth of all MAC Addresss in the said ARP list item of said access device is set to identical maximum bandwidth, and the difference of the bandwidth that said remaining bandwidth and said flow are taken is as new remaining bandwidth.
The a plurality of MAC Addresss that carry in the ARP message of said expansion comprise main with MAC Address and available MAC Address, and when said access device was not supported the ARP message of said expansion, said access device was according to the said main MAC Address transmitted traffic of using.
The present invention provides the equipment that flow sends in a kind of Virtual Router Redundancy Protocol VRRP networking; Be applied to the VRRP networking as access device; VRRP group in the said VRRP networking comprises a plurality of convergence-level equipment, and each convergence-level equipment has different separately MAC Addresss; This equipment further comprises:
The message receiving element is used for sending the ARP request message to said VRRP group, receives the arp reply message of the expansion of said VRRP group transmission, and the arp reply message of said expansion carries a plurality of MAC Addresss;
List item is set up the unit, is used for setting up the ARP list item according to the arp reply message of said expansion, stores said a plurality of MAC Address;
The bandwidth record cell is used to write down each self-corresponding bandwidth use value of said a plurality of MAC Address;
The flow transmitting element is used for and need when said VRRP group transmitted traffic, searches said ARP list item, selects dedicated bandwidth is minimum or remaining bandwidth is maximum MAC Address as gateway MAC Address and transmitted traffic.
Said list item is set up the unit and also is used for:
Obtain the corresponding a plurality of MAC Addresss in IP address and said IP address of said VRRP group according to the arp reply message of said expansion;
Set up the ARP list item and store the corresponding a plurality of MAC Addresss in said IP address and said IP address, also comprise dedicated bandwidth or remaining bandwidth field in the said ARP list item, be used to write down each MAC Address corresponding dedicated bandwidth or remaining bandwidth.
Said bandwidth record cell also is used for:
When said access device during to said VRRP group transmitted traffic, obtain the bandwidth that said flow takies, in said ARP list item, increase said flow target MAC (Media Access Control) address dedicated bandwidth or reduce the remaining bandwidth of said MAC Address;
When said access device stopped to send said flow, the dedicated bandwidth that in said ARP list item, reduces the target MAC (Media Access Control) address of said flow perhaps increased the remaining bandwidth of said MAC Address.
Said bandwidth record cell also is used for:
The initial value of the dedicated bandwidth of all MAC Addresss in the said ARP list item is set to 0, bandwidth that said flow is taken and said dedicated bandwidth and as new dedicated bandwidth;
Perhaps
The initial value of the remaining bandwidth of all MAC Addresss in the said ARP list item is set to identical maximum bandwidth, and the difference of the bandwidth that said remaining bandwidth and said flow are taken is as new remaining bandwidth.
The a plurality of MAC Addresss that carry in the ARP message of said expansion comprise main with MAC Address and available MAC Address;
Said flow transmitting element also is used for: when said access device is not supported the ARP message of said expansion, according to the said main MAC Address transmitted traffic of using.
Compared with prior art, the present invention has the following advantages at least:
Among the present invention; Access device receives the ARP message of the expansion of VRRP group transmission; Set up the ARP list item according to this message, store a plurality of MAC Addresss, and the corresponding bandwidth use value of record MAC Address; Select dedicated bandwidth is minimum or remaining bandwidth is maximum MAC Address as gateway MAC Address transmitted traffic, realize balanced flow load sharing.
Embodiment
Core concept of the present invention is: in the VRRP networking, configuration is based on the load balancing mode of flow bandwidth.The ARP message of configuration expansion adds optional MAC Address field in the ARP message of expansion, be used to carry the MAC Address of the convergence-level equipment that can supply the access device access.Access device is set up the ARP list item according to the ARP message of expansion; The corresponding bandwidth use value of alternative MAC Address of record and MAC Address in this ARP list item; Select dedicated bandwidth is minimum or remaining bandwidth is maximum MAC Address as the gateway MAC Address, thereby realize load balancing access way based on bandwidth.
The present invention provides the method that flow sends in a kind of VRRP networking, and the VRRP group in the said VRRP networking comprises a plurality of convergence-level equipment, and each convergence-level equipment has different separately MAC Addresss; As shown in Figure 2, this method further comprises:
Step 201, access device sends the ARP request message to said VRRP group, receives the arp reply message of the expansion of said VRRP group transmission, and the arp reply message of said expansion carries a plurality of MAC Addresss;
Step 202, said access device is set up the ARP list item according to the arp reply message of said expansion, stores said a plurality of MAC Address, and writes down each self-corresponding bandwidth use value of said a plurality of MAC Address;
Step 203 when said access device need be to said VRRP group transmitted traffic, searched said ARP list item, selects dedicated bandwidth is minimum or remaining bandwidth is maximum MAC Address as gateway MAC Address and transmitted traffic.
Introduce the method that flow sends in the VRRP networking provided by the invention in detail below in conjunction with concrete application scenarios.
In the application scenarios of the present invention, dispose a kind of arp reply message of expansion, the form of existing arp reply message is as shown in table 1:
Table 1
Wherein, the form of the arp reply message that provides of application scenarios of the present invention is as shown in table 2:
Table 2
In the message of arp reply shown in the table 1; Transmitting terminal MAC Address and transmitting terminal IP address are respectively the MAC Address of the convergence-level equipment that sends the arp reply message and the IP address of VRRP group, and destination-mac address and target ip address are respectively the MAC Address and the IP address of access device.
Different with table 1 is, in the ARP message of the expansion shown in the table 2 that should provide with scene, has increased optional MAC Address field, in order to carry except that main with can also be as the optional MAC Address of gateway MAC Address the MAC Address (transmitting terminal MAC Address).Can also increase optional MAC digital section in the table 2, the number of the optional MAC Address that carries in the ARP message in order to the sign expansion.
In the ARP message of the expansion shown in the table 2 that should provide with scene, the OP field can also be added message identification, and for example 8, in order to identify the ARP message of this message for expansion.
Because in the ARP message of the expansion shown in the table 2 that should provide with scene, both comprised and mainly use MAC Address that comprise optional MAC Address again, the access device for the ARP message of support expanded can obtain leading with MAC Address and optional MAC Address of wherein carrying; For the access device of the ARP message of support expanded not, can obtain the master who wherein carries and use MAC Address.
Concrete, the method that flow sends in the VRRP networking that application scenarios of the present invention provides, as shown in Figure 3, may further comprise the steps:
Step 301, access device sends the ARP request to the VRRP group.
Step 302, the VRRP group is sent the ARP message of expansion to access device.
In the VRRP agreement, two groups of important notions are arranged: VRRP router and virtual router, master control router and backup router.The VRRP router is meant the router of operation VRRP, is physical entity, and virtual router is meant what the VRRP agreement was created, is logical concept.The collaborative work of one group of VRRP router constitutes a virtual router jointly.This virtual router externally shows as a router logic with unique fixed ip address.Be in the role that router in the same VRRP group has two kinds of mutual exclusions: master control router and backup router, there is and has only a router that is in the master control role in the VRRP group, can there be one or more to be in backup role's router.The VRRP agreement uses selection strategy from groups of routers, to select one as master control, is responsible for the corresponding and forwarding IP packet of ARP, and other router in the group is ready as the role of backup.When the master control router breaks down for a certain reason, backup router can several seconds the time delay and upgrade to active router.
In the application scenarios of the present invention, receive the ARP request that access device sends after, VRRP group a plurality of or all MAC Addresss that this group is interior add in the ARP message of expansion, and the ARP message that will expand sends to access device.
Step 303, access device receive the ARP message of the expansion of VRRP group transmission, set up the ARP list item and store a plurality of available MAC Addresss.
Concrete, after access device receives the ARP message of the expansion that the VRRP group sends, set up ARP list item as shown in table 3 according to the transmitting terminal MAC Address that carries in this message and available MAC Address and transmitting terminal IP address:
Table 3
| Internet?Address | Physical?Address | Type | Used data stream bandwidth |
| x.x.x.x | The transmitting terminal MAC Address | dynamic | a |
| Optional MAC Address 1 | dynamic | b |
| Optional MAC Address 2 | dynamic | c |
Wherein, Internet address representes requested IP address, i.e. the IP address of VRRP group; Physical Address representes physical address, and Type representes the mode of this list item study, representes to use the stream bandwidth of this MAC Address as the gateway MAC Address with data stream bandwidth.
Should use in the scene, also can be to use other forms that can identify the corresponding bandwidth value of MAC Address with data stream bandwidth in the table 3, for example can use the remaining bandwidth value to replace.
Whenstep 304, access device are sent new flow to VRRP group, search the ARP list item, select dedicated bandwidth is minimum or remaining bandwidth is maximum MAC Address as the gateway MAC Address, to VRRP group transmitted traffic.
When access device used MAC Address in the ARP list item as the gateway MAC Address, access device was also according to the bandwidth of the flow that sends to the VRRP group, in the ARP list item this MAC Address of record corresponding with data stream bandwidth or remaining bandwidth value.
After receiving the ARP message of VRRP group transmission, access device is searched the MAC Address that dedicated bandwidth is minimum or remaining bandwidth is maximum in the ARP list item, use this MAC Address as gateway MAC Address transmitted traffic.
Should use in the scene, access device when promptly VRRP organizes transmitted traffic, need be known the bandwidth that this flow takies to convergence-level equipment, revises corresponding dedicated bandwidth or the remaining bandwidth value of MAC Address in the ARP list item according to the bandwidth of flow.The acquiescence total bandwidth value of each MAC Address is identical.
Introduce the method that flow sends in the VRRP networking provided by the invention below in conjunction with another concrete application scenarios.Wherein, access device is that example is introduced with the multimedia terminal.
With networking shown in Figure 4 is example, and wherein, the IP address of gateway VRRP is 1.1.1.1, has two convergence-level equipment, and its MAC Address is respectively 0000-0000-0001 and 0000-0000-0002; The IP address and the MAC Address that insert multimedia equipment are respectively:
IP:1.1.1.2, MAC Address 0000-0000-1111.
As shown in Figure 5, the method that flow sends in the VRRP networking under this concrete application scenarios may further comprise the steps:
Step 501 inserts multimedia equipment and sends common ARP request to the VRRP group.
Step 502, the VRRP group is sent the ARP message of expansion to the VRRP group.
The form of the ARP message of this expansion is as shown in table 4:
Table 4
| OP | 8 |
| The transmitting terminal MAC Address | 0000-0000-0001 |
| Transmitting terminal IP address | 1.1.1.1 |
| Destination-mac address | 0000-0000-1111 |
| Target ip address | 1.1.1.2 |
| Optional MAC number | 1 |
| Optional MAC Address | 0000-0000-0002 |
Step 503 inserts the ARP message that multimedia equipment receives expansion, sets up the ARP list item.
Concrete, this ARP list item is as shown in table 5:
Table 5
| Internet?Address | Physical?Address | Type | Used data stream bandwidth (K) |
| 1.1.1.1 | 0000-0000-0001 | dynamic | 0 |
| 0000-0000-0002 | dynamic | 0 |
Step 504 inserts the newly-built media stream of multimedia equipment, searches the ARP list item, selects the MAC Address that dedicated bandwidth is minimum or remaining bandwidth is maximum to send media stream as the gateway MAC Address.
Concrete, if there is the user need watch live telecast, then inserting the newly-built media stream of meeting on the multimedia equipment, this stream inserts multimedia equipment and searches the ARP list item when sending.When initial; The use data stream bandwidth that each MAC Address is corresponding all is 0; Then insert multimedia equipment and can select first MAC Address according to preset rule; As gateway MAC, and use data stream bandwidth, for example add 1* code stream bandwidth according to what the bandwidth that this newly-built media stream takies write down this gateway in the ARP list item.The gateway MAC Address that this stream of record uses in software simultaneously; Promptly in existing stream list item, increase a MAC value variable; When increasing this stream; The MAC Address of selecting is deposited in this variable, and follow-up message to this flow all uses the target MAC (Media Access Control) address in this variable to encapsulate.
Through adopting method provided by the invention; Access device receives the ARP message of the expansion of VRRP group transmission; Set up the ARP list item according to this message, store a plurality of MAC Addresss, and the corresponding bandwidth use value of record MAC Address; Select dedicated bandwidth is minimum or remaining bandwidth is maximum MAC Address as gateway MAC Address transmitted traffic, realize balanced flow load sharing.
The present invention provides the equipment that flow sends in a kind of VRRP networking, is applied to the VRRP networking as access device, and the VRRP group in the said VRRP networking comprises a plurality of convergence-level equipment, and each convergence-level equipment has different separately MAC Addresss; As shown in Figure 6, this equipment further comprises:
Message receiving element 11 is used for sending the ARP request message to said VRRP group, receives the arp reply message of the expansion of said VRRP group transmission, and the arp reply message of said expansion carries a plurality of MAC Addresss;
List item is set upunit 12, is connected with saidmessage receiving element 11, is used for setting up the ARP list item according to the arp reply message of said expansion, stores said a plurality of MAC Address;
Bandwidth record cell 13 is set upunit 12 with said list item and is connected, and is used in each self-corresponding bandwidth use value of the said a plurality of MAC Addresss of said ARP list item record;
Flow transmittingelement 14 is set upunit 12 with said list item and is connected, and is used for when said VRRP group transmitted traffic, searching said ARP list item, selects dedicated bandwidth is minimum or remaining bandwidth is maximum MAC Address as gateway MAC Address and transmitted traffic.
Said list item is set upunit 12 and also is used for:
Obtain the corresponding a plurality of MAC Addresss in IP address and said IP address of said VRRP group according to the arp reply message of said expansion;
Set up the ARP list item and store the corresponding a plurality of MAC Addresss in said IP address and said IP address, also comprise dedicated bandwidth or remaining bandwidth field in the said ARP list item, be used to write down each MAC Address corresponding dedicated bandwidth or remaining bandwidth.
Saidbandwidth record cell 13 also is used for:
When said access device during to said VRRP group transmitted traffic, obtain the bandwidth that said flow takies, in said ARP list item, increase said flow target MAC (Media Access Control) address dedicated bandwidth or reduce the remaining bandwidth of said MAC Address;
When said access device stopped to send said flow, the dedicated bandwidth that in said ARP list item, reduces the target MAC (Media Access Control) address of said flow perhaps increased the remaining bandwidth of said MAC Address.
Saidbandwidth record cell 13 also is used for:
The initial value of the dedicated bandwidth of all MAC Addresss in the said ARP list item is set to 0, bandwidth that said flow is taken and said dedicated bandwidth and as new dedicated bandwidth;
Perhaps
The initial value of the remaining bandwidth of all MAC Addresss in the said ARP list item is set to identical maximum bandwidth, and the difference of the bandwidth that said remaining bandwidth and said flow are taken is as new remaining bandwidth.
The a plurality of MAC Addresss that carry in the ARP message of said expansion comprise main with MAC Address and available MAC Address; Saidflow transmitting element 14 also is used for: when said access device is not supported the ARP message of said expansion, according to the said main MAC Address transmitted traffic of using.
Through adopting equipment provided by the invention; Access device receives the ARP message of the expansion of VRRP group transmission; Set up the ARP list item according to this message, store a plurality of MAC Addresss, and the corresponding bandwidth use value of record MAC Address; Select dedicated bandwidth is minimum or remaining bandwidth is maximum MAC Address as gateway MAC Address transmitted traffic, realize balanced flow load sharing.
Through the description of above execution mode, those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential general hardware platform, can certainly pass through hardware, but the former is better execution mode under a lot of situation.Based on such understanding; The part that technical scheme of the present invention contributes to prior art in essence in other words can be come out with the embodied of software product; This computer software product is stored in the storage medium; Comprise some instructions with so that computer equipment (can be personal computer, server, the perhaps network equipment etc.) carry out the described method of each embodiment of the present invention.
It will be appreciated by those skilled in the art that accompanying drawing is the sketch map of a preferred embodiment, module in the accompanying drawing or flow process might not be that embodiment of the present invention is necessary.
It will be appreciated by those skilled in the art that the module in the device among the embodiment can be distributed in the device of embodiment according to the embodiment description, also can carry out respective change and be arranged in the one or more devices that are different from present embodiment.The module of the foregoing description can be merged into a module, also can further split into a plurality of submodules.
The invention described above embodiment sequence number is not represented the quality of embodiment just to description.
More than disclosedly be merely several specific embodiment of the present invention, still, the present invention is not limited thereto, any those skilled in the art can think variation all should fall into protection scope of the present invention.