Layer 2 LAN Technologies
Ethernet is the most common Layer 2 LAN protocol implemented in company networks.
The DIX version specified transmission of data at 10-Megabit-per-second(Mbps) speeds in a shared medium. DIX was then enhanced in 1982 and is now referred to as Ethernet II(version 2), which is commonly used today.
IEEE = Institute of Electrical and Electronic Engineers
IEEE defined new standards for Ethernet starting in the 1980s. The first two of these standards was 802.3, which deals with the physical layer functions as part of the data link layer, and the second was 802.2 which deals with the higher level data link layer functions.
Ethernet is a LAN technology that functions at the Data Link layer. Ethernet uses Carrier Sense Multiple Access/Collision Detection(CSMA/CD) to send information in a shared environment.
CSMA/CD describes the actual process of how the Ethernet operates on a shared medium.
Before a Ethernet NIC puts a frame on the wire, it will first sense the wire to ensure that no other frame is currently on the wire. If the cable uses copper, the NIC can detect this by examining the voltage levels on the wire, else if fiber , the NIC can detect this by examining the light frequencies on the wire. The NIC must go through this sensing process because Ethernet supports multiple access – another NIC might already have a frame on the wire.
If two or more devices simultaneously sense the wire and see no frame, and each places its frame on the wire, a collision will occur. In this situation, the voltage levels on a copper wire or the light frequencies on a piece of fiber get messed up. The two original frames become unintelligible(or indecipherable). When NICs place a frame on the wire the examine the status of the wire to ensure that a collision does not occur: this is the collision detection mechanism of CSMA/CD.
If NICs see a collision they have to resend the frames. In the instance where a collision occurs, each NIC that was transmitting frame creates a special signal called a jam signal on the wire. It then waits a small random time period, and sense again, if no frame is on the wire, it resends the original frame.
The more collisions you experience, the less throughput you will get. Normally if your collisions are less than one percent of your total traffic you are okay.
Because of the fact that Ethernet experiences collisions, networking devices that share the same medium, so that they are connected to the same physical segment, are said to belong to the same collision or bandwidth domain.
Traffic generated by one device on the collision domain can adversely affect other devices in the same domain.
Two variants of Ethernet exist: IEEE’s implementation and Ethernet II. Devices running TCP/IP typically use the Ethernet II implementation. The Ethernet II standard covers both the physical and data link layer functions.
IEEE split the data link layer into two components to simplify dealing with multiple layer 2 and layer 3 protocols. The two data link layer components are Media Access Control(MAC) and Logical Link Control(LLC).
The second version of Ethernet was developed by IEEE and is standardized in the IEEE 802.2 and 802.3 standards.
The top part of the data link layer is the LLC and its function performed in software. The bottom part of the data link layer is the MAC, and it’s function is performed in hardware.
The LLC performs its multiplexing by using Service Access Point(SAP) identifiers.
When a network layer protocol is encapsulated in the 802.2 frame, the protocol number of the network data is placed in the SAP field. When destination receives frame, it examines the SAP field to determine which upper-layer network protocol should process the frame.
Optionally, LLC can provide sequencing and flow control to provide a reliable service, as TCP does at the transport layer.
One of the main differences between IEEE’s and Ethernet II’s implementation of Ethernet is the framing used(framing defines the format of information a s it’s carried across a data link layer medium)
IEEE 802.3 is responsible for defining the framing used to transmit information between two NIC’s.
Fields in the 802.3 Frame
| Field | Length(Bytes) | Description |
| Preamble | 7 | Identifies the beginning of the 802.3 frame and is a string of 7 bytes of alternating 1’s and 0’s. |
| Start of Frame(SOF) | 1 | Indicates the following byte is the start of the frame. The first 8 bytes are commonly referred to as the preamble, even though this is not quite true. |
| Destination MAC | 6 | The MAC address to which the frame is to be sent. |
| Source MAC | 6 | The MAC address of the source of the frame. |
| Length | 2 | Defines the length of the frame from this point to the checksum at the end of the frame. |
| Data | Variable | The 802.2 LLC encapsulated frame. |
| FCS(field or frame checksum sequence) | 4 | A checksum(CRC, or cyclic redundancy check) that is used to ensure that the frame is received by the destination error free. |
When generating the FCS value, which is basically a checksum, the NIC takes all of the fields in the 802.3 frame, except the FCS field and runs them through an algorithm that generates a 4-byte result.
Upon receiving the destination takes the same fields and runs them through the same algorithm and then compares its own 4-byte output with what was included with the frame.
IEEE 802.2(LLC) handles the top part of the data link layer. Two types of 802.2 frames are used: Service Access Point(SAP) and Subnetwork Access Protocol(SNAP). 802.2 frames are encapsulated in an 802.3 frame when being sent to a destination.
Where 802.3(Ethernet) is used as a transport to get the 802.2 frames to other devices, 802.2 is used to define which network layer protocol created the data that the 802.2 frame will include.
Here are some examples of SAP values: TCP/IP uses 0×06(hexadecimal) and IPX uses 0x0E.
Make sure you understand the mechanics of Ethernet’s media access method: CSMA/CD. Ethernet, Fast Ethernet, and Gigabit Ethernet use CSMA/CD. All devices have equal priority when accessing and transmitting on the wire. A device must sense the wire before transmitting. If two devices transmit simultaneously, a collision occurs. When this happens, a jam signal is generated and the devices retransmit their frame after waiting a random period and sensing the wire again.
The second frame type supported by 802.2 is SNAP, and two additional field are included: OUI ID and Type.
To indicate a SNAP frame, the SAP fields are set to hexadecimal 0xAA, the control field is set to 0×03, and the OUI field is set to 0×0.
AppleTalk is an example of a protocol that uses an 802.2 SNAP frame.
Token Ring is specified in IEEE’s 802.5 standard, and FDDI is specified in an ANSI standard.
802.2 uses a SAP or SNAP field to differentiate between encapsulated layer 3 payloads. With a SNAP frame, the SAP fields are set to 0xAA and the type field is used to indicate the layer 3 protocol.
Ethernet II was the original Ethernet frame type. Ethernet II and 802.3 are very similar: they both use CSMA/CD to determine their operations.
Ethernet II does not have any sublayers, while IEEE 802.2/3 has two – LLC and MAC.
Ethernet II has a type field instead of a length field(used in 802.3). IEEE 802.2 defines the type for IEEE Ethernet.
NIC’s differentiate between the two types by examining the value in the type field for an Ethernet II frame and the value in the length field in the IEEE 802.3 fram.
Both versions of Ethernet can exist in the same network. However, because of the frame differences between the two types, a NIC running only 802.3 will discard any Ethernet II frames and vice versa.
In 1 byte(octet) there are 8 bits.
Bit positions are labelled from left to right, where the leftmost bit is the most significant and the rightmost bit is the least significant.
In decimal you have values that range from 0 to 9(10 Values).Hexadecimal has a range of 16 values, which are 0-9, A-F. As an example, a decimal 10 is equivalent to A in hexadecimal. A decimal 17 is equivalent to 11 in hexadecimal.
A MAC Address is 48 bits long and is represented as a hexadecimal number. In hex it is 12 characters in length, where each character is 4 bits.
The first six digits of a MAC Address are associated with the vendor, or maker of the NIC and are commonly called the Organizationally Unique Identifier(OUI)