Bandwidth allocation method, device and readable storage medium for switch multicast group
By obtaining the resource occupancy rate and multicast source IP priority of the switch hardware routing table, the bandwidth resources are reasonably allocated, which solves the problem of unreasonable bandwidth allocation of the switch hardware multicast table entries and improves multicast forwarding efficiency and resource utilization.
Patent Information
- Application Number
- CN202310244313.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-06
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2043-03-06
AI Technical Summary
The bandwidth allocation of existing switch hardware multicast entries is unreasonable, resulting in low multicast forwarding efficiency on the edge network, some services cannot be performed, and bandwidth resources for different multicast group members are insufficient.
By obtaining the resource occupancy rate of the switch hardware routing table, confirm whether there are remaining resources. If so, add the hardware multicast table and allocate bandwidth; if not, allocate bandwidth resources according to the multicast source IP priority, and combine QOS and ACL to Limit service bandwidth and delete unused multicast groups to improve resource utilization.
It improves the utilization rate of hardware multicast table resources, ensures effective forwarding of multicast data, optimizes the multicast forwarding efficiency of edge networks, and solves the problem of insufficient hardware multicast table resources.
Smart Images

Figure CN116366577B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of switch applications, and in particular to a bandwidth allocation method for a switch multicast group and a readable storage medium. Background Art
[0002] The Layer 2 switch is an edge switch that can forward multicast source data according to the multicast group. It is located in the second layer of the network model: the link layer. The multicast source learned through IGMP-SNOOPING is used to create software entries, which are sent to the switching chip according to the learned software entries. The purpose of hardware forwarding is to improve stability, reduce the burden on the CPU processor, and ultimately achieve the purpose of specifying the port and the host to receive the multicast source;
[0003] However, the capacity of the hardware multicast table is relatively scarce, and all multicast sources of any number and type cannot be added. When the number of multicast sources exceeds the capacity of the hardware multicast table, the remaining devices will not be able to learn the multicast sources, and thus will not be able to hear the multicast data, causing some services to fail.
[0004] Even if the multicast hardware table is not full, there is still a problem of insufficient bandwidth resources required by different multicast group members. This requires optimizing the scheduling of data forwarded by different multicast sources to improve the multicast forwarding efficiency of the entire edge network.
[0005] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention
[0006] The main purpose of the present invention is to provide a bandwidth allocation method for a switch multicast group and a readable storage medium, aiming to solve the technical problem that the bandwidth allocation of existing switch hardware multicast table items is unreasonable, affecting the multicast forwarding efficiency of the edge network.
[0007] To achieve the above object, the present invention provides a bandwidth allocation method for a switch multicast group, comprising the following steps:
[0008] Obtaining a resource occupancy rate of a switch hardware routing table, and confirming whether there are any remaining resources in the switch hardware routing table according to the resource occupancy rate;
[0009] When it is confirmed that the switch hardware routing table has remaining resources, the newly learned hardware multicast table is added to the switch hardware driver, and the multicast bandwidth resources are allocated to the user-side port by using the newly added hardware multicast table;
[0010] When it is confirmed that there are no remaining resources in the switch hardware routing table, multicast bandwidth resources are allocated to the user-side port according to the IP priority of the newly added multicast source.
[0011] Optionally, when confirming that the switch hardware routing table has remaining resources, the step of adding the newly learned hardware multicast table to the switch hardware driver, and allocating multicast bandwidth resources to the user-side port with the newly added hardware multicast table includes:
[0012] Determine the bandwidth utilization of existing user-side ports;
[0013] If the bandwidth usage rate reaches a preset value, multicast bandwidth resources are allocated according to the priority of the multicast group corresponding to the user-side port.
[0014] Optionally, before the step of allocating multicast bandwidth resources according to the priority of the multicast group corresponding to the user-side port, the method further includes:
[0015] Confirm whether the user-side port has packet loss;
[0016] When it is confirmed that the user side port has lost packets, a step of allocating multicast bandwidth resources according to the priority of the multicast group corresponding to the user side port is performed.
[0017] Optionally, when it is confirmed that there are no remaining resources in the switch hardware routing table, the step of allocating multicast bandwidth resources to the user-side port according to the IP priority of the newly added multicast source includes:
[0018] Confirm the target IP users with high priority;
[0019] A multicast source corresponding to the target IP user is newly added, and multicast bandwidth resources are allocated to the user-side port by using the newly added multicast source.
[0020] Optionally, the step of confirming a target IP user with a high priority includes:
[0021] Collect parameter information of each multicast source IP report message and query message reporting IP data packet;
[0022] The priority order of each of the multicast sources is determined according to the parameter information, and the multicast source IP with a high priority is used as the target IP user.
[0023] Optionally, before the step of allocating multicast bandwidth resources to the user-side port using the newly added multicast source, the method further includes:
[0024] Collecting parameter information of IP data packets of each multicast source IP report message and multicast traffic of the user side port;
[0025] When it is confirmed that the multicast traffic is greater than the maximum bandwidth allocation of the user-side port, a step of allocating multicast bandwidth resources to the user-side port using the newly added multicast source is performed.
[0026] Optionally, the step of allocating multicast bandwidth resources to the user-side port using the newly added multicast source includes:
[0027] Determining the priority of each of the user-side ports;
[0028] Multicast bandwidth resources are allocated to the user-side port according to the priority.
[0029] Optionally, after the step of confirming the target IP user with a high priority, the method further includes:
[0030] Identify low-priority IP users;
[0031] The multicast group corresponding to the IP user with a low priority is deleted.
[0032] To achieve the above-mentioned purpose, the present invention also provides a bandwidth allocation device for a switch multicast group, wherein the bandwidth allocation device for the switch multicast group comprises: a memory, a processor, and a bandwidth allocation program for the switch multicast group stored in the memory and executable on the processor, wherein the bandwidth allocation program for the switch multicast group implements the steps of the bandwidth allocation system for the switch multicast group as described above when executed by the processor.
[0033] In addition, to achieve the above-mentioned purpose, the present invention also provides a readable storage medium, which stores a bandwidth allocation program for a switch multicast group. When the bandwidth allocation program for the switch multicast group is executed, the steps of the bandwidth allocation system for the switch multicast group as described above are implemented.
[0034] A bandwidth allocation method for a switch multicast group proposed in an embodiment of the present invention obtains the resource occupancy rate of a switch hardware routing table, and confirms whether there are surplus resources in the switch hardware routing table according to the resource occupancy rate; when it is confirmed that the switch hardware routing table has surplus resources, a newly learned hardware multicast table is added to the switch hardware driver, and multicast bandwidth resources are allocated to user-side ports using the newly added hardware multicast table; when it is confirmed that there are no surplus resources in the switch hardware routing table, multicast bandwidth resources are allocated to user-side ports according to the IP priority of the newly added multicast source. When the technical solution of the present application is applied, the second-layer forwarding of multicast data is realized by combining software and hardware, so as to solve the problem of insufficient hardware multicast table. Theoretically, the size of software table items can be infinitely expanded. Based on this, when there are surplus hardware multicast table resources and the hardware port resources are used up, the bandwidth resources required and available for each multicast source under the port are calculated, and the service bandwidth is limited by combining QOS and ACL; when there are surplus hardware port resources and the hardware multicast table is used up, the offline or unused multicast groups are deleted according to the traffic statistics measured by the host and the activation message statistics measured by the host, so as to realize joining only when needed, leaving and deleting the multicast group when it is not needed after joining and the resources are full, so as to greatly improve the utilization efficiency of multicast resources; through the priority processing of the multicast group, the priority of the entire replacement and the ratio of port traffic allocation are calculated by using resources and online status to distribute traffic, so as to maximize the utilization rate of the hardware multicast table resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a schematic diagram of the terminal\device structure of the hardware operating environment involved in the embodiment of the present invention;
[0036] Figure 2 It is a flow chart of the first embodiment of the bandwidth allocation system for the switch multicast group of the present invention.
[0037] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0038] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0039] The main solution of the embodiment of the present invention is: obtaining the resource occupancy rate of the switch hardware routing table, and confirming whether the resources of the switch hardware routing table are surplus according to the resource occupancy rate; when it is confirmed that the switch hardware routing table has surplus resources, adding the newly learned hardware multicast table to the switch hardware driver, and allocating multicast bandwidth resources to the user-side port with the newly added hardware multicast table; when it is confirmed that the switch hardware routing table has no surplus resources, allocating multicast bandwidth resources to the user-side port according to the IP priority of the newly added multicast source.
[0040] Since the capacity of hardware multicast table entries in the prior art is relatively scarce, when the number of multicast sources exceeds the capacity of the hardware multicast table, the remaining devices will not be able to learn the multicast sources, and thus will not be able to hear the multicast data, resulting in some services being unable to proceed; even if the multicast hardware table is not full, there is still a problem of insufficient bandwidth resources required by different multicast group members, and the multicast forwarding efficiency of the entire edge network cannot be improved.
[0041] The present invention provides a solution. When there are surplus hardware multicast table resources and hardware port resources are used up, the bandwidth resources required and available for each multicast source under the port are calculated, and the service bandwidth is limited by combining QOS and ACL; when there are surplus hardware port resources and the hardware multicast table is used up, offline or unused multicast groups are deleted according to traffic statistics measured by the host and activation message statistics measured by the host, so that joining is achieved only when needed, and leaving and deleting the multicast group when it is not needed after joining and the resources are full, so that the utilization efficiency of the multicast resources is greatly improved; through the priority processing of the multicast group, the priority of the entire replacement and the ratio of port traffic distribution are calculated by using resources and online status to distribute traffic, so as to maximize the utilization rate of the hardware multicast table resources.
[0042] like Figure 1 As shown, Figure 1 It is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiment of the present invention.
[0043] The terminal of the embodiment of the present invention includes: a processor 1001 , such as a CPU, a network interface 1004 , a user interface 1003 , a memory 1005 , and a communication bus 1002 .
[0044] Those skilled in the art will understand that Figure 1 The terminal structure shown in the figure does not constitute a limitation on the terminal, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0045] like Figure 1As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a bandwidth allocation program for a switch multicast group.
[0046] exist Figure 1 In the terminal shown, the network interface 1004 is mainly used to connect to the backend server and perform data communication with the backend server; the user interface 1003 is mainly used to connect to the client (user end) and perform data communication with the client; and the processor 1001 can be used to call the bandwidth allocation program of the switch multicast group stored in the memory 1005, and perform the following operations:
[0047] Obtaining a resource occupancy rate of a switch hardware routing table, and confirming whether there are any remaining resources in the switch hardware routing table according to the resource occupancy rate;
[0048] When it is confirmed that the switch hardware routing table has remaining resources, the newly learned hardware multicast table is added to the switch hardware driver, and the multicast bandwidth resources are allocated to the user-side port by using the newly added hardware multicast table;
[0049] When it is confirmed that there are no remaining resources in the switch hardware routing table, multicast bandwidth resources are allocated to the user-side port according to the IP priority of the newly added multicast source.
[0050] Further, the processor 1001 may call the bandwidth allocation program of the switch multicast group stored in the memory 1005, and further perform the following operations:
[0051] Determine the bandwidth utilization of existing user-side ports;
[0052] If the bandwidth usage rate reaches a preset value, multicast bandwidth resources are allocated according to the priority of the multicast group corresponding to the user-side port.
[0053] Further, the processor 1001 may call the bandwidth allocation program of the switch multicast group stored in the memory 1005, and further perform the following operations:
[0054] Confirm whether the user-side port has packet loss;
[0055] When it is confirmed that the user side port has lost packets, a step of allocating multicast bandwidth resources according to the priority of the multicast group corresponding to the user side port is performed.
[0056] Further, the processor 1001 may call the bandwidth allocation program of the switch multicast group stored in the memory 1005, and further perform the following operations:
[0057] Confirm the target IP users with high priority;
[0058] A multicast source corresponding to the target IP user is newly added, and multicast bandwidth resources are allocated to the user-side port by using the newly added multicast source.
[0059] Further, the processor 1001 may call the bandwidth allocation program of the switch multicast group stored in the memory 1005, and further perform the following operations:
[0060] Collect parameter information of each multicast source IP report message and query message reporting IP data packet;
[0061] The priority order of each of the multicast sources is determined according to the parameter information, and the multicast source IP with a high priority is used as the target IP user.
[0062] Further, the processor 1001 may call the bandwidth allocation program of the switch multicast group stored in the memory 1005, and further perform the following operations:
[0063] Collecting parameter information of IP data packets of each multicast source IP report message and multicast traffic of the user side port;
[0064] When it is confirmed that the multicast traffic is greater than the maximum bandwidth allocation of the user-side port, a step of allocating multicast bandwidth resources to the user-side port using the newly added multicast source is performed.
[0065] Further, the processor 1001 may call the bandwidth allocation program of the switch multicast group stored in the memory 1005, and further perform the following operations:
[0066] Determining the priority of each of the user-side ports;
[0067] Multicast bandwidth resources are allocated to the user-side port according to the priority.
[0068] Further, the processor 1001 may call the bandwidth allocation program of the switch multicast group stored in the memory 1005, and further perform the following operations:
[0069] Identify low-priority IP users;
[0070] The multicast group corresponding to the IP user with a low priority is deleted.
[0071] Reference Figure 2 , Figure 2 This is a flow chart of a first embodiment of a bandwidth allocation system for a switch multicast group of the present invention. The bandwidth allocation method for a switch multicast group includes the following steps when applied:
[0072] Step S10, obtaining the resource occupancy rate of the switch hardware routing table, and confirming whether there are any remaining resources in the switch hardware routing table according to the resource occupancy rate;
[0073] According to the current application of the switch, after the user-side port is connected to the switch, the network resources of the hardware multicast table written in the table are used for communication and transmission through the hardware group of the second layer of the switch. In order to ensure the full use of the network resources of the hardware multicast table, or to confirm the use of the network resources of the hardware multicast table, it is necessary to obtain the resource occupancy rate of the hardware routing table of the current application switch based on the current bandwidth usage. Based on this, the resource occupancy rate of the hardware routing table of the current application switch is obtained to confirm whether the current application switch can still bear the bandwidth demand of the current user-side port. The resource occupancy rate is the proportion of the current switch hardware routing table resource usage, which is calculated based on the bandwidth usage of the currently connected user-side port and the amount of resources available in the chip capacity of the hardware routing table, and can clearly indicate the resource usage of the switch hardware multicast table.
[0074] Step S20, when it is confirmed that the switch hardware routing table has remaining resources, the newly learned hardware multicast table is added to the switch hardware driver, and the multicast bandwidth resources are allocated to the user-side port by using the newly added hardware multicast table;
[0075] The remaining resources of the switch hardware routing table are confirmed according to the acquired resource occupancy rate. When it is confirmed that the switch hardware routing table has remaining resources, the newly learned hardware multicast table is added to the switch hardware driver to update the network resources of the switch hardware routing table. The newly learned hardware multicast table is a multicast group newly created based on the IGMP request message after the switch receives the IGMP request message sent by the host. After the new multicast group is created, the user side port can be mounted to fully use the remaining resources of the switch hardware routing table. The newly created multicast group is used to mount the new user side port to use the bandwidth resources of the switch for network communication transmission. Based on this situation, in order to ensure the bandwidth usage of the user side port in the newly created multicast group, it is necessary to reallocate the bandwidth resources based on the multicast group user side port currently connected and used by the switch and the newly created multicast group user side port. Therefore, when it is confirmed that the switch hardware routing table has remaining resources, the newly learned hardware multicast table is added to the switch hardware driver, and the step of allocating multicast bandwidth resources to the user side port with the newly added hardware multicast table includes:
[0076] Determine the bandwidth utilization of existing user-side ports;
[0077] If the bandwidth usage rate reaches a preset value, multicast bandwidth resources are allocated according to the priority of the multicast group corresponding to the user-side port.
[0078] According to the resource usage of the hardware routing table represented by the current switch, the user side port using the switch hardware routing table resources is confirmed, and the user side port is a multicast group member port mounted in the multicast group of the switch. Network communication interaction is carried out through the bandwidth resources of the multicast group. Based on this, the bandwidth utilization rate of the user side port using the switch bandwidth resources is determined. The bandwidth utilization rate is relative to the bandwidth resources of the mounted multicast group, that is, the bandwidth utilization rate of the user side port is calculated by the bandwidth resource capacity of the multicast group and the bandwidth utilization of the user side port. The bandwidth utilization rate can clearly represent the usage of the user side port based on the bandwidth resources. According to the determined bandwidth utilization rate of the user side port, when it is confirmed that the bandwidth utilization rate reaches a preset value, the preset value is limited to 100%, that is, when the bandwidth utilization rate reaches 100%, there may be other needs for the bandwidth resources representing the user side port, and bandwidth needs to be re-allocated to the user side port based on the bandwidth utilization rate.
[0079] In addition, considering the abnormal bandwidth usage caused by the abnormal network situation on the network bandwidth, or in other words, being able to more accurately characterize the bandwidth utilization rate of the user-side port, it is also necessary to consider the packet loss in the network communication of the user-side port. Therefore, the condition that the user-side port has the bandwidth demand can be characterized, and the bandwidth utilization rate can be limited to 100%. When there is a packet loss phenomenon, the priority of the multicast group under the user-side port is recalculated, and the network bandwidth is reallocated based on the priority, that is, before the step of allocating multicast bandwidth resources according to the priority of the multicast group corresponding to the user-side port, it also includes:
[0080] Confirm whether the user-side port has packet loss;
[0081] When it is confirmed that the user side port has lost packets, a step of allocating multicast bandwidth resources according to the priority of the multicast group corresponding to the user side port is performed.
[0082] As shown above, when it is confirmed that the bandwidth utilization rate of the current user side port reaches 100%, it is determined whether the user side port has packet loss. The packet loss of the user side port is defined as the loss when initiating a message, that is, the failure to send a message or the failure to successfully receive a message. This is a network abnormality caused by the lack of network bandwidth resources. When the packet loss of the user side port is confirmed, the bandwidth is reallocated according to the priority of the multicast group under the user side port.
[0083] Step S30: when it is confirmed that there are no remaining resources in the switch hardware routing table, multicast bandwidth resources are allocated to the user-side port according to the IP priority of the newly added multicast source.
[0084] The remaining resources of the switch hardware routing table are confirmed according to the obtained resource occupancy rate. When it is confirmed that there are no remaining resources in the switch hardware routing table, in order to improve the optimized application of the switch hardware routing table resources, the bandwidth resources are reallocated according to the priority of the newly added multicast source IP, wherein the newly added multicast source IP is a newly added IP user of the multicast group created by the current switch, that is, an IP user newly added to the port, and the priority of the added multicast group is obtained based on the priority of the IP user, so as to reallocate the multicast bandwidth resources. The priority calculation of the IP user is determined based on the priority of the multicast source corresponding to the IP user, that is, when it is confirmed that there are no remaining resources in the switch hardware routing table, the step of allocating multicast bandwidth resources to the user-side port according to the priority of the newly added multicast source IP includes:
[0085] Confirm the target IP users with high priority;
[0086] A multicast source corresponding to the target IP user is newly added, and multicast bandwidth resources are allocated to the user-side port by using the newly added multicast source.
[0087] According to the newly added multicast source IP, when allocating multicast bandwidth resources, the priority can be calculated based on the IP user corresponding to the newly added multicast source IP. In this case, it can be known that there should be multiple newly added multicast source IPs, that is, there are multiple IP users. In this way, the priority is calculated according to the IP user, and the IP user with a high priority is used as the target IP user, that is, the step of confirming the target IP user with a high priority includes:
[0088] Collect parameter information of each multicast source IP report message and query message reporting IP data packet;
[0089] The priority order of each of the multicast sources is determined according to the parameter information, and the multicast source IP with a high priority is used as the target IP user.
[0090] When calculating the IP user priority, obtain the parameter information of the IP data packet reported by the current multicast source report message and the query message, the multicast source includes the original registered multicast source and the newly added multicast source, and the multicast source has the ability to report and forward messages. In actual applications, the message of the multicast source includes the report message and the query message, which are defined as igmp report / query messages, and collect the QoS information of the IP data packet reported by each igmp report / query message (PQOS is the dscp classification of the multicast source, and the priority of the multicast source port is calculated, including the COS of the 802.1P protocol, the IP header dscp), mac (the source MAC address of the host side reported by the MAC address member port); record the igmp The PORT reported by report / query (PORT is the port number reported by the member port on the device); and the user-defined priority used by the multicast source (the customized priority is the host service priority customized by the user according to the source MAC or source IP, which is used for the member port priority calculation) are calculated using a preset priority definition, and the preset priority definition is: user-defined priority>dscp / cos>mac>port; the corresponding priority result of the IP data packet is calculated according to the priority definition, and the priority results are sorted in high, medium and low order and added to the multicast group, and the IP user with a high priority is extracted from the IP data packet according to the priority result of the IP data packet, and the extracted IP user is defined as the target IP user, and the multicast source corresponding to the target IP user is added to the current switch hardware multicast table, and multicast bandwidth resources are allocated to the user-side port based on the newly added multicast source.
[0091] In addition, considering the resource maximization application of the switch hardware routing table, the multicast group with low priority can be deleted to avoid the waste of bandwidth resources. Therefore, after the step of confirming the target IP user with high priority, it also includes:
[0092] Identify low-priority IP users;
[0093] The multicast group corresponding to the IP user with a low priority is deleted.
[0094] After the target IP user with high priority has been confirmed, based on the current bandwidth resource maximization application, or in other words, the optimized application of bandwidth resources is improved, based on the priority of the currently calculated IP data packet, the low-priority IP data packet is determined, and the low-priority IP user is extracted, and the multicast group corresponding to the low-priority IP user is deleted, thereby saving the waste of bandwidth resources.
[0095] Furthermore, when allocating multicast bandwidth resources to the user side port based on the newly added multicast source, in order to ensure the maximum application of bandwidth resources, bandwidth resources are allocated based on the priority of each user side port, that is, before the step of allocating multicast bandwidth resources to the user side port based on the newly added multicast source, it also includes:
[0096] Collecting parameter information of IP data packets of each multicast source IP report message and multicast traffic of the user side port;
[0097] When it is confirmed that the multicast traffic is greater than the maximum bandwidth allocation of the user-side port, a step of allocating multicast bandwidth resources to the user-side port using the newly added multicast source is performed.
[0098] In order to maximize the application of bandwidth resources, the multicast bandwidth resources of the user side port are allocated according to the parameter information of the message reported by each multicast source and the multicast traffic of each user side port. It is necessary to determine whether the capacity of the multicast bandwidth resources needs to be adjusted based on the collected multicast traffic of the user side port. The multicast traffic is the traffic value occupied by the corresponding multicast group when the user side port performs network communication applications, and according to the normal use of the user side port and the allocation of network bandwidth resources, the user side port has a maximum bandwidth allocation capacity by default. Therefore, when it is confirmed that the multicast traffic of the user side port is greater than the preset maximum bandwidth allocation, the traffic allocation operation of the bandwidth share is performed based on the priority of the user side port, that is, the step of allocating multicast bandwidth resources to the user side port with the newly added multicast source includes:
[0099] Determining the priority of each of the user-side ports;
[0100] Multicast bandwidth resources are allocated to the user-side port according to the priority.
[0101] The multicast bandwidth resource is allocated based on the priority of each user-side port. The priority of the user-side port can be evaluated based on the message parameter information of each user-side port, that is, the IP Qos and MAC information of each igmpreport message of each user's port, the statistical information of the multicast traffic under each port and the user-defined priority are collected;
[0102] When it is confirmed that the port traffic exceeds the maximum bandwidth allocation of the port, the traffic priority calculation algorithm is started to calculate the priority of the data flow according to the QoS information in the IP parameter information of the message reported by the user side port (including the COS of the 802.1P protocol and the IP header dscp); or, if there is a custom priority setting, the priority of the user side port is calculated with the set custom priority; or, if the QoS information in the IP parameter information of the reported message of each user side port is consistent, the MAC address size of the user side port is sorted to determine the priority. As shown above, after the priority of the user side port is obtained, the traffic is allocated according to the pre-defined bandwidth ratio, and the operation of allocating the traffic according to the pre-defined bandwidth ratio can be set based on the relevant bandwidth allocation function.
[0103] In this embodiment, when there are surplus resources in the hardware multicast table and the hardware port resources are used up, the bandwidth resources required and available for each multicast source under the port are calculated, and the service bandwidth is limited by combining QOS and ACL; when there are surplus resources in the hardware port and the hardware multicast table is used up, the offline or unused multicast groups are deleted according to the traffic statistics measured by the host and the activation message statistics measured by the host, so that the multicast group is joined only when needed, and the multicast group is left and deleted when it is not needed after joining and the resources are full, so that the utilization efficiency of the multicast resources is greatly improved; the priority processing of the multicast group uses the resources and the online status to calculate the priority of the entire replacement and the ratio of the port traffic allocation to perform traffic allocation, so as to maximize the utilization rate of the hardware multicast table resources.
[0104] In addition, an embodiment of the present invention further provides a readable storage medium, which stores a bandwidth allocation program for a switch multicast group. When the bandwidth allocation of the switch multicast group is executed, the content of the bandwidth allocation method embodiment of the switch multicast group is implemented as described above.
[0105] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, system, drug or system including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, system, drug or system. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, system, drug or system including the element.
[0106] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0107] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment system can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, including a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the system described in each embodiment of the present invention.
[0108] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A bandwidth allocation method for a switch multicast group, characterized in that: The bandwidth allocation method for the switch multicast group comprises the following steps: Obtaining a resource occupancy rate of a switch hardware routing table, and confirming whether there are any remaining resources in the switch hardware routing table according to the resource occupancy rate; When it is confirmed that there are remaining resources in the switch hardware routing table, the newly learned hardware multicast table is added to the switch hardware driver, and multicast bandwidth resources are reallocated for the user-side port, the user-side port is a multicast group member port, mounted in the multicast group of the switch, wherein the newly learned hardware multicast table is a multicast group newly created based on the IGMP request message after the switch receives the IGMP request message sent by the host, and bandwidth resources are reallocated based on the multicast group user-side port currently connected and used by the switch and the newly created multicast group user-side port, so that the newly created multicast group is used to mount the new user-side port and use the bandwidth resources of the switch for network communication transmission; When it is confirmed that there are no remaining resources in the switch hardware routing table, reallocate multicast bandwidth resources for the user-side port according to the priority of the newly added multicast source IP, wherein the newly added multicast source IP is an IP user newly added to the multicast group created by the switch, and the priority of the multicast source IP is determined according to the priority of the IP user, wherein the priority of the IP user is determined based on the user-defined priority corresponding to the multicast source IP, and the user-defined priority is a member port priority calculated by the user according to the host service priority defined by the user according to the source MAC or source IP; The bandwidth allocation method for the switch multicast group also includes: Identify low-priority IP users; Deleting the multicast group corresponding to the IP user with a low priority; Before the step of adding the newly learned hardware multicast table to the switch hardware driver to reallocate multicast bandwidth resources to the user-side port, the method includes: Determining the bandwidth usage of the user-side port; If the bandwidth usage rate reaches a preset value, multicast bandwidth resources are reallocated to the multicast group of the user side port, and the preset value is 100%.
2. The bandwidth allocation method for a switch multicast group according to claim 1, characterized in that: The step of reallocating multicast bandwidth resources for the multicast group of the user-side port if the bandwidth usage rate reaches a preset value comprises: Confirm whether the user-side port has packet loss; When it is confirmed that the user-side port has packet loss, a step of reallocating multicast bandwidth resources for the multicast group of the user-side port is performed.
3. A bandwidth allocation device for a switch multicast group, characterized in that: The bandwidth allocation device for the switch multicast group includes: a memory, a processor, and a bandwidth allocation program for the switch multicast group stored in the memory and executable on the processor. When the bandwidth allocation program for the switch multicast group is executed by the processor, the steps of the bandwidth allocation method for the switch multicast group as described in any one of claims 1 to 2 are implemented.
4. A readable storage medium, characterized in that: The readable storage medium stores a bandwidth allocation program for a switch multicast group. When the bandwidth allocation program for the switch multicast group is executed by a processor, the steps of the bandwidth allocation method for the switch multicast group as claimed in any one of claims 1 to 2 are implemented.
Citation Information
Patent Citations
Combined hardware / software forwarding mechanism and method
CN102195875A
Multicast routing table entry processing method and device
CN105704046A
