1. Field of the Invention
The present invention relates generally to data routing, and more particularly, to measuring traffic in a communications network.
2. Description of Related Art
Service providers desire the ability to measure network traffic transmitted through network routers, including layer 2 (L2) headers, framing information, and padding information, on a per-customer basis. In many routers, a layer 3 (L3) forwarding subsystem performs the per-customer accounting functions. In these routers, however, a receive line card typically strips incoming packets of the L2 overhead before the packets are transmitted to the L3 forwarding subsystem. Therefore, the L3 forwarding subsystem is not able to consider the L2 overhead when performing the per-customer accounting.
Similarly, when a packet is to be transmitted from a router, the L3 forwarding subsystem generally performs the per-customer accounting. The L3 forwarding subsystem then passes the packet to the line card where the L2 overhead information is added. In such a system, the L3 forwarding subsystem does not consider the L2 overhead information when performing per-customer accounting.
It is, therefore, desirable to improve per-customer accounting in a network device.
Systems and methods consistent with the principles of the invention address this and other needs by accounting for L2 overhead when performing per-customer accounting.
One aspect consistent with principles of the invention is directed to a method that measures traffic in a device. The method includes tracking the amount of data and the number of data units and predicting the amount of padding associated with the data units. The method also includes determining the amount of traffic in the device based on the predicted padding, the amount of data, and the number of data units.
A second aspect consistent with principles of the invention is directed to a network device that includes a first processing unit and a second processing unit. The first processing unit processes data to form data units, predicts an amount of padding to be added to the data units, and calculates an amount of traffic in the network device based on the predicted amount of padding. The second processing unit adds the predicted amount of padding to the data units.
A third aspect consistent with principles of the invention is directed to a method for predicting padding in a network device. The method includes detecting a size of a data unit, receiving a minimum size parameter, and predicting an amount of padding associated with the data unit based on the size of the data unit and the minimum size parameter.
A fourth aspect consistent with principles of the invention is directed to a system that includes a first memory that stores a minimum size parameter, a second memory, having a group of entries, where each entry stores a pad count, and at least one computation unit. The computation unit connects to the first memory and the second memory and is configured to receive a data unit size value, predict an amount of padding associated with the data unit based on the data unit size value and the minimum size parameter, and store the amount of padding in one of the entries of the second memory.
A fifth aspect of the invention is directed to system that includes a first memory that stores at least one minimum size parameter, a second memory, having at least one entry that stores a pad count, and a group of computation units. The computation units connect to the first memory and the second memory and are associated with at least two different communication protocols. Each computation unit receives a data unit size value, and predicts an amount of padding associated with the data unit based on the data unit size value and the one minimum size parameter.
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate an embodiment of the invention and, together with the description, explain the invention. In the drawings,
The following detailed description of the invention refers to the accompanying drawings. The same reference numbers in different drawings may identify the same or similar elements. Also, the following detailed description does not limit the invention. Instead, the scope of the invention is defined by the appended claims and equivalents.
As described herein, a system improves per-customer accounting in a network device. In one implementation consistent with principles of the invention, an L3 forwarding subsystem predicts the L2 overhead that will be added to packets prior to transmission and the L3 overhead stripped from packets upon receipt. The L3 forwarding subsystem may then account for this overhead when performing per-customer accounting.
Router 100 may include a routing engine (RE) 110 and multiple packet forwarding engines (PFEs) 120 interconnected via a switch fabric 130. Switch fabric 130 may include one or more switching planes to facilitate communication between two or more of PFEs 120. In an implementation consistent with the principles of the invention, each of the switching planes includes a three-stage switch of crossbar elements.
RE 110 performs high level management functions for router 100. For example, RE 110 communicates with other networks and systems connected to router 100 to exchange information regarding network topology. RE 110 creates routing tables based on network topology information, creates forwarding tables based on the routing tables, and sends the forwarding tables to PFEs 120. PFEs 120 use the forwarding tables to perform route lookups for incoming packets. RE 110 also performs other general control and monitoring functions for router 100.
Each of PFEs 120 connects to RE 110 and switch fabric 130. PFEs 120 receive packets on physical links connected to a network, such as a wide area network (WAN). Each physical link could be one of many types of transport media, such as optical fiber or Ethernet cable. The packets on the physical link are formatted according to one of several protocols, such as the synchronous optical network (SONET) standard or Ethernet.
Packet processor 220 connects to switch fabric 130. Packet processor 220 may process packets received from switch fabric 130 and prepare packets for transmission to switch fabric 130. For packets received from switch fabric 130, packet processor 220 may store data in memory 230. For packets to be transmitted to switch fabric 130, packet processor 220 may read data from memory 230.
As illustrated, packet processor 210 may include an L3 processor 310 and an L2 processor 320. Packet processor 210 may include additional devices (not shown) that aid packet processor 210 in receiving, transmitting, or processing data.
L3 processor 310 reads data from memory 230 and forms one or more packets therefrom. L3 processor 310 may create an L3 packet header from the information read from memory 230 and add the L3 header to the packets.
L2 processor 320 receives packets from L3 processor 310 and adds L2 headers and padding, if necessary, to the packets. L2 processor 320 may create the L2 packet header from the information read from memory 230. L2 processor 320 may add padding to the packet to bring the length of the packet up to a minimum value required by the particular communication protocol being implemented by router 100. For example, the Ethernet protocol may require that each packet be a minimum of 64 bytes. L2 processor 320 may pad a packet to ensure that the packet satisfies this minimum requirement.
L3 processor 310 may include a traffic measuring unit 315 that measures the amount of traffic transmitted to and received from the WAN. To properly measure the traffic being transmitted to the WAN, traffic measuring unit 315 predicts the size of the L2 header and the amount of padding to be added by L2 processor 320. To measure the traffic received from the WAN, traffic measuring unit 315 estimates what the size of the L2 header was and the amount of padding stripped from the packets by L2 processor 320.
Global register 410 stores a parameter representing the minimum size of L3 packets. This parameter may be determined based on the minimum size of L2 packets and the known size of the L2 header. For example, if the minimum size of the L2 packets is 64 bytes and the L2 header is 12 bytes, then the L3 minimum size parameter would be set to 52 bytes.
Computation unit 420 receives information regarding the size of a packet (e.g., in bytes) and the minimum L3 size parameter from global register 410 and determines the adjusted pad amount to be added to the packet based thereon. Computation unit 420 may receive the packet size value from another device, such as a counter, in router 100 or may determine the packet size itself using well-known techniques.
Adder 510 adds the minimum L3 size parameter to the inverse of the packet size to produce a value representing the raw pad amount. The raw pad amount is the amount of padding (e.g., in bytes) that will be added to the packet by L2 processor 320 to bring the packet to the minimum size required by the particular protocol used by router 100. Adder 510 provides the raw pad amount to multiplexer 520. Adder 510 also provides a select signal to multiplexer 520 that represents whether the addition of the minimum L3 size parameter and the inverted packet size results in a negative or positive value.
Multiplexer 520 outputs the raw pad amount when the addition of the minimum L3 size parameter and the inverted packet size results in a positive value and outputs a “0” when a negative value results.
Returning to
Pad counter array 430 receives a trigger that indicates when an end of a packet has been detected, control information, and the pad amount from computation unit 420. The control information may include an address or index value that identifies a counter in the counter array that corresponds to the particular stream by which the packet is to be transmitted by router 100. In response to receiving the trigger, pad counter array 430 fetches the counter value in the counter identified by the control information, adds the pad amount, and writes back the result to the counter.
Byte counter array 440 includes a group of counters that tracks the number of bytes to be transmitted or that have been received. Each counter in array 440 may correspond to a counter in pad counter array 430. Byte counter array 440 receives the trigger, the control information, and the packet size. In response to receiving the trigger, byte counter array 440 fetches the counter value in the counter identified by the control information, adds the packet size, and writes back the result to the counter.
Packet counter array 450 includes a group of counters that tracks the number of packets transmitted or received by router 100. Each counter in array 450 may correspond to a counter in pad counter array 430. Packet counter array 450 receives the trigger and the control information. In response to receiving the trigger, packet counter array 450 fetches the counter value in the counter identified by the control information, adds one to the counter value, and writes back the result to the counter.
Traffic processor 460 receives counter values from pad counter array 430, byte counter array 440, and packet counter array 450 and determines the total amount of traffic based thereon. Traffic processor 460 may determine the total amount of traffic for a particular set of counters as follows:
Total Traffic=(fixed L2 header size×packet counter)+byte counter+pad counter.
Once traffic processor 460 has determined the amount of traffic (i.e., the total L2 bytes) for a particular set of counters, traffic processor 460 may reset that particular set of counters. Traffic processor 460 may determine the amount of traffic automatically (e.g., at predetermined periods of time) or in response to an input by a user. The traffic amounts may be stored for later analysis and/or customer billing.
It will be appreciated that, as an alternative to the above, pad counter array 430 could be incorporated into byte counter array 440. In such an implementation, each counter in the byte/pad counter array would track both the number of bytes and the pad amount.
L3 minimum size array 610 may include a group of entries corresponding, for example, to the different packet streams by which router 100 transmits and receives packets. The minimum size of L3 packets may vary from stream to stream. For example, assume that the minimum L2 packet size is 64 bytes. If the Ethernet L2 header is 12 bytes for packets transmitted in a first stream, then the minimum L3 packet size for that stream would be 52 bytes. Assume that VLAN data is included in the L2 header for packets transmitted via a second stream and that this VLAN data is 4 bytes. The minimum L3 packet size for packets transmitted in this second stream would then be 48 bytes.
L3 minimum size array 610 receives the control information and transmits the L3 minimum size parameter from the appropriate entry to computation unit 420. Computation unit 420 may then determine the padding for a particular packet based on the received L3 minimum size parameter.
Traffic measuring unit 315 may monitor and measure traffic as packets are transmitted from or received by router 100. To do so, traffic measuring unit 315 may predict the amount of padding that will be added to or stripped from the packets by L2 processor 320 [act 720]. As described above, L2 processor 320 may add padding to packets in order to bring the size of the packet up to a minimum size required by the particular protocol implemented by router 100. L2 processor 320 may also strip the L2 overhead from packets received from the network.
To predict the amount of padding added to or stripped from packets, traffic measuring unit 315 may subtract the packet size from a minimum L3 size parameter. The L3 size minimum parameter may be determined based on the size of the L2 header. For example, if the L2 header is 12 bytes and the minimum packet size is 64 bytes, then the L3 minimum size parameter would be 52 bytes. In those situations where the L2 header includes additional control information, such as a VLAN tag, the L3 minimum size parameter may be varied to take this control information into account. For example, if a 4-byte VLAN tag is to be or was included, the L3 minimum size parameter would be 48 bytes.
The difference between the L3 minimum size parameter and the packet size represents the amount of padding that will be added to the packet prior to transmission or the amount of padding that was stripped from the packet when it was received. In those situations where the L3 minimum size parameter is equal to or less than the packet size, traffic measuring unit 315 determines that no padding will be added.
The amount of padding needed in an ATM environment may be predicted in a similar manner. In an ATM environment, packets may be broken up into cells of 48 bytes each. If a packet's size is 100 bytes, then the packet may be broken down into three cells, two cells having 48 bytes of data and the third cell having 4 bytes. To bring the third cell up to the minimum 48 byte size requirement, 44 bytes of padding may be added. Traffic measuring unit 315 may predict the padding in an ATM environment as follows:
Amount of Padding=cell size−[(L3 packet size+AAL5 header size)mod cell size], where AAL5 represents the ATM Adaptation Layer 5 header and “mod” refers to the modulo operation. In the event that the sum of the packet size and AAL5 header size is equal to the cell size, traffic measuring unit 315 may determine that no padding will be added. It is possible to avoid the above computation and store the accumulation of
(L3 packet size+AAL5 header size)mod cell size=last cell penetration.
The total padding count can then be determined by:
((cell size−1)×packet count)−Σ last cell penetration.
Traffic measuring unit 315 may store the predicted amount of padding in memory. In one embodiment, traffic measuring unit 315 tracks the amount of padding to be added to packets (or cells) based on, for example, the priority of the packets or the particular stream by which the packets will be transmitted. Traffic measuring unit 315 may also track the number of bytes and the number of packets to be transmitted from router 100. Traffic measuring unit 315 determines the amount of traffic, including L2 headers, framing, and padding, being transmitted over any period of time as follows:
Total Traffic=(fixed L2 header size×packet counter)+byte counter+pad counter.
Once traffic measuring unit 315 has determined the amount of traffic for any period of time, traffic measuring unit 315 may clear the corresponding entries in memory. Traffic measuring unit 315 may determine the amount of traffic automatically (e.g., at predetermined periods of time) or in response to an input by a user. The traffic amounts may be stored for later analysis and/or customer billing.
Computation units 810-830 may predict the amount of padding associated with packets based on the communication protocol by which the packets will be processed. Computation unit 810, for example, predicts padding for cells transmitted/received in an ATM environment and computation 820 predicts padding for packets transmitted/received in an Ethernet environment. Computation unit 800 may include other computation units 830 dedicated to predicting padding for other communication protocols. Other computation units 830 may also include other ATM or Ethernet computation units that allow for parallel processing or redundant operations.
Multiplexer 840 receives the padding amounts from computation units 810-830 and outputs one of the padding amounts based on a computation unit selection signal. The computation unit selection signal may be received from another device in router 100 based on an identification of the type of protocol by which data is to be processed.
The foregoing description of preferred embodiments of the present invention provides illustration and description, but is not intended to be exhaustive or to limit the invention to the precise form disclosed. Modifications and variations are possible in light of the above teachings or may be acquired from practice of the invention. For example, although embodiments consistent with the principles of the invention count bytes, any unit of length to determine an amount of data could also be used, such as a number of bits or words comprising multiple bytes. Also, while a series of acts has been described in
No element, act, or instruction used in the description of the present application should be construed as critical or essential to the invention unless explicitly described as such. Also, as used herein, the article “a” is intended to include one or more items. Where only one item is intended, the term “one” or similar language is used.
The scope of the invention is defined by the claims and their equivalents.
This application is a divisional of U.S. application Ser. No. 10/193,194, filed Jul. 12, 2002, which claims priority under 35 U.S.C. §119 based on U.S. Provisional Application No. 60/350,984, filed Jan. 25, 2002, the disclosures of which are incorporated herein by reference.
Number | Name | Date | Kind |
---|---|---|---|
5384770 | Mays et al. | Jan 1995 | A |
5430842 | Thompson et al. | Jul 1995 | A |
5842224 | Fenner | Nov 1998 | A |
5850526 | Chou | Dec 1998 | A |
5928325 | Shaughnessy et al. | Jul 1999 | A |
5991308 | Fuhrmann et al. | Nov 1999 | A |
6021117 | Juniper et al. | Feb 2000 | A |
6076115 | Sambamurthy et al. | Jun 2000 | A |
6085248 | Sambamurthy et al. | Jul 2000 | A |
6101547 | Mukherjee et al. | Aug 2000 | A |
6112009 | Kikuchi et al. | Aug 2000 | A |
6122279 | Milway et al. | Sep 2000 | A |
6134383 | Kikuchi et al. | Oct 2000 | A |
6157635 | Wang et al. | Dec 2000 | A |
6233279 | Boon | May 2001 | B1 |
6263371 | Geagan et al. | Jul 2001 | B1 |
6407680 | Lai et al. | Jun 2002 | B1 |
6453360 | Muller et al. | Sep 2002 | B1 |
6484212 | Markowitz et al. | Nov 2002 | B1 |
6512773 | Scott | Jan 2003 | B1 |
6516350 | Lumelsky et al. | Feb 2003 | B1 |
6665706 | Kenner et al. | Dec 2003 | B2 |
6775284 | Calvignac et al. | Aug 2004 | B1 |
6865150 | Perkins et al. | Mar 2005 | B1 |
6918034 | Sengodan et al. | Jul 2005 | B1 |
6941378 | Apostolopoulos et al. | Sep 2005 | B2 |
6954785 | Martin et al. | Oct 2005 | B1 |
6970478 | Nishihara | Nov 2005 | B1 |
6981029 | Menditto et al. | Dec 2005 | B1 |
7200402 | Apostolopoulos et al. | Apr 2007 | B2 |
7272122 | Trossen et al. | Sep 2007 | B2 |
7286566 | Parruck et al. | Oct 2007 | B1 |
7292590 | Chen et al. | Nov 2007 | B1 |
7298691 | Yonge et al. | Nov 2007 | B1 |
7327760 | Parruck et al. | Feb 2008 | B1 |
7342942 | Parruck et al. | Mar 2008 | B1 |
7369574 | Parruck et al. | May 2008 | B1 |
7469297 | Kostoff et al. | Dec 2008 | B1 |
7523215 | Robinson et al. | Apr 2009 | B1 |
7844697 | Greene | Nov 2010 | B1 |
20010033575 | Shimamura et al. | Oct 2001 | A1 |
20020003811 | Herrmann | Jan 2002 | A1 |
20020013852 | Janik | Jan 2002 | A1 |
20020021669 | Kunito et al. | Feb 2002 | A1 |
20020082015 | Wu | Jun 2002 | A1 |
20020090206 | Kikuchi et al. | Jul 2002 | A1 |
20020152305 | Jackson et al. | Oct 2002 | A1 |
20030009577 | Apostolopoulos et al. | Jan 2003 | A1 |
20030046396 | Richter et al. | Mar 2003 | A1 |
20030076832 | Ni | Apr 2003 | A1 |
20030105806 | Gayle et al. | Jun 2003 | A1 |
20030143985 | Yokoyama | Jul 2003 | A1 |
20040139157 | Neely et al. | Jul 2004 | A1 |
20040213291 | Beshai et al. | Oct 2004 | A1 |
Entry |
---|
Co-pending U.S. Appl. No. 10/193,194, filed Jul. 12, 2002 entitled “Measuring Network Traffic Based on Predicted Amount of Padding (as amended)” by Spencer Greene, 33 pages. |
Number | Date | Country | |
---|---|---|---|
20110032841 A1 | Feb 2011 | US |
Number | Date | Country | |
---|---|---|---|
60350984 | Jan 2002 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 10193194 | Jul 2002 | US |
Child | 12906446 | US |