The invention is directed to processing data packets in a data communication network, particularly to processing Virtual Private LAN Service (VPLS) packets requiring unicast or multicast forwarding.
Virtual Private Local Area Network (LAN) Service (VPLS) is a Virtual Private Network (VPN) technology that provides multipoint communication over Ethernet networks and is described in Internet Engineering Task Force (IETF) RFC 4761 and RFC 4762. When an Ethernet packet is received in network ingress direction, normally it contains network Layer 2 and Layer 3 encapsulations. Examples of network Layer 2 encapsulation are Ethernet, Multi-Link Point to Point Protocol (MLPPP) and Point to Point Protocol (PPP). Examples of network Layer 3 encapsulation are Multi-Protocol Label Switching (MPLS) protocol and Internet Protocol (IP) Generic Routing Encapsulation (GRE) protocol. A network Layer 3 header provides traffic management characteristics for a given packet. After network Layer 2 and Layer 3 headers are removed, the remaining packet is an Ethernet frame. A destination Media Access Control (MAC) address of the Ethernet frame is then looked up in a forwarding database. If there is no match for a unicast packet or if the packet has a multicast or a broadcast destination address then this packet needs to be duplicated to flood every endpoint configured in the VPLS service. A packet that needs to be duplicated must follow different traffic management rules than a packet with a known unicast destination MAC address. Traffic management rules typically include rate limiting parameters, scheduling priority and parameters, and congestion profiles.
The aforementioned operations involved in processing VPLS packets may in some cases consume considerable resources of a network processor in a switch or router that is communicating VPLS packet traffic. Therefore, a way of efficiently using network processor resources to process VPLS traffic is desired.
According to an aspect of the invention a method of processing a Virtual Private LAN Service (VPLS) packet is provided. The method comprises: performing at a first module the steps of: parsing a Layer 2 (L2) header and a Layer 3 (L3) header from the VPLS packet to obtain an Ethernet frame, retrieving traffic management (TM) characteristics based on the L3 header, and forwarding the Ethernet frame and the TM characteristics to a second module; and at the second module performing the steps of: determining a type (Known unicast, Unknown unicast, Broadcast, Multicast) of the Ethernet frame, and processing the Ethernet frame in accordance with the TM characteristics based on the type of the Ethernet frame.
In some embodiments the method further comprises: determining if the Ethernet frame is of a first type requiring unicast forwarding or of a second type requiring multicast forwarding; retrieving a unicast queue identifier and a multicast queue identifier; retrieving a unicast congestion profile and a multicast congestion profile; assigning, responsive to the Ethernet frame being of the first type, the unicast queue identifier and the unicast congestion profile to the Ethernet frame; and assigning, responsive to the Ethernet frame being of the second type, the multicast queue identifier and the multicast congestion profile to the Ethernet frame.
According to another aspect of the invention a device for processing a Virtual Private LAN Service (VPLS) packet is provided. The device comprises: a Layer 2/Layer 3 (L2/L3) parsing module operable to receive the VPLS packet and parse an L2 header and an L3 header from the VPLS packet to obtain an Ethernet frame and to forward the Ethernet frame; and a VPLS parsing module operable to receive the Ethernet frame and to determine if the Ethernet frame requires unicast of multicast forwarding, wherein the L2/L3 parsing module is further operable to retrieve a set of traffic management (TM) characteristics based on the L3 header and to provide the set of TM characteristics to the VPLS parsing module, and wherein the VPLS parsing module is further operable to select a queue of a plurality of queues based on the set of TM characteristics and whether unicast or multicast forwarding of the Ethernet frame is required.
In some embodiments the VPLS parsing module is further operable to apply a first congestion profile in accordance with the set of TM characteristics and a determination that unicast forwarding of the Ethernet frame is required, and to apply a second congestion profile in accordance with the set of TM characteristics and a determination that multicast forwarding of the Ethernet frame is required.
The foregoing and other objects, features and advantages of the invention will be apparent from the following more particular description of the preferred embodiments, as illustrated in the appended drawings, where:
In the figures like features are denoted by like reference characters.
Advantageously, due to modularization, program code sharing among different sub-modules 18, 20, 22, 24 can be exploited resulting in optimized use of code space. Moreover, parsing of the VPLS packet is done once, by the L2/L3 parsing module 12; thereby making efficient use of network processor resources. Portability of the implementation, e.g. to other types of network processors or FPGA, is high due to modularization of the implementation.
A traffic management policy is created on a network Layer 2/Layer 3 interface which in turn dictates how received unicast packets having a known destination address (referred to herein as known unicast packets) and packets needing duplication (e.g. unknown unicast, broadcast, or multicast) are to be treated in the router or switch. After the VPLS packet is received only the Layer 2 and Layer 3 headers are parsed to retrieve the set of TM characteristics. The set of TM characteristics (e.g. TM1) includes two different queue IDs identifying which queue to use for this packet and two different congestion profiles describing how to treat the packet under congestion. Both queue IDs and congestion profiles are retrieved because the L2/L3 parsing module 12 does not know if the VPLS packet received is a known unicast packet or a packet needing duplication. The L2/L3 parsing module 12 then removes Layer2 and Layer3 headers and forwards the Ethernet frame 30 to VPLS parsing module 14 along with both queue identifiers and congestion profiles.
The VPLS parsing module 14 parses the received Ethernet frame 30 and identifies the Ethernet frame 30 as being either known unicast or a packet needing duplication by performing a lookup in a forwarding database based on a destination address included in the Ethernet frame 30. The VPLS parsing module 14 then assigns a queue identifier and a congestion profile to the Ethernet frame 30 according to the frame type of the Ethernet frame 30. The assigned queue identifier and congestion profile are each one of those received from the L2/L3 parsing module 12 with the Ethernet frame 30. In this manner unique traffic management behavior is provided based on the frame type used. In the case that the Ethernet frame 30 requires unicast forwarding the VPLS parsing module 14 forwards the Ethernet frame 30 to a given unicast queue of a plurality of unicast queues 32, the unicast queue being identified by the assigned queue identifier, and the Ethernet frame 30 is unicasted from the switch or router along with other unicast packets. In the case that the Ethernet frame 30 requires multicast forwarding, the VPLS parsing module 14 forwards the Ethernet frame 30 to a given multicast queue of a plurality of multicast queues 34, the multicast queue being identified by the assigned queue identifier, and the Ethernet frame 30 is multicasted from the switch or router along with other multicast packets.
Advantageously, this invention uses a modular approach to assign unique TM characteristic based on the frame type. This approach allows extensive code reuse and also avoids reparsing the VPLS packet in each module; thereby providing good VPLS packet processing performance and efficient use of network processor resources.
Advantageously, some embodiments enable reuse of the VPLS parsing module 14 by simply connecting different type of Layer2/Layer3 parsing modules to VPLS parsing module 14 which makes the VPLS parsing module 14 portable. This portability helps to shorten development time required for designing new VPLS processing devices that support new Layer 2 interfaces.
Numerous modifications, variations and adaptations may be made to the embodiments of the invention described above without departing from the scope of the invention, which is defined in the claims.
Embodiments of the device 10 would typically be implemented in a network processor including the L2/L3 parsing module 12, the VPLS parsing module 14, and the unicast 32 and multicast queues 34. The data store of TM characteristics 16 may be included in the device 10 or may be external to it. Likewise, in some embodiments the unicast queues 32 and additionally or alternatively the multicast queues 34 could be external to the device 10. In fact, even the L2/L3 parsing module 12 and the VPLS parsing module 14 could be implemented in separate devices. Embodiments are not limited to network processors, as microprocessors, field programmable gate arrays (FPGAs), and application specific integrated circuits (ASICs), taken individually or in any combination, could be used.