Monday, May 9, 2016

Ethernet frame encapsulations

Ethernet packets are referred to as frames.  There are 4 types of Ethernet encapsulations:
  • Ethernet II: This is the version that came out of the original Ethernet specification from Digital-Intel-Xerox, commonly referred to as DIX.  This is the one that uses an Ethertype and is the most common format in use today.  [MAC DA | MAC SA | Etype | Payload | FCS] 
  • IEEE 802.3 Raw: This was defined by IEEE 802.3.  It was most widely used by Novell IPX with the first two bytes of the payload being 0xFFFF. [MAC DA | MAC SA | Length | Payload | FCS]
  • IEEE 802.3 LLC: This version used the service access points (DSAP/SSAP) to indicate the protocol in the frame. [MAC DA | MAC SA | Length | DSAP | SSAP | Control | Payload | FCS]
  • IEEE 802.3 SNAP: This version was use by SNA and some IP implementations. [MAC DA | MAC SA | Length | DSAP=0xAA SSAP=0xAA Control=0x03 | OUI=00 00 00 | Type=Ethertype | Payload | FCS]
Frame size

The minimum frame size in Ethernet is 64 bytes (from the start of the MAC DA to the end of the FCS).

For length-encapsulated frames, the length field indicates the actual amount of data following the length field excluding any pad.  Valid values of the length field are 0 to 1500 bytes.  If the length is less than 46 bytes, then one or more bytes of pad are added to the frame to bring it up to 64 bytes.  A received frame that is smaller than 64 bytes is termed a runt.  Runts are usually discarded by the receiver.  Runts were more common in the days when Ethernet deployments used CSMA/CD, collisions being the main cause.

If the 2-byte following the MAC SA is 1536 or larger, then it is interpreted as an Ethertype.  Frames for which these 2 bytes are greater than 1500 but less than 1536 are non-standard frames and may be discarded by some switches.

The maximum payload size in IEEE 802.3 is 1500 bytes.  This is what follows the type/length field (and includes the DSAP, SSAP, etc. if used).  This makes the max frame size in Ethernet 1518 bytes (from start of MAC DA to end of FCS).  IEEE 802.3ac increase the max frame size to 1522 bytes when a VLAN tag is present; without the VLAN tag the max frame size is still 1518 bytes.  IEEE 802.3as increased the max frame size to 2000 bytes but specifies that the payload size is still 1500 bytes.  The additional bytes (500 of them in all) are used to accommodate headers define by 802 (e.g. MACsec, Provider Backbone Bridge aka MAC-in-MAC, etc.).

A frame that is larger than 1518 (or 1522 with a VLAN tag) is term a jumbo frame.  These are non-standard frames, but they are supported by almost all vendors of commercial networking equipment.  Jumbo frames are sometimes also referred to as giants.  Frames that are slightly over 1518/1522 bytes are sometimes called as baby giants.  Commonly supported jumbo frame sizes are 9 KB (9216 bytes) and 12 KB.  There are slight differences in the jumbo frame sizes supported by different vendors.

There was an attempt to create a project to standardize jumbo frames in IEEE 802.3, but the effort failed.  This is documented in draft-ietf-isis-ext-eth-01 (see the appendices at the end of the document).

On the wire frames also include an 8-byte-preamble, and 12-bytes of inter-frame gap.

Useful references

Wednesday, September 10, 2014

Resources for IEEE 802

The following is a collection of resources for IEEE 802 and related organizations.
Tutorial and other useful presentations

Tuesday, September 9, 2014

IEEE 802.1 projects

The following is a list of IEEE 802 and IEEE 802.1 projects.  At some point I hope to add a few lines providing an executive summary of each project.  This list doesn't include projects that are revisions (-REV) and projects that are corrigenda (-Cor-x), except in cases where the revisions were actually adding significant new functionality.

IEEE 802 projects
  • 802 - Overview and Architecture
  • 802a - Playpen Ethertypes
  • 802b - Registration of object identifiers (OIDs)
  • 802c - Local MAC address usage
  • 802d - Allocation of uniform resource name (URN) values
  • 802E - Privacy considerations for 802 technologies
IEEE 802.1 projects
  • 802.1B - LAN/MAN management
  • 802.1D - MAC bridges
  • 802.1E - System load protocol
  • 802.1F - Common definitions and procedures for IEEE 802 management information
  • 802.1G - Remote MAC bridging
  • 802.1H - Bridging of Ethernet v2 to IEEE 802 LANs
  • 802.1j - Managed objects for MAC bridges
  • 802.1p - Expedited traffic classes and dynamic multicast filtering
  • 802.1Q - MAC bridges and virtual bridged LANs (formerly virtual bridged LANs)
    • See also IEEE 802.3ac
  • 802.1s - Multiple spanning trees
  • 802.1t - 802.1D maintenance
  • 802.1u - 802.1Q maintenance
  • 802.1v - VLAN classification by protocol and port
  • 802.1w - Rapid reconfiguration (RSTP)
  • 802.1X- Port-based network access control
  • 802.1y - 802.1D maintenance
  • 802.1z - 802.1Q maintenance
  • 802.1aa - 802.1X maintenance
  • 802.1AB - Link layer discovery protocol (LLDP)
  • 802.1AC - MAC service definition
  • 802.1ad - Provider bridging
  • 802.1AE - MACsec
  • 802.1af - MACsec key management
  • 802.1ag - Connectivity fault management
  • 802.1ah - Provider backbone bridging
  • 802.1aj - Two-port MAC relay
  • 802.1ak - Multiple registration protocol (MRP)
  • 802.1ap - MIB definition for VLAN bridges
  • 802.1aq - Shortest path bridging
  • 802.1AR - Secure Device Identifier
  • 802.1AS - Time Synchronization
  • 802.1Qat - Stream reservation protocol (SRP)
  • 802.1Qau - Congestion notification
  • 802.1Qav - Credit-based shaper
  • 802.1Qaw - Data driven connectivity fault management
  • 802.1AX - Link aggregation
  • 802.1AX-REV - Distributed resilient network interconnect (DRNI)
  • 802.1Qay - Provider backbone bridging - traffic engineering
  • 802.1Qaz - Enhanced transmission selection (ETS) and DCBX
  • 802.1BA - AVB systems
  • 802.1Qbb - Priority-based flow control (PFC)
    • See also 802.3bd
  • 802.1Qbc - Remote customer service interfaces (RCSI)
  • 802.3bd - MAC control frame for PFC
  • 802.1Qbe - Multiple I-SID registration protocol (MIRP)
  • 802.1Qbf - PBB-TE segment protection
  • 802.1Qbg - Edge virtual bridging (EVB)
  • 802.1Qbh - Bridge port extenders (replaced by 802.1BR)
  • 802.1AXbk - Link aggregation protocol addressing
  • 802.1AEbn - 256-bit encryption
  • 802.1Qbp - Equal cost multiple paths (ECMP)
  • 802.1AXbq - Distributed resilient network interconnect (replaced by AX-REV)
  • 802.1BR - Bridge port extenders
  • 802.1ASbt - Time synchronization - Enhancement and performance improvements
  • 802.1Qbu - Frame preemption
    • See also 802.3br - Interspersed express traffic (IET)
  • 802.1Qbv - Enhancements for scheduled traffic -- time-aware shaper
  • 802.1AEbw - MACsec extended packet numbering
  • 802.1Xbx- MACsec key agreement extensions
  • 802.1ACby - Ethernet over MOST
  • 802.1Qbz - Enhancements to bridging of 802.11
  • 802.1Qca - Path control and reservation
  • 802.1CB - Frame replication and elimination for reliability (FRER)
  • 802.1Qcc - SRP enhancements and performance improvements
  • 802.1Qcd - Application VLAN TLV
  • 802.1ARce - Secure device identity - SHA-384 and P-384 elliptic curve
  • 802.1CF - OmniRAN network reference model and functional description of access network
  • 802.1AEcg - Ethernet data encryption devices
  • 802.1Qch - Cyclic queueing and forwarding
  • 802.1Qci - Per-stream filtering and policing
  • 802.1Qcj - Automatic attachment to PBB services
  • 802.1Xck - 802.1X YANG data model
  • 802.1CM - TSN profile for fronthaul
  • 802.1Qcn - VSI/VDP extensions for NVO3
  • 802.1Qcp - 802.1Q YANG data model
  • 802.1CQ - Multicast and local address assignment protocol
  • 802.1Qcr - Asynchronous traffic shaping
  • 802.1CS - Link-local registration protocol (LRP)
  • 802.1AR-REV - SHA-384 and P-384 enhancements
  • 802.1ACct - Support for 802.15.3
  • 802.1ABcu - LLDP YANG
  • 802.1CBcv - FRER YANG & MIB
  • 802.1Qcw - TSN YANG for Qbu, Qcv, Qci
  • 802.1Qcx - CFM YANG
  • 802.1Qcy - EVB VDP extensions for NVO
  • 802.1Qcz - Congestion isolation
  • 802.1DA (60802) - Profile for industrial automation
  • 802.1CBdb - Extended stream identification
  • 802.1DC - QoS provisioning for non-bridge systems
  • 802.1Qdd - Resource allocation protocol
  • 802.1CMde - Enhancements for fronthaul interface
  • 802.1DF - TSN profile for service provider networks
  • 802.1DG - TSN profile for automotive networks
  • 802.1ABdh - LLDPv2 - Support for Multiframe Protocol Data Units
  • 802.1Qdj - TSN configuration enhancements
  • 802.1AEdk - Privacy enhancements for use with MACsec
  • 802f - Ethertype YANG
  • 802.1ASdm - Hot standby
  • 802.1ASdn - Time Synch YANG
  • 802.1DP - TSN profile for aerospace
  • 802.1Qdq - Tspec - Shaper parameter settings for bursty traffic requiring bounded latency
  • 802.1ASdr - Time Synch inclusive terminology
  • 802.1ASds - Time Synch support for half duplex MAC
  • 802.1Qdt - PFC enhancements
  • 802.1DU - Cut-through forwarding
  • 802.1Qdv - Cyclic queueing and forwarding (CQF) enhancements
  • 802.1Qdw - Source flow control
  • 802.1Qdx - Credit shaper YANG
  • 802.1Qdy - MSTP YANG

