Relaying apparatus and packet relaying apparatus

Each transmission port module includes a plurality of queues in association with combinations of a priority and a VLAN number. An accumulated-amount storage unit stores a total size of packets accumulated in queues associated with the same priority. A threshold storage unit stores a threshold of a total packet accumulated amount for each queue. When a packet is received, whether to discard the packet is determined based on a total packet accumulated amount stored in the accumulated-amount storage unit in association with a priority set for the packet and the threshold stored in the threshold storage unit in association with a storage-destination queue of the packet.

CROSS-REFERENCE TO RELATED APPLICATION

This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2008-107177, filed on Apr. 16, 2008, the entire contents of which are incorporated herein by reference.

FIELD

The embodiments discussed herein are directed to a relaying apparatus and packet relaying method of relaying a packet received from an apparatus belonging to a predetermined virtual network to another apparatus.

BACKGROUND

In recent years, some relaying apparatuses, such as switches and routers, which relay a packet, come to have a function called Quality of Service (QoS) for ensuring communication quality. Examples of the function for ensuring communication quality include bandwidth control for achieving data transmission with a lowest bandwidth under contract with each user, priority control for relaying packets in descending order of priority set in each packet, and congestion control for controlling a transfer rate according to the load state on a network.

Specifically, the congestion control is achieved, for example, by: determining whether the amount of received packets is equal to or greater than a predetermined threshold or not according to the priority set for each packet; and, after the amount of received packets reaches the predetermined threshold (when the congestion occurs), discarding the packet received thereafter (refer to Japanese Patent Application Laid-open No. 2004-166080 and Japanese Patent Application Laid-open No. 11-112544).

Meanwhile, Virtual Local Area Networks (VLANs) have become widely used in recent years. The VLAN is a virtual network created in a physical network. Communication providers and users of VLANs desire to realize congestion control for each virtual network.

However, in the conventional technology, although congestion control can be performed for each priority, congestion control cannot be performed for each virtual network. Specifically, in a conventional relaying apparatus, when the amount of received packets of a predetermined priority exceeds a threshold, packets of the predetermined priority are discarded thereafter regardless of a virtual network to which an apparatus that transmits the packet belongs. Thus, congestion control by the conventional relaying apparatus does not take difference in virtual networks into consideration.

SUMMARY

According to an aspect of an embodiment, a relaying apparatus receives a packet from an apparatus belonging to a predetermined virtual network and relays the packet to another apparatus. The relaying apparatus includes a plurality of queues each provided in association with a combination of a priority indicative of an order of precedence for packet relaying and a VLAN number for identifying a virtual network, a queue-number storage unit that stores a queue number for identifying each of the queues in association with the combination of the priority and the VLAN number, an accumulated-amount storage unit that stores, in association with each priority, a total packet accumulated amount indicative of a sum of packets accumulated in the queues associated with the priority, a threshold storage unit that stores a threshold of the total packet accumulated amount in association with each queue number, a storage-destination-queue determining unit that determines, when a packet is received, that the packet is to be stored in a queue indicated by a queue number stored in the queue-number storage unit in association with a combination of the VLAN number and the priority set for the packet, and a congestion controlling unit that discards the packet based on a total packet accumulated amount stored in the accumulated-amount storage unit in association with a priority set for the packet and a threshold stored in the threshold storage unit in association with a queue number indicative of the queue determined by the storage-destination-queue determining unit, which is a storage-destination queue.

According to another aspect of an embodiment, a relaying apparatus receives a packet from an apparatus belonging to a predetermined virtual network and relays the packet to another apparatus. The relaying apparatus includes a plurality of queues each provided in association with a combination of a priority indicative of an order of precedence for packet relaying and a VLAN number for identifying a virtual network, a queue-number storage unit that stores a queue number for identifying each of the queues in association with the combination of the priority and the VLAN number, an accumulated-amount storage unit that stores, in association with each queue number, a total packet accumulated amount accumulated in a queue indicated by the queue number, a threshold storage unit that stores a threshold of the total packet accumulated amount in association with each queue number, a storage-destination-queue determining unit that determines, when a packet is received, that the packet is to be stored in a queue indicated by a queue number stored in the queue-number storage unit in association with a combination of the VLAN number and the priority set for the packet, and a congestion controlling unit that discards the packet based on a total packet accumulated amount stored in the accumulated-amount storage unit in association with a queue number indicative of the queue determined by the storage-destination-queue determining unit, which is a storage-destination queue, and the threshold stored in the threshold storage unit in association with a queue number indicative of the storage-destination queue.

According to still another aspect of an embodiment, a relaying method is for relaying a packet received from an apparatus belonging to a predetermined virtual network to another apparatus. The relaying method includes storing in a queue-number storage unit, a queue number for identifying each of queues each provided in association with a combination of a priority indicative of an order of precedence for packet relaying and a VLAN number for identifying a virtual network, in association with the combination of the priority and the VLAN number, storing in an accumulated-amount storage unit, in association with each priority, a total packet accumulated amount indicative of a sum of packets accumulated in the queues associated with the priority, storing in a threshold storage unit, a threshold of the total packet accumulated amount in association with each queue number, determining, when a packet is received, that the packet is to be stored in a queue indicated by a queue number stored in the queue-number storage unit in association with a combination of the VLAN number and the priority set for the packet, and discarding the packet based on a total packet accumulated amount stored in the accumulated-amount storage unit in association with a priority set for the packet and a threshold stored in the threshold storage unit in association with a queue number indicative of the queue determined in the determining, which is a storage-destination queue.

