CN111049752B - Load balancing method and device for multiple transmission lines - Google Patents

Load balancing method and device for multiple transmission lines Download PDF

Info

Publication number
CN111049752B
CN111049752B CN201911302284.9A CN201911302284A CN111049752B CN 111049752 B CN111049752 B CN 111049752B CN 201911302284 A CN201911302284 A CN 201911302284A CN 111049752 B CN111049752 B CN 111049752B
Authority
CN
China
Prior art keywords
initial application
routing device
routing
packet
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911302284.9A
Other languages
Chinese (zh)
Other versions
CN111049752A (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.)
Ruijie Networks Co Ltd
Original Assignee
Ruijie Networks 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 Ruijie Networks Co Ltd filed Critical Ruijie Networks Co Ltd
Priority to CN201911302284.9A priority Critical patent/CN111049752B/en
Publication of CN111049752A publication Critical patent/CN111049752A/en
Application granted granted Critical
Publication of CN111049752B publication Critical patent/CN111049752B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • H04L45/245Link aggregation, e.g. trunking
    • 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

Abstract

The application discloses a load balancing method and device for multiple transmission lines. After receiving an initial application message sent by a first network connected with a convergence site to a second network connected with an access site, if determining that a first routing device has a main device attribute, acquiring path scheduling information of the initial application message according to a preset load balancing scheduling strategy, first line information and at least one second line information of at least one second transmission line, thereby determining a forwarding path for forwarding the initial application message; if the first routing equipment is determined to have the equipment attribute, the initial application message is encapsulated in a first preset encapsulation mode, the application message to be forwarded is obtained and is forwarded to the selected second routing equipment with the main equipment attribute, and therefore the selected second routing equipment determines the forwarding path for forwarding the initial application message. The method solves the load balancing problem of a plurality of transmission lines of the routing equipment of the aggregation sites deployed at different places.

Description

