This application is based upon and claims the benefit of priority from Japanese patent application No. 2006-350806 filed on Dec. 27, 2006, the disclosure of which is incorporated herein in its entirety by reference.
1. Field of the Invention
The present invention relates to a layer 3 switch device and a control method thereof, and more particularly to a layer 3 switch device of a first packet method and a control method thereof.
2. Related Art
Conventionally, in the layer 3 switch of the first packet system, an IP (Internet Protocol) packet transfer portion performs hardware transfer in the communication flow, whereby the IP packet transfer portion sends a first packet to a CPU (Central Processing Unit), and the CPU retrieves header information of the packet and performs a process for controlling the IP packet transfer portion to generate a cache entry in the communication flow in accordance with this retrieval result.
Therefore, in the layer 3 switch of the first packet system, it is always required that the first packet is sent from the IP packet transfer portion to the CPU. However, if the first packets are concentrated on the CPU, a congestion state (overload state) occurs in the CPU. Thus, it is required to control the flow of the first packet (flow rate control: shaping) so that the packet flow may not be concentrated on the CPU.
Therefore, in the layer 3 switch of the first packet system, a shaper queue 61 is provided to control the flow of the first packet to the CPU 4 within the IP packet transfer portion 6, as shown in
Referring to
The flow of each IP packet is shown as a first packet flow 161 of the virtual router VR#1, a first packet flow 162 of the virtual router VR#2 and a first packet flow 163 of the virtual router VR#N. All of the first packet flows 161 to 163 are inputted into the common shaper queue 61, which performs the shaping for controlling the flow rate of first packet to be led out to the CPU 4.
In
Such layer 3 switch was disclosed in Japanese Patent Laid-Open No. 2006-033714, Japanese Patent Laid-Open No. 2006-081057, Japanese Patent Laid-Open No. 2005-210556, Japanese Patent Laid-Open No. 2004-274441 and the like.
In the layer 3 switch of the first packet system as described above, the IP packet transfer portion 6 makes the flow rate control for the packet to the CPU 4. However, in a state where a plurality of virtual routers are set up within one device, when a large amount of first packets are sent from each virtual router, there is a problem that there is a bias in the first packet sending amount on each virtual router, and in an extreme case, some virtual routers can not send out the first packet at all.
In such flow rate control for the packet to the CPU, it is possible to make the flow rate control for the packet depending on a resource use state (load state) of the CPU, but since there is no check function for the virtual router of source, there is an unfair problem that there is a bias in the first packet sending amount on each virtual router, or some virtual routers (virtual router VR#N in
Thus, an exemplary object of the invention is to provide a layer 3 switch device that can send out the first packet to the CPU without a bias in the first packet sending amount on each virtual router while avoiding the congestion of the CPU, and a control method thereof.
A device of an exemplary aspect of the invention is a layer 3 switch device of a first packet system in which a first packet is sent via a packet transfer portion to header information retrieval portion of performing a retrieval process for the header information, including a plurality of first shaper queues provided corresponding to a plurality of virtual routers and performing a flow rate control for the first packet from the packet transfer portion to the header information retrieval portion, a second shaper queue for performing a flow rate control for the first packet of which the flow rate is controlled in the plurality of first shaper queues, and control portion of dynamically controlling the flow rate of packet from the second shaper queue to the header information retrieval portion in accordance with a load state in the header information retrieval portion.
A method of an exemplary aspect of the invention is a control method for a layer 3 switch device of a first packet system in which a first packet is sent via a packet transfer portion to header information retrieval portion of performing a retrieval process for the header information, including: performing a flow rate control for the first packet from the packet transfer portion to the header information retrieval portion with a plurality of first shaper queues provided corresponding to a plurality of virtual routers, performing a flow rate control for the first packet of which the flow rate is controlled in the plurality of first shaper queues using a second shaper queue, and dynamically controlling the flow rate of packet from the second shaper queue to the header information retrieval portion in accordance with a load state in the header information retrieval portion.
The exemplary embodiments of the present invention will be described below firstly from the principle of the invention. That is, in a layer 3 switch device according to the invention, a first shaper queue assigned to each virtual router controls the flow rate of the first packet addressed to a CPU from each virtual router, and a second shaper queue dynamically controls the inflow rate (total inflow band) of the first packet, of which the flow rate is controlled for each virtual router, addressed to the CPU, based on a CPU resource use state. Thereby, it is possible to reduce a bias (unfairness) in the first packet sending amount for each virtual router, while avoiding the congestion (overload) state of the CPU.
The embodiments of the invention will be described below with reference to the drawings.
In
Herein, the CPU 4 performs a process for receiving a first packet in the communication flow from the IP packet transfer portion 2, retrieving the header information of this first packet, and controlling the IP packet transfer portion 2 to generate a cache entry in the communication flow in accordance with this retrieval result, as previously described.
Specifically, the CPU 4 retrieves the header information of the first packet, and controls the IP packet transfer portion 2 to generate a cache entry in the communication flow, based on an IP address (destination and source) and a protocol type of the communication flow included in this header information.
The IP packet transfer portion 2 performs the hardware transfer for packets following the first packet (second packet, third packet and so on) based on the created cache entry in the communication flow. The cache entry in the communication flow means the information concerning what process (including a transfer process) the device performs for the communication flow, temporarily written in a memory, and is well known and not detailed.
The interface unit 1 comprises an IP packet transfer portion 2, and a physical port 3. The IP packet transfer portion 2 comprises the first shaper queues 22 to 24, provided (assigned) corresponding to the virtual routers VR#1 to VR#N, for controlling the flow rate of the first packet addressed to the CPU 4 for each of the virtual routers VR#1 to VR#N, and a second shaper queue 21 for controlling the flow rate of the first packet supplied from the first shaper queues 22 to 24.
A monitor control portion 7 controls the flow rate for the second shaper queue 21. That is, the monitor control portion 7 monitors the resource use state of the CPU 4, and dynamically controls the inflow rate of the first packet addressed to the CPU 4 from the second shaper queue 21, based on this monitor result.
The flow of each IP packet is a first packet flow 121 of the virtual router VR#1, a first packet flow 122 of the virtual router VR#2, or a first packet flow 123 of the virtual router VR#N. The queues of the virtual routers VR#1 to VR#N include a first shaper queue 22 of the virtual router VR#1, a first shaper queue 23 of the virtual router VR#2 and a first shaper queue 24 of the virtual router VR#N.
Referring to
The first packets 161 to 163 entering an interface unit 5 are all sent out under the flow rate control by a shaper queue 61, irrespective of the virtual routers. As shown in
Referring to
The first packets 121 to 123 entering the interface unit 1 are firstly controlled for flow rate by the first shaper queues 22 to 24 provided corresponding to the virtual routers VR#1 to VR#N, respectively. Each of the first shaper queues 22 to 24 is a preset fixed length queue, in which the inflowing packet over this queue length is discarded, so that the flow rate control for each packet is performed for each of the virtual routers VR#1 to VR#N.
Thereafter, the second shaper queue 21 performs the scheduling by round robin method. That is, the sending bandwidth (flow rate of packet addressed to the CPU) of the second shaper queue 21 is dynamically controlled by the monitor control portion 7 in connection with the resource use state of the CPU 4. And the packet is sent under the flow rate control from the second shaper queue 21 to the CPU 4. Finally, the first packets 121 to 123 of the virtual routers VR#1 to VR#N are sent to the CPU 4 at the almost same rate.
Herein, the operation of the second shaper queue 21 will be described below in detail using
When the CPU use ratio becomes greater than or equal to N % (N<100%) from here, the second shaper queue 21 transits to the congestion state S2 (S4 of
Conversely, if the CPU use ratio reaches 100% from the congestion state S2, the operation transits to the congestion state avoidance control state S3 (S6 of
The congestion state avoidance control state S3 will be more specifically described below. If the operation gets into the congestion state S2, the flow rate for the second shaper queue 21 is narrowed, and at the same time the packets passing through the first shaper queues 22 to 24 from each virtual router VR are sequentially scheduled by round robin method in capturing the packets into the second shaper queue 21.
In this embodiment, the first shaper queues 22 to 24 assigned to the virtual routers VR#1 to VR#N control the flow rate of the first packet addressed to the CPU independently for the virtual routers VR#1 to VR#N, and the second shaper queue 21 dynamically performs the shaping control for the total sending bandwidth of the first packet addressed to the CPU, with its flow rate being controlled for each of the virtual routers VR#1 to VR#N, based on the CPU use ratio, whereby it is possible to reduce a bias in the first packet sending amount for each of the virtual routers VR#1 to VR#N, while avoiding the congestion of the CPU 4.
That is, the first shaper queues 22 to 24 can relieve the unfairness for each of the virtual routers VR, and the second shaper queue 21 can avoid the congestion state of the CPU.
In this embodiment, in addition to the configuration of
In
Referring to
Referring firstly to
Referring to
In the embodiment, the inflow rate per unit time for each of the first shaper queues for each of the virtual routers VR is monitored, and the flow rate for the first shaper queue is controlled, based on the monitor result, whereby the greatly increased first packets can be supplied to the CPU for each of the virtual routers VR#1 to VR#N without discarding them.
The following procedure for the packets shaped in the first shaper queues 22 to 24 for each of the virtual routers VR#1 to VR#N is the same as the first embodiment of the invention shown in
An exemplary advantage according to the invention has the effect that it is possible to send the first packet to the CPU without a bias for each virtual router (fairly), while avoiding the congestion (overload) state of the CPU.
While the invention has been particularly shown and described with reference to exemplary embodiments thereof, the invention is not limited to these embodiments. It will be understood by those of ordinary skill in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present invention as defined by the claims.
Number | Date | Country | Kind |
---|---|---|---|
350806/2006 | Dec 2006 | JP | national |