According to still another aspect of the present invention, a relaying method is for relaying a packet received from an apparatus belonging to a predetermined virtual network to another apparatus. The relaying method includes storing in a queue-number storage unit, a queue number for identifying each of queues each provided in association with a combination of a priority indicative of an order of precedence for packet relaying and a VLAN number for identifying a virtual network, in association with the combination of the priority and the VLAN number, storing in an accumulated-amount storage unit, in association with each queue number, a total packet accumulated amount accumulated in a queue indicated by the queue number, storing in a threshold storage unit, a threshold of the total packet accumulated amount in association with each queue number, determining, when a packet is received, that the packet is to be stored in a queue indicated by a queue number stored in the queue-number storage unit in association with a combination of the VLAN number and the priority set for the packet, and discarding the packet based on a total packet accumulated amount stored in the accumulated-amount storage unit in association with a queue number indicative of the queue determined in the determining, which is a storage-destination queue, and the threshold stored in the threshold storage unit in association with a queue number indicative of the storage-destination queue.

Additional objects and advantages of the invention (embodiment) will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The object and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the appended claims.

DESCRIPTION OF EMBODIMENTS

Embodiments of a relaying apparatus and packet relaying method according to the present invention are explained in detail below based on the drawings. In examples described below as the embodiments, the relaying apparatus and the packet relaying method are applied to a switch. Alternatively, the relaying apparatus and the packet relaying method can be applied to other relaying apparatuses, such as a router.

[a] First Embodiment

Firstly, a switch according to a first embodiment is schematically explained.FIG. 1depicts an overview of the switch according to the first embodiment. As depicted inFIG. 1, a switch10according to the first embodiment includes an accumulated-amount storage unit157, a threshold storage unit158, a queue group150-0, and others.

The accumulated-amount storage unit157stores a total size of packets accumulated in all queues of the queue group150-0, i.e., queues151-0,152-0, and so on, in association with a priority corresponding to the queue group150-0. For example, the accumulated-amount storage unit157stores the total size of packets (hereinafter, also referred to as “total packet accumulated amount”) accumulated in queues151-0to154-0in association with a priority “0”, and stores the total size of packets accumulated in queues151-1to154-1in association with a priority “1”. The threshold storage unit158stores, for each of the queues151-0and others, a threshold of the total packet accumulated amount.

The switch10has a queue group like the queue group150-0corresponding to each priority of the packet. Assuming that the priority range set for received packets is from “0” to “7”, eight queue groups150-0to150-7are arranged in the switch10ofFIG. 1. InFIG. 1, the queue group150-0corresponds to the priority “0”, whereas the queue group150-1corresponds to the priority “1”.

Each of the queue groups150-0to150-7has a plurality of queues. In the example ofFIG. 1, the queue group150-0has four queues151-0to154-0, whereas the queue group150-1has four queues151-1to154-1.

On receiving a packet, the switch10according to the first embodiment causes the packet to be stored in a predetermined storage unit (i.e., a stream memory16, which will be explained later). The switch10stores an instruction for relaying a packet stored in the stream memory16to another apparatus (hereinafter, “relay instruction”) in the queue151-0, for example. For simplicity of description ofFIG. 1, the received packet is assumed to be stored in the queue such as the queue151-0inFIG. 1.

On receiving a packet, the switch10of the above-described configuration determines a queue in which the received packet is to be stored based on a VLAN number, a priority set for the packet, and various information stored in a predetermined storage unit (i.e., a queue-number storage unit173, which will be explained later). The queue determined by the switch10as a storage destination of the packet is hereinafter referred to as a “storage-destination queue”.

The switch10then obtains from the accumulated-amount storage unit157a total packet accumulated amount stored in association with a priority set for the received packet. Further, the switch10obtains from the threshold storage unit158a threshold stored in association with the storage-destination queue of the received packet. The switch10then compares the obtained total packet accumulated amount and threshold with each other. When the total packet accumulated amount is smaller than the threshold, the switch10stores the received packet in the storage-destination queue, and adds the size of the stored packet to the total packet accumulated amount stored in the accumulated-amount storage unit157in association with the priority set for the packet. On the other hand, when the total packet accumulated amount is equal to or greater than the threshold, the switch10discards the received packet.

The above-described process by the switch10is explained by using the example depicted inFIG. 1. InFIG. 1, packets P11to P13have their VLAN number set as “A” and their priority set as “0”. Further, packets P21to P23have their VLAN number set as “B” and their priority set as “0”. Furthermore, the threshold for the queue151-0stored in the threshold storage unit158is “100” and the threshold for the queue152-0is “200”. Still further, each total packet accumulated amount in the accumulated-amount storage unit157before reception of the packet P11, for example, has a value smaller than the threshold stored in the threshold storage unit158. Still further, the switch10receives the packets P11, P12, P13, P21, P22, and then P23in this order.

Upon receiving the packet P11, the switch10stores the packet P11in the queue151-0in the queue group150-0corresponding to the priority “0”, and adds the size of the packet P11to the total packet accumulated amount for the priority “0” stored in the accumulated-amount storage unit157. Then, upon receiving the packet P12, the switch10stores the packet P12in the queue151-0, and adds the size of the packet P12to the total packet accumulated amount for the priority “0” stored in the accumulated-amount storage unit157.

At this time, it is assumed that the total packet accumulated amount for the priority “0” stored in the accumulated-amount storage unit157becomes “110”, exceeding the threshold “100” for the queue151-0stored in the threshold storage unit158. Then, upon receiving the packet P13thereafter, the switch10discards the packet P13.

Subsequently, when the switch10receives the packet P21, the total packet accumulated amount “110” for the priority “0” is not equal to or greater than the threshold “200” for the queue152-0, and therefore the switch10stores the packet P21in the queue152-0and updates the accumulated-amount storage unit157. Similarly, when the switch10receives the packets P22and P23, as long as the total packet accumulated amount “110” for the priority “0” is not equal to or greater than the threshold “200” for the queue152-0, the switch10stores the packets P22and P23in the queue152-0and updates the accumulated-amount storage unit157.

Further, in the example ofFIG. 1, packets P31to P33have their VLAN number set as “A” and their priority set as “1”. Packets P41to P43have their VLAN number set as “B” and their priority set as “1”. Furthermore, the threshold for the queue151-1stored in the threshold storage unit158is “200” and the threshold for the queue152-1is “300”. Still further, the switch10receives the packets P31, P32, P33, P41, P42, and then P43in this order.