Load balancing method and device for multiple transmission lines
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for load balancing of multiple transmission lines.
Background
At present, a network of a private network in industries such as finance, government, traffic, meteorology and the like in China, for example, an intra-provincial wide area network is generally divided into a provincial level convergence layer, a city convergence layer and a district (or branch) access layer, each convergence point in the convergence layer can be called a convergence site, each access point in the access layer can be called an access site, each site can comprise at least two routing devices, interconnection for communication between the convergence site and the access site is provided, at least two transmission lines exist between the two interconnection sites, as shown in fig. 1, the intra-provincial wide area network comprises the provincial level convergence layer, the city convergence layer and the district access layer, and each provincial level convergence site, each city convergence site and each access site comprise two routing devices. The transmission line is mostly a two-layer special line, and also comprises a part of Internet line and 4G (or 3G, 5G) line.
At present, the provincial wide area network is still evolving towards the flattening, the access site can be directly connected to the provincial convergence site through the wide area network line, and because there is no convergence of the city convergence layer, the convergence of all the access sites can not be completed by two routing devices in each provincial convergence site, so that more routing devices need to be deployed in the convergence site, as shown in fig. 2, the investment cost of the wide area network is greatly increased by such deployment.
In order to reduce the investment cost of the wide area network, that is, to fully utilize the bandwidth of each line without increasing the routing equipment of the aggregation site and to achieve the purpose of line load balancing between the aggregation site and the receiving site, the following two solutions are currently included:
the method I, configuring policy routing:
by configuring policy routing, different service flows are forwarded from different lines, but for users with huge network service number, the manner of configuring policy routing for each routing device is more complicated, the configuration time is longer, and the deployment of policy routing is more difficult. And the scheme for configuring the policy routing is a static adjustment scheme, and if the traffic flow size ratio in the network system changes, the purpose of load balancing can be achieved only by readjusting the policy, and dynamic configuration cannot be realized.
The second method comprises the following steps of equipment virtualization:
the device virtualization is to virtualize a plurality of routing devices into a virtual routing device, and then bind transmission lines in a wide area network into an aggregation line. In order to solve the problem that two routing devices in a provincial convergence site cannot complete convergence of a large number of access sites, the number of the routing devices in the convergence site needs to be increased, however, because the routing devices in the convergence site need to be placed in different machine rooms in the same city, in this case, networking interconnection can be performed by deploying two layers of direct-connected lines, such as optical fiber lines, but the cost is high.
Disclosure of Invention
The embodiment of the application provides a load balancing method and device for multiple transmission lines, solves the problem that a convergence site in the prior art cannot complete convergence of a large number of access sites, achieves real-time load balancing of lines between the convergence site and receiving sites, and reduces network expenses.
In a first aspect, a method for load balancing of multiple transmission lines is provided, where the method is applied to a first routing device of a convergence station, at least two transmission lines between the convergence station and an access station are configured as a virtual aggregation link, and the convergence station further includes at least one second routing device, and the method may include:
receiving an initial application message of a target application sent by a first network connected with the aggregation site to a second network connected with the access site;
acquiring the attributes of the main and standby devices of the first routing device and the at least one second routing device;
if the first routing equipment is determined to have the attribute of the main equipment, acquiring path scheduling information of the initial application message according to a preset load balancing scheduling strategy, first line information of a first transmission line where the first routing equipment is located and at least one second line information of at least one second transmission line where at least one second routing equipment is located; determining a forwarding path for forwarding the initial application message from the first transmission line and the at least one second transmission line according to the path scheduling information;
if the first routing equipment is determined to have the equipment attribute, packaging the initial application message in a first preset packaging mode to obtain an application message to be forwarded and forwarding the application message to selected second routing equipment having the main equipment attribute, so that the selected second routing equipment obtains the initial application message, obtains path scheduling information of the initial application message according to the preset load balancing scheduling strategy, the first path information and the at least one second path information, and then determines a forwarding path forwarded by the initial application message.
In an optional implementation, the obtaining the attributes of the primary and standby devices of the first routing device and the at least one second routing device includes:
sending a first synchronization control message to the at least one second routing device, and receiving at least one second synchronization control message sent by the at least one second routing device, where the first synchronization control message includes a first Media Access Control (MAC) address of the first routing device, a link identifier of the virtual aggregation link, and the first line information, and each second synchronization control message in the at least one second synchronization control message includes a second MAC address of the corresponding second routing device, the link identifier, and the second line information;
and determining the master/standby device attributes of the first routing device and the at least one second routing device according to the first MAC address, the at least one second MAC address and the link identifier.
In an optional implementation, determining, according to the first MAC address, the at least one second MAC address, and the link identifier, a master-slave device attribute of the first routing device and the at least one second routing device includes:
calculating the first MAC address and the link identification by adopting a Hash algorithm to obtain a first Hash value; respectively operating the at least one second MAC address and the link identification to obtain at least one second hash value;
if the first hash value is a hash value meeting a preset rule, and the at least one second hash value is a hash value not meeting the preset rule, determining that the first routing equipment has a main equipment attribute, and the at least one second routing equipment has a standby equipment attribute;
and if the first hash value is a hash value which does not meet the preset rule, and a selected second hash value in the at least one second hash value is a hash value which meets the preset rule, determining that the first routing equipment has the attribute of the equipment, and determining that the second routing equipment corresponding to the selected second hash value has the attribute of the main equipment.
In an optional implementation, determining a forwarding path to which the initial application packet is forwarded from the first transmission line and the at least one second transmission line according to the path scheduling information includes:
if the path scheduling information indicates that the initial application packet is forwarded from the first transmission line, forwarding the initial application packet to the second network through the first transmission line;
if the path scheduling information indicates that the initial application message is forwarded from a target second transmission line in the at least one second transmission line, packaging the initial application message by adopting a second preset packaging mode to obtain a current application message, wherein the current application message comprises message forwarding information;
and sending the current application packet to a target second routing device with the standby device attribute corresponding to the target second transmission line, so that the target second routing device acquires the initial application packet and the packet forwarding information, and forwards the initial application packet to the second network according to the packet forwarding information.
In an optional implementation, after obtaining the application packet to be forwarded and forwarding the application packet to the selected second routing device with the attribute of the primary device, the method further includes:
if the path scheduling information acquired by the selected second routing equipment indicates that the initial application message is forwarded from the first transmission line, receiving a current application message which is sent by the selected second routing equipment and comprises message forwarding information, wherein the current application message is obtained by packaging the initial application message by the selected second routing equipment in a second preset packaging mode;
decapsulating the current application packet to obtain the initial application packet and the packet forwarding information;
and forwarding the initial application message to the second network through the first transmission line according to the message forwarding information.
In an optional implementation, encapsulating the initial application packet by using a first preset encapsulation manner to obtain an application packet to be forwarded, includes:
packaging the initial application message according to a scheduling protocol of the virtual aggregation link to obtain an initial application message to be forwarded, wherein the initial application message to be forwarded comprises message information to be forwarded;
and encapsulating the initial application message to be forwarded by adopting a general routing encapsulation protocol to obtain the application message to be forwarded.
In an optional implementation, the initial application packet to be forwarded includes the initial application packet, a protocol type of the initial application packet, the packet to be forwarded information, and an IP address of a routing device of a next hop of an original forwarding line.
In an optional implementation, encapsulating the initial application packet by using a second preset encapsulation manner to obtain a current application packet, including:
packaging the initial application message according to a scheduling protocol of the virtual aggregation link to obtain an intermediate application message, wherein the intermediate application message comprises the message forwarding information;
and encapsulating the intermediate application message by adopting a general routing encapsulation protocol to obtain the current application message.
In an optional implementation, the intermediate application packet includes the initial application packet, a protocol type of the initial application packet, the packet forwarding information, an IP address of a routing device to which a target forwarding line belongs, and an IP address of a routing device of a next hop of an original forwarding line.
In an optional implementation, the preset load balancing policy includes at least one policy of load balancing of each application packet, load balancing of traffic flow formed by a plurality of application packets, load balancing of a specified line based on a line service level protocol parameter, and load balancing based on a line real-time rate.
In an optional implementation, if there is application packet transmission of a service other than a target application in the virtual aggregation link before receiving an initial application packet of the target application forwarded by the first network to the second network, acquiring path scheduling information of the initial application packet according to a preset load balancing scheduling policy, the first line information, and at least one second line information of at least one second transmission line in which at least one second routing device is located, includes:
and acquiring path scheduling information of the application messages of other services and path scheduling information of the initial application message according to a preset load balancing scheduling strategy, the first line information and the second line information.
In a second aspect, a load balancing apparatus for multiple transmission lines is provided, where the apparatus is applied to a first routing device of a rendezvous site, at least two transmission lines between the rendezvous site and an access site are configured as a virtual aggregated link, the rendezvous site further includes at least one second routing device, and the apparatus includes: the device comprises a receiving unit, an obtaining unit, a determining unit, a packaging unit and a sending unit;
the receiving unit is configured to receive an initial application packet of a target application sent by a first network connected to the aggregation site to a second network connected to the access site;
the obtaining unit is configured to obtain attributes of the master device and the standby device of the first routing device and the at least one second routing device;
if the first routing equipment is determined to have the attribute of the main equipment, acquiring path scheduling information of the initial application message according to a preset load balancing scheduling strategy, first line information of a first transmission line where the first routing equipment is located and at least one second line information of at least one second transmission line where at least one second routing equipment is located;
the determining unit is configured to determine a forwarding path to which the initial application packet is forwarded from the first transmission line and the at least one second transmission line according to the path scheduling information;
the encapsulation unit is further configured to encapsulate the initial application packet by using a first preset encapsulation manner if it is determined that the first routing device has the standby device attribute, so as to obtain an application packet to be forwarded;
the sending unit is configured to forward the initial application packet to a selected second routing device having a master device attribute, so that the selected second routing device obtains the initial application packet, and determines a forwarding path to which the initial application packet is forwarded after obtaining path scheduling information of the initial application packet according to the preset load balancing scheduling policy, the first line information, and the at least one second line information.
In an optional implementation, the sending unit is further configured to send a first synchronization control packet to the at least one second routing device;
the receiving unit is further configured to receive at least one second synchronization control packet sent by the at least one second routing device, where the first synchronization control packet includes a first media access control MAC address of the first routing device, a link identifier of the virtual aggregation link, and the first line information, and each second synchronization control packet in the at least one second synchronization control packet includes a second MAC address of a corresponding second routing device, the link identifier, and second line information;
the determining unit is further configured to determine, according to the first MAC address, the at least one second MAC address, and the link identifier, master/standby device attributes of the first routing device and the at least one second routing device.
In an optional implementation, the determining unit is specifically configured to calculate the first MAC address and the link identifier by using a hash algorithm to obtain a first hash value; respectively operating the at least one second MAC address and the link identification to obtain at least one second hash value;
if the first hash value is a hash value meeting a preset rule, and the at least one second hash value is a hash value not meeting the preset rule, determining that the first routing device has a master device attribute, and the at least one second routing device has a slave device attribute;
and if the first hash value is a hash value which does not meet the preset rule, and a selected second hash value in the at least one second hash value is a hash value which meets the preset rule, determining that the first routing equipment has the attribute of the equipment, and determining that the second routing equipment corresponding to the selected second hash value has the attribute of the main equipment.
In an optional implementation, the sending unit is further configured to forward the initial application packet to the second network through the first transmission line if the path scheduling information indicates that the initial application packet is forwarded from the first transmission line;
the obtaining unit is further configured to package the initial application packet in a second preset packaging manner to obtain a current application packet if the path scheduling information indicates that the initial application packet is forwarded from a target second transmission line in the at least one second transmission line, where the current application packet includes packet forwarding information;
the sending unit is further configured to send the current application packet to a target second routing device having a standby device attribute and corresponding to the target second transmission line, so that the target second routing device obtains the initial application packet and the packet forwarding information, and forwards the initial application packet to the second network according to the packet forwarding information.
In an optional implementation, the receiving unit is further configured to receive a current application packet including packet forwarding information sent by the selected second routing device if the path scheduling information acquired by the selected second routing device indicates that the initial application packet is forwarded from the first transmission line, where the current application packet is obtained by encapsulating, by the selected second routing device, the initial application packet in the second preset encapsulation manner;
the obtaining unit is further configured to decapsulate the current application packet, and obtain the initial application packet and the packet forwarding information;
the sending unit is further configured to forward the initial application packet to the second network through the first transmission line according to the packet forwarding information.
In an optional implementation, the obtaining unit is specifically configured to encapsulate the initial application packet according to a scheduling protocol of the virtual aggregation link to obtain an initial application packet to be forwarded, where the initial application packet to be forwarded includes information to be forwarded of a packet;
and encapsulating the initial application message to be forwarded by adopting a general routing encapsulation protocol to obtain the application message to be forwarded.
In an optional implementation, the initial application packet to be forwarded includes the initial application packet, a protocol type of the initial application packet, the packet to be forwarded information, and an IP address of a routing device of a next hop of an original forwarding line.
In an optional implementation, the obtaining unit is further specifically configured to encapsulate the initial application packet according to a scheduling protocol of the virtual aggregation link, so as to obtain an intermediate application packet, where the intermediate application packet includes the packet forwarding information;
and adopting a general routing encapsulation protocol to encapsulate the intermediate application message to obtain the current application message.
In an optional implementation, the intermediate application packet includes the initial application packet, a protocol type of the initial application packet, the packet forwarding information, an IP address of a routing device to which a target forwarding line belongs, and an IP address of a routing device of a next hop of an original forwarding line.
In an optional implementation, the preset load balancing policy includes at least one policy of load balancing of each application packet, load balancing of traffic flow formed by a plurality of application packets, load balancing of a specified line based on a line service level protocol parameter, and load balancing based on a line real-time rate.
In an optional implementation, if application packet transmission of other services except the target application exists in the virtual aggregation link before receiving an initial application packet of the target application forwarded by the first network to the second network, the obtaining unit is further specifically configured to obtain path scheduling information of the application packet of the other services and path scheduling information of the initial application packet according to a preset load balancing scheduling policy, the first line information, and at least one second line information of at least one second transmission line in which the at least one second routing device is located.
In a third aspect, an electronic device is provided, which includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor adapted to perform the method steps of any of the above first aspects when executing a program stored in the memory.
In a fourth aspect, a computer-readable storage medium is provided, having stored therein a computer program which, when executed by a processor, performs the method steps of any of the above first aspects.
The load balancing method for multiple transmission lines provided by the embodiment of the invention obtains the attributes of the main and standby devices of the first routing device and at least one second routing device after receiving the initial application message of the target application sent by the first network connected with the aggregation site to the second network connected with the access site; if the first routing equipment is determined to have the main equipment attribute, acquiring path scheduling information of the initial application message according to a preset load balancing scheduling strategy, first line information of a first transmission line where the first routing equipment is located and at least one second line information of at least one second transmission line where at least one second routing equipment is located; determining a forwarding path for forwarding the initial application message from the first transmission line and the at least one second transmission line according to the path scheduling information; if the first routing equipment is determined to have the equipment attribute, the initial application message is packaged in a first preset packaging mode to obtain the application message to be forwarded and is forwarded to the selected second routing equipment with the main equipment attribute, so that the selected second routing equipment obtains the initial application message, and the forwarding path forwarded by the initial application message is determined after the path scheduling information of the initial application message is obtained according to a preset load balancing scheduling strategy, the first line information and at least one second line information. The method adopts the scheduling protocol of the virtual aggregation link after configuring the plurality of transmission lines between the aggregation site and the access site as the virtual aggregation link, solves the load balancing problem of the plurality of transmission lines of the routing equipment of the aggregation site deployed at different places without changing the existing network, reduces the network charge, and realizes the automatic load balancing of the real-time service flow of each transmission line.
Drawings
Fig. 1 is a schematic structural diagram of a network system provided;
fig. 2 is a schematic structural diagram of another network system provided;
fig. 3 is a schematic diagram of a network architecture applied to a load balancing method for multiple transmission lines according to an embodiment of the present invention;
fig. 4 is a message format diagram of a control message of a virtual aggregation link V-AG protocol according to an embodiment of the present invention;
fig. 5A is a schematic flowchart of a load balancing method for multiple transmission lines according to an embodiment of the present invention;
fig. 5B is a schematic structural diagram of a network system according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a message structure of a current message according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a message format after a scheduling protocol TAG is encapsulated according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a load balancing apparatus with multiple transmission lines according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without any creative effort belong to the protection scope of the present application.
The load balancing method for multiple transmission lines provided in the embodiment of the present invention may be applied to the network architecture shown in fig. 3, where the network architecture may include: a first network, a second network, an aggregation site, and at least one access site.
The first network is in communication connection with at least one aggregation site, the second network is in communication connection with at least one access site, the aggregation site may include at least two routing devices, each access site may include at least one routing device, and at least one routing device in each access site is correspondingly connected to at least two routing devices in the aggregation site, respectively, so as to form at least two transmission lines.
At least two transmission lines between an aggregation site and an access site are configured as a Virtual-aggregation-report (V-AG), such as V-AG 1, V-AG 2 and V-AG 3. The virtual aggregation link V-AG aggregates a plurality of transmission lines between the aggregation site and the access site into one virtual transmission line, but a logical three-layer interface is not generated.
Introduction to the virtual aggregated link V-AG:
(1) The total bandwidth of the virtual aggregated link V-AG is the sum of the bandwidths of the individual transmission lines of the at least two transmission lines. The V-AG does not require the same line bandwidth, different line bandwidths can be from Kbps level to Gbps level, and a plurality of lines with different bandwidths can be bundled together to realize load balancing.
(2) Service flow (or called application message flow) between an aggregation site and an access site in a virtual aggregation link V-AG shares the total bandwidth of the virtual aggregation link V-AG;
(3) The traffic flow between the aggregation site and the access site in the virtual aggregation link V-AG can realize load balancing on at least two transmission lines in the virtual aggregation link V-AG.
(4) The virtual aggregation link V-AG has a link identification V-AG ID, and each routing device on the virtual aggregation link stores the link identification V-AG ID, that is, all routing devices on the same virtual aggregation link store the same link identification V-AG ID.
(5) Each of at least two transmission lines of the virtual aggregation link V-AG may implement measurement of a line forwarding rate and measurement of a Service-Level Agreement (SLA) parameter, where the line SLA parameter may include a delay parameter, a line jitter parameter, a packet loss rate parameter, and the like. Where the varying delay is referred to as jitter.
It can be appreciated that the line SLA parameters may not be measured if load balancing based on the line SLA parameters is not required.
(6) At least two routing devices in the aggregation site of the virtual aggregation link V-AG can communicate information such as forwarding rate parameters, line SLA parameters and the like of a transmission line through a control message of a virtual aggregation link V-AG protocol.
The control message of the V-AG protocol of the virtual aggregation link may include message contents such as a link identifier V-AG ID, the number of transmission lines in the virtual aggregation link, an MAC address of the routing device, and line information of the routing device, where the line information may include information such as a total line bandwidth, a real-time line bandwidth, a line delay, a line packet loss rate, a bandwidth utilization rate, and a line type.
In an example, the message format of the control message may be as shown in fig. 4, and may include:
routing device MAC address (System MAC) field: 32bit;
message Sequence number (Sequence) field: 16bit, each time a message is sent, sequence is added with 1, and the initial value is 0.
Link identification (V-AG ID) field of virtual aggregated link: 32bit, and identifying the current virtual aggregation link V-AG;
number of lines (Link Number) field: 32bit, the total number of transmission lines included in a virtual aggregation link V-AG where the current routing equipment is located;
IP address of current routing device (localwarnip) field: 32bit;
line type (LinkType) field: 8bit, wherein, 1: a second layer of special lines; 2: an Internet line; 3, a line 4G/5G; 4: other unknowns;
line status (LinkState) field: 8bit,0: down,1: up;
line color (LinkColour) field: 8bit, different colors are used to represent the overall rating of the line quality;
control protocol connection status (C) field: 1bit,0: disconnected,1: connected;
total bandwidth (Total bandwidth) field: unit: kbps,32 bit;
line real-time bandwidth (realtimebandwidth) field: unit: kbps,32 bit;
line current delay (Link delay v-AG) field: and (4) bidirectional time delay. 32bit;
a current packet Loss rate (Loss) field of the line: unit: one in a thousand. 32bit;
jitter (Jitter) field of line: 32 And (6) bit.
It should be noted that the configuration of the virtual aggregation link V-AG may be implemented by an aggregation site or an access site, or may be preconfigured by a technician, and the embodiment of the present invention is not limited herein.
In addition, the virtual aggregation link V-AG can be deployed only on the access site or the aggregation site to provide traffic load balancing in one direction, and when a network is modified, only the access site or the aggregation site can be modified to complete traffic scheduling in one direction.
With reference to fig. 3, it is exemplified below that the virtual aggregation link is composed of one aggregation site and one access site, and the load balancing method is deployed at the aggregation site.
Fig. 5A is a schematic flowchart of a load balancing method for multiple transmission lines according to an embodiment of the present invention. The method is applied to a first routing device of an aggregation site, where the aggregation site further includes at least one second routing device, and as shown in fig. 5A, the method may include:
step 501, a first routing device receives an initial application message of a target application sent by a first network connected to a convergence station to a second network connected to an access station.
Step 502, the first routing device obtains the attributes of the primary and standby devices of the first routing device and the at least one second routing device.
The first routing device may send a first synchronization control packet to the at least one second routing device and receive at least one second synchronization control packet sent by the at least one second routing device.
The first synchronization Control message may include a first Media Access Control (MAC) address of the first routing device, a link identifier of the virtual aggregation link, and first line information. Each second synchronization control message in the at least one second synchronization control message includes a second MAC address, a link identifier, and second line information of the corresponding second routing device. The line information may include information such as total line bandwidth, real-time line bandwidth, line delay, and line packet loss rate.
Then, the first routing device may determine the active/standby device attributes of the first routing device and the at least one second routing device according to the first MAC address, the at least one second MAC address, and the link identifier.
Specifically, for convenience of description, the virtual aggregation link V-AG configured below includes two transmission lines of an aggregation site and an access site, and as shown in fig. 5B, the aggregation site may include a first routing device R1 and a second routing device R2; the access site may include a third routing device R3 and a fourth routing device R4, and the virtual aggregation link may include a transmission line 1 (or "transmission line where the first routing device is located") formed by the first routing device R1 and the third routing device R3, and a transmission line 2 (or "transmission line where the second routing device is located") formed by the second routing device R2 and the fourth routing device R4.
The first routing device R1 may periodically or real-time interact with the second routing device R2 to implement information synchronization, where the synchronization control message is a control message of a virtual aggregation link V-AG protocol. The synchronization control packet may include the MAC address of each routing device, the link identifier of the virtual aggregation link to which the routing device belongs, and the line information of the transmission line in which each routing device belongs, that is, the synchronization control packet of the first routing device R1 may include the line information of the transmission line in which the first routing device R1 is located, and the synchronization control packet of the second routing device R2 may include the line information of the transmission line in which the second routing device R2 is located.
Further, the first routing device may use a hash algorithm to calculate the first MAC address and the link identifier to obtain a first hash value; respectively operating at least one second MAC address and the link identification to obtain at least one second hash value;
if the first hash value is a hash value meeting a preset rule and the at least one second hash value is a hash value not meeting the preset rule, determining that the first routing equipment has the main equipment attribute and the at least one second routing equipment has the standby equipment attribute;
if the first hash value is a hash value which does not meet the preset rule, and a selected second hash value in the at least one second hash value is a hash value which meets the preset rule, it is determined that the first routing device has the standby device attribute, and a second routing device (or called "selected second routing device") corresponding to the selected second hash value has the main device attribute.
Specifically, with reference to fig. 5B, the first routing device R1 calculates the MAC address and the link identifier V-AG ID of the first routing device R1 by using a hash algorithm, so as to obtain a first hash value; calculating the MAC address and the link identification V-AG ID of the second routing equipment R2 to obtain a second hash value; determining the routing equipment corresponding to the hash value meeting the preset rule in the first hash value and the second hash value as the routing equipment with the main equipment attribute, and determining the routing equipment corresponding to the hash value not meeting the preset rule as the routing equipment with the equipment attribute; and the hash value meeting the preset rule is the maximum or minimum hash value.
For example, if the first hash value is greater than the second hash value and the hash value of the preset rule is the maximum hash value, it is determined that the first routing device R1 corresponding to the first hash value has the master device attribute, and the second routing device R2 corresponding to the second hash value has the slave device attribute.
Determining a routing device corresponding to a routing identifier meeting a preset rule in the routing identifiers (Router ID) of the first routing device and the second routing device as a routing device with a main device attribute; and the route identifier of the preset rule is the maximum or minimum route identifier.
Further, if it is determined that the first routing device has the master device attribute and at least one second routing device has the slave device attribute, performing step 503;
if the first routing equipment is determined to have the standby equipment attribute, and the second routing equipment is selected to have the main equipment attribute, executing step 507;
it should be noted that, the first routing device may notify the determined attributes of the primary and secondary devices to the at least one second routing device, and the at least one second routing device may also determine the attributes of the primary and secondary devices of the first routing device and the at least one second routing device itself, and since the algorithms are the same and the calculated parameters are the same, the determined attributes of the primary and secondary devices are the same, so that the embodiment of the present invention that determines the attributes of the first routing device and the primary and secondary devices of the first routing device and the at least one second routing device is not described herein again.
Secondly, besides the two manners, the active-standby device attributes of the first routing device and the at least one second routing device may also be determined in a manner preconfigured by a technician, and other manners in which the active-standby device attributes of the first routing device and the at least one second routing device may be determined.
Step 503, the first routing device obtains path scheduling information of the initial application packet according to a preset load balancing scheduling policy, first line information of a first transmission line where the first routing device is located, and second line information of a second transmission line where at least one second routing device is located.
Optionally, the load balancing scheduling policy may include at least one of load balancing of each application packet, load balancing of traffic formed by a plurality of application packets, load balancing of a specified line based on line SLA parameters, and load balancing based on line real-time rate.
Step 504, the first routing device determines a forwarding path for forwarding the initial application packet from the first transmission line and the at least one second transmission line according to the path scheduling information.
If the path scheduling information indicates that the initial application message is forwarded from the first transmission line, forwarding the initial application message to a second network through the first transmission line;
if the path scheduling information indicates that the initial application packet is forwarded from the target second transmission line of the at least one second transmission line, the initial application packet is encapsulated in a second preset encapsulation manner to obtain a current application packet, where the current application packet may include packet forwarding information, and then step 505 is executed.
Specifically, the first routing device encapsulates the initial application packet according to a scheduling protocol TAG of the virtual aggregation link, so as to obtain an intermediate application packet, where the intermediate application packet may include packet forwarding information. The intermediate application packet may include an initial application packet, a protocol type of the initial application packet, packet forwarding information, an IP address of a routing device to which the target forwarding line belongs, and an IP address of a routing device of a next hop of the original forwarding line.
Then, a Generic Routing Encapsulation protocol (GRE) is used to encapsulate the intermediate application packet, so as to obtain a current application packet, that is, the current packet is a GRE packet and may include packet forwarding information.
As shown in fig. 6, the current message may include an intermediate application message field, a GRE field, and an initial application message field.
The message structure of the intermediate application message encapsulated by the scheduling protocol TAG may include: an initial application message (or "payload") field and a scheduling protocol TAG field. The scheduling protocol TAG field may include a protocol type field (or "protocol type of passenger protocol") (protocol type) field of the initial application packet, a forwarding control (control word) field, an IP address (dstlinkpip) field of the routing device to which the target forwarding line belongs, and an IP address (srclinkpip) field of the routing device of the next hop of the original forwarding line, as shown in fig. 7.
(1) Protocol type (protocol type) field of passenger protocol: the initial application message before encapsulation is called payload, the message protocol of the initial application message is called passenger protocol, and the field can be defined by referring to a GRE (generic routing encapsulation) header), and 8 bits;
(2) Forward control (ControlWord) field: control information for transmission and forwarding, 24bit;
(3) IP address (DstLinkIP) field of the routing device to which the destination forwarding line belongs: if the value is 0, the message is an application message of which the target line is not scheduled, and the V-AG main equipment is required to schedule a message forwarding line, namely 32 bits;
(4) IP address (SrcLinkIP) field of the routing device of the next hop of the original forwarding line: and forwarding the next hop IP address of the original line which should be traveled according to the route, wherein the next hop IP address is 32 bits.
The message format of the current application message after GRE encapsulation may include: a transport protocol field, an encapsulation protocol field, and a passenger protocol field.
(1) Passenger Protocol (Passenger Protocol): the message before encapsulation is called payload, namely, the intermediate message, and the message protocol of the intermediate message is called passenger protocol.
(2) Encapsulation Protocol (Encapsulation Protocol): the GRE header is completed and populated by an encapsulation Protocol, also known as a Carrier Protocol.
(3) Transport Protocol (Transport Protocol): and the protocol is responsible for forwarding the encapsulated message.
The source IP address and the destination IP address in the transmission protocol are IP addresses of two routing devices interconnected in the aggregation site, that is, an IP address of the first routing device R1 and an IP address of the second routing device R2, respectively.
And 505, the first routing device sends the current application message to the target second routing device with the device attribute corresponding to the target second transmission line.
Step 506, the target second routing device decapsulates the current application packet, obtains the initial application packet and the packet forwarding information, and forwards the initial application packet to the second network through the transmission line where the target second routing device is located according to the packet forwarding information.
And 507, the first routing device encapsulates the initial application message in a first preset encapsulation mode to obtain an application message to be forwarded.
Specifically, the first routing device encapsulates an initial application packet according to a scheduling protocol of the virtual aggregation link to obtain an initial application packet to be forwarded, where the initial application packet to be forwarded may include information to be forwarded of the packet, and then encapsulates the initial application packet to be forwarded by using a general routing encapsulation protocol to obtain the application packet to be forwarded.
The initial application packet to be forwarded may include the initial application packet, a protocol type of the initial application packet, information to be forwarded of the packet, and an IP address of a routing device of a next hop of an original forwarding line.
It can be seen that the application packet to be forwarded has the same structure as the current packet, but the application packet to be forwarded includes packet to-be-forwarded information indicating that the application packet of the target line has not been scheduled yet, and the V-AG master device is required to schedule the packet forwarding line, that is, the IP address (dstlinkpip) field of the routing device to which the target forwarding line belongs in the packet format is 0.
Step 508, the first routing device sends the application packet to be forwarded to the selected second routing device with the attribute of the main device.
Step 509, the second routing device is selected to decapsulate the application packet to be forwarded, obtain the packet forwarding request information and the initial application packet, and obtain the path scheduling information of the initial application packet according to a preset load balancing scheduling policy, the first line information, and the at least one second line information.
Step 510, selecting the second routing device to determine a forwarding path for forwarding the initial application packet to the second network according to the path scheduling information.
The selected second routing equipment has the main equipment attribute, so if the path scheduling information indicates that the initial application message is forwarded from the transmission line where the selected second routing equipment is located, the initial application message is forwarded to the second network through the transmission line where the selected second routing equipment is located; if the path scheduling information indicates that the initial application message is forwarded from the transmission line where the first routing device with the device attribute is located, the second routing device is selected to package the initial application message in a preset packaging mode to obtain a current application message, wherein the current application message may include message forwarding information. Step 511 is then performed.
The process of encapsulating the initial application packet by the second routing device is the same as the encapsulation process described in step 504, and details are not described again in the embodiment of the present invention.
Step 511, selecting the second routing device to send the current application packet to the first routing device.
And step 512, the first routing device decapsulates the current application packet to obtain an initial application packet and packet forwarding information, and forwards the initial application packet to the second network through a transmission line where the first routing device is located according to the packet forwarding information.
Further, based on the foregoing embodiment, if application packet transmission of services other than the target application exists in the virtual aggregation link between the first network and the second network before the first routing device receives the initial application packet of the target application, where the initial application packet is sent by the first network to the second network, and at this time, the load of the application packets of the services other than the target application is balanced in the virtual aggregation link V-AG.
If the first routing equipment is determined to have the attribute of the main equipment and at least one second routing equipment has the attribute of the standby equipment, the first routing equipment acquires path scheduling information of application messages of other services and path scheduling information of initial application messages of target applications according to a preset load balancing scheduling strategy, first line information and at least one second line information; and determining a forwarding path for forwarding the initial application packet and the application packets of other services to the second network according to the path scheduling information of the application packets of other services and the path scheduling information of the initial application packet, so as to realize load balancing of the virtual aggregation link.
Or, if it is determined that the first routing device has the attribute of the standby device, the second routing device is selected to have the attribute of the main device, and the second routing device is selected to decapsulate the application packet to be forwarded, and obtain the information to be forwarded of the packet and the initial application packet, the second routing device may obtain path scheduling information of the application packet of the other service and path scheduling information of the initial application packet of the target application according to a preset load balancing scheduling policy, the first path information, and at least one second path information, and determine, according to the path scheduling information of the application packet of the other service and the path scheduling information of the initial application packet, the application packet of the other service and the initial application packet are forwarded to a forwarding path of the second network, so as to implement load balancing of the virtual aggregation link.
Furthermore, in the embodiment of the present application, the message communicated between the routing devices in the aggregation site is a message encapsulated by using a GRE and a scheduling protocol TAG, so that a problem that communication can only be performed by deploying a two-layer direct connection line between routing devices stored in different machine rooms is solved. That is, when the first routing device and the at least one second routing device in the aggregation site are respectively deployed in different rooms (or "aggregation areas") in the same city, the first routing device and each second routing device are interconnected through a three-layer core switch.
The embodiment of the invention realizes the communication between the control message and the application message of the V-AG protocol by automatically constructing the V-AG interconnection tunnel among different convergence areas, forms a logical relation of three-layer Full interconnection (Full-Mesh) among all routing devices among the different convergence areas, and realizes the independence of network topology through the V-AG interconnection tunnel.
The load balancing method for multiple transmission lines provided by the embodiment of the invention obtains the attributes of the main and standby devices of the first routing device and at least one second routing device after receiving the initial application message of the target application sent by the first network connected with the aggregation site to the second network connected with the access site; if the first routing equipment is determined to have the main equipment attribute, acquiring path scheduling information of the initial application message according to a preset load balancing scheduling strategy, first line information of a first transmission line where the first routing equipment is located and at least one second line information of at least one second transmission line where at least one second routing equipment is located; determining a forwarding path for forwarding the initial application message from the first transmission line and the at least one second transmission line according to the path scheduling information; if the first routing equipment is determined to have the equipment attribute, the initial application message is packaged in a first preset packaging mode to obtain the application message to be forwarded and is forwarded to the selected second routing equipment with the main equipment attribute, so that the selected second routing equipment obtains the initial application message, and the forwarding path forwarded by the initial application message is determined after the path scheduling information of the initial application message is obtained according to a preset load balancing scheduling strategy, the first line information and at least one second line information. The method adopts the scheduling protocol of the virtual aggregation link after configuring the plurality of transmission lines between the aggregation site and the access site as the virtual aggregation link, solves the load balancing problem of the plurality of transmission lines of the routing equipment of the aggregation site deployed at different places without changing the existing network, reduces the network charge, and realizes the automatic load balancing of the real-time service flow of each transmission line.
Corresponding to the foregoing method, an embodiment of the present invention further provides a load balancing apparatus for multiple transmission lines, which is applied to a first routing device in at least two routing devices of a convergence station connected to a first network in a network system, where the network system further includes an access station connected to a second network, and as shown in fig. 8, the apparatus may include: a receiving unit 810, an obtaining unit 820, a determining unit 830, a packaging unit 840 and a sending unit 850;
a receiving unit 810, configured to receive an initial application packet sent by a first network connected to the aggregation site to a target application of a second network connected to the access site;
an obtaining unit 820, configured to obtain active-standby device attributes of the first routing device and the at least one second routing device;
if the first routing equipment is determined to have the attribute of the main equipment, acquiring path scheduling information of the initial application message according to a preset load balancing scheduling strategy, first line information of a first transmission line where the first routing equipment is located and at least one second line information of at least one second transmission line where at least one second routing equipment is located;
a determining unit 830, configured to determine, according to the path scheduling information, a forwarding path to which the initial application packet is forwarded from the first transmission line and the at least one second transmission line;
the encapsulating unit 840 is further configured to encapsulate the initial application packet by using a first preset encapsulating manner to obtain an application packet to be forwarded if it is determined that the first routing device has the standby device attribute;
a sending unit 850, configured to forward the initial application packet to a selected second routing device with the attribute of the master device, so that the selected second routing device obtains the initial application packet, and determines a forwarding path to which the initial application packet is forwarded after obtaining path scheduling information of the initial application packet according to the preset load balancing scheduling policy, the first line information, and the at least one second line information.
In an optional implementation, the sending unit 850 is further configured to send a first synchronization control packet to the at least one second routing device;
a receiving unit 810, further configured to receive at least one second synchronization control packet sent by the at least one second routing device, where the first synchronization control packet includes a first media access control MAC address of the first routing device, a link identifier of the virtual aggregation link, and the first line information, and each second synchronization control packet in the at least one second synchronization control packet includes a second MAC address of a corresponding second routing device, the link identifier, and second line information;
the determining unit 830 is further configured to determine, according to the first MAC address, the at least one second MAC address, and the link identifier, active/standby device attributes of the first routing device and the at least one second routing device.
In an optional implementation, the determining unit 830 is specifically configured to employ a hash algorithm to perform an operation on the first MAC address and the link identifier to obtain a first hash value; respectively operating the at least one second MAC address and the link identification to obtain at least one second hash value;
if the first hash value is a hash value meeting a preset rule, and the at least one second hash value is a hash value not meeting the preset rule, determining that the first routing equipment has a main equipment attribute, and the at least one second routing equipment has a standby equipment attribute;
and if the first hash value is a hash value which does not meet the preset rule, and a selected second hash value in the at least one second hash value is a hash value which meets the preset rule, determining that the first routing equipment has the attribute of the equipment, and determining that the second routing equipment corresponding to the selected second hash value has the attribute of the main equipment.
In an optional implementation, the sending unit 850 is further configured to forward the initial application packet to the second network through the first transmission line if the path scheduling information indicates that the initial application packet is forwarded from the first transmission line;
an obtaining unit 820, further configured to, if the path scheduling information indicates that the initial application packet is forwarded from a target second transmission line in the at least one second transmission line, encapsulate the initial application packet in a second preset encapsulation manner to obtain a current application packet, where the current application packet includes packet forwarding information;
the sending unit 850 is further configured to send the current application packet to a target second routing device with a device attribute corresponding to the target second transmission line, so that the target second routing device obtains the initial application packet and the packet forwarding information, and forwards the initial application packet to the second network according to the packet forwarding information.
In an optional implementation, the receiving unit 810 is further configured to receive a current application packet including packet forwarding information sent by the selected second routing device if the path scheduling information acquired by the selected second routing device indicates that the initial application packet is forwarded from the first transmission line, where the current application packet is obtained by encapsulating, by the selected second routing device, the initial application packet in the second preset encapsulation manner;
an obtaining unit 820, further configured to decapsulate the current application packet, and obtain the initial application packet and the packet forwarding information;
the sending unit 850 is further configured to forward the initial application packet to the second network through the first transmission line according to the packet forwarding information.
In an optional implementation, the obtaining unit 820 is specifically configured to encapsulate the initial application packet according to a scheduling protocol of the virtual aggregation link, so as to obtain an initial application packet to be forwarded, where the initial application packet to be forwarded includes information to be forwarded of a packet;
and encapsulating the initial application message to be forwarded by adopting a general routing encapsulation protocol to obtain the application message to be forwarded.
In an optional implementation, the initial application packet to be forwarded includes the initial application packet, a protocol type of the initial application packet, the packet to be forwarded information, and an IP address of a routing device of a next hop of an original forwarding line.
In an optional implementation, the obtaining unit 820 is further specifically configured to encapsulate the initial application packet according to a scheduling protocol of the virtual aggregation link, so as to obtain an intermediate application packet, where the intermediate application packet includes the packet forwarding information;
and encapsulating the intermediate application message by adopting a general routing encapsulation protocol to obtain the current application message.
In an optional implementation, the intermediate application packet includes the initial application packet, a protocol type of the initial application packet, the packet forwarding information, an IP address of a routing device to which a target forwarding line belongs, and an IP address of a routing device of a next hop of an original forwarding line.
In an optional implementation, the preset load balancing policy includes at least one policy of load balancing of each application packet, load balancing of a service flow formed by a plurality of application packets, load balancing of a specified line based on a line service level protocol parameter, and load balancing based on a line real-time rate.
In an optional implementation, if application packet transmission of other services than the target application exists in the virtual aggregation link before receiving an initial application packet of the target application forwarded by the first network to the second network, the obtaining unit 820 is further specifically configured to obtain path scheduling information of the application packet of the other services and path scheduling information of the initial application packet according to a preset load balancing scheduling policy, the first line information, and at least one second line information of at least one second transmission line in which the at least one second routing device is located.
The functions of the functional units of the load balancing apparatus with multiple transmission lines provided in the foregoing embodiments of the present invention may be implemented by the foregoing method steps, and therefore, detailed working processes and beneficial effects of the units in the load balancing apparatus with multiple transmission lines provided in the embodiments of the present invention are not described herein again.
An embodiment of the present invention further provides an electronic device, as shown in fig. 9, including a processor 910, a communication interface 920, a memory 930, and a communication bus 940, where the processor 910, the communication interface 920, and the memory 930 complete mutual communication through the communication bus 940.
A memory 930 for storing computer programs;
the processor 910 is configured to implement the following steps when executing the program stored in the memory 930:
receiving an initial application message of a target application sent by a first network connected with the aggregation site to a second network connected with the access site;
acquiring the attributes of the main and standby devices of the first routing device and the at least one second routing device;
if the first routing equipment is determined to have the attribute of the main equipment, acquiring path scheduling information of the initial application message according to a preset load balancing scheduling strategy, first line information of a first transmission line where the first routing equipment is located and at least one second line information of at least one second transmission line where at least one second routing equipment is located; determining a forwarding path for forwarding the initial application message from the first transmission line and the at least one second transmission line according to the path scheduling information;
if the first routing equipment is determined to have the equipment attribute, packaging the initial application message in a first preset packaging mode to obtain an application message to be forwarded and forwarding the application message to selected second routing equipment having the main equipment attribute, so that the selected second routing equipment obtains the initial application message, obtains path scheduling information of the initial application message according to the preset load balancing scheduling strategy, the first path information and the at least one second path information, and then determines a forwarding path forwarded by the initial application message.
In an optional implementation, the obtaining the attributes of the active and standby devices of the first routing device and the at least one second routing device includes:
sending a first synchronization control message to the at least one second routing device, and receiving at least one second synchronization control message sent by the at least one second routing device, where the first synchronization control message includes a first Media Access Control (MAC) address of the first routing device, a link identifier of the virtual aggregation link, and the first line information, and each second synchronization control message in the at least one second synchronization control message includes a second MAC address of the corresponding second routing device, the link identifier, and the second line information;
and determining the master/standby device attributes of the first routing device and the at least one second routing device according to the first MAC address, the at least one second MAC address and the link identifier.
In an optional implementation, determining, according to the first MAC address, the at least one second MAC address, and the link identifier, a master-slave device attribute of the first routing device and the at least one second routing device includes:
calculating the first MAC address and the link identification by adopting a Hash algorithm to obtain a first Hash value; respectively operating the at least one second MAC address and the link identification to obtain at least one second hash value;
if the first hash value is a hash value meeting a preset rule, and the at least one second hash value is a hash value not meeting the preset rule, determining that the first routing equipment has a main equipment attribute, and the at least one second routing equipment has a standby equipment attribute;
and if the first hash value is a hash value which does not meet the preset rule, and a selected second hash value in the at least one second hash value is a hash value which meets the preset rule, determining that the first routing equipment has the attribute of the equipment, and determining that the second routing equipment corresponding to the selected second hash value has the attribute of the main equipment.
In an optional implementation, determining a forwarding path to which the initial application packet is forwarded from the first transmission line and the at least one second transmission line according to the path scheduling information includes:
if the path scheduling information indicates that the initial application packet is forwarded from the first transmission line, forwarding the initial application packet to the second network through the first transmission line;
if the path scheduling information indicates that the initial application message is forwarded from a target second transmission line in the at least one second transmission line, packaging the initial application message by adopting a second preset packaging mode to obtain a current application message, wherein the current application message comprises message forwarding information;
and sending the current application packet to a target second routing device with the standby device attribute corresponding to the target second transmission line, so that the target second routing device acquires the initial application packet and the packet forwarding information, and forwards the initial application packet to the second network according to the packet forwarding information.
In an optional implementation, after obtaining the application packet to be forwarded and forwarding the application packet to the selected second routing device with the attribute of the primary device, the method further includes:
if the path scheduling information acquired by the selected second routing equipment indicates that the initial application message is forwarded from the first transmission line, receiving a current application message which is sent by the selected second routing equipment and comprises message forwarding information, wherein the current application message is obtained by packaging the initial application message by the selected second routing equipment in a second preset packaging mode;
decapsulating the current application packet to obtain the initial application packet and the packet forwarding information;
and forwarding the initial application message to the second network through the first transmission line according to the message forwarding information.
In an optional implementation, encapsulating the initial application packet by using a first preset encapsulation manner to obtain an application packet to be forwarded, includes:
packaging the initial application message according to a scheduling protocol of the virtual aggregation link to obtain an initial application message to be forwarded, wherein the initial application message to be forwarded comprises message information to be forwarded;
and encapsulating the initial application message to be forwarded by adopting a general routing encapsulation protocol to obtain the application message to be forwarded.
In an optional implementation, the initial application packet to be forwarded includes the initial application packet, a protocol type of the initial application packet, the packet to be forwarded information, and an IP address of a routing device of a next hop of an original forwarding line.
In an optional implementation, encapsulating the initial application packet by using a second preset encapsulation manner to obtain a current application packet, including:
packaging the initial application message according to a scheduling protocol of the virtual aggregation link to obtain an intermediate application message, wherein the intermediate application message comprises the message forwarding information;
and encapsulating the intermediate application message by adopting a general routing encapsulation protocol to obtain the current application message.
In an optional implementation, the intermediate application packet includes the initial application packet, a protocol type of the initial application packet, the packet forwarding information, an IP address of a routing device to which a target forwarding line belongs, and an IP address of a routing device of a next hop of an original forwarding line.
In an optional implementation, the preset load balancing policy includes at least one policy of load balancing of each application packet, load balancing of a service flow formed by a plurality of application packets, load balancing of a specified line based on a line service level protocol parameter, and load balancing based on a line real-time rate.
In an optional implementation, if there is application packet transmission of a service other than a target application in the virtual aggregation link before receiving an initial application packet of the target application forwarded by the first network to the second network, acquiring path scheduling information of the initial application packet according to a preset load balancing scheduling policy, the first line information, and at least one second line information of at least one second transmission line in which at least one second routing device is located, includes:
and acquiring path scheduling information of the application messages of other services and path scheduling information of the initial application message according to a preset load balancing scheduling strategy, the first line information and at least one second line information of at least one second transmission line in which the at least one second routing device is positioned.
The aforementioned communication bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
Since the implementation manner and the beneficial effects of the electronic device in the foregoing embodiment for solving the problems can be implemented by referring to the steps in the embodiment shown in fig. 5A, detailed working processes and beneficial effects of the electronic device provided in the embodiment of the present invention are not described herein again.
In yet another embodiment of the present invention, a computer-readable storage medium is further provided, which stores instructions that, when executed on a computer, cause the computer to execute the method for load balancing of multiple transmission lines as described in any one of the above embodiments.
In a further embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the method for load balancing of multiple transmission lines as described in any of the above embodiments.
As will be appreciated by one of skill in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present embodiments have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all changes and modifications that fall within the true scope of the embodiments of the present application.
It is apparent that those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. Thus, if such modifications and variations of the embodiments of the present application fall within the scope of the claims of the embodiments of the present application and their equivalents, the embodiments of the present application are also intended to include such modifications and variations.

