Data link layer

From Free net encyclopedia

(Redirected from Layer 2)

Template:Cleanup-date

OSI Model
7Application layer
6Presentation layer
5Session layer
4Transport layer
3Network layer
2Data link layer
1Physical layer

The data link layer is layer two of the seven-layer OSI model. It responds to service requests from the network layer and issues service requests to the physical layer.

The data link layer is the layer of the model which transfers data between adjacent network nodes in a wide area network or between nodes on the same local area network segment. The data link layer provides the functional and procedural means to transfer data between network entities and might provide the means to detect and possibly correct errors that may occur in the Physical layer. Examples of data link protocols are Ethernet for local area networks and PPP, HDLC and ADCCP for point-to-point connections.

The data link is all about getting information from one place to a selection of other places. At this layer one does not need to be able to go everywhere, just able to go somewhere else. So in social contact, one needs to know at least one other person, but not necessarily know Tung of Waterloo, Canada.

The data link provides data transfer across the physical link. That transfer might or might not be reliable; many data link protocols do not have acknowledgments of successful frame reception and acceptance, and some data link protocols might not even have any form of checksum to check for transmission errors. In those cases, higher-level protocols must provide flow control, error checking, and acknowledgments and retransmission.

This layer is sometimes split into two sublayers.

Contents

Logical Link Control Sublayer

The first sublayer is Logical Link Control (LLC). This sublayer multiplexes protocols running atop the data link layer, and optionally provides flow control, acknowledgment, and error recovery.

Media Access Control Sublayer

The second sublayer is Media Access Control (MAC). This sublayer determines who is allowed to access the media at any one time. There are generally two forms of media access control: distributed and centralised. Both of these may be compared to communication between people:

  • In a network made up of people speaking, i.e. a conversation, we look for clues from our fellow talkers to see if any of them appear to be about to speak. If two people speak at the same time, they will back off and begin a long and elaborate game of saying "no, you first".
  • In the UK Houses of Parliament, the speaker determines who can speak at any time and gets to say "order" very loudly if anybody breaks the rules.

The Media Access Control sublayer also determines where one frame of data ends and the next one starts. In a snail-mail network, each letter is one frame of data, and you can tell where it begins and ends because it is inside an envelope. You might also specify that a letter will begin with a phrase like "Dear Sir", and ends with a phrase like "Yours Sincerely".

On IEEE 802 local area networks, the data link layer is split into MAC and LLC sublayers; this means that the IEEE 802.2 LLC protocol can be used with all of the IEEE 802 MAC layers, such as Ethernet, Token Ring, IEEE 802.11, etc., as well as with some non-802 MAC layers such as FDDI. Other data link layer protocols, such as HDLC, are specified to include both sublayers, although some other protocols, such as Cisco HDLC, use HDLC's low-level framing as a MAC layer in combination with a different LLC layer.

Internet protocol suite
Layer Protocols
Application DNS, TLS/SSL, TFTP, FTP, HTTP, IMAP, IRC, NNTP, POP3, SIP, SMTP, SNMP, SSH, TELNET, BitTorrent, RTP, rlogin, ENRP, …
Transport TCP, UDP, DCCP, SCTP, IL, RUDP, …
Network IP (IPv4, IPv6), ICMP, IGMP, ARP, RARP, …
Link Ethernet, Wi-Fi, Token ring, PPP, SLIP, FDDI, ATM, DTM, Frame Relay, SMDS, …

Examples

Interfaces

The data link layer is often implemented in software as a "network card driver". The operating system will have a defined software interface between the data link and the network transport stack above. This interface is not a layer itself, but rather a definition for interfacing between layers. Examples include:

cs:Linková vrstva da:Datalinklaget es:Nivel de enlace de datos fr:Couche de liaison it:Livello datalink he:שכבת הקו של מודל ה-OSI nl:Datalinklaag no:Datalink-laget nn:Datalinklaget sk:Linková vrstva sv:Datalänkskikt vi:Tầng liên kết dữ liệu tr:Veri bağ tabakası (protokol) zh:数据链路层