Calculation accounting for Layer 2 overhead when viewing traffic statistics

juniperlayer2layer3

Recently, I was on a Juniper device, trying to figure out why I was getting a lower bit rate even though I knew I was sending a lot more.

Then it hit me that Juniper devices show the Layer 3 transmit rate, whereas I was sending at a Layer 2 bit rate. It has been a while since I have encountered this, and I used to be able to do a calculation to estimate the Layer 3 bit rate based on the Layer 2 bit rate using the frame-size (Ethernet, VLAN).

However, I cant seem to remember how I did that calculation, nor can I find any examples or documentation on the conversion.

Can anyone highlight how this calculation is done (preferably with an example)? Lets say a L2 bit rate of 100 Mbps, and a frame size of 70 MB.

Best Answer

The frame header is 14 octets without a VLAN tag, and 18 octets with a VLAN tag. Inside the frame is your payload (IP packet). There is also a 4-octet FCS at the end of the frame.

If you add that all together, you get the frame size (maximum 1518 or 1522 octets, depending on whether or not it is a trunk link).

Ethernet has more than just the frame. There is a 7-octet preamble, 1-octet start of frame delimiter, and a 12-octet inter-packet gap between frames. So you add 20 octets to the size of your frame to account for ethernet overhead.

Related Topic