juniper:how_many_packets_per_second_per_port_are_needed_to_achieve_wire-speed
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
juniper:how_many_packets_per_second_per_port_are_needed_to_achieve_wire-speed [2022/01/04 23:57] – created aperez | juniper:how_many_packets_per_second_per_port_are_needed_to_achieve_wire-speed [2024/02/18 09:41] (current) – aperez | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | < | + | **SUMMARY: |
- | <section slot=" | + | |
- | < | + | When evaluating or measuring an Ethernet device' |
- | <div class=" | + | However it is also important to make sure that the device has the capacity or the ability to switch/ |
- | firewalls) performance capabilities, | + | |
- | device backplane can provide.< | + | |
- | < | + | |
- | | + | |
- | | + | |
- | | + | |
- | < | + | |
- | This article details how to calculate how many packets per second processing capabilities is required from a | + | |
- | port to achieve wire-rate performance. | + | |
- | </ | + | This article details how to calculate how many packets per second processing capabilities is required from a port to achieve wire-rate performance. |
- | < | + | **SOLUTION:** |
- | <div class=" | + | Note: This article focuses on Ethernet; other mediums such as ATM will have other considerations for calculating PPS. |
- | < | + | |
- | | + | |
- | <p>To calculate the amount of packets per second a port must be able to handle to achieve wire-rate performance | + | To calculate the amount of packets per second a port must be able to handle to achieve wire-rate performance we need to take into consideration the fact that the IP protocol allows for variable payload sizes which in turn plays a part in our PPS calculation. |
- | | + | |
- | | + | |
- | <p>The smaller the packet passing on the wire the more packets that need to be switched to achieve wire-rate | + | The smaller the packet passing on the wire the more packets that need to be switched to achieve wire-rate performance; |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | <p>We need to see how much ‘space’ each packet will occupy so we will look at the frame size in which the | + | We need to see how much ‘space’ each packet will occupy so we will look at the frame size in which the smallest packet will be encapsulated, |
- | | + | |
- | | + | |
- | <div style=" | ||
- | src=" | ||
- | style=" | ||
- | <div style=" | ||
- | <p>As seen in figure 1, a packet will occupy at least 84 bytes on the wire. So taking the example of a 1G port | + | {{ :juniper: |
- | we first have to convert the speed into bytes:</p> | + | |
- | <p style=" | ||
- | < | ||
- | < | ||
- | speed:</ | ||
- | <p style=" | ||
- | < | ||
- | | ||
- | <div style=" | ||
- | style=" | ||
- | <div style=" | ||
- | < | + | **Figure 1: ‘Space’ Occupied by the smallest packet** |
- | order to achieve wire speed. The above calculation however does not take into consideration additional tags | + | |
- | that might be available in an Ethernet frame such as VLAN tags or MPLS labels. These will be covered in the | + | |
- | following sections.</ | + | |
- | < | + | As seen in figure 1, a packet will occupy at least **84 bytes** on the wire. So taking the example of a **1G port** we first have to convert the speed into bytes: |
- | < | + | **1Gbps = 1, |
- | distinguisher for the different VLANs traversing the link. There are multiple methods to perform the VLAN | + | |
- | identification but for the scope of this article we will only look at the standards based method which is | + | |
- | the IEEE 802.1q.</p> | + | |
- | < | + | Then we can calculate how many packets per second need to be processed if the port is to transmit at wire speed: |
- | Source MAC address and the Type field. Consequently our ‘minimum’ frame will have the following appearance | + | |
- | on the wire:</ | + | |
- | | + | |
- | <div style=" | + | **PPS = (125, |
- | src=" | + | |
- | style=" | + | |
- | <div style=" | + | Similarly this same calculation can be extended to different port speeds: |
- | <p>As we can see the minimum frame has increased in size by 4 bytes. Let’s examine how this will affect the | + | {{ :juniper: |
- | calculations we have performed above since the minimum ‘space’ that a frame will occupy has increased from | + | |
- | 84 bytes to 88 bytes while taking the wire speed of 1Gbps as an example:</p> | + | |
- | <p style=" | + | **Table 1: PPS Calculation** |
- | < | + | |
- | <p style=" | + | From the above table we see how many packets per second an Ethernet device must be able to handle per port in order to achieve wire speed. The above calculation however does not take into consideration additional tags that might be available in an Ethernet frame such as VLAN tags or MPLS labels. These will be covered in the following sections. |
- | < | + | **VLAN Tags** |
- | decreased slightly. This is to be expected since the wire now has to carry more information for every packet | + | |
- | processed.</ | + | |
- | < | + | VLAN Tagging or Trunking |
- | <div style=" | + | The IEEE 802.1q standard states that Ethernet ports in trunk mode will insert a 32bit field between the Source MAC address and the Type field. Consequently our ‘minimum’ frame will have the following appearance on the wire: |
- | src=" | + | |
- | style=" | + | |
- | <div style=" | ||
- | <p>It is worth noting that within the 802.1Q standard, there is a concept of a ‘Native VLAN’. This means that | ||
- | dot1Q will not tag the frame egressing the trunk port for one select VLAN. For these particular frames, the | ||
- | first calculation will apply since they do not contain the dot1Q tag.</ | ||
- | < | ||
- | <p>An amendment to the 802.1Q standard is the 802.1ad or otherwise known as Q-in-Q. The purpose of this | + | {{ : |
- | amendment was to create a method for users to run their own VLANs inside the VLANs offered by a Metro | + | |
- | Ethernet Service Provider. To achieve this goal a second tag is inserted in the Ethernet frame to | + | |
- | distinguish the customer VLANs as shown below:</ | + | |
- | <div style=" | ||
- | src=" | ||
- | style=" | ||
- | <div style=" | ||
- | < | ||
- | another 4 bytes. As such the smallest frame size will increase again from 88 bytes to 92 bytes total. | ||
- | Therefore our speeds/PPS table will look as follows:</ | ||
- | <div style=" | + | **Figure 2: 802.1Q tagged minimum frame** |
- | src=" | + | |
- | style=" | + | |
- | <div style=" | + | As we can see the minimum frame has increased in size by 4 bytes. Let’s examine how this will affect the calculations we have performed above since the minimum ‘space’ that a frame will occupy has increased from 84 bytes to 88 bytes while taking the wire speed of 1Gbps as an example: |
- | <p>As it is becoming readily noticeable, the more information we encode in the packet the more the maximum | + | **1Gbps = 1,000,000,000 bits/s = (1, |
- | number of packets per second limit drops for each wire speed.</p> | + | |
- | < | + | **PPS = (125, |
- | < | + | From the above calculation, |
- | operates between Layers 2 and 3 of the OSI model and is frequently referred | + | |
- | works by prefixing packets with an MPLS header, containing one or more ' | + | |
- | deciding where the traffic will go to next in the network. Each label is 32 bits in length.</p> | + | |
- | < | + | The above table is shown below with the values recalculated |
- | point of view, our PPS calculation will depend on how many labels are stacked in the frame. | + | |
- | number of labels that can be placed on one frame depends on factors affecting | + | |
- | such as MTU size for that segment and the capability of the device to process frames with that amount of | + | |
- | labels in them.</p> | + | |
- | < | + | {{ :juniper: |
- | | + | |
- | <div style=" | + | **Table 2: PPS Calculation (802.1Q)** |
- | src=" | + | |
- | style=" | + | |
- | <div style=" | + | It is worth noting that within the 802.1Q standard, there is a concept of a ‘Native VLAN’. This means that dot1Q will not tag the frame egressing the trunk port for one select VLAN. For these particular frames, the first calculation will apply since they do not contain the dot1Q tag. |
- | <p>As you can see, each label will occupy 4 more bytes of ‘space’ on our wire. As such for the 3 label example | + | **Q-in-Q** |
- | the total size of the frame on the wire will be 96 bytes. The formula for calculating wire packets per | + | |
- | second should be apparent by now and it will result | + | |
- | above:</ | + | |
- | <div style=" | + | An amendment to the 802.1Q standard is the 802.1ad or otherwise known as Q-in-Q. The purpose of this amendment was to create a method for users to run their own VLANs inside the VLANs offered by a Metro Ethernet Service Provider. To achieve this goal a second tag is inserted in the Ethernet frame to distinguish the customer VLANs as shown below: |
- | src=" | + | |
- | style=" | + | |
- | <div style=" | ||
- | < | ||
- | <br> | ||
- | <a href=" | ||
- | target=" | ||
- | <br> | ||
- | <a href=" | ||
- | target=" | ||
- | <br> | ||
- | <a href=" | ||
- | target=" | ||
- | <br> | ||
- | <a href=" | ||
- | & | ||
- | <br> | ||
- | <a href=" | ||
- | target=" | ||
- | <br> | ||
- | <a href=" | ||
- | target=" | ||
- | <br> | ||
- | <a href=" | ||
- | </ | ||
- | < | + | {{ :juniper:juniper10.jpg? |
- | jnpr-kb-article-content .table-wrapper | + | |
- | overflow-x: scroll; | + | |
- | padding-top: 10px; | + | |
- | | + | |
- | jnpr-kb-article-content strong span { | ||
- | padding: 1.2rem 0 0; | ||
- | display: inline-block; | ||
- | } | ||
- | jnpr-kb-article-content .content { | ||
- | color: #6c6c6c; | ||
- | line-height: | ||
- | } | ||
- | jnpr-kb-article-content .content table { | + | **Figure 3: 802.1ad tagged frame** |
- | margin-top: 1rem; | + | |
- | } | + | |
- | jnpr-kb-article-content | + | For the purposes of our calculation this second tag will increase the ‘space’ a single frame will occupy by another 4 bytes. As such the smallest frame size will increase again from 88 bytes to 92 bytes total. Therefore our speeds/PPS table will look as follows: |
- | font-weight: | + | |
- | font-size: 1.5rem; | + | |
- | margin: auto; | + | |
- | padding-top: 20px; | + | |
- | } | + | |
- | jnpr-kb-article-content p { | + | {{ :juniper:juniper6.jpeg?400 |}} |
- | color: #6c6c6c; | + | |
- | font-size: 16px; | + | |
- | margin: 0 0 10px; | + | |
- | line-height: 1.5; | + | |
- | | + | |
- | jnpr-kb-article-content p.table-heading { | + | **Table 3: PPS Calculation (802.1ad)** |
- | margin: 0; | + | |
- | } | + | |
- | jnpr-kb-article-content p.article-name { | + | As it is becoming readily noticeable, the more information we encode in the packet the more the maximum number of packets per second limit drops for each wire speed. |
- | font-size: 24px; | + | |
- | color: #333; | + | |
- | } | + | |
- | jnpr-kb-article-content .section { | + | **MPLS** |
- | padding: 1rem 0; | + | |
- | } | + | |
- | jnpr-kb-article-content | + | Another Ethernet technology which alters the frame on the wire is **Multi Protocol Label Switching (MPLS)**. MPLS operates between **Layers 2 and 3 of the OSI model and is frequently referred to as a Layer 2.5 protocol**. MPLS works by prefixing packets with an MPLS header, containing one or more ' |
- | position: relative; | + | |
- | border-collapse: | + | |
- | font-weight: | + | |
- | width: 100% !important; | + | |
- | } | + | |
- | jnpr-kb-article-content | + | MPLS labels can be stacked in one frame to allow more flexibility in MPLS packet handling. From the frame point of view, our PPS calculation will depend on how many labels are stacked in the frame. The maximum number of labels that can be placed on one frame depends on factors affecting the processing of the frame such as MTU size for that segment and the capability of the device to process frames with that amount of labels in them. |
- | border: none; | + | |
- | padding: 0; | + | |
- | background-color: | + | |
- | color: var(--table-header-text-color); | + | |
- | height: 100%; | + | |
- | } | + | |
- | jnpr-kb-article-content .header table tbody tr:last-child { | + | For our example we will look at a packet with 3 labels placed in it: |
- | border-right: | + | |
- | } | + | |
- | jnpr-kb-article-content .table-wrapper table tbody tr: | ||
- | font-size: 1rem; | ||
- | font-weight: | ||
- | line-height: | ||
- | letter-spacing: | ||
- | border-right: | ||
- | background-clip: | ||
- | text-align: left; | ||
- | vertical-align: | ||
- | padding: 10px; | ||
- | width: 5%; | ||
- | } | ||
- | jnpr-kb-article-content .table-wrapper table tbody tr:not(:first-child): | + | {{ :juniper:juniper11.jpg?600 |}} |
- | background-color: | + | |
- | color: var(--table-sub-header-text-color); | + | |
- | | + | |
- | jnpr-kb-article-content .table-wrapper table tbody tr: | + | {{ :juniper: |
- | color: #fff; | + | |
- | | + | |
- | jnpr-kb-article-content .table-wrapper table tbody tr { | ||
- | padding: 20px; | ||
- | border-bottom: | ||
- | } | ||
- | jnpr-kb-article-content .table-wrapper table tbody tr:last-child { | + | **Figure 4: MPLS tagged frame** |
- | border-bottom: | + | |
- | ; | + | |
- | } | + | |
- | jnpr-kb-article-content | + | As you can see, each label will occupy 4 more bytes of ‘space’ on our wire. As such for the 3 label example the total size of the frame on the wire will be 96 bytes. The formula for calculating wire packets per second should be apparent by now and it will result in the following speeds for the 3 label example shown above: |
- | font-size: 13.6px; | + | |
- | padding: 10px; | + | |
- | background-clip: | + | |
- | position: relative; | + | |
- | background-size: | + | |
- | box-sizing: border-box; | + | |
- | table-layout: | + | |
- | width: 100px !important; | + | |
- | } | + | |
- | jnpr-kb-article-content .table-wrapper.no-header table tbody td { | + | {{ :juniper: |
- | padding: 0 5px; | + | |
- | | + | |
- | jnpr-kb-article-content .table-wrapper.no-header table tbody td a { | ||
- | color: var(--table-header-bg-color); | ||
- | width: 100%; | ||
- | display: inline-block; | ||
- | padding: 5px; | ||
- | text-decoration: | ||
- | } | ||
- | jnpr-kb-article-content .table-wrapper table tbody tr td: | ||
- | background-color: | ||
- | } | ||
- | |||
- | jnpr-kb-article-content .table-wrapper table tbody tr.reverse td: | ||
- | background-color: | ||
- | } | ||
- | |||
- | jnpr-kb-article-content .table-wrapper table tbody tr.reverse td: | ||
- | background-color: | ||
- | } | ||
- | |||
- | jnpr-kb-article-content .table-wrapper table tbody td: | ||
- | border-right: | ||
- | } | ||
- | |||
- | jnpr-kb-article-content pre { | ||
- | white-space: | ||
- | margin: 1rem; | ||
- | word-break: break-all; | ||
- | } | ||
- | |||
- | jnpr-kb-article-content blockquote { | ||
- | margin: 1rem; | ||
- | } | ||
- | |||
- | jnpr-kb-article-content h4 { | ||
- | font-size: 1.2rem; | ||
- | } | ||
- | |||
- | @media only screen and (max-width: 639px) { | ||
- | jnpr-kb-article-content .table-wrapper { | ||
- | border: 1px solid #ccc; | ||
- | box-shadow: inset 0 0 10px #ccc; | ||
- | } | ||
- | } | ||
- | </ | ||
- | </ | ||
- | </ | ||
- | |||
- | </ |
juniper/how_many_packets_per_second_per_port_are_needed_to_achieve_wire-speed.1641358633.txt.gz · Last modified: 2022/01/04 23:57 by aperez