Tuesday, August 26, 2014

Networking cheat sheet

The following are some useful rules of thumb:
  • Forwarding rate calculations for Ethernet
    • Packets per second (pps) = link speed in bps / ((size+20)*8)
    • Preamble + IFG is 20 bytes.
    • Gbps x 1.5 = Mpps @ 64 bytes (actual value is 1.488).
      • 1.5 Mpps @ 1 Gbps
      • 15 Mpps @ 10 Gbps
  • Latency
    • 5 usec per km (one way).
    • 10 usec per km (RTT).
    • Speed of light in medium = 2x10^8 m/sec, i.e. 0.67 x c.
    • 67.2 nsec @ 10G for 64 bytes (including preamble + IFG).
  • Data in flight
    • ~1300 bytes / 100 m @ 10 Gbps (RTT).
  • Recommended default sampling rate for sflow
    • 1 in (link speed in Gbps x 1000).
    • 10G, 1 in 10,000
    • 100G, 1 in 100,000
    • 400G, 1 in 400,000
    • Can use higher sampling rate if utilization is low.
    • Backoff in sampling is not recommended.  Instead keep track of discards and report them.

Tuesday, July 15, 2014

Resources from standards organizations

The following are resources from various standards I have followed or participated in over the years.

Wednesday, April 2, 2014

Encapsulations for NVO3

There are several encapsulations that have been proposed for use with NVO3.  In no particular order, they are:
Which ones survive is to be seen.