Abstract:
A multicast packet forwarding apparatus and method that can combine an internal processor of a multicast packet processor into a forwarding unit and a packet duplicator in order to minimize delay in the processing time of a forwarder and a packet transmitter. In the apparatus, a packet receiver is adapted to receive unicast and multicast packets. A forwarding unit has a unicast forwarder for forwarding a unicast packet to a destination when the packet receiver receives the unicast packet, and a multicast forwarder for multicasting a multicast packet to respective output interfaces when the packet receiver receives the multicast packet. A packet duplicator is adapted to convert the multicast packet output from the multicast forwarder into a several unicast packets. A packet dispatcher is adapted to reintroduce the unicast packets converted by the packet duplicator to the forwarding unit again. A scheduler serves to port-schedule packets output via the forwarding unit and duplicated packets according to a scheduling policy.

Description:
CLAIM OF PRIORITY  
       [0001]     This application makes reference to and claims all benefits accruing under 35 U.S.C. §119 from an application for MULTICAST PACKET PROCESSING APPARATUS AND METHOD earlier filed in the Korean Intellectual Property Office on 31 Jan. 2005 and there duly assigned Serial No.  2005-8783.    
       BACKGROUND OF THE INVENTION  
       [0002]     1. Field of the Invention  
         [0003]     The present invention relates to a multicast packet processing apparatus and a method of processing where both multicast packet forwarding and packet duplication can be achieved by the same forwarding apparatus leading to a simplified process as well as an enhanced processing rate.  
         [0004]     2. Description of the Related Art  
         [0005]     Internet transmission involves transmitters and receivers, each of which can be classified into unicast, multicast and broadcast transmission devices. Unicast transmission involves a single transmitter that transmits data to a single receiver. Unicast transmission has been adopted by all common Internet application programs. Broadcast transmission involves a single transmitter that transmits data to all receivers in the same sub-network. Multicast transmission is where one transmitter transmits data to at least one receiver. Multicast transmission is often used for Internet video conferencing.  
         [0006]     When a transmitter attempts to transmit the same data to a plurality of receivers for group-communication according to unicast transmission, the transmitter must repeatedly transmit the same data packet subject to each of a plurality of receivers. Such repeated transmission of the same packet deteriorates network efficiency. The seriousness of the problem of deteriorated network efficiency is in proportion to the number of receivers. When multicast transmission is supported, a transmitter has to duplicate data to ensure that the same message is transmitted to several receivers at one time. Such multicopy transmission of data tends to waste network resources.  
         [0007]     Router equipment is classified into data plane, control plane and management plane based on their function. Each function is installed and operated in a network processor and in a host processor. When data plane operates in the network processor, a packet is forwarded to the host processor, requiring more complicated processing than either a packet forwarding function or a simple forwarding function. When either control plane or management plane operates in the host processor, a routing table is constructed via routing protocol message processing with management by an operator.  
         [0008]     Regarding earlier techniques of multicast packet processing in a network processor, all Output InterFace (OIF) lists generally share new packet descriptors that are as numerous as the number of OIF lists. The packet descriptors are obtained by looking up information of a multicast forwarding table by using the source address and the group address of a received multicast packet, and a packet buffer corresponding thereto. As a result, processing is very complicated, especially when there are exceptional changes to the payload of the packet. Also, additional processing is needed during tunneling when a packet transmitter encapsulates/decapsulates IPv4 header information. This additional processing, in addition to being complicated, also affects the performance of the packet transmitter. Therefore, when processing an exceptional situation, such as when quality of service (QoS) and tunneling are carried out, other functions in the process pipeline may be affected, leading to many problems in general forwarding performance. Therefore, what is needed is an improved design of a forwarding unit in a router that can handle all of the above functions without being too complicated and without sacrificing general forwarding performance.  
       SUMMARY OF THE INVENTION  
       [0009]     It is therefore an object of the present invention to provide an improved multicast packet forwarding apparatus.  
         [0010]     It is also an object of the present invention to provide an improved multicast packet processing method.  
         [0011]     It is still an object of the present invention to provide a packet forwarding apparatus that can forward both multicast packets as well as duplicate packets.  
         [0012]     It is further an object of the present invention to provide a forwarding apparatus that can provide for tunneling.  
         [0013]     It is yet an object an object of the present invention to provide a forwarding apparatus for QoS.  
         [0014]     It is still an object of the present invention to provide multicast packet forwarding apparatus and method that can serve as both a forwarding unit and as a packet duplicator in an internal processor of a multicast packet processor in order to minimize delay in the processing time of a forwarder and of a packet transmitter.  
         [0015]     These and other objects can be achieved by a multicast packet processing apparatus in a router, the apparatus including a packet receiver adapted to receive both unicast and multicast packets, a forwarding unit that includes a unicast forwarder and a multicast forwarder, the unicast forwarder being adapted to forward a unicast packet to a destination upon receipt of the unicast packet by the packet receiver, the multicast forwarder being adapted to multicast a multicast packet to respective output interfaces upon receipt of the multicast packet by the packet receiver, a packet duplicator adapted to convert the multicast packet output from the multicast forwarder into a plurality of unicast packets, a packet dispatcher adapted to reintroduce the plurality of unicast packets converted by the packet duplicator back into the forwarding unit, and a scheduler adapted to port-schedule packets output from the forwarding unit and packets output from the packet duplicator according to a scheduling policy.  
         [0016]     According to another aspect of the present inventions is a multicast packet processing method of a router, the method including providing a router, determining whether or not a received packet is a unicast packet or a multicast packet, transmitting the received packet to a corresponding destination when the received packet is determined to be a unicast packet, converting the received packet into a plurality of unicast packets when the received packet is determined to be a multicast packet, and reintroducing the plurality of unicast packets produced during the converting back into the router when the received packet is a multicast packet.  
         [0017]     According to yet another aspect of the present invention, there is provided a multicast packet processing method in a router, the method including providing a router, determining whether or not a received packet is a unicast packet or a multicast packet, transmitting the received packet to a corresponding destination when the received packet is determined to be a unicast packet, converting the received packet into a plurality of unicast packets when the received packet is determined to be a multicast packet, reintroducing the plurality of unicast packets produced during the converting back into the router when the received packet is a multicast packet  
         [0018]     The present invention pertains to a technology that duplicates a multicast packet and forwards the duplicated packets to their destinations. In describing the present invention, emphasis will be made on the network processor where the packet duplication is carried out. 
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0019]     A more complete appreciation of the invention, and many of the attendant advantages thereof, will be readily apparent as the same becomes better understood by reference to the following detailed description when considered in conjunction with the accompanying drawings in which like reference symbols indicate the same or similar components, wherein:  
         [0020]      FIG. 1  is a view of a block diagram illustrating a multicast packet forwarding apparatus according to a first embodiment of the invention;  
         [0021]      FIG. 2  is a view of a block diagram illustrating a multicast packet forwarding apparatus according to a second embodiment of the invention; and  
         [0022]      FIG. 3  is a view of a multicast packet lookup table in use for the realization of the present invention. 
     
    
     DETAILED DESCRIPTION OF THE INVENTION  
       [0023]     Turning now to the figures,  FIG. 1  is a view of a block diagram illustrating a multicast packet forwarding apparatus  100  for forwarding IPv6 multicast packets according to a first embodiment of the present invention. In  FIG. 1 , the reference symbol‘⊚’ stands for a queue. The queue ‘ 502 ’ will not be further described in the specification since it operates in a common fashion.  
         [0024]     As illustrated in  FIG. 1 , the network forwarding apparatus  100  includes a packet receiver  110 , a packet forwarding unit  120 , a scheduler  130 , a packet duplicator and dispatcher  140  and a packet transmitter  150 . The packet forwarding unit  120  is adapted to transmit received packets to a unicast forwarder or a multicast forwarder according to the received packet type. The scheduler  130  is adapted to perform port-scheduling in queues ‘⊚’ and to perform de-queuing of the packets. Queues ‘ 502 ’ are provided in output ports for storing packets output via the forwarding unit  120  according to a scheduling policy. The packet duplicator and dispatcher  140  is adapted to duplicate output packets from the multicast forwarder of the forwarding unit  120  and to distribute and transmit the duplicated packets back again into the queues of the forwarding unit  120  that are adapted to receive these recycled packets. The packet transmitter  150  is adapted to acquire routing information with reference to a multicast layer  2  table  160 , and to transmit packets to acquired destination addresses.  
         [0025]     The forwarding unit  120  can receive the packets from the packet receiver  110  as well as the packet duplicator and dispatcher  140  via the respective queues. The respective queues perform de-queuing generally in a round robin fashion. According to the existence of enqueued packets managed in each queue, an occurrence of an empty queue causes the empty queue to be skipped and a packet is then de-queued from another queue that is not empty instead.  
         [0026]     The forwarding unit  120  serves to receive input packets from both the packet receiver  110  and the packet duplicator and dispatcher  140 . According to a setting of a QoS Enable/Disable flag of a packet, the forwarding unit  120  performs Ingress QoS operations at Ingress QoS  121  or bypasses Ingress QoS  121 . Also, depending on whether a received IPv6 packet is unicast or multicast, the forwarding unit  120  forwards a packet to IPv6 unicast forwarder  127  or to IPv6 multicast forwarder  128 . If instead the received packet is an IPv4 unicast packet, forwarding unit  120  forwards the received packet to IPv4 unicast forwarder  122 .  
         [0027]     In an IPv6-IPv4-IPv6 type network, a tunneling process must be present to support communication between two IPv6 terminal equipments via the IPv4 network. A configured tunneling function is provided in order to configure tunneling parameters by an operator for the purpose of establishing a tunnel with respect to individual networks. It is required, at a starting point of the configured tunnel, to perform encapsulation at tunnel encapsulator  124  by attaching an IPv4 header to an IPv6 packet by referring to a tunnel information table  125 . It is also required, at an end point of the configured tunnel, to perform decapsulation at tunnel decapsulator  123  by removing the IPv4 header from the IPv6 packet after having passed through the tunnel so that the IPv6 packet is recovered.  
         [0028]     When an input packet is an IPv6 unicast packet, the IPv6 unicast forwarder  127  consults a lookup table (not illustrated) to determine whether or not the input packet is being tunneled. If the input packet is being tunneled, the IPv6 unicast forwarder  127  forwards the input packet to tunnel encapsulator  124  so that an IPv4 header can be attached to the input packet.  
         [0029]     When a received multicast packet is to be tunneled and when a portion of a multicast Output Interface (OIF) of a Multicast Forwarding Cache Entry (MFCE) table  129  is set as a configured tunnel, the IPv6 multicast forwarder  128  forwards the packet corresponding to an OIF entry set as the configured tunnel to configured tunnel encapsulator  124  in order to perform IPv4 header encapsulation. In the meantime, before a packet can be forwarded to the scheduler  130  upon completion of packet processing, egress processing is performed by Egress QoS  126  when QoS flag of the packet is enabled. When the QoS flag is disabled, Egress QoS  126  is bypassed.  
         [0030]     Now the operation of the present invention will be described. Ingress QoS  121  performs ingress QoS processing on an original multicast packet received from the packet receiver  110  depending on whether QoS flag for the packet is enabled or disabled (i.e., whether or not a receiving port supports QoS). In order to support IPv6 multicast QoS, data such as source address and group address are to be registered according to QoS level regulations. Then, the packet is to bypass the IPv6 unicast forwarder  127  in order to prevent repeated validation of the IP header and to process a Protocol Independent Multicast (PIM) register packet.  
         [0031]     In general, the PIM register packet is a message, which is encapsulated and sent to a rendezvous point. When the packet is a PIM register packet, a PIM type is marked  1 , and the original multicast packet is forwarded to the rendezvous point to a data area that follows a PIM header.  
         [0032]     According to this invention, since the PIM register packet is a unicast packet, the IPv6 unicast forwarder first determines whether or not the packet is a register packet. Then, since the packet is related to multicasting, the packet is forwarded to the IPv6 multicast forwarder  128  so that subsequent processing can be performed. Accordingly, if the packet is determined to be a PIM register packet or an IPv6 multicast packet, the IPv6 unicast forwarder  127  forwards the packet to the IPv6 multicast forwarder  128 . The multicast forwarder  128  then performs following functions:  
         [0033]     Decapsulation for PIM register packets  
         [0034]     Multicast Forwarding Cache Entry (MFCE) table  129  Lookup according to Source Address &amp; Group Address; and  
         [0035]     RPF (Reverse Path Forwarding) Validation according to Incoming Interface data stored in an MFCE  
         [0036]     After the above process is normally performed, OIF and Exception are inspected to determine whether or not packet duplication is necessary. Only when packet duplication is necessary (i.e., when the sum of Exception and OIF is 2 or more), an OIF list is forwarded to the packet duplicator and dispatcher  140 .  
         [0037]     Packet duplication is performed only if the sum of Exception and OIF is 2 or more because of following reasons. When a router acts as a source-dedicated router, there are frequent situations where a PIM register packet is encapsulated and multicast-forwarded at the same time. In this scenario, since PIM register encapsulation is performed by a higher application, the PIM register packet is treated as an Exception packet and forwarded to a higher layer. Then, general forwarding is performed with respect to remaining OIF areas.  
         [0038]     If packet duplication is not necessary (i.e., the sum of Exception and OIF is 1), packet data is forwarded to tunneling encapsulator  124  for tunneling or to Egress QoS  128  and processed if the QoS Enable/Disable flag on the packet is set to enable and then to an output port type passing through the packet duplicator and dispatcher  140  so that next process can be performed.  
         [0039]     When a packet is sent to packet duplicator and dispatcher  140 , the multicast packet duplicator and dispatcher  140  generates new Child Packet Descriptors corresponding to the number of OIFs according to OIF list data received from the IPv6 multicast forwarder  128 , and duplicates some data such as packet size and offset from a Parent Packet Descriptor containing original multicast data, which is received from the packet receiver  110 .  
         [0040]     Reference count is kept in the Parent Packet Descriptor to manage the number of the child packet descriptors, which are initially set corresponding to the OIF number by the packet duplicator and dispatcher  140 . The Parent Packet Descriptor stores data such as storage position of a received original multicast packet, its size information and the total number of duplicated packets in a Reference Count field.  
         [0041]     Each of the Child Packet Descriptors store output port information corresponding to each output port in the OIF list and next process information determined by QoS Enable/Disable flag and interface type. That is, in case of a general OIF, index information of a multicast layer  2  table  160  is stored. If OIF is set as a tunnel, indices of a tunnel information table  125  are stored, in which IPv4 header information to be encapsulated is stored in the tunnel information table  125 . An additional flag is established to identify a duplicated multicast packet so that the next process can be performed efficiently.  
         [0042]     Whenever a packet is duplicated, each Child Packet Descriptor duplicates and stores storage position and size information of the original multicast packet from the Parent Packet Descriptor along with a pointer pointing to the Parent Packet Descriptor and so on. Whenever the duplicated packet is transmitted, the Child Packet Descriptors are set free, and the Reference Counter of the Parent Packet Descriptor is reduced by 1. When the Reference Counter of the Parent Packet Descriptor becomes  0  (i.e., all of duplicated packets are transmitted), the Parent Packet Descriptor is also set free and thus can be used again.  
         [0043]     In the meantime, the packet duplicator and dispatcher  140  duplicates only packet information in a Parent Packet Descriptor whenever generating a Child Packet Descriptor, but does not duplicate the payload stored in a parent packet buffer. Instead, the Child Packet Descriptor can maintain a pointer pointing to the Parent Descriptor allowing for access to the packet information and the payload stored in the parent packet buffer. Also the Child Packet Descriptor itself has a one-to-one matching child packet buffer where an IPv4 header for encapsulation is stored in case of tunneling. This is to remove any change in parent packet buffer information shared by a plurality of OIFs.  
         [0044]     In addition, the packet duplicator and dispatcher  140  determines whether a duplicated multicast packet will be reintroduced back into forwarding unit  120  or be directly transmitted according to QoS Enable/Disable flag and interface types corresponding to the individual OIFs. Only when the QoS flag is set to enable or when interface types are of a configured tunnel are they reintroduced into the forwarding unit  120  so that tunnel encapsulation can then take place or so egress QoS processing can then take place.  
         [0045]     Since additional processing at the forwarding unit  120  is unnecessary when the QoS flag of the packet is Disabled and when the packet has a common interface type, such a packet is then forwarded to the scheduler  130 , and then the packet is forwarded to the packet transmitter  150  according to an order of scheduling.  
         [0046]     In particular, in order to minimize delay deviation and ensure a packet distribution procedure, the packet duplicator and dispatcher  140  generates new descriptors while constantly maintaining OIF list orders on an MFCE table  129 , and then reintroduces the descriptors back into the forwarding unit  120 .  
         [0047]     When a multicast packet is re-injected and unicasted at the packet duplicator and dispatcher  140 , packet descriptor type marked by the packet duplicator and dispatcher  140  is inspected. Then, the multicast packet is forwarded to the IPv6 multicast forwarder  128  without being processed at Ingress QoS  121 . The IPv6 multicast forwarder  128  recognizes that the received packet is a duplication recycled by the packet duplicator and dispatcher  140 , and then prepares the packet for subsequent QoS Egress processing.  
         [0048]     If an output port is a configured tunnel interface, the packet is forwarded to the configured tunnel encapsulator  124 . Upon receiving the packet, the configured tunnel encapsulator  124  performs IPv4 Encapsulation by using tunnel table ID  1  stored in the Child Descriptor by the packet duplicator and dispatcher  140 , without having to perform any lookup process. Then, according to whether Egress QoS flag is Enabled or Disabled, the packet is forwarded to the packet transmitter  150  by the scheduler  130  via Egress QoS  126  like a unicast packet.  
         [0049]     If the output port is not a configured tunnel, the IPv6 multicast forwarder  128  determines QoS Enable or Disable, and the packet is forwarded to the packet transmitter  150  via Egress QoS  126  like the unicast packet.  
         [0050]     Upon having transmitted the duplicated multicast packet, the packet transmitter  150  sets the Child Packet Descriptor free so that it can be reused, resulting in the reference count stored in the Parent Packet Descriptor being decremented by one. When the reference counter of the Parent Packet Descriptor becomes 0 (i.e., when, there are no Child Packet Descriptors remaining), the Parent Packet Descriptor is also set free.  
         [0051]     Turning now to  FIG. 2 ,  FIG. 2  is a view of a block diagram illustrating a multicast packet forwarding apparatus  200  according to a second embodiment of the invention. The multicast packet forwarding apparatus  200  illustrated in  FIG. 2  is substantially the same as the multicast packet forwarding apparatus  100  of  FIG. 1  except that an IPv4 packet is forwarded to an IPv4 multicast forwarder  128 ′ with the possibility that MFCE table  129 ′ is accessed. Therefore, the apparatus  200  in  FIG. 2  will not be further described.  
         [0052]     Turning now to  FIG. 3 ,  FIG. 3  is a view of a multicast packet lookup table in use for the realization of the present invention. Referring to  FIG. 3 , in initial establishment of MFCE and MTU information of each output port, interface type information (e.g., configured tunnel or normal interface), Enable/Disable information of Egress QoS and L 2  (Layer  2 ) header information to be encapsulated are previously constructed, and then L 2  table ID for multicast is stored in order to reduce overhead that accesses additional data structures for multicast packet processing.  
         [0053]     Even when a corresponding output port is of a configured tunnel, the present invention acquires previously-configured tunneling information in advance and stores tunnel table ID storing IP header information subject to encapsulation in MFCE, so that IPv4 header encapsulation can be performed rapidly by a configured tunnel encapsulator without having to pass through an additional lookup in the event of later encapsulation to a duplicated multicast packet reintroduced from the packet duplicator.  
         [0054]     In addition, IPv6 multicast QoS function can be supported for a multicast packet, which is duplicated by the packet duplicator and thus already converted into unicast packets, without particularly modifying previous unicast QoS. That is, merely adding packet classification entry for IPv6 multicast packet enables multicast QoS support.  
         [0055]     According to the present invention as described hereinbefore, the packet multicast transmission function, which has been performed by a conventional packet transmitter in case of multicast processing, is distributed to the multicast forwarder and the multicast packet duplicator in order to remove processing pipeline break or blocking of the forwarding unit or the packet transmitter owing to exceptional processing of the multicast packet as well as to minimize delay and jitter, thus enhancing multicast forwarding performance. Furthermore, this invention enables a multicast packet to be duplicated as many times as the output OIFs and converted into unicast packets before entering the forwarding unit while the order of an OIF list is maintained, thus more effectively supporting multicast QoS or configured tunnel of each output port.  
         [0056]     While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, 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 following claims.