Claims (11)

1. A method for load balancing of multiple transmission lines, applied to a first routing device of a convergence station, wherein at least two transmission lines between the convergence station and an access station are configured as virtual aggregation links, and the convergence station further includes at least one second routing device, and the method includes:
receiving an initial application message of a target application sent by a first network connected with the aggregation site to a second network connected with the access site;
acquiring the attributes of the main and standby devices of the first routing device and the at least one second routing device;
if the first routing equipment is determined to have the attribute of the main equipment, acquiring path scheduling information of the initial application message according to a preset load balancing scheduling strategy, first line information of a first transmission line where the first routing equipment is located and at least one second line information of at least one second transmission line where at least one second routing equipment is located; determining a forwarding path for forwarding the initial application message from the first transmission line and the at least one second transmission line according to the path scheduling information;
if the first routing equipment is determined to have the equipment attribute, packaging the initial application message in a first preset packaging mode to obtain an application message to be forwarded and forwarding the application message to selected second routing equipment having the main equipment attribute, so that the selected second routing equipment obtains the initial application message, and determines a forwarding path for forwarding the initial application message from the first transmission line and the at least one second transmission line after obtaining path scheduling information of the initial application message according to the preset load balancing scheduling strategy, the first line information and the at least one second line information.
2. The method of claim 1, wherein obtaining master-slave device attributes of the first routing device and the at least one second routing device comprises:
sending a first synchronization control message to the at least one second routing device, and receiving at least one second synchronization control message sent by the at least one second routing device, where the first synchronization control message includes a first Media Access Control (MAC) address of the first routing device, a link identifier of the virtual aggregation link, and the first line information, and each second synchronization control message in the at least one second synchronization control message includes a second MAC address of the corresponding second routing device, the link identifier, and the second line information;
and determining the master/standby device attributes of the first routing device and the at least one second routing device according to the first MAC address, the at least one second MAC address and the link identifier.
3. The method of claim 2, wherein determining the master-slave device attributes of the first routing device and the at least one second routing device based on the first MAC address, the at least one second MAC address, and the link identification comprises:
calculating the first MAC address and the link identification by adopting a Hash algorithm to obtain a first Hash value; respectively operating the at least one second MAC address and the link identification to obtain at least one second hash value;
if the first hash value is a hash value meeting a preset rule, and the at least one second hash value is a hash value not meeting the preset rule, determining that the first routing device has a master device attribute, and the at least one second routing device has a slave device attribute;
and if the first hash value is a hash value which does not meet the preset rule, and a selected second hash value in the at least one second hash value is a hash value which meets the preset rule, determining that the first routing equipment has the attribute of the equipment, and determining that the second routing equipment corresponding to the selected second hash value has the attribute of the main equipment.
4. The method of claim 1, wherein determining a forwarding path for the initial application message forwarding from the first transmission line and the at least one second transmission line according to the path scheduling information comprises:
if the path scheduling information indicates that the initial application packet is forwarded from the first transmission line, forwarding the initial application packet to the second network through the first transmission line;
if the path scheduling information indicates that the initial application message is forwarded from a target second transmission line in the at least one second transmission line, packaging the initial application message by adopting a second preset packaging mode to obtain a current application message, wherein the current application message comprises message forwarding information;
and sending the current application packet to a target second routing device with the standby device attribute corresponding to the target second transmission line, so that the target second routing device acquires the initial application packet and the packet forwarding information, and forwards the initial application packet to the second network according to the packet forwarding information.
5. The method of claim 1, wherein after obtaining the application packet to be forwarded and forwarding to the selected second routing device having the attributes of the primary device, the method further comprises:
if the path scheduling information acquired by the selected second routing equipment indicates that the initial application message is forwarded from the first transmission line, receiving a current application message which is sent by the selected second routing equipment and comprises message forwarding information, wherein the current application message is obtained by packaging the initial application message by the selected second routing equipment in a second preset packaging mode;
decapsulating the current application packet to obtain the initial application packet and the packet forwarding information;
and forwarding the initial application message to the second network through the first transmission line according to the message forwarding information.
6. The method of claim 1, wherein encapsulating the initial application packet by a first predetermined encapsulation method to obtain an application packet to be forwarded comprises:
packaging the initial application message according to a scheduling protocol of the virtual aggregation link to obtain an initial application message to be forwarded, wherein the initial application message to be forwarded comprises message information to be forwarded;
and encapsulating the initial application message to be forwarded by adopting a general routing encapsulation protocol to obtain the application message to be forwarded.
7. The method of claim 4, wherein encapsulating the initial application packet using a second predetermined encapsulation method to obtain a current application packet comprises:
packaging the initial application message according to a scheduling protocol of the virtual aggregation link to obtain an intermediate application message, wherein the intermediate application message comprises the message forwarding information;
and encapsulating the intermediate application message by adopting a general routing encapsulation protocol to obtain the current application message.
8. The method according to claim 1, wherein if there is application packet transmission of a service other than the target application in the virtual aggregated link before receiving an initial application packet of the target application forwarded by the first network to the second network, acquiring path scheduling information of the initial application packet according to a preset load balancing scheduling policy, the first line information, and at least one second line information of at least one second transmission line in which the at least one second routing device is located, includes:
and acquiring path scheduling information of the application messages of other services and path scheduling information of the initial application message according to a preset load balancing scheduling strategy, the first line information and the second line information.
9. A load balancing apparatus for multiple transmission lines, applied to a first routing device of a convergence station, where at least two transmission lines between the convergence station and an access station are configured as a virtual aggregation link, and the convergence station further includes at least one second routing device, where the apparatus includes: the device comprises a receiving unit, an obtaining unit, a determining unit, a packaging unit and a sending unit;
the receiving unit is configured to receive an initial application packet of a target application sent by a first network connected to the aggregation site to a second network connected to the access site;
the obtaining unit is configured to obtain attributes of the master device and the standby device of the first routing device and the at least one second routing device;
if the first routing device is determined to have the main device attribute, obtaining path scheduling information of the initial application message according to a preset load balancing scheduling strategy, first line information of a first transmission line where the first routing device is located and at least one second line information of at least one second transmission line where at least one second routing device is located;
the determining unit is configured to determine a forwarding path to which the initial application packet is forwarded from the first transmission line and the at least one second transmission line according to the path scheduling information;
the encapsulation unit is further configured to encapsulate the initial application packet by using a first preset encapsulation manner if it is determined that the first routing device has the standby device attribute, so as to obtain an application packet to be forwarded;
the sending unit is configured to forward the initial application packet to a selected second routing device having a master device attribute, so that the selected second routing device obtains the initial application packet, and determines a forwarding path to which the initial application packet is forwarded from the first transmission line and the at least one second transmission line after obtaining path scheduling information of the initial application packet according to the preset load balancing scheduling policy, the first line information, and the at least one second line information.
10. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are used for completing mutual communication through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 8 when executing a program stored on a memory.
11. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 1-8.
CN201911302284.9A 2019-12-17 2019-12-17 Load balancing method and device for multiple transmission lines Active CN111049752B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911302284.9A CN111049752B (en) 2019-12-17 2019-12-17 Load balancing method and device for multiple transmission lines

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911302284.9A CN111049752B (en) 2019-12-17 2019-12-17 Load balancing method and device for multiple transmission lines