Upon receiving the packet P31, the switch10stores the packet P31in the queue151-1, and adds the size of the packet P31to the total packet accumulated amount for the priority “1” stored in the accumulated-amount storage unit157. At this time, it is assumed that the total packet accumulated amount for the priority “1” stored in the accumulated-amount storage unit157becomes “210”, exceeding the threshold “200” for the queue151-1stored in the threshold storage unit158. Then, upon receiving the packet P32thereafter, the switch10discards the packet P32.

Here, assume that the total packet accumulated amount for the priority “1” stored in the accumulated-amount storage unit becomes “190” because the switch10transmits a packet accumulated in the queue151-1to another apparatus before receiving the packet P33. This means that the total packet accumulated amount for the priority “1” becomes smaller than the threshold “200” for the queue151-1. In this case, when the switch10receives the packet P33thereafter, the total packet accumulated amount “190” for the priority “1” is not equal to or greater than the threshold “200” for the queue151-1, and therefore the switch10stores the packet P33in the queue151-1and updates the accumulated-amount storage unit157.

Subsequently, the switch10receives the packets P41and P42, stores these packets P41and P42in the queue152-1, and updates the accumulated-amount storage unit157. At this time, it is assumed that the total packet accumulated amount for the priority “1” stored in the accumulated-amount storage unit157becomes “310” exceeding the threshold “300” for the queue152-1stored in the threshold storage unit158. Then, upon receiving the packet P43thereafter, the switch10discards the packet P43.

The switch10according to the first embodiment includes a plurality of queues each provided in association with a combination of priority and VLAN number, the accumulated-amount storage unit157that stores a total size of packets accumulated in queues associated with the same priority, and the threshold storage unit158that stores a threshold of the packet accumulated amount for each queue. When receiving a packet, the switch10determines whether to discard the packet based on the total packet accumulated amount stored in the accumulated-amount storage unit157in association with the priority set for the packet and the threshold stored in the threshold storage unit158in association with the storage-destination queue for the packet. Thus, congestion control can be performed for each virtual network.

In the above-described example, packets with different VLAN numbers are stored in different queues. Alternatively, packets with different VLAN numbers may be stored in the same queue. For example, the switch10may store packets having VLAN numbers “A” to “C” in the queue151-0and packets having VLAN numbers “D” to “F” in the queue151-1.

Then, several virtual networks can be handled as one virtual network group, and congestion control can be performed for each virtual network group. For example, when a plurality of virtual networks is employed for the same type of works, these virtual networks can be considered as one virtual network group for the purpose of congestion control. In addition, even when the network includes plural VLANs, the switch does not need to have queues as many as the number of VLANs, whereby the configuration of the switch10can be simplified.

Further, by putting plural virtual networks which distribute the packets at different time zones but have the same threshold of the packet accumulated amount into the same virtual network group, resources (queues) can be effectively used. Specifically, when a virtual network A and a virtual network B have the same threshold of the packet accumulated amount, and packets are distributed only in the morning in the virtual network A and packets are distributed only in the afternoon in the virtual network B, the virtual networks A and B can be put into one virtual network group. Then, a predetermined queue can be used in the morning for relaying a packet over the virtual network A and can be used in the afternoon for relaying a packet over the virtual network B. As a result, the period during which the queues are not used can be reduced. Thus, the resources (queues) can be effectively used. Packets with different VLAN numbers can be stored in the same queue by changing various information stored in the queue-number storage unit173which will be explained later.

Next, a network to which the switch10according to the first embodiment is applied is explained.FIG. 2is a drawing of an example of configuration of a network to which the switch10according to the first embodiment is applied. As depicted inFIG. 2, a network1includes server systems2A to2C, storage systems3A to3C, a switch group4including switches10A to10F, a network system5, and a routing system6. It is assumed that a plurality of virtual networks (VLANs) is formed in the network1.

The server systems2A to2C are information processing apparatuses, such as host computers, and are connected to any one or more of the switches10A to10F. The storage systems3A to3C are data input and output apparatuses, such as storage apparatuses, and are connected to any of the switches10A to10F. The network system5is an apparatus for maintenance and monitoring of the network1, and is connected to the switch10E. The routing system6is an apparatus for relaying data between the network1and other network, and is connected to the switch10F.

The switches10A to10F are relaying apparatuses for data relaying process, and are each connected to any one or more of the switches10A to10F other than itself and to any one or more of the server systems2A to2C, for example. In the network1in which virtual networks are formed, the switches10A to10F perform a relaying process by inserting or deleting a VLAN tag in or from a packet.

Note that the configuration of the network1depicted inFIG. 2is merely an example, and the configuration example of the network to which the switches10A to10F according to the first embodiment are applied is not restricted to the one depicted inFIG. 2. For example, in the network1ofFIG. 2, three server systems2A to2C, three storage systems3A to3C, six switches10A to10F, one network system5, and one routing system6are provided. However, each number of components is not restricted to this example.

Next, the configuration of the switch10according to the first embodiment is explained.FIG. 3is a block diagram of the configuration of the switch10according to the first embodiment. Note that the switch10depicted inFIG. 3corresponds to each of the switches10A to10F depicted inFIG. 2. As depicted inFIG. 3, the switch10includes reception ports11ato11c, transmission ports12ato12c, and a switch core13.

The reception ports11ato11care interfaces that receive a packet from a predetermined apparatus (for example, any of the server systems2A to2C or another switch). Each of the reception ports11ato11creceives a packet from an apparatus belonging to a predetermined virtual network. For example, the reception port11areceives a packet only from an apparatus belonging to any of virtual networks A to E, whereas the reception port11breceives a packet only from an apparatus belonging to any of virtual networks F to J.

The transmission ports12ato12care interfaces that transmit the packet received by the reception ports11ato11cto another apparatus. Each of the transmission ports12ato12ctransmits a packet to an apparatus belonging to a predetermined virtual network. For example, the transmission port12atransmits a packet only to an apparatus belonging to any of the virtual networks A to E, whereas the transmission port12btransmits a packet only to an apparatus belonging to any of the virtual networks F to J.

In the example depicted inFIG. 3, the switch10includes three reception ports11ato11cand three transmission ports12ato12c. Alternatively, the switch10may include two or less reception ports and transmission ports, or four or more reception ports and transmission ports.

The switch core13is a functional unit for relaying data, and includes a port module group14including reception port modules14ato14c, a port module group15including transmission port modules15ato15c, the stream memory16, a storage unit17, and a controlling unit18.

The reception port modules14ato14care provided for the reception ports11ato11c, respectively, and, when a packet is input from the corresponding one of the reception ports11ato11c, write the packet in the stream memory16and output header information of the packet to the controlling unit18. The “header information” herein represents, for example, Destination Address (DA: Destination Media Access Control (MAC) address) and Source Address (SA: transmission-source MAC address), VLAN number, and priority.

In the example ofFIG. 3, the reception port module14acorresponds to the reception port11a, the reception port module14bcorresponds to the reception port11b, and the reception port module14ccorresponds to the reception port11c. Therefore, the reception port module14aperforms the process explained above on the packet received by the reception port11a.

The transmission port modules15ato15care provided for the transmission ports12ato12c, respectively, and output a packet stored in the stream memory16for output to the transmission ports12ato12c. Specifically, the transmission port modules15ato15ceach have a plurality of queues for storing a relay instruction and, according to such a relay instruction, transmit a packet stored in the stream memory16to another apparatus via the transmission ports12ato12c. The configuration of the transmission port modules15ato15cwill be explained in detail further below.

In the example ofFIG. 3, the transmission port module15acorresponds to the transmission port12a, the transmission port module15bcorresponds to the transmission port12b, and the transmission port module15ccorresponds to the transmission port12c. Therefore, the transmission port module15aoutputs a packet to the transmission port12a.

The stream memory16is a storage device, such as a memory, storing a packet written by any of the reception port modules14ato14c. The stream memory16has a storage area divided into logical blocks of a predetermined size to store data in units of logical block. For example, when the packet size is equal to or smaller than the size of one logical block, the stream memory16stores such a packet in one logical block. On the other hand, when the packet size is greater than the size of one logical block, the stream memory16stores such a packet as being divided into a plurality of logical blocks.

The storage unit17is a storage device, such as a memory, and includes a tag memory171, a route storage unit172, and the queue-number storage unit173. The tag memory171stores various information for managing the logical blocks of the stream memory16.

Specifically, the tag memory171stores logical block numbers for identifying the logical blocks. Also, the tag memory171stores information indicative of a relationship among the logical blocks (hereinafter, “link information”). Here, examples of the link information stored in the tag memory171are explained. For example, assume that one packet P101is stored as being divided into three logical blocks R1to R3. In this case, the tag memory171stores link information indicating that the packet P101is stored in the logical blocks R1to R3. Also, for example, assume that one data is divided into nine packets P201to P209and these packets P201to P209are stored in a plurality of logical blocks R11to R30. In this case, the tag memory171stores link information indicating that the packets P201to P209are stored in the logical blocks R11to R30.

The route storage unit172stores, in association with the DA set for the packet, a number for identifying an output-destination transmission port for the packet (hereinafter, numbers for identifying the reception ports11ato11cand the transmission ports12ato12care referred to as “port numbers”). An example of the route storage unit172is depicted inFIG. 4. As depicted inFIG. 4, the route storage unit172has items, such as MAC address and port number. The MAC address indicates a DA set for the packet. The port number indicates a port number of the corresponding output destination of the transmission ports12ato12cfor the packet with its DA set with the corresponding MAC address. In the following, the reference numerals “11a” to “11c” provided to the reception ports11ato11cand “12a” to “12c” provided to the transmission ports12ato12cdepicted inFIG. 3are taken as port numbers.

The first row of the route storage unit172depicted inFIG. 4indicates that a packet with its DA set with “00:01:02:03:04:05” is output to the transmission port12aindicated by the port number “12a”. The second row of the route storage unit172depicted inFIG. 4indicates that a packet with its DA set with “00:01:02:03:04:06” is output to the transmission port12bindicated by the port number “12b”.

The queue-number storage unit173stores, for each priority in association with a VLAN number, a queue number (hereinafter, “Queue ID (QID)”) for identifying a queue in which a relay instruction is to be stored. An example of the queue-number storage unit173is depicted inFIG. 5. As depicted inFIG. 5, the queue-number storage unit173has items, such as VLAN number, priority, member port number, QID, and specified threshold.

The VLAN number indicates a number for identifying a virtual network. The member port number indicates a port number of any of the reception ports11ato11cthat receives a packet distributed over the virtual network indicated by the VLAN number and any of the transmission ports12ato12cthat transmits a packet over the virtual network indicated by the VLAN number. QID indicates a QID of the storage-destination queue of a relay instruction generated based on the packet set with the corresponding VLAN number and priority. The specified threshold indicates a threshold of the packet size that can be received by the switch10. A specific threshold is stored in the threshold storage unit158, which will be explained further below.

That is, the first to eighth rows of the queue-number storage unit173depicted inFIG. 5indicates that the reception port11ais a port that receives a packet distributed over the virtual network indicated by a VLAN number “1” and that the transmission port12aor12bis a port that transmits the distributed packet. Further, the first row of the queue-number storage unit173depicted inFIG. 5indicates that a relay instruction with the VLAN number “1” and the priority “0” is stored in a queue indicated by a QID “0”.

The controlling unit18is a controlling unit for controlling the entire switch core13, and includes a link-information obtaining unit181, a route determining unit182, a storage-destination-queue determining unit183, and a packet discarding unit184. The link-information obtaining unit181is a processing unit that, when header information is input from the port module group14, obtains from the tag memory171link information of a packet having this header information, and then outputs the obtained link information to the storage-destination-queue determining unit183.

The route determining unit182is a processing unit that determines a transmission port to which the received packet is to be transmitted, based on various information stored in the route storage unit172. Specifically, when header information is input from the port module group14, the route determining unit182obtains from the route storage unit172a port number stored in association with the DA set for the header information. Then, the route determining unit182determines that the packet having this header information is to be output to any one of the transmission ports12ato12cthat is indicated by the obtained port number.

For example, when the route storage unit172is in a state depicted inFIG. 4and header information Hi having the DA set with “00:01:02:03:04:05” is input to the route determining unit182from the port module group14, the route determining unit182obtains the port number “12a” from the route storage unit172. The route determining unit182then determines that the packet having the header information H1is to be output to the transmission port12aindicated by the obtained port number “12a”.

The storage-destination-queue determining unit183is a processing unit that generates a relay instruction based on various information stored in the queue-number storage unit173and determines a storage-destination queue for the generated relay instruction.

Specifically, when header information is input from the port module group14, the storage-destination-queue determining unit183obtains from the queue-number storage unit173a QID and a specified threshold stored in association with a combination of the VLAN number and the priority set for this header information. The queue indicated by the obtained QID is the storage-destination queue for the packet having this header information.

Subsequently, the storage-destination-queue determining unit183generates a relay instruction including, for example, the input header information, a logical block number(s) indicating a logical block(s) on the stream memory16where the packet having this header information is stored, the QID and the specified threshold obtained from the queue-number storage unit173, and the link information input from the link-information obtaining unit181. Here, the storage-destination-queue determining unit183may include the packet size in the relay instruction. Subsequently, the storage-destination-queue determining unit183outputs the generated relay instruction to any of the transmission port modules15ato15ccorresponding to any of the transmission ports12ato12cdetermined by the route determining unit182.

For example, when the route storage unit172is in a state depicted inFIG. 4and the queue-number storage unit173is in a state depicted inFIG. 5, and header information H2set with a DA “00:01:02:03:04:06”, a VLAN number “2”, and a priority “7” is input to the controlling unit18from the port module group14, the route determining unit182determines that the packet having the header information H2is to be transmitted to the transmission port12b. Subsequently, the storage-destination-queue determining unit183obtains a QID “3” and a specified threshold “TH7” stored in the queue-number storage unit173in association with a combination of the VLAN number “2” and the priority “7”. Subsequently, the storage-destination-queue determining unit183generates a relay instruction including the QID “3” and the specified threshold “TH7”. Subsequently, the storage-destination-queue determining unit183outputs the generated relay instruction to the transmission port module15bcorresponding to the transmission port12bdetermined by the route determining unit182.

The packet discarding unit184is a processing unit that, when information indicating that the relay instruction has been discarded (hereinafter, “discard information”) is input from a congestion controlling unit159, which will be explained further below, discards from the stream memory16a packet stored in the logical block indicated by the logical block number included in the relay instruction. A discard-information output process by the congestion controlling unit159will be explained in detail further below.

An example of a technique of discarding a packet stored in the stream memory16is explained. For example, the packet discarding unit184causes any of the reception port modules14ato14cto read a discard-target packet from the stream memory16. When the stored information is read from the stream memory16, the information is deleted. Therefore, the packet is discarded by being read by any of the reception port modules14ato14c.

Next, the configuration of the transmission port modules15ato15cdepicted inFIG. 3is explained.FIG. 6is a block diagram of the configuration of one of the transmission port modules15ato15cdepicted inFIG. 3. Since the transmission port modules15ato15chave the same configuration, only the configuration of the transmission port module15ais explained.

As depicted inFIG. 6, the transmission port module15aincludes the queue groups150-0to150-7, a priority control transmission scheduler156, the accumulated-amount storage unit157, the threshold storage unit158, and the congestion controlling unit159.

The queue group150-0includes the queues151-0to154-0and a round-robin control scheduler (hereinafter, “DRR scheduler”)155-0. The queues151-0to154-0are storage areas in which a relay instruction with a priority “0” is stored by the congestion controlling unit159, which will be explained further below.

The DRR scheduler155-0is a processing unit that takes out a relay instruction from any of the queues151-0to154-0through a DRR technique. The DRR scheduler155-0may take out a relay instruction through a round robin technique with the same weighting ratio or a Weighted Round Robin (WRR) technique. Further, the DRR scheduler155-0may take out a relay instruction through a round robin technique disclosed in Japanese Patent Application Laid-open No. 2004-242335 applied by the applicant of the present application.

Similarly, the queue group150-7includes queues151-7to154-7in which a relay instruction with a priority “7” is stored by the congestion controlling unit159and a DRR scheduler155-7. Although not depicted inFIG. 6, the transmission port module15aalso includes queue groups150-1to150-6in which relay instructions with priorities “1” to “6” are stored, respectively. The configuration of these queue groups150-1to150-6is similar to the configuration of the queue groups150-0and150-7.

In the example depicted inFIG. 6, each of the queue groups150-0to150-7includes four queues (in the example of the queue group150-0, the queues151-0to154-0). Alternatively, each of the queue groups150-0to150-7may include three or less queues or five or more queues.

In the following, it is assumed that QIDs of each queue included in the queue group150-0, for example, are “0”, “1”, “2”, and “3” from the top. Specifically, it is assumed that the QID of the queue151-0is “0”, the QID of the queue152-0is “1”, the QID of the queue153-0is “2”, and the QID of the queue154-0is “3”. Similarly, it is assumed that the QID of the queue151-7is “0”, the QID of the queue152-7is “1”, the QID of the queue153-7is “2”, and the QID of the queue154-7is “3”.

The priority control transmission scheduler156processes the relay instructions taken out by the DRR schedulers155-0to155-7in the descending order of priority according to the respective relay instructions. Specifically, the priority control transmission scheduler156reads from the stream memory16a packet stored in a logical block indicated by the logical block number included in the relay instruction for output to the transmission port12a. Further, when link information is included in the relay instruction, the priority control transmission scheduler156reads from the stream memory16a packet stored in a logical block indicated by the logical block number included in the link information for output to the transmission port12a. The priority control transmission scheduler156performs a similar packet output process according to the relay instruction in the descending order of priority.

In this manner, the DRR schedulers155-0to155-7take out a relay instruction from each queue through the DRR technique, thereby allowing bandwidth control for each virtual network. Also, the priority control transmission scheduler156transmits packets in the descending order of priority to other apparatuses according to the relay instructions, thereby allowing priority control in consideration of each priority of every received packet.

The accumulated-amount storage unit157stores a total size of packets indicated by the relay instructions stored in a plurality of queues provided for each priority. An example of the accumulated-amount storage unit157is depicted inFIG. 7. As depicted inFIG. 7, the accumulated-amount storage unit157includes items, such as priority and total packet accumulated amount. The priority indicates a priority in association with queue. The total packet accumulated amount indicates a total size of packets indicated by the relay instructions stored in the queues provided in association with each corresponding priority.

That is, the first row of the accumulated-amount storage unit157depicted inFIG. 7indicates that the total size of packets indicated by the relay instructions stored in the queues151-0to154-0provided in association with the priority “0” is “100 bytes”. The eighth row of the accumulated-amount storage unit157indicates that the total size of packets indicated by the relay instructions stored in the queues151-7to154-7provided in association with the priority “7” is “140 bytes”.

The threshold storage unit158stores a specific threshold in association with a specified threshold. An example of the threshold storage unit158is depicted inFIG. 8. As depicted inFIG. 8, the threshold storage unit158includes items, such as specified threshold and threshold. The specified threshold corresponds to the specified threshold included in the queue-number storage unit173depicted inFIG. 5. The threshold indicates a threshold of the total packet accumulated amount.

That is, the first row of the threshold storage unit158depicted inFIG. 8indicates that the threshold of a specified threshold “TH0” is “300 bytes”, whereas the eighth row of the threshold storage unit158depicted inFIG. 8indicates that the threshold of a specified threshold “TH7” is “3000 bytes”.

The congestion controlling unit159is a processing unit that performs control to determine, when a relay instruction is input from the storage-destination-queue determining unit183, whether to discard the relay instruction or store it in a predetermined queue. Specifically, the congestion controlling unit159obtains a total packet accumulated amount stored in the accumulated-amount storage unit157in association with the priority included in the relay instruction input from the storage-destination-queue determining unit183. Subsequently, the congestion controlling unit159obtains a threshold stored in the threshold storage unit158in association with the specified threshold included in the relay instruction. Then, the congestion controlling unit159compares the total packet accumulated amount obtained from the accumulated-amount storage unit157and the threshold obtained from the threshold storage unit158with each other.

When the total packet accumulated amount is smaller than the threshold, the congestion controlling unit159stores the relay instruction in a queue indicated by the QID included in the relay instruction from among the queues provided in association with the priority included in the relay instruction. On the other hand, when the total packet accumulated amount is equal to or greater than the threshold, the congestion controlling unit159discards the relay instruction, and outputs discard information to the packet discarding unit184.

Next, a packet relaying procedure performed by the switch10according to the first embodiment is explained.FIG. 9is a flowchart of the packet relaying procedure performed by the switch10according to the first embodiment. As depicted inFIG. 9, when any of the reception ports11ato11cof the switch10receives a packet (Yes at Step S101), one of the reception ports11ato11coutputs header information of the packet to the controlling unit18, and writes the packet in the stream memory16(Step S102).

The route determining unit182of the controlling unit18accepting the header information determines a transmission port to which the packet is to be transmitted, based on the header information and various information stored in the route storage unit172(Step S103)

Subsequently, the storage-destination-queue determining unit183obtains a QID and a specified threshold stored in the queue-number storage unit173in association with a combination of the VLAN number and the priority set for the input header information. The storage-destination-queue determining unit183then determines, from among the plurality of queues provided in association with the priority set for the header information, that a relay instruction is to be stored in a queue indicated by the QID obtained from the queue-number storage unit173(Step S104).

Subsequently, the storage-destination-queue determining unit183generates a relay instruction including, for example, the input header information, a logical block number indicating a logical block in which the packet having the header information is stored, the QID and the specified threshold obtained from the queue-number storage unit173, and link information input from the link-information obtaining unit181(Step S105). Subsequently, the storage-destination-queue determining unit183outputs the generated relay instruction to one of the transmission port modules15ato15cthat corresponds to any of the transmission ports12ato12cdetermined by the route determining unit182.

The congestion controlling unit159of any of the transmission port modules15ato15cthat receives the input of the relay instruction from the storage-destination-queue determining unit183obtains a total packet accumulated amount stored in the accumulated-amount storage unit157in association with the priority included in the input relay instruction, and also obtains a threshold stored in the threshold storage unit158in association with the specified threshold included in the relay instruction. Subsequently, the congestion controlling unit159compares the total packet accumulated amount obtained from the accumulated-amount storage unit157and the threshold obtained from the threshold storage unit158with each other (Step S106).

When the total packet accumulated amount is greater than the threshold (No at Step S107), the congestion controlling unit159discards the relay instruction, and outputs discard information to the packet discarding unit184. The packet discarding unit184accepting the discard information discards from the stream memory16the packet indicated by the logical block number included in the relay instruction (Step S108).

On the other hand, when the total packet accumulated amount is equal to or smaller than the threshold (Yes at Step S107), the congestion controlling unit159adds the size of the packet indicated by the relay instruction to the total packet accumulated amount stored in the accumulated-amount storage unit157in association with the priority included in the relay instruction (Step S109). Subsequently, among the plurality of queues provided corresponding to the priority included in the relay instruction, the congestion controlling unit159stores the relay instruction in a queue indicated by the QID included in the relay instruction (Step S110).

