CN109660461B - HQoS (quality of service) implementation method and device - Google Patents
HQoS (quality of service) implementation method and device Download PDFInfo
- Publication number
- CN109660461B CN109660461B CN201910101443.2A CN201910101443A CN109660461B CN 109660461 B CN109660461 B CN 109660461B CN 201910101443 A CN201910101443 A CN 201910101443A CN 109660461 B CN109660461 B CN 109660461B
- Authority
- CN
- China
- Prior art keywords
- target
- scheduling
- mac address
- layer
- layer message
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/302—Route determination based on requested QoS
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/66—Layer 2 routing, e.g. in Ethernet based MAN's
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/50—Queue scheduling
- H04L47/60—Queue scheduling implementing hierarchical scheduling
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention provides a method and a device for realizing HQoS (high quality of service), wherein the method comprises the following steps: when a two-layer message is received, inquiring a two-layer forwarding table item according to the two-layer message to determine a target queue identifier matched with the two-layer message; determining an output port of the message according to the target queue identification, and inquiring a target scheduling strategy applied to the output port of the message according to the target queue identification; and when the target scheduling strategy has a target hierarchical scheduling mode matched with the target queue identification, performing hierarchical scheduling on the two-layer message according to the target hierarchical scheduling mode. The embodiment of the invention can realize the HQoS of the two-layer network of the switching equipment and expand the application scene of the HQoS.
Description
Technical Field
The invention relates to the technical field of network communication, in particular to an HQoS (quality of service) implementation method and device.
Background
The HQoS (Hierarchical Quality of Service) adopts a Hierarchical scheduling mode to refine the traffic classification and provide Quality of Service guarantee for different users and services.
As shown in fig. 1, the HQoS employs a tree-like hierarchical scheduling model. In the model, the bottommost layer is a leaf node, the middle layer is a branch node, and the topmost layer is a root node. After the interface receives the message, the HQoS dispatches the message from bottom to top. Each leaf node corresponds to a system predefined FC (Forwarding Class), which is a scheduling queue, such as BE (Best Effort, service in the graph), AF (asserted, service with guaranteed transmission quality), and NC (Network Control, highest priority service). After receiving the message, the interface searches a priority mapping table according to the user priority value of the message, and puts the message into the corresponding predefined FC. Each branch node corresponds to one FG (Forwarding Group), and one Forwarding Group nests multiple Forwarding groups or predefined Forwarding classes. In the nesting of forwarding groups, the forwarding group in which the nesting is performed is called a parent branch node, and the nested forwarding group is called a child branch node. The root node is an SP (Scheduler Policy), and the scheduling Policy nests a plurality of forwarding groups. After the scheduling policy SP is applied to the interface, the flow of the interface can be hierarchically scheduled from the leaf node to the root node according to the nesting relation.
However, practice shows that no HQoS implementation scheme of a two-layer network on a switch exists at present.
Disclosure of Invention
The invention provides a method and a device for realizing HQoS (quality of service), which aim to solve the problem that the HQoS of a two-layer network on a switch does not exist in the conventional HQoS realization scheme.
According to a first aspect of embodiments of the present invention, there is provided an HQoS implementation method, applied to a switching device, where a corresponding queue identifier is allocated to a user applying a target scheduling policy on a target interface of the switching device, the target interface is an interface applying the target scheduling policy, and the target scheduling policy includes a hierarchical scheduling manner for the user applying the target scheduling policy, where the method includes:
when a two-layer message is received, inquiring a two-layer forwarding table item according to the two-layer message to determine a target queue identifier matched with the two-layer message;
determining an output port of the message according to the target queue identification, and inquiring a target scheduling strategy applied to the output port of the message according to the target queue identification;
and when the target scheduling strategy has a target hierarchical scheduling mode matched with the target queue identification, performing hierarchical scheduling on the two-layer message according to the target hierarchical scheduling mode.
According to a second aspect of the embodiments of the present invention, there is provided an HQoS implementation apparatus, applied to a switching device, where a corresponding queue identifier is allocated to a user applying a target scheduling policy on a target interface of the switching device, the target interface is an interface applying the target scheduling policy, and the target scheduling policy includes a hierarchical scheduling manner for the user applying the target scheduling policy, where the apparatus includes:
a receiving unit, configured to receive a packet;
the query unit is used for querying a two-layer forwarding table item according to a two-layer message when the receiving unit receives the two-layer message so as to determine a target queue identifier matched with the two-layer message;
a determining unit, configured to determine an egress port of the packet according to the target queue identifier;
the query unit is further configured to query a target scheduling policy applied to an egress port of the packet according to the target queue identifier;
and the scheduling unit is used for performing hierarchical scheduling on the two-layer message according to the target hierarchical scheduling mode when the target hierarchical scheduling mode matched with the target queue identifier exists in the target scheduling strategy.
By applying the technical scheme disclosed by the invention, through the QueID corresponding to the user fragment applying the target scheduling strategy on the target interface of the switching equipment, when a two-layer message is received, a two-layer forwarding table entry is inquired according to the two-layer message, the output port of the two-layer message is determined according to the target QueID recorded in the two-layer forwarding table entry matched with the two-layer message, the target scheduling strategy applied on the output port is inquired according to the target QueID, so that a target hierarchical scheduling mode matched with the target queue identification is determined, further, the two-layer message is hierarchically scheduled according to the target hierarchical scheduling mode, the two-layer network HQoS of the switching equipment is realized, and the application scene of the HQoS is expanded.
Drawings
FIG. 1 is a schematic diagram of a tree-like hierarchical scheduling model;
fig. 2 is a schematic flow chart of an HQoS implementation method according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating an application scenario provided by an embodiment of the present invention;
FIG. 4 is a schematic diagram of another application scenario provided by an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an HQoS implementation apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of another HQoS implementation apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions in the embodiments of the present invention better understood and make the above objects, features and advantages of the embodiments of the present invention more comprehensible, the technical solutions in the embodiments of the present invention are described in further detail below with reference to the accompanying drawings.
Referring to fig. 2, a schematic flow diagram of an HQoS implementation method according to an embodiment of the present invention is provided, where the HQoS implementation method may be applied to a switching device, such as a switch or another device using a switching chip (e.g., a router using the switching chip), and as shown in fig. 2, the HQoS implementation method may include the following steps:
for convenience of description and understanding, the following description takes the execution subjects of steps 201 to 203 as an example of a switch.
In the embodiment of the present invention, in order to implement HQoS on a switch, a corresponding QueID (queue identifier) may be allocated to a user (referred to as a target user herein) applying a target scheduling policy on an interface (referred to as a target interface herein) applying the target scheduling policy on the switch, so that the switch may determine a hierarchical scheduling mode of the corresponding user according to the QueID.
The target scheduling policy comprises a hierarchical scheduling mode aiming at a user applying the target scheduling policy.
In addition, in the embodiment of the present invention, a two-layer forwarding entry (including a statically configured or dynamically learned two-layer forwarding entry) on the switch may record QueID (queue identifier) information, and perform hierarchical scheduling on a corresponding packet according to the QueID.
It should be noted that, in the embodiment of the present invention, if not specifically stated, all the mentioned scheduling policies indicate directional scheduling policies, that is, the scheduling policies configured on any interface all refer to scheduling policies used when the interface is used as a message egress port, and the following description of the embodiment of the present invention is not repeated.
Correspondingly, in the embodiment of the present invention, when the switch receives the two-layer packet, the switch queries the two-layer forwarding table entry according to the two-layer packet to determine the two-layer forwarding table entry (referred to as a target two-layer forwarding table entry herein) matching the packet, and determines the QueID (referred to as a target QueID herein) recorded in the target two-layer forwarding table entry as the QueID matching the two-layer packet.
In an embodiment of the present invention, the querying a two-layer forwarding entry according to a two-layer packet to determine a target queue identifier matching the two-layer packet may include:
according to the destination MAC (Media Access Control) and VLAN (Virtual Local Area Network) information of the two-layer message, an MAC address table is inquired, and a queue identifier recorded in a destination MAC address table item matched with the destination MAC address and VLAN information of the two-layer message is determined as a target queue identifier.
In this embodiment, taking an example of implementing an HQoS scenario in a Service-VLAN (Service VLAN) networking, when a switch receives a two-layer packet, the switch may query an MAC address table according to a destination MAC address of the two-layer packet and VLAN information, to determine an MAC address table entry (referred to as a destination MAC address table entry herein) matching the destination MAC address of the two-layer packet and the VLAN information, and determine a QueID recorded in the destination MAC address table entry as a target QueID.
In another embodiment of the present invention, the querying a two-layer forwarding entry according to a two-layer packet to determine a target queue identifier matching with the two-layer packet may include:
and inquiring an MAC address table according to the destination MAC address and VSI (Virtual Switch Instance) information of the two-layer message, and determining a queue identifier recorded in a destination MAC address table item matched with the destination MAC address and VSI information of the two-layer message as a target queue identifier.
In this embodiment, taking implementing an HQoS scenario in an MPLS (Multi-Protocol Label Switching) L2VPN (Layer 2Virtual Private Network) Network as an example, when the switch receives a two-Layer packet, the switch may determine, according to an input port of the two-Layer packet and Label information carried in the two-Layer packet, VSI information corresponding to the two-Layer packet, and query, according to a destination MAC address of the two-Layer packet and the VSI information, an MAC address table to determine a destination MAC address table entry matched with the destination MAC address and the VSI information of the two-Layer packet, and determine, as a target QueID, a QueID recorded in the destination MAC address table entry.
In the embodiment of the invention, when the switch determines the target queue identifier matched with the received two-layer message, the switch can determine the output port of the message according to the target queue identifier.
For example, when a target user on a target interface of a switch is allocated with a QueID, a corresponding relationship between the interface and the QueID may be recorded on the switch, and further, when the switch determines a target queue identifier matching a received two-layer message, an interface corresponding to the target queue identifier may be determined according to the corresponding relationship between the interface and the QueID, and the interface may be determined as an egress port of the message.
In the embodiment of the invention, after the switch determines the output port of the message, the switch can inquire a target scheduling strategy applied on the output port according to the target QueID to determine whether a target hierarchical scheduling mode matched with the target QueID exists in the target scheduling strategy.
And 203, when a target hierarchical scheduling mode matched with the target queue identifier exists in the target scheduling strategy, analyzing and scheduling the two-layer message according to the target hierarchical scheduling mode.
In the embodiment of the present invention, when the switch determines that a hierarchical scheduling manner (referred to as a target hierarchical scheduling manner herein) matching the target QueID exists in the target scheduling policy applied at the egress port of the two-layer packet, the switch may perform analysis scheduling on the two-layer packet according to the target analysis scheduling manner.
In one embodiment of the present invention, the hierarchical scheduling manner may include a user group scheduling manner, a user scheduling manner, and a service scheduling manner;
correspondingly, the performing hierarchical scheduling on the two-layer packet according to the target hierarchical scheduling manner may include:
and scheduling the two-layer message according to the user group scheduling mode, the user scheduling mode and the service scheduling mode in sequence.
In this embodiment, a three-level scheduling structure of "user group" - "user" - "service" is taken as an example.
Correspondingly, the hierarchical scheduling modes included in the target scheduling policy may include a user group scheduling mode, a user scheduling mode, and a service scheduling mode.
After the switch determines a target QueID matched with the received two-layer message and determines an egress port of the two-layer message, the switch may query a target scheduling policy applied on the egress port according to the target QueID.
Specifically, the switch may determine a user group (referred to as a target user group herein) to which the packet belongs according to the target QueID, query a user group scheduling manner corresponding to the target user group from a target scheduling policy applied at the egress port, and schedule the two-layer packet by using the user group scheduling manner.
For each interface applying the target scheduling policy, a hierarchical scheduler can be deployed, and according to a forwarding group nested in the target scheduling policy, the QueID is hung on the corresponding hierarchical scheduler, so that HQoS is realized.
Furthermore, the switch can also determine a user scheduling mode corresponding to the two-layer message according to the target QueID, and schedule the two-layer message according to the user scheduling mode.
Finally, the switch can also determine a service scheduling mode corresponding to the two-layer message according to the target QueID and the priority information in the two-layer message, and schedule the two-layer message according to the service calling mode.
That is, the switch can schedule the two-layer message according to the user group scheduling mode, the user scheduling mode and the service scheduling mode in sequence, thereby realizing the hierarchical scheduling of the two-layer message.
It can be seen that, in the flow of the method shown in fig. 2, when a two-layer message is received, a two-layer forwarding entry is queried according to the two-layer message by using a QueID corresponding to a user fragment to which a target scheduling policy is applied on a target interface of an exchange device, an egress port of the two-layer message is determined according to the target QueID recorded in the two-layer forwarding entry matched with the two-layer message, the target scheduling policy applied on the egress port is queried according to the target QueID, so as to determine a target hierarchical scheduling manner matched with a target queue identifier, and then, the two-layer message is hierarchically scheduled according to the target hierarchical scheduling manner, thereby implementing a two-layer network HQoS of the exchange device and expanding an application scenario of the HQoS.
It should be noted that, in the embodiment of the present invention, in order to implement unification of HQOS and ordinary QOS scheduling, for any interface on a switch, a user that does not adopt hierarchical scheduling on the interface may be divided into a user group (may be referred to as a default user group), and a QueID is allocated to the default user group, and further, when it is determined that the QueID matched with a received two-layer packet is the QueID of the default user group, the two-layer packet may be scheduled according to an ordinary QOS scheduling manner, that is, the two-layer packet is scheduled according to the priority of the two-layer packet.
The specific implementation of the switch scheduling the two-layer packet according to the ordinary QoS scheduling manner may refer to the related description in the existing related implementation, and the details of the embodiment of the present invention are not described herein.
In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present invention, the technical solutions provided by the embodiments of the present invention are described below with reference to specific examples.
For convenience of understanding and description, the scheduling policy to be issued is hereinafter divided into three levels of scheduling hierarchies of "user group", "user" and "service" according to the nesting relationship of forwarding groups, i.e., "service" is a leaf node, "user" is a child branch node, and "user group" is a parent branch node.
However, it should be appreciated that in practical applications, the hierarchical scheduling hierarchy is not limited to three levels, and may also be a two-level scheduling hierarchy or a four-level scheduling hierarchy (greater than or equal to two levels), and the following descriptions of the embodiments of the present invention will not be repeated.
Example one
In this embodiment, taking HQoS implementation in Service-VLAN networking as an example, in this networking, different "users" are divided into different "VLAN domains," services "are identified by" 802.1p priority, "and the scheduling object with the finest granularity is the Service of the user.
One user corresponds to one VLAN domain, and one VLAN domain can comprise one VLAN or a plurality of VLANs; a user group may include multiple users (corresponding to multiple VLAN fields); messages of different priorities of a user correspond to different services.
Referring to fig. 3, in this embodiment, it is assumed that user groups 1 to 3 access through interfaces 311 to 313 of a switch device 310 respectively (there may be other switch devices between the user and the switch device 310, which are not shown in fig. 3), and the interfaces 311 to 313 of the switch device 310 all apply a target scheduling policy; wherein:
the VLAN corresponding to the user group 1 is assumed to comprise VLAN 100-VLAN 299, wherein the VLAN domain corresponding to the user 11 is VLAN 100-VLAN 149; the VLAN domain corresponding to the user 12 is VLAN 150-VLAN 199; the VLAN domain corresponding to the user 13 is VLAN 200-VLAN 249; the VLAN domain corresponding to the user 14 is VLAN 250-VLAN 299;
the VLAN corresponding to the user group 2 comprises VLAN 300-VLAN 399, wherein the VLAN domain corresponding to the user 21 is VLAN 300-VLAN 339; the VLAN domain corresponding to the user 22 is VLAN 340-VLAN 369; the VLAN fields corresponding to the user 33 are VLANs 370 to 400.
The VLAN corresponding to the user group 3 includes VLANs 400 to 450, where the VLAN corresponding to the user 31 is VLAN400 to VLAN420, and the VLAN corresponding to the user 32 is VLAN421 to VLAN 450.
In this embodiment, in order to implement HQoS, for each user to which a target scheduling policy is applied, a Lif (logical Interface) may be configured for the user on a corresponding Interface, and a QueID may be allocated, and learning information (learn info) of the Lif of each user is set as the QueID of the user.
Suppose that Lif corresponding to the user 11 is Lif1, and the QueID is 11; lif corresponding to the user 12 is Lif2, and QueID is 21; lif corresponding to the user 13 is Lif3, and QueID is 31; …, respectively; lif corresponding to the user 31 is Lif8, and QueID is 81; the Lif corresponding to the user 32 is Lif9, and the QueID is 91.
In this embodiment, for the users not applying the target scheduling policy on each interface (interfaces 311-313), the users are respectively divided into default user groups of each interface, and default lifs (assuming lifs 101-Lif 103 respectively) are configured and assigned with default queids (assuming 111, 121 and 131 respectively).
In this embodiment, when the switching device 310 receives the two-layer packet, on one hand, the switching device 310 may query whether there is a matching MAC address entry according to the source MAC address of the two-layer packet and the VLAN information, and if not, the switching device 220 may determine the Lif corresponding to the two-layer packet according to the ingress port of the two-layer packet and the VLAN information, and generate the MAC address entry corresponding to the two-layer packet.
For example, assuming that the ingress port of the two-layer packet is the interface 311, and the VLAN information (VLAN Tag) is the VLAN110, the switching device 310 may determine that Lif corresponding to the two-layer packet is Lif1, at this time, the switching device 310 may generate an MAC address table entry corresponding to the two-layer packet, and the MAC address table entry may record a source MAC address, VLAN information, and a QueID (a QueID corresponding to Lif1, that is, the QueID11) of the two-layer packet.
It should be noted that, in this embodiment, if the switching device 310 queries the matched MAC address table entry according to the source MAC address of the two-layer packet and the VLAN information, the switching device 310 may refresh the corresponding MAC address table entry.
In addition, in this embodiment, the MAC address table entry may also be implemented in a static configuration manner, for example, an administrator manually configures the MAC address table entry including the MAC address of the user, VLAN information, and a QueID, and specific implementation thereof is not described herein again.
On the other hand, the switching device 310 may query the matched MAC address table entry according to the destination MAC address of the two-layer packet and the VLAN information, and obtain the QueID in the queried MAC address table entry.
After the switching device 310 obtains the QueID in the queried MAC address table entry, it may determine an egress port of the two-layer packet according to the QueID, and query a target scheduling policy applied on the egress port according to the QueID, so as to determine whether a target hierarchical scheduling manner matching the QueID exists.
Assuming that the QueID in the queried MAC address entry acquired by the switching device 310 is the QueID21, the switching device 310 may determine that the output port of the two-layer packet is the interface 311, and further, the switching device 310 may query the target scheduling policy applied on the interface 311 according to the QueID 21.
The switching device 310 may determine, according to the QueID21, that the destination user of the two-layer packet is the user 12, and the user group to which the two-layer packet belongs is the user group 1.
In addition, the switching device 310 may determine a service corresponding to the two-layer packet according to the priority information in the two-layer packet and the QueID, for example, determine a corresponding service (assumed to be service a) according to the QueID21+ Pri (priority in the two-layer packet).
Furthermore, the switch device 310 may schedule the two-layer packet by using the scheduling manner of the user group 1, the scheduling manner of the user 12, and the scheduling manner of the service a, which are included in the target scheduling policy applied on the interface 311, in sequence.
It should be noted that, in this embodiment, if the QueID in the queried MAC address table entry acquired by the switching device 310 is the QueID0, the switching device 310 may determine that the user corresponding to the two-layer packet is a user of the default user group, and at this time, the switching device 310 may perform ordinary QoS scheduling on the two-layer packet, which is not described herein in detail.
Example two
In this embodiment, taking an HQoS implementation in an MPLS L2VPN networking as an example, in the networking, one or more tunnels may exist between switching devices (such as PE (Provider Edge) devices), and each tunnel may carry one or more L2VPN PWs (Pseudo-wires) (abbreviated as PW).
The tunnel may correspond to a user group, the PW may correspond to a user, and the PW + Pri (priority) may correspond to a service.
Referring to fig. 4, in this embodiment, it is assumed that tunnels 401 and 402 are created between PE device 410 and PE device 420; the interfaces of the PE device 410 corresponding to the tunnels 401 and 402 are an interface 411 and an interface 412 (which may be referred to as a tunnel portal 411 and a tunnel portal 412), respectively; the tunnel 401 carries PW4011 and PW4012 (not shown in the figure), and the tunnel 402 carries PW4021, PW4022, and PW4023 (not shown in the figure).
In this embodiment, in order to implement HQoS, for each PW to which a target scheduling policy is applied, a Lif may be configured for the PW on a corresponding tunnel port, and a QueID may be allocated, and learning information of the Lif of each PW is set as the QueID of the PW.
Assuming that Lif corresponding to PW4011 is Lif1 and QueID is 11; lif corresponding to PW4012 is Lif2, and QueID is 12; lif corresponding to PW4021 is Lfi3, and QueID is 21; lif corresponding to PW4022 is Lif4, and QueID is 22; the Lif of PW4023 is Lif5, and QueID is 23.
In this embodiment, for PWs to which no target scheduling policy applies, they are divided into default user groups, configured with default Lif (assumed to be Lif0) and assigned with default QueID (assumed to be 0).
In this embodiment, when the PE device 310 receives the two-layer packet, the PE device 310 may determine, according to the ingress port of the two-layer packet and Label information carried in the two-layer packet, VSI information corresponding to the two-layer packet.
Furthermore, on one hand, the PE device may query whether there is a matching MAC address entry according to the source MAC address and VSI information of the two-layer packet, and if not, the PE device 210 may determine the Lif corresponding to the two-layer packet according to the ingress port of the two-layer packet and Label information, and generate the MAC address entry corresponding to the two-layer packet.
For example, assuming that the ingress port of the two-layer packet is the tunnel port 411, the PE device 410 determines that the corresponding PW is PW4011 according to the ingress port and Label information in the two-layer packet, so that the PE device 410 may determine that Lif corresponding to the two-layer packet is Lif1, at this time, the PE device 410 may generate an MAC address table entry corresponding to the two-layer packet, and the MAC address table entry may record a source MAC address, VSI information, and a QueID (QueID corresponding to Lif1, that is, QueID11) of the two-layer packet.
It should be noted that, in this embodiment, when the two-layer message received by the PE device is a two-layer message with tunnel encapsulation, the PE device may first remove the tunnel encapsulation and then process the two-layer message according to the above manner, and specific implementation thereof is not described herein again.
In addition, in this embodiment, if the PE device 410 queries a matching MAC address table entry according to the source MAC address and the VSI information of the layer two message, the PE device 310 may refresh the corresponding MAC address table entry.
Furthermore, in this embodiment, the MAC address table entry may also be implemented in a static configuration manner, for example, an administrator manually configures the MAC address table entry including the MAC address of the user, the VSI information, and the QueID, and the specific implementation thereof is not described herein again.
On the other hand, the PE device may query the matched MAC address table entry according to the destination MAC address and the VSI information of the two-layer packet, and obtain the QueID in the queried MAC address table entry.
After obtaining the QueID in the queried MAC address table entry, the PE device can determine an output port of the two-layer message according to the QueID, and query a target scheduling policy applied on the output port according to the QueID so as to determine whether a target hierarchical scheduling mode matched with the QueID exists.
Assuming that the QueID in the queried MAC address table entry acquired by the PE device 410 is QueID11, the PE device may determine that the egress port of the two-layer packet is the tunnel port 411, and further, the PE device may query the target scheduling policy applied on the tunnel port 411 according to the QueID 11.
The PE device 410 may determine, according to the Que11, that a PW corresponding to a destination user of the two-layer packet is PW4011, and the carried tunnel is the tunnel 401.
In addition, the PE device 410 may determine a service corresponding to the two-layer packet according to the priority information of the two-layer packet and the QueID, for example, determine a corresponding service (assumed as service b) according to the QueID11+ Pri (priority in the two-layer packet).
Further, the PE device 410 may sequentially use the scheduling manner of the user group corresponding to the tunnel 401, the scheduling manner corresponding to the PW4011, and the scheduling manner of the service b, which are included in the target scheduling policy applied on the tunnel port 411, to schedule the two-layer packet.
It should be noted that, in this embodiment, if the QueID in the queried MAC address table entry acquired by the PE device 410 is the QueID0, the PE device 410 may determine that the user corresponding to the two-layer packet is the user of the default user group, and at this time, the PE device 410 may perform ordinary QoS scheduling on the two-layer packet, which is not described herein in detail.
As can be seen from the above description, in the technical solution provided in the embodiment of the present invention, when a two-layer message is received, a two-layer forwarding entry is queried according to the two-layer message by using a QueID corresponding to a user fragment to which a target scheduling policy is applied on a target interface of a switching device, an egress port of the two-layer message is determined according to the target QueID recorded in the two-layer forwarding entry matched with the two-layer message, the target scheduling policy applied on the egress port is queried according to the target QueID, so as to determine a target hierarchical scheduling manner matched with a target queue identifier, and then, the two-layer message is hierarchically scheduled according to the target hierarchical scheduling manner, thereby implementing a two-layer network HQoS of the switching device and expanding an application scenario of the HQoS.
Referring to fig. 5, a schematic structural diagram of an HQoS implementation apparatus according to an embodiment of the present invention is provided, where the HQoS implementation apparatus may be applied to a switching device in the foregoing method embodiment, and as shown in fig. 5, the HQoS implementation apparatus may include:
a receiving unit 510, configured to receive a message;
a querying unit 520, configured to query, when the receiving unit 510 receives the two-layer packet, a two-layer forwarding entry according to the two-layer packet, so as to determine a target queue identifier matching with the two-layer packet;
a determining unit 530, configured to determine an egress port of the packet according to the target queue identifier;
the query unit 520 is further configured to query a target scheduling policy applied on an egress port of the packet according to the target queue identifier;
and the scheduling unit 540 is configured to, when a target hierarchical scheduling manner matching the target queue identifier exists in the target scheduling policy, perform hierarchical scheduling on the two-layer packet according to the target hierarchical scheduling manner.
In an optional embodiment, the querying unit 520 is configured to query the MAC address table according to the destination MAC address of the layer two packet and the VLAN information, and determine a queue identifier recorded in a destination MAC address table entry matched with the destination MAC address of the layer two packet and the VLAN information as a target queue identifier;
or the like, or, alternatively,
a querying unit 520, configured to query an MAC address table according to the destination MAC address of the layer two packet and the virtual switch instance VSI information, and determine a queue identifier recorded in a destination MAC address table entry matched with the destination MAC address and the VSI information of the layer two packet as a target queue identifier.
In an optional embodiment, a user applying a target scheduling policy on a target interface of the switching device is configured with a corresponding logical interface, and learning information of the logical interface is a queue identifier of the user;
referring to fig. 6 together, a schematic structural diagram of another HQoS implementing apparatus according to an embodiment of the present invention is shown in fig. 6, where on the basis of the HQoS implementing apparatus shown in fig. 5, the HQoS implementing apparatus shown in fig. 6 further includes: a generation unit 550; wherein:
the determining unit 530 is further configured to determine, when it is determined that there is no MAC address table entry matching the source MAC address and the VLAN information of the two-layer packet, a logical interface corresponding to the two-layer packet according to the ingress port of the two-layer packet and the VLAN information;
a generating unit 550, configured to generate an MAC address table entry matching the source MAC address of the two-layer packet and the VLAN information; wherein, the MAC address table entry records a queue identifier corresponding to the logic interface;
or the like, or, alternatively,
the determining unit 530 is further configured to determine, when it is determined that there is no MAC address table entry matching the source MAC address and the VSI information of the two-layer packet, a logical interface corresponding to the two-layer packet according to an ingress port of the two-layer packet and the tag information;
a generating unit 550, configured to generate an MAC address table entry matching the source MAC address and the VSI information of the layer two packet; wherein, the MAC address table entry records a queue identifier corresponding to the logical interface.
In an optional embodiment, the hierarchical scheduling mode includes a user group scheduling mode, a user scheduling mode and a service scheduling mode;
the scheduling unit 540 is specifically configured to schedule the two-layer packet according to a user group scheduling manner, a user scheduling manner, and a service scheduling manner in sequence.
In an optional embodiment, the scheduling unit 540 is further configured to perform, when a target hierarchical scheduling manner matching the target queue identifier does not exist in the target scheduling policy, ordinary QoS scheduling on the two-layer packet.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the invention. One of ordinary skill in the art can understand and implement it without inventive effort.
It can be seen from the above embodiments that, by applying a QueID corresponding to a user fragment of a target scheduling policy on a target interface of an exchange device, when a two-layer message is received, a two-layer forwarding entry is queried according to the two-layer message, an egress port of the two-layer message is determined according to the target QueID recorded in the two-layer forwarding entry matched with the two-layer message, and a target scheduling policy applied on the egress port is queried according to the target QueID, so as to determine a target hierarchical scheduling manner matched with a target queue identifier, and then, the two-layer message is hierarchically scheduled according to the target hierarchical scheduling manner, thereby implementing a two-layer network HQoS of the exchange device and expanding an application scenario of the HQoS.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.
Claims (10)
1. A method for realizing hierarchical service quality HQoS is applied to switching equipment, and is characterized in that a corresponding queue identifier is allocated to a user applying a target scheduling policy on a target interface of the switching equipment, the target interface is an interface applying the target scheduling policy, and the target scheduling policy comprises a hierarchical scheduling mode aiming at the user applying the target scheduling policy, and the method comprises the following steps:
when a two-layer message is received, inquiring a two-layer forwarding table item according to the two-layer message to determine a target queue identifier matched with the two-layer message;
determining an output port of the message according to the target queue identification, and inquiring a target scheduling strategy applied to the output port of the message according to the target queue identification;
and when the target scheduling strategy has a target hierarchical scheduling mode matched with the target queue identification, performing hierarchical scheduling on the two-layer message according to the target hierarchical scheduling mode.
2. The method of claim 1, wherein said querying a layer two forwarding entry according to the layer two packet to determine a target queue id matching the packet comprises:
inquiring an MAC address table according to a target Media Access Control (MAC) address of the two-layer message and Virtual Local Area Network (VLAN) information, and determining a queue identifier recorded in a target MAC address table item matched with the target MAC address of the two-layer message and the VLAN information as the target queue identifier;
or the like, or, alternatively,
and inquiring an MAC address table according to the destination Media Access Control (MAC) address of the two-layer message and the VSI information of the virtual switch instance, and determining a queue identifier recorded in a destination MAC address table entry matched with the destination MAC address and the VSI information of the two-layer message as the target queue identifier.
3. The method according to claim 2, wherein a user applying the target scheduling policy on the target interface of the switching device is configured with a corresponding logical interface, and the learning information of the logical interface is a queue identifier of the user;
when receiving the two-layer message, the method further comprises:
when determining that an MAC address table item matched with a source MAC address and VLAN information of the two-layer message does not exist, determining a logic interface corresponding to the two-layer message according to an input port of the two-layer message and the VLAN information, and generating an MAC address table item matched with the source MAC address and the VLAN information of the two-layer message; wherein, the MAC address table entry records a queue identifier corresponding to the logic interface;
or the like, or, alternatively,
when determining that an MAC address table item matched with the source MAC address and VSI information of the two-layer message does not exist, determining a logic interface corresponding to the two-layer message according to an input port and label information of the two-layer message, and generating an MAC address table item matched with the source MAC address and VSI information of the two-layer message; wherein, the MAC address table entry records a queue identifier corresponding to the logical interface.
4. The method of claim 1, wherein the hierarchical scheduling modes include a user group scheduling mode, a user scheduling mode, and a service scheduling mode;
the hierarchical scheduling of the two-layer message according to the target hierarchical scheduling mode comprises the following steps:
and scheduling the two-layer message according to the user group scheduling mode, the user scheduling mode and the service scheduling mode in sequence.
5. The method of claim 1, wherein after querying a target scheduling policy applied on an egress port of the packet according to the target queue identity, the method further comprises:
and when the target scheduling strategy does not have a target hierarchical scheduling mode matched with the target queue identification, performing common QoS scheduling on the two-layer message.
6. A hierarchical service quality HQoS implementation device is applied to a switching device, and is characterized in that a corresponding queue identifier is allocated to a user applying a target scheduling policy on a target interface of the switching device, the target interface is an interface applying the target scheduling policy, and the target scheduling policy includes a hierarchical scheduling mode for the user applying the target scheduling policy, and the device includes:
a receiving unit, configured to receive a packet;
the query unit is used for querying a two-layer forwarding table item according to a two-layer message when the receiving unit receives the two-layer message so as to determine a target queue identifier matched with the two-layer message;
a determining unit, configured to determine an egress port of the packet according to the target queue identifier;
the query unit is further configured to query a target scheduling policy applied to an egress port of the packet according to the target queue identifier;
and the scheduling unit is used for performing hierarchical scheduling on the two-layer message according to the target hierarchical scheduling mode when the target hierarchical scheduling mode matched with the target queue identifier exists in the target scheduling strategy.
7. The apparatus of claim 6,
the query unit is used for querying an MAC address table according to the destination Media Access Control (MAC) address of the two-layer message and Virtual Local Area Network (VLAN) information, and determining a queue identifier recorded in a destination MAC address table item matched with the destination MAC address of the two-layer message and the VLAN information as the target queue identifier;
or the like, or, alternatively,
and the query unit is used for querying an MAC address table according to the destination Media Access Control (MAC) address of the two-layer message and the Virtual Switch Instance (VSI) information, and determining a queue identifier recorded in a destination MAC address table item matched with the destination MAC address and the VSI information of the two-layer message as the target queue identifier.
8. The apparatus according to claim 7, wherein a user applying the target scheduling policy on the target interface of the switching device is configured with a corresponding logical interface, and the learning information of the logical interface is a queue identifier of the user;
the device further comprises: a generating unit; wherein:
the determining unit is further configured to determine a logical interface corresponding to the two-layer packet according to an ingress port of the two-layer packet and VLAN information when it is determined that there is no MAC address table entry matching with a source MAC address and VLAN information of the two-layer packet;
the generating unit is used for generating an MAC address table item matched with the source MAC address and the VLAN information of the two-layer message; wherein, the MAC address table entry records a queue identifier corresponding to the logic interface;
or the like, or, alternatively,
the determining unit is further configured to determine, when it is determined that there is no MAC address table entry matching the source MAC address and the VSI information of the layer two packet, a logical interface corresponding to the layer two packet according to an ingress port of the layer two packet and the tag information;
the generating unit is used for generating an MAC address table item matched with the source MAC address and the VSI information of the two-layer message; wherein, the MAC address table entry records a queue identifier corresponding to the logical interface.
9. The apparatus of claim 6, wherein the hierarchical scheduling modes comprise a user group scheduling mode, a user scheduling mode, and a service scheduling mode;
and the scheduling unit is specifically configured to schedule the two-layer packet according to the user group scheduling mode, the user scheduling mode and the service scheduling mode in sequence.
10. The apparatus of claim 6,
and the scheduling unit is further configured to perform ordinary QoS scheduling on the two-layer packet when a target hierarchical scheduling manner matching the target queue identifier does not exist in the target scheduling policy.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910101443.2A CN109660461B (en) | 2019-01-31 | 2019-01-31 | HQoS (quality of service) implementation method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910101443.2A CN109660461B (en) | 2019-01-31 | 2019-01-31 | HQoS (quality of service) implementation method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109660461A CN109660461A (en) | 2019-04-19 |
CN109660461B true CN109660461B (en) | 2021-04-27 |
Family
ID=66121959
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910101443.2A Active CN109660461B (en) | 2019-01-31 | 2019-01-31 | HQoS (quality of service) implementation method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109660461B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114257892A (en) * | 2021-12-22 | 2022-03-29 | 苏州盛科通信股份有限公司 | Method and application for message multistage scheduling in passive optical network |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101478475A (en) * | 2008-11-21 | 2009-07-08 | 中兴通讯股份有限公司 | Method for implementing HQoS technique in T-MPLS network |
CN101958836A (en) * | 2010-10-12 | 2011-01-26 | 中兴通讯股份有限公司 | Queuing resource management method and device in hierarchical service quality |
CN102546395A (en) * | 2011-12-14 | 2012-07-04 | 中兴通讯股份有限公司 | Service scheduling method and service scheduling device based on Layer 2 Virtual Private Networks (L2VPN) |
CN102594663A (en) * | 2012-02-01 | 2012-07-18 | 中兴通讯股份有限公司 | Queue scheduling method and device |
EP3029896A1 (en) * | 2013-07-31 | 2016-06-08 | ZTE Corporation | Qos implementation method and apparatus in openflow network |
-
2019
- 2019-01-31 CN CN201910101443.2A patent/CN109660461B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101478475A (en) * | 2008-11-21 | 2009-07-08 | 中兴通讯股份有限公司 | Method for implementing HQoS technique in T-MPLS network |
CN101958836A (en) * | 2010-10-12 | 2011-01-26 | 中兴通讯股份有限公司 | Queuing resource management method and device in hierarchical service quality |
CN102546395A (en) * | 2011-12-14 | 2012-07-04 | 中兴通讯股份有限公司 | Service scheduling method and service scheduling device based on Layer 2 Virtual Private Networks (L2VPN) |
CN102594663A (en) * | 2012-02-01 | 2012-07-18 | 中兴通讯股份有限公司 | Queue scheduling method and device |
EP3029896A1 (en) * | 2013-07-31 | 2016-06-08 | ZTE Corporation | Qos implementation method and apparatus in openflow network |
Also Published As
Publication number | Publication date |
---|---|
CN109660461A (en) | 2019-04-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6903121B2 (en) | Packet transmission | |
CN109768927B (en) | HQoS (quality of service) implementation method and device | |
Hantouti et al. | Service function chaining in 5G & beyond networks: Challenges and open research issues | |
US8599850B2 (en) | Provisioning single or multistage networks using ethernet service instances (ESIs) | |
US20220103598A1 (en) | Network virtualization infrastructure with divided user responsibilities | |
CN103917967A (en) | Network control system for configuring middleboxes | |
BRPI0300118B1 (en) | Layer 3 virtual private network and method to build the same | |
WO2005031532A9 (en) | Method and apparatus for modeling and analyzing mpls and virtual private networks | |
Matias et al. | An OpenFlow based network virtualization framework for the cloud | |
CN112134801B (en) | Method and device for processing segment identification SID and each node | |
US8670352B2 (en) | Link inference in large networks based on incomplete data | |
CN101237376A (en) | A label acquisition method of virtual private network and independent system boundary routing device | |
US9954732B1 (en) | Hierarchical resource groups for providing segregated management access to a distributed switch | |
Kulkarni et al. | Neo-NSH: Towards scalable and efficient dynamic service function chaining of elastic network functions | |
US20100254406A1 (en) | Qos management method for an ethernet based ngn | |
CN101471880B (en) | Method, system and routing device for processing data | |
US20080240102A1 (en) | Method and system for policy-based routing in a private network-to-network interface protocol based network | |
CN109660461B (en) | HQoS (quality of service) implementation method and device | |
WO2022237291A1 (en) | Message transmission method and apparatus, related device, and storage medium | |
CN109756411B (en) | Message forwarding method and device, first VTEP device and storage medium | |
KR100916835B1 (en) | METHOD OF PROCESSING PACKETS PER-FLOW USING NETWORK PROCESSOR IN DiffServ-over-MPLS | |
US20150381560A1 (en) | Logical interface encoding | |
CN111600849B (en) | Message processing method, device, equipment and machine readable storage medium | |
CN104253751A (en) | Multi-role host-based message transmission method and multi-role host-based message transmission equipment | |
CN108259338B (en) | Private network application identification method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |