Ethernet overhead bytes: 12 gap + 8 preamble + 14 header + 4 trailer = 38 bytes/packet w/o 802.1q 12 gap + 8 preamble + 18 header + 4 trailer = 42 bytes/packet with 802.1q Ethernet Payload data rates are thus: 1500/(38+1500) = 97.5293 % w/o 802.1q tags 1500/(42+1500) = 97.2763 % with 802.1q tags 9000/(38+9000) = 99.5796 % jumbo w/o 802.1q tags 9000/(42+9000) = 99.5355 % jumbo with 802.1q tags TCP over Ethernet: Assuming no header compression (e.g. not PPP) Add 20 IPv4 header or 40 IPv6 header (no options) Add 20 TCP header Add 12 bytes optional TCP timestamps Max TCP Payload data rates over ethernet are thus: (1500-40)/(38+1500) = 94.9285 % IPv4, minimal headers (1500-52)/(38+1500) = 94.1482 % IPv4, TCP timestamps (1500-52)/(42+1500) = 93.9040 % 802.1q, IPv4, TCP timestamps (1500-60)/(38+1500) = 93.6281 % IPv6, minimal headers (1500-72)/(38+1500) = 92.8479 % IPv6, TCP timestamps (1500-72)/(42+1500) = 92.6070 % 802.1q, IPv6, TCP timestamps (9000-40)/(38+9000) = 99.1370 % Jumbo IPv4, minimal headers (9000-52)/(38+9000) = 99.0042 % Jumbo IPv4, TCP timestamps (9000-52)/(42+9000) = 98.9604 % Jumbo 802.1q, IPv4, TCP timestamps (9000-60)/(38+9000) = 98.9157 % Jumbo IPv6, minimal headers (9000-72)/(38+9000) = 98.7829 % Jumbo IPv6, TCP timestamps (9000-72)/(42+9000) = 98.7392 % Jumbo 802.1q, IPv6, TCP timestamps UDP over Ethernet: Add 20 IPv4 header or 40 IPv6 header (no options) Add 8 UDP header Max UDP Payload data rates over ethernet are thus: (1500-28)/(38+1500) = 95.7087 % IPv4 (1500-28)/(42+1500) = 95.4604 % 802.1q, IPv4 (1500-48)/(38+1500) = 94.4083 % IPv6 (1500-48)/(42+1500) = 94.1634 % 802.1q, IPv6 (9000-28)/(38+9000) = 99.2697 % Jumbo IPv4 (9000-28)/(42+9000) = 99.2258 % Jumbo 802.1q, IPv4 (9000-48)/(38+9000) = 99.0485 % Jumbo IPv6 (9000-48)/(42+9000) = 99.0046 % Jumbo 802.1q, IPv6An excellent source of ethernet information is Charles Spurgeon's Ethernet Web Site.
Notes:
Gigabit ethernet is exactly 10 times faster than 100 Mbps ethernet, so for standard 1500 byte frames, the numbers above all apply, multiplied by 10 (for 10GE, multiple by 100). Many GigE devices however allow "jumbo frames" larger than 1500 bytes. The most common figure being 9000 bytes. For 9000 byte jumbo frames, potential GigE throughput becomes (from Bill Fink, the author of nuttcp):
Theoretical maximum TCP throughput on GigE using jumbo frames: (9000-20-20-12)/(9000+14+4+7+1+12)*1000000000/1000000 = 990.042 Mbps | | | | | | | | | | | | MTU | | | MTU | | | | | GigE Mbps | | | | | | | | IP | | Ethernet | | | | InterFrame Gap (IFG), aka Header | | Header | | | | InterPacket Gap (IPG), is | | | | | | a minimum of 96 bit times TCP | FCS | | | from the last bit of the Header | | | | FCS to the first bit of | Preamble | | the preamble TCP | | Options Start | (Timestamp) Frame | Delimiter | (SFD) | | Inter Frame Gap (IFG) Theoretical maximum UDP throughput on GigE using jumbo frames: (9000-20-8)/(9000+14+4+7+1+12)*1000000000/1000000 = 992.697 Mbps Theoretical maximum TCP throughput on GigE without using jumbo frames: (1500-20-20-12)/(1500+14+4+7+1+12)*1000000000/1000000 = 941.482 Mbps Theoretical maximum UDP throughput on GigE without using jumbo frames: (1500-20-8)/(1500+14+4+7+1+12)*1000000000/1000000 = 957.087 Mbps
-------------------------- DS3 ------------------------------ Line Rate 44.736 Mbps PLCP Payload 40.704 (avail to ATM) ATM Payload 36.864 (avail to AAL) MTU=576 MTU=9180 MTU=65527 AAL5 Payload 34.501 36.752 36.845 (avail to LLC/SNAP) LLC/SNAP Payload 34.028 36.720 36.841 (avail to IP) IP Payload 32.847 36.640 36.830 (avail to transport) UDP Payload 32.374 36.608 36.825 (avail to application) TCP Payload 31.665 36.560 36.818 (avail to application)
-------------------------- OC-3c ------------------------------ Line Rate 155.520 Mbps SONET Payload 149.760 (avail to ATM) ATM Payload 135.632 (avail to AAL) MTU=576 MTU=9180 MTU=65527 AAL5 Payload 126.937 135.220 135.563 (avail to LLC/SNAP) LLC/SNAP Payload 125.198 135.102 135.547 (avail to IP) IP Payload 120.851 134.808 135.506 (avail to transport) UDP Payload 119.112 134.690 135.489 (avail to application) TCP Payload 116.504 134.513 135.464 (avail to application)
-------------------------- OC-12c ----------------------------- Line Rate 622.080 Mbps SONET Payload 600.768 (avail to ATM) ATM Payload 544.092 (avail to AAL) MTU=576 MTU=9180 MTU=65527 AAL5 Payload 509.214 542.439 543.818 (avail to LLC/SNAP) LLC/SNAP Payload 502.239 541.966 543.752 (avail to IP) IP Payload 484.800 540.786 543.586 (avail to transport) UDP Payload 477.824 540.313 543.519 (avail to application) TCP Payload 467.361 539.605 543.420 (avail to application)Notes:
On the physical layer (single pt-to-pt hop), one out of every 27 cells is an OAM cell. The above calculations don't take that into account, but that's another 3.7% reduction!
We should add calculations for ping packets and 1500 byte packets.
So what is the largest packet that we can fit in a single ATM cell? If you are using AAL5, you have a 40 byte payload to work with. For IPv4, you could have a 20 byte header + a 20 byte IP payload. A UDP or ICMP payload could be up to 12 bytes (both use 8 bytes after the IP header). So a "ping -s8" through "ping -s12" should fit in one ATM cell and still give you a round trip time.
Flag Byte (0x7e) Address Byte (0xff = all stations) Control Byte (0x03 = Unnumbered Information) Protocol - 2 bytes, 1 byte if compressed + Payload - 0-MRU bytes | PPP part Padding - 0+ bytes + Frame Check Sequence (FCS) - 4 bytes (2 in limited cases) Flag Byte (0x7e) [Interframe fill or next Address]HDLC has no set frame size limit, nor does PPP specify the payload size, you just keep reading until you see a Flag byte. PPP however specifies that the Maximum Receive Unit (MRU) default is 1500 bytes and that other sizes can be negotiated using LCP. These LCP messages have a 16-bit length field, so a properly negotiated maximum payload would be 65535 bytes. [It would be possible to configure a sender/receiver pair to go beyond 65535 and simply not negotiate a size with LCP. No one does this however.]
Most POS hardware seems to have a 4470 or 9180 byte MRU. Some Cisco documentation says the MRU can only be set between 64 and 17940 (go figure), and recommends a setting of 1492. Juniper documentation says they support up to 65535. The RFC says you must be able to receive at least 1500 even if you set this lower.
So we get:
-------------------------- OC-3c ------------------------------ Line Rate 155.520 Mbps SONET Payload 149.760 (avail to POS) POS Payload *** to do *** (avail to IP) etc. -------------------------- OC-12c ----------------------------- Line Rate 622.080 Mbps SONET Payload 600.768 (avail to POS) MTU=1500 MTU=9000 POS Payload (no stuff) 597.185 600.168 (avail to IP) 9 overhead POS Payload (rnd stuff) 592.583 595.520 20.71875 overhead POS Payload (max stuff) 299.486 300.234 1509 overhead ~TCP Payload w/ts rnd 572.040 592.079
Notes:
References:
A new way to do POS uses PPP over GFP-F (Generic Framing Proceedure, Framed) instead of HDLC. In both the HDLC and GFP-F cases, SONET / SDH VCAT (Virtual Concatenation) is used. GFP-F also allows Ethernet frames (100, GE and 10GE) and Resilient Packet Ring (RPR) frames to be sent over SONET/SDH VCAT. GFP can also map to G.709 (part of the Optical Transport Network (OTN) series).
A GFP User Frame:
References:
Multi-Protocol Label Switching (MPLS) adds four bytes to every frame. As described in RFC3032 the 32-bit label includes:
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Label | Label | Exp |S| TTL | Stack +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Entry Label: Label Value, 20 bits Exp: Experimental Use, 3 bits S: Bottom of Stack, 1 bit TTL: Time to Live, 8 bits