Subsequently, one of the DRR schedulers155-0to155-7of the transmission port modules15ato15ctakes out relay instructions from the queues through the DRR technique (Step S111). Specifically, the DRR scheduler155-0takes out a relay instruction from any of the queues151-0to154-0through the DRR technique, whereas the DRR scheduler155-7takes out a relay instruction from any of the queues151-7to154-7through the DRR technique.

Subsequently, the priority control transmission scheduler156reads packets from the stream memory16according to the relay instructions in the descending order of priority from among the relay instructions taken out by the DRR schedulers155-0to155-7, and then outputs these packets to any of the transmission ports12ato12c(Step S112). Specifically, the priority control transmission scheduler156reads from the stream memory16a packet stored in the logical block indicated by the logical block number included in each relay instruction, and then outputs the packet to any of the transmission ports12ato12c.Also, when a relay instruction includes link information, the priority control transmission scheduler156reads from the stream memory16a packet stored in the logical block indicated by the logical block number included in the link information, and then outputs the packet to any of the transmission ports12ato12c.

After the packets are transmitted by the priority control transmission scheduler156to the transmission ports12ato12c, the congestion controlling unit159subtracts the size of the output packets from the total packet accumulated amount stored in the accumulated-amount storage unit157in association with the priority of each output packet (Step S113).

As has been explained above, the switch10according to the first embodiment includes for each of the transmission port modules15ato15c, a plurality of queues each provided in association with a combination of a priority and a VLAN number, and also includes the accumulated-amount storage unit157that stores a total size of packets accumulated in queues associated with the same priority and the threshold storage unit158that stores a threshold of the packet accumulated amount for each queue. When receiving a packet, the switch10determines whether to discard the packet based on the total packet accumulated amount stored in the accumulated-amount storage unit157in association with the priority set for the packet and the threshold stored in the threshold storage unit158in association with the storage-destination queue for the packet. With this, congestion control can be performed for each virtual network.

Also, in the switch10according to the first embodiment, packets even with different VLAN numbers can be stored in the same queue. Therefore, several virtual networks can be handled as one virtual network group, thereby allowing congestion control for each virtual network group.

[b] Second Embodiment

In the first embodiment, an example is explained in which the queue-number storage unit173stores a member port number, QID, and specified threshold for each priority. Alternatively, the member port number, QID, and specified threshold may be stored in different storage units in a distributed manner. Thus, in a second embodiment, an example is explained in which the member port number, QID, and specified threshold are stored in storage units in a distributed manner.

First, the configuration of a switch20according to a second embodiment is explained.FIG. 10is a block diagram of the configuration of the switch20according to the second embodiment. In the following, components having functions similar to those of the components depicted inFIG. 3are provided with the same reference numerals, and are not explained herein in detail.

As depicted inFIG. 10, the switch20includes a switch core23, which newly includes a storage unit27in place of the storage unit17included in the switch core13depicted inFIG. 3. In comparison with the storage unit17depicted inFIG. 3, the storage unit27newly includes a queue-number storage unit273and a VLAN storage unit274in place of the queue-number storage unit173.

An example of the queue-number storage unit273is depicted inFIG. 11. As depicted inFIG. 11, the queue-number storage unit273includes items, such as VLAN umber, priority, QID, and specified threshold. An example of the VLAN storage unit274is depicted inFIG. 12. As depicted inFIG. 12, the VLAN storage unit274includes items, such as VLAN number and member port number.

As has been explained above, in the switch20according to the second embodiment, the queue-number storage unit273stores the QID and the specified threshold that can take different values depending on the priority, whilst the VLAN storage unit274stores the member port number not varied depending on the priority. With this, congestion control can be performed for each virtual network. Furthermore, the configuration of each storage unit can be simplified.

Meanwhile, in the first and second embodiments, an example is explained in which the threshold corresponding to the specified threshold stored in the queue-number storage unit173or273is obtained from the threshold storage unit158for congestion control. Alternatively, such a specified threshold may not be provided. Also, in the first and second embodiments, an example is explained in which the total packet accumulated amount is stored in the accumulated-amount storage unit157in units of queue group. Alternatively, the packet accumulated amount may be stored for each queue. Thus, in a third embodiment, an example is explained in which the queue-number storage unit does not include a specified threshold and the accumulated-amount storage unit stores a packet accumulated amount for each queue.

First, the configuration of a switch30according to the third embodiment is explained.FIG. 13is a block diagram of the configuration of the switch30according to the third embodiment. As depicted inFIG. 13, the switch30includes a switch core33, which newly includes a port module group35, a storage unit37, and a controlling unit38in place of the port module group15, the storage unit17, and the controlling unit18included in the switch core13depicted inFIG. 3.

The port module group35includes transmission port modules35ato35ccorresponding to the transmission ports12ato12c. The configuration of the transmission port modules35ato35cwill be explained further below in detail.

In comparison with the storage unit17depicted inFIG. 3, the storage unit37newly includes a queue-number storage unit373in place of the queue-number storage unit173. An example of the queue-number storage unit373is depicted inFIG. 14. As depicted inFIG. 14, the queue-number storage unit373does not include a specified threshold, in comparison with the queue-number storage unit173depicted inFIG. 5.

In comparison with the controlling unit18depicted inFIG. 3, the controlling unit38newly includes a storage-destination-queue determining unit383in place of the storage-destination-queue determining unit183. The storage-destination-queue determining unit383is a processing unit that generates a relay instruction not including a specified threshold and outputs the generated relay instruction to any of the transmission port modules35ato35c.

