DATA LINK LAYER
The data link Layer is the second layer of the OSI model. The data link layer performs various functions depending upon the hardware protocol used, but has four primary functions:
- COMMUNICATION WITH NETWORK LAYER
- SEGMENTATION & REASSEMBLY
- BIT ORDERING
- COMMUNICATION WITH PHYSICAL LAYER
- COMMUNICATION with the Network layer above.
- SEGMENTATION of upper layer datagrams (also called packets) into frames in sizes that can be handled by the communications hardware.
- BIT ORDERING. The data link layer organizes the pattern of data bits into frames before transmission. The frame formatting issues such as stop and start bits, bit order, parity and other functions are handled here. Management of big-endian / little-endian issues are also managed at this layer.
- COMMUNICATION with the Physical layer below
This layer provides reliable transit of data across a physical link. The data link layer is concerned with physical addressing, network topology, physical link management, error notification, ordered delivery of frames, and flow control.
It should be noted that in most modern network interface adaptors, the Physical and Datalink functions are performed by the network interface adaptor.
Ethernet Network Adaptors uses a Media Access Control (MAC) address, which is a physical address that (somewhat) uniquely identifies a network card to the physical network. The Ethernet Adaptor's primary job at the data link layer is to transmit Ethernet frames onto the wire. It places its own MAC address in the frame, followed by the destination MAC address to which it wishes to communicate, sets various other values in the Ethernet frame (protocol type etc.) and then transmits on the wire. The CSMA/CD protocol that Ethernet uses to control access to the common network bus could be said to occur at the data link layer of the OSI model or could also be called a data link function.