Publications (2)

Publication Number Publication Date
CN111049752A CN111049752A (en) 2020-04-21
CN111049752B true CN111049752B (en) 2023-01-10

Family

ID=70237040

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911302284.9A Active CN111049752B (en) 2019-12-17 2019-12-17 Load balancing method and device for multiple transmission lines

Country Status (1)

Country Link
CN (1) CN111049752B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112104553B (en) * 2020-08-27 2022-07-12 新华三技术有限公司 Method, device, routing equipment and storage medium for selecting path
CN112398902B (en) * 2020-09-17 2022-07-05 苏宁云计算有限公司 High availability load balancing method, system and computer readable storage medium
CN113098800B (en) * 2021-02-24 2023-04-07 北京瀚诺半导体科技有限公司 Data forwarding method and device, electronic equipment and medium
CN115150320B (en) * 2021-03-31 2023-12-08 北京华为数字技术有限公司 Message transmission method, device and system
CN115701060A (en) * 2021-07-29 2023-02-07 华为技术有限公司 Message transmission method and related device
CN114285786B (en) * 2021-12-24 2023-12-08 中国农业银行股份有限公司 Construction method and device of network link library

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102801623B (en) * 2012-08-15 2015-07-22 杭州华三通信技术有限公司 Multi-access data transmitting method and device
CN103401801A (en) * 2013-08-07 2013-11-20 盛科网络(苏州)有限公司 Method and device for realizing dynamic load balance
CN105099847B (en) * 2014-05-05 2019-01-08 新华三技术有限公司 A kind of mostly ownership cut-in method and device
CN105490957B (en) * 2014-10-11 2019-05-03 华为技术有限公司 A kind of load sharing method and device
CN104917678B (en) * 2015-06-02 2018-07-06 上海斐讯数据通信技术有限公司 Link aggregation method based on SDN
CN107819677B (en) * 2017-10-26 2020-03-06 新华三技术有限公司 Message forwarding method and device
US10382319B2 (en) * 2017-10-30 2019-08-13 Dell Products Lp Multiple VXLAN tunnel reachability
CN109194511B (en) * 2018-09-03 2021-09-10 新华三技术有限公司 Message sending method and device