Specifically, when header information is input from the port module group14, the storage-destination-queue determining unit383obtains from the queue-number storage unit373a QID corresponding to a combination of the VLAN number and the priority set for this header information. Subsequently, the storage-destination-queue determining unit383generates a relay instruction including, for example, the input header information, a logical block number(s) indicating a logical block(s) where the packet having this header information is stored, the QID obtained from the queue-number storage unit373, and the link information. Subsequently, the storage-destination-queue determining unit383outputs the generated relay instruction to any one of the transmission port modules35ato35ccorresponding to any of the transmission ports12ato12cdetermined by the route determining unit182.

Next, the configuration of the transmission port modules35ato35cdepicted inFIG. 13is explained.FIG. 15is a block diagram of the configuration of one of the transmission port modules35ato35cdepicted inFIG. 13. Since the transmission port modules35ato35chave the same configuration, only the configuration of the transmission port module35ais explained. Also, in the following, components having functions similar to those of the components depicted inFIG. 6are provided with the same reference numerals, and are not explained herein in detail.

As depicted inFIG. 15, the transmission port module35aincludes queue groups150-0to150-7, the priority control transmission scheduler156, an accumulated-amount storage unit357, a threshold storage unit358, and a congestion controlling unit359.

An example of the accumulated-amount storage unit357is depicted inFIG. 16. As depicted inFIG. 16, the accumulated-amount storage unit357stores a packet accumulated amount for each QID in association with the priority. That is, the first row of the accumulated-amount storage unit357depicted inFIG. 16indicates that, from among queues included in the queue group150-0corresponding to a priority “0”, a packet of “50 bytes” is accumulated in the queue151-0indicated by a QID “0”, a packet of “100 bytes” is accumulated in the queue152-0indicated by a QID “1”, a packet of “50 bytes” is accumulated in the queue153-0indicated by a QID “2”, and a packet of “50 bytes” is accumulated in the queue154-0indicated by a QID “3”.

Also, the eighth row of the accumulated-amount storage unit357depicted inFIG. 16indicates that, from among queues included in the queue group150-7corresponding to a priority “7”, a packet of “300 bytes” is accumulated in the queue151-7indicated by a QID “0”, a packet of “500 bytes” is accumulated in the queue152-7indicated by a QID “1”, a packet of “250 bytes” is accumulated in the queue153-7indicated by a QID “2”, and a packet of “250 bytes” is accumulated in the queue154-7indicated by a QID “3”.

An example of the threshold storage unit358is depicted inFIG. 17. As depicted inFIG. 17, the threshold storage unit358stores a threshold for each QID in association with the priority. That is, the first row of the threshold storage unit358depicted in theFIG. 17indicates that, from among queues included in the queue group150-0corresponding to a priority “0”, the threshold of the queue151-0indicated by the a QID “0” is “300 bytes”, the threshold of the queue152-0indicated by the a QID “1” is “200 bytes”, the threshold of the queue153-0indicated by the a QID “2” is “500 bytes”, and the threshold of the queue154-0indicated by the a QID “3” is “1000 bytes”.

Here, it is assumed in the configuration of the accumulated-amount storage unit357depicted inFIG. 16and the configuration of the threshold storage unit358depicted inFIG. 17that QIDs of the queues included in the queue groups150-0and others are assigned “0”, “1”, “2”, and then “3” from the top. However, a unique QID can be assigned to every queue. In this case, the accumulated-amount storage unit357stores a packet accumulated amount in association with the QID, and the threshold storage unit358stores a threshold in association of the QID.

When a relay instruction is input from the storage-destination-queue determining unit383, the congestion controlling unit359obtains a packet accumulated amount stored in the accumulated-amount storage unit357in association with a combination of the priority and the QID included in the input relay instruction. Subsequently, the congestion controlling unit359obtains a threshold stored in the threshold storage unit358in association with a combination of the priority and the QID included in the input relay instruction. Subsequently, the congestion controlling unit359compares the packet accumulated amount obtained from the accumulated-amount storage unit357and the threshold obtained from the threshold storage unit358with each other.

When the packet accumulated amount is smaller than the threshold, the congestion controlling unit359stores the relay instruction in a queue indicated by the QID included in the relay instruction from among the queues provided in association with the priority included in the relay instruction. On the other hand, when the packet accumulated amount is equal to or greater than the threshold, the congestion controlling unit359discards the relay instruction, and outputs discard information to the packet discarding unit184.

As has been explained above, the switch30according to the third embodiment stores a packet accumulated amount and a threshold in association with a combination of the priority and the QID. Thus, congestion control can be performed for each virtual network. Also, the packet accumulated amount stored in each queue and the threshold set for each queue can be easily checked.

In the first to third embodiments, an example is explained in which the storage-destination-queue determining unit183, for example, stores a relay instruction in a queue, and the transmission port module15a, for example, takes out the relay instruction from the queue, and then a packet relaying process is performed according to the relay instruction. Such a packet relaying technique is merely an example, and a packet relaying process may be performed through another technique. For example, as explained by usingFIG. 1, the switches10,20, and30may store packets themselves in each queue for packet relaying.

The process procedure, the control procedure, specific names, and information including various data and parameters can be arbitrarily changed unless otherwise specified. Furthermore, each component depicted is conceptual in function, and is not necessarily physically configured as depicted. That is, the specific patterns of distribution and unification of the components are not meant to be restricted to those depicted in the drawings. All or part of the components can be functionally or physically distributed or unified in arbitrary units according to various loads and the state of use. Still further, all or arbitrary part of the process functions performed in each component can be achieved by a Central Processing Unit (CPU) and a program analyzed and executed on that CPU, or can be achieved as hardware with a wired logic.

Regarding the embodiments including the first to third embodiments, the following notes are further disclosed.

Note that other embodiments can be effectively achieved by applying the components, representations, and an arbitrary combination of the components of the relaying apparatus disclosed herein to a method, an apparatus, a system, a computer program, a recording medium, a data structure, and others.

According to the embodiments, an effect can be achieved such that congestion control can be performed for each virtual network.