A frame is the lowest level of organizing bits for transmission on a circuit. It corresponds to Layer 2 of the OSI 7-layer reference model, the Link Layer.
Layer 1, the Physical Layer in the OSI model specifies the physical circuit: what kind of physical medium is used, how 1s and 0s are represented on the physical medium, how often that can be done. This implements the ability to transmit bits from one machine to another.
However, there is no such thing as an error-free, unlimited capacity physical circuit. Further, there may be multiple devices on a single circuit - a WiFi hotspot, for example.
Layer 2, the Link Layer, provides mechanisms for indicating which device the communications are to and from on the circuit, which device is allowed to transmit next, controlling the flow of information to deal with limited capacities, and detecting bit errors.
The result is the ability to transmit to another device on the same circuit.
These functions are implemented with Ethernet Local Area Network (LAN) technology.
Ethernet was a brand name for the original LAN product, and is now used to refer to a set of standards published by study group 802 of the Institute of Electrical and Electronic Engineers (IEEE), universally supported for communicating data between two devices over copper cables, fiber optics and over the air.
Data is transmitted in blocks of about 1500 bytes, carried as the payload or information field of a frame. A frame, illustrated above, is the unit of transmission. Machines transmit one frame at a time.
On a circuit with multiple devices physically connected, all devices will hear the transmission – so it is necessary to indicate for whom a transmission is intended; which device should react to a transmission. This is accomplished by prepending an address to the block of data.
The IEEE specifies Ethernet addressing in standard 802.2, as part of the Media Access Control (MAC) sublayer, so these addresses are often called MAC addresses .
MAC addresses are permanently assigned by manufacturers to LAN interfaces, i.e. the electronics sitting behind a jack that a LAN cable is plugged into, or the wireless transceiver in the case of Wi-Fi.. Currently, MAC addresses are six bytes long: the first three bytes identify the manufacturer, and the last three bytes identify the device.
Control information such as sequence numbers or an indication of the size of the payload is also prepended to the block.
An error detection mechanism called a Frame Check Sequence (FCS) is calculated by the transmitter and appended to the block. With a mathematical operation, the receiver can detect to better than 99.99% accuracy if any of the received bits are in error. If an error is detected, the whole thing is discarded and retransmitted. This entire process is known as Cyclic Redundancy Checking (CRC).
The framing is a pattern of bits marking the beginning and end of the transmission.
This collection of bits is called a frame and is the unit of transmission between machines over an Ethernet connection.
To communicate data from one machine to another on the circuit, the transmitting station's Ethernet software takes a block of data and puts the Media Access Control sublayer (MAC) address of the desired destination device on the front of the block, along with the source MAC address, control information, framing and the FCS at the end of the block, creating the frame.
Next, the transmitting machine checks if another other machines are using the circuit. If so, the transmitting station must wait. When the circuit is free, the transmitting station signals the MAC frame one bit at a time by flashing a light on and off on Optical Ethernet, by changing the voltage up and down on a copper LAN cable, or transmitting a modem signal using a radio on a wireless connection.
All devices on the circuit receive the frame, verify if there are errors, then compare the destination MAC address from the frame to the MAC address on their LAN interface. If they are the same, then the device knows it should react to the frame.
The result is to move a block of data from one machine to another machine on the same physical circuit.
This is the purpose of Ethernet, MAC addresses and frames.
The next question would be: what if the desired destination device is not on the same circuit? The answer, of course, is that is is necessary to connect circuits together. A device terminating more than one circuit, that can connect or bridge between the circuits, to relay frames from one circuit to another is required. This device is called a router.