Also Published As

Publication number Publication date
CN111049752A (en) 2020-04-21

Similar Documents

Publication Publication Date Title
CN111049752B (en) Load balancing method and device for multiple transmission lines
JP7079866B2 (en) Packet processing method and device
US11431526B2 (en) Deterministic forwarding across L2 and L3 networks
EP3154227B1 (en) Packet transmission method, node, path management server and storage medium
CN103036809B (en) For having the method and apparatus of the scalable network that active link utilizes
CN101394361B (en) Packet transmission method, device and system
CN105245452B (en) Multi-protocol label switching traffic engineering tunnel establishing method and equipment
CN109218178A (en) A kind of message processing method and the network equipment
CN100403735C (en) Method and system for realizing binding interface edge-to-edge pseudo wire simulation service
JP2021530912A (en) Network slice control method and device, computer readable storage medium
WO2017124709A1 (en) Method of establishing traffic engineering tunnel and device
WO2022062506A1 (en) Data processing method and apparatus, storage medium, and electronic apparatus
US11736962B2 (en) Methods, apparatus and computer-readable mediums relating to configuration of redundant paths
CN103685009A (en) Data packet processing method and system as well as controller
CN110324225B (en) Method and device for processing message
CN104301252A (en) Data sending system and method
CN115004656B (en) Message sending method, device and system
CN104798350A (en) Virtual link aggregations across multiple fabric switches
CN105515816B (en) Processing method and device for detecting hierarchical information
WO2022110535A1 (en) Packet sending method, device, and system
CN103067278A (en) Data frame transmission processing method, equipment and system
EP3007389A1 (en) Gre tunnel implementation method, access point and gateway
CN105264837B (en) A kind of Transmission system of data message, transmission method and equipment
CN104320322A (en) Message control method and equipment
CN107484206B (en) Method and device for realizing link load balance in wireless local area network

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