Archive for June 6, 2013



Layer 2 – Data Link: Specifications for delivering data across a uniform medium, that provide the functional & procedural means to transfer data between network entities

Data Link Functions:

  • PHYSICAL ADDRESSING: formats signal into data frames, organizing the bits into:
    • Frame Headers: contain the hardware destination & source address
    • Payload: contains the actual data/information being transmitted

    ERROR DETECTION: detection of transmission errors that may occur in the physical layer
    ACCESS ARBITRATION: endeavors to arbitrate between parties contending for access to a medium; in the event of contention specifies how devices detect &recover from such collisions, and may provide mechanisms to reduce or prevent them
    UPPER LAYER PROTOCOL IDENTIFICATION: Data-link frames, do not cross the boundaries of a local network. thus inter-networking and global addressing require higher layer functions. The protocols used to fulfill these functions must be identified.

Data Link Technologies/Protocols

  • L2 Devices – Bridges, Switches, Wireless AP, Network Interface Cards (NIC)
  • L2 LAN Protocols – 802.3 Ethernet, 802.11 Wireless,
  • L2 ISP Protocols – PPP, PPTP, L2TP, Frame Relay, Q.921 (ISDN), ESF (T1)

Data Link Framework

Composed of 2 Sub-Layers

  1. LLC[Logical Layer Control] 802.2; done in software
    • Flow Control & Regulation of data transfer rate
    • Error Detection [via FCS: Frame Check Sequence]
    • Identification Of Layer 3 Protocol [via Protocol Field in Header: DSAP/SNAP]
    • Encapsulation/Decapsulation
  2. MAC[Media Access Control]; done in hardware
  • Hardware Addressing
  • Media Contention
Ethernet Layer 2 Functions

Addressing – defines ID for each network node

Ethernet = MAC address = 48 bits long

Ethernet MAC Addresses – burned in to network devices EEPROM
NOTE: 48 bits represented as 12 digit hex ID
Ex) 0000.0015.E1FF
Decimal: 248 = Hex: F8 – (F is in 16’s column, and 8 is in 1’s column)
Decimal: 17 = Hex: 11

Cisco Notation – 0000.0000.FFFF
Standard Notation – 00:00:00:00:FF:FF

XX: represents 8 bits/1 byte – 0 to 255


(First 24 bits) OUI[Organizationally Unique Identifier] – Manufacturer ID assigned by IEEE
(Last 24 bits)Interface ID – Unique ID for that device

:. 16 million Manufacturers, each with 16 million unique device ID’s

Error Detection – determines if data successfully transmitted across the physical medium

Ethernet = FCS[Frame Check Sequence]

4 byte Data-Link Trailer – essentially algorithm based on frame’s contents is applied before transmission, then compared to results after transmission :. if they are the same -> no errors occurred

/!\NOT Error -Recovery-

Identification Of Encapsulated Data – identifies Layer 3 protocol that encapsulated the data

Ethernet = 802.2 LLC[Logical Layer Control] Sub-headers

i.e. determines if data is an IPX Packet meant for a Novell system, or an IP Packet meant for a Windows system

Arbitration – determines when it is appropriate to use physical medium; how to avoid and/or recover from frame collisions

Ethernet = CSMA/CD[Carrier Sense Multiple Access/Collision Detection]

media access mechanism in which devices ready to transmit first check channel for carrier prior to transmitting; if no carrier is sensed then device can transmit

Collisions: if 2 devices transmit at once -> a collision occurs

  • this collision delays retransmission from those devices for random length of time
  • more systems on network = slower network; 2X Systems -> 10X # of collisions

:. collisions limit the # of systems

[around 40% of bandwidth utilization performance peaks then drops due to collisions]

Collision Detection Process
  1. collision is detected [i.e. voltage is over acceptable range]
  2. jam signal propagates & notifies all devices on network
  3. all devices stop transmitting
  4. set random timers before resending

802.3 Ethernet Frame

Ethernet II = Xerox Ethernet developed by Bob Metcaff

*also called DIX[DEC Intel Xerox] Ethernet

Preamble Destination MAC Source MAC Type Data FCS
8 bytes 6 bytes 6 bytes 2 bytes MTU 4 bytes

IEEE 802.3 Ethernet

Preamble SD Dest MAC Source MAC Length DSAP SSAP Control Data FCS
7 bytes 1 byte 6 bytes 6 bytes 2 bytes 1 byte 1 byte 1-2 bytes MTU 4 bytes

IEEE 802.3 Ethernet w/ SNAP Header

Preamble SD Dest MAC Source MAC Length DSAP SSAP Control SNAP Data FCS
7 bytes 1 byte 6 bytes 6 bytes 2 bytes 1 byte 1 byte 1-2 bytes 5 bytes MTU 4 bytes

MTU[Maximum Transmission Unit] – 64 to 1518 bytes

defines max Layer 3 packet size that can be sent over a specific medium

802.2 LLC Sub-headers

SSAP[Source Service Access Point] – IEEE defined “type” field that identifies the Layer 3 protocol that originated Data

DSAP[Destination Service Access Point] – IEEE defined “type” field that identifies the Layer 3 protocol to send the Data to

SNAP[Sub-Network Access Protocol] – later developed by IEEE to accommodate additional protocols; i.e. extension to DSAP

Control – notifies what type of packet is encapsulated in frame :. reduces cross-protocol broadcasts [i.e. identifies what -fields- will follow]

NOTE: DSAP value of AA & Control value of 03 signifies to use SNAP to identify protocol

/!\TCP/IP requires SNAP

Preamble – a 64-bit (8 byte) field generated by the LAN interface card that contains a synchronization pattern consisting of alternating ones and zeros and ending with two consecutive ones, which allows devices on the network to easily detect a new incoming frame. After synchronization is established, the preamble is used to locate the first bit of the packet.

SFD [Start Frame Delimeter] – the 8-bit (1-byte) value marking the end of the Preamble of an Ethernet frame, which is designed to break this pattern, and signal the start of the actual frame. It has the value 10101011.

Both the Preamble and the SOF assist NIC’s adjustment to slight speed variations between frames