The . The purpose of this model is

The Data Link Layer and Physical LayerYanyi DongHarrisburg universityAbstractThe data link layer is the second layer of the seven-layer OSI model of computer networking. This layer is the protocol layer that transfers data between adjacent network nodes in a wide area network (WAN) or between nodes on the same local area network (LAN) segment.1 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. Does the link layer encapsulates the datagram received from the network layer into a frame?Is the link layer incapable of detecting an error in a received frame?  In this paper, we’re going to find the answer of those question and got a  brief description of IEEE,WIFI,NICs, Etc. keyword:Data link layer, physical Layer,IEEE,WiFi,sub-layers,NICs , protocols,CRC,MAC What is OSI model. In order to understand data link layer, first, we need to understand what’s OSI model. OSI known as open systems interconnection is a model for how applications can communicate over the network . The purpose of this model is to guide vendors and developers so the digital communication products and software programs they create will interoperate and facilitate clear comparisons among communications tools. 1 The main concept of OSI is that the process of communication between two endpoints in a telecommunication network can be divided into seven distinct groups of related functions, or layers. Each communicating user or program is at a computer that can provide those seven layers of function1 . So in a given message between users, there will be a flow of data down through the layers in the source computer, across the network and then up through the layers in the receiving computer. The seven layers of function are provided by a combination of applications, operating systems, network card device drivers and networking hardware that enable a system to put a signal on a network cable or out over Wi-Fi or other wireless protocol).2 The data link layer is the second layer of the seven-layer OSI model of computer networking. Each physical medium has link-layer specifications for network and link-layer protocol characteristics such as physical addressing, network topology, error notification, frame sequencing, and flow control.3P1Physical AddressingPhysical addressing is different from network addressing. Network addresses differentiate between nodes or devices in a network, allowing traffic to be routed or switched through the network. In contrast, physical addressing identifies devices at the link-layer level, differentiating between individual devices on the same physical medium. The primary form of physical addressing is the media access control (MAC) address.3Network TopologyNetwork topology specifications identify how devices are linked in a network. Some media allow devices to be connected by a bus topology, while others require a ring topology. The bus topology is used by Ethernet technologies, which are supported on Services Routers.3Error NotificationThe data link layer provides error notifications that alert higher-layer protocols that an error has occurred on the physical link. Examples of link-level errors include the loss of a signal, the loss of a clocking signal across serial connections, or the loss of the remote endpoint on a T1 or T3 link.3Frame SequencingThe frame sequencing capabilities of the data link layer allow frames that are transmitted out of sequence to be reordered on the receiving end of a transmission. The integrity of the packet can then be verified by means of the bits in the Layer 2 header, which is transmitted along with the data payload.3Flow ControlFlow control within the data link layer allows receiving devices on a link to detect congestion and notify their upstream and downstream neighbors. The neighbor devices relay the congestion information to their higher-layer protocols so that the flow of traffic can be altered or rerouted.3Data Link SublayersThe data link layer is divided into two sublayers: Logical Link Control (LLC) and Media Access Control (MAC). The LLC sublayer manages communications between devices over a single link of a network. This sublayer supports fields in link-layer frames that enable multiple higher-layer protocols to share a single physical link.The MAC sublayer governs protocol access to the physical network medium. Through the MAC addresses that are typically assigned to all ports on a router, multiple devices on the same physical link can uniquely identify one another at the data link layer. MAC addresses are used in addition to the network addresses that are typically configured manually on ports within a network.3MAC AddressingA MAC address is the serial number permanently stored in a device adapter to uniquely identify the device. MAC addresses operate at the data link layer, while IP addresses operate at the network layer. The IP address of a device can change as the device is moved around a network to different IP subnets, but the MAC address remains the same, because it is physically tied to the device.16Within an IP network, devices match each MAC address to its corresponding configured IP address by means of the Address Resolution Protocol (ARP). ARP maintains a table with a mapping for each MAC address in the network.3Most Layer 2 networks use one of three primary numbering spaces—MAC-48, EUI-48 (Extended Unique Identifier), and EUI-64—which are all globally unique. MAC-48 and EUI-48 spaces each use 48-bit addresses, and EUI-64 spaces use a 64-bit addresses, but all three use the same numbering format. MAC-48 addresses identify network hardware, and EUI-48 addresses identify other devices and software.4The Ethernet and ATM technologies supported on Services Routers use the MAC-48 address space. IPv6 uses the EUI-64 address space.16MAC-48 addresses are the most commonly used MAC addresses in most networks. These addresses are 12-digit hexadecimal numbers (48 bits in length) that typically appear in one of the following formats:MM:MM:MM:SS:SS:SSMM-MM-MM-SS-SS-SSThe first three octets (MM:MM:MM or MM-MM-MM) are the ID number of the hardware manufacturer. Manufacturer ID numbers are assigned by the Institute of Electrical and Electronics Engineers (IEEE). The last three octets (SS:SS:SS or SS-SS-SS) make up the serial number for the device, which is assigned by the manufacturer. For example, an Ethernet interface card might have a MAC address of 00:05:85:c1:a6:a0.3This layer is the protocol layer that transfers data between adjacent network nodes in a wide area network (WAN) or between nodes on the same local area network (LAN) segment.1 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. 8The data link layerThe data link layer is concerned with local delivery of frames between devices on the same LAN. Data-link frames, as these protocol data units are called, do not cross the boundaries of a local network. Inter-network routing and global addressing are higher-layer functions, allowing data-link protocols to focus on local delivery, addressing, and media arbitration. This way, the data link layer is analogous to a neighborhood traffic cop; it endeavors to arbitrate between parties contending for access to a medium, without concern for their ultimate destination. When devices attempt to use a medium simultaneously, frame collisions occur. Data-link protocols specify how devices detect and recover from such collisions, and may provide mechanisms to reduce or prevent them.8Examples of data link protocols are Ethernet for local area networks (multi-node), the Point-to-Point Protocol (PPP), HDLC and ADCCP for point-to-point (dual-node) connections. In the Internet Protocol Suite (TCP/IP), the data link layer functionality is contained within the link layer, the lowest layer of the descriptive model.15Types of data link protocols.16Often called layer 2 protocols, data link protocols exist in the protocol layer just above the physical layer relative to the OSI protocol model. Data link protocols provide communication between two devices. Because there are many different ways to connect devices, there are many different data link protocols.16 The defining factors areDedicated point-to-point links between two devices, such as modem, bridges, or routersShared media links in which multiple devices share the same cable (i.e., Ethernet LAN)The PPP (Point-to-Point Protocol) that people use to connect to the Internet via a dial-up modem is an example of a data link protocol. Because the link between two systems is point to point, the bits are always delivered from sender to receiver in order. Also, unlike shared-media LANs in which multiple stations attempt to use the network, there is no contention.16Data link protocols may provide any of the following services17:Framing Data is broken up into frames that are transmitted as independent units. If errors are detected in a frame, it is only necessary to retransmit that frame.Session setup and termination For reliable services, session control messages are used by end systems to exchange status information about the session.Error detection Determines whether a frame has been delivered accurately. A checksum is calculated on a frame by the sender, and the receiver must perform the same calculation and come up with the same checksum. If not, the frame is considered corrupted. If reliable services are being used, the frame is retransmitted. For non-reliable services, the frame is dropped and upper-layer protocols are relied on to handle the problem.Addressing on a multipoint medium such as a LAN A computer’s address is usually the hardwired address of the NIC (network interface card) .NIC, also known as a network interface card, network adapter, LAN adapter or physical network interface, and by similar terms is a computer hardware component that connects a computer to a computer network.11Early network interface controllers were commonly implemented on expansion cards that plugged into a computer bus. The low cost and ubiquity of the Ethernet standard means that most newer computers have a network interface built into the motherboard.11Modern network interface controllers offer advanced features such as interrupt and DMA interfaces to the host processors, support for multiple receive and transmit queues, partitioning into multiple logical interfaces, and on-controller network traffic processing such as the TCP offload engine.10The network controller implements the electronic circuitry required to communicate using a specific physical layer and data link layer standard such as Ethernet or Wi-Fi.a This provides a base for a full network protocol stack, allowing communication among small groups of computers on the same local area network (LAN) and large-scale network communications through routable protocols, such as Internet Protocol (IP).10The NIC allows computers to communicate over a computer network, either by using cables or wirelessly. The NIC is both a physical layer and data link layer device, as it provides physical access to a networking medium and, for IEEE 802 and similar networks, provides a low-level addressing system through the use of MAC addresses that are uniquely assigned to network interfaces.10Flow control A technique that prevents the sender from sending more, overflowing the receiver with more data than it can handle.Reliable services were essential in the days of dumb terminals that did not have the capabilities to perform error or frame checking. Today, end systems have their own processing power, so reliability services are not essential in the network itself. Instead, reliable services are executed on end systems. TCP is a reliable transport layer protocols that can replace network- level reliability services.16Common Data Link Protocols17The most common data link level protocols are listed here with a short description. Note that most of these data link protocol are used for WAN and Modem Connections. LLC is a LAN data link protocol.SDLC (Synchronous Data Link Protocol) This protocol was originally developed by IBM as part of IBM’s SNA (Systems Network Architecture). It was used to connect remote devices to mainframe computers at central locations in either point-to-point (one-to-one) or point-to-multipoint (one-to-many) connections.17HDLC (High-level Data Link Control) This protocol is based on SDLC and provides both a best-effort unreliable service and a reliable service. It is used with various serial interface protocols defined in the physical layer, such as EIA/TIA-232, V.24, V.35, and others.17SLIP (Serial Line Interface Protocol) SLIP is a data link control facility for transmitting IP packets, usually between an ISP (Internet service provider) and a home user over a dial-up link. SLIP has some limitations, including a lack of any error-detection and correction mechanisms. It is up to higher-layer protocols to perform these checks. Used over much of the same serial interfaces as HDLC.17PPP (Point-to-Point Protocol) PPP provides the same functionality as SLIP (i.e., it is commonly used for Internet connections over dial-up lines); but it is a more robust protocol that can transport not only IP, but also other types of packets. Frames contain a field that identifies the type of protocol being carried (IP, IPX, and so on). It is used over much of the same serial interfaces as HDLC.17LAP (Link Access Procedure) LAP has reliability service features and comes in three varieties. LAPB (LAP Balanced) is a protocol that provides point-to-point connections on X.25 packet-switched networks. LAPD (LAP D-Channel) provides the data link control over the D channel of an ISDN (Integrated Services Digital Network) connection. LAPF (LAP Frame-Mode Bearer Services) provides the data link for frame relay networks.17Frame Relay LAP used with X.25 is highly reliable, but it also has high overhead. Frame relay does away with the reliability services (i.e., error-correction mechanisms are removed) to improve throughput.17LLC (Logical Link Control) The IEEE (Institute of Electrical and Electronic Engineers) defines this protocol in its 802.x family of networks standards. The ANSI FDDI standard also uses this protocol. LLC is discussed further in the next section.17Overview of IEEE 802 StandardsIEEE 802 is a family of IEEE standards dealing with local area networks and metropolitan area networks (see p2).6More specifically, the IEEE 802 standards are restricted to networks carrying variable-size packets. By contrast, in cell relay networks data is transmitted in short, uniformly sized units called cells. Isochronous networks, where data is transmitted as a steady stream of octets, or groups of octets, at regular time intervals, are also out of the scope of this standard.P2All 802 standards provide a common upper interface to Logical Link Control (LLC) • A MAC protocol may be specified for use with different physical mediaLAN Data Link ControlsThe IEEE (Institute of Electrical and Electronics Engineers) has defined a number of LAN technologies in the data link layer, including Ethernet, Fast Ethernet, Gigabit Ethernet, and token ring. You can refer to the related entries page for more information.15The actual data link layer is split into two sublayers, called the MAC (Medium Access Control) sublayer and the LLC (Logical Link Control) sublayer, as shown in Figure D-11. The lower MAC layer defines the media access method, which can be CSMA/CD (carrier sense multiple access/collision detection), token ring, or other IEEE physical interface. The LLC sublayer provides a way for the network layer to communicate with one of these protocols.15As it stated above, one of the service link layer provided is error check and error correction. Now, we would to introduce the cyclic redundancy check as one of the example here. One widely used parity bit based error detection scheme is the cyclic redundancy check or CRC.The Cyclic Redundancy Check 4is an error-detecting code used to determine if a block of data has been corrupted. CRCs are ubiquitous. They are present in many of the link layers that TCP/IP is used over. For instance, Ethernet and Wi-Fi packets both contain CRCs.The CRC is based on some fairly impressive looking mathematics. It is helpful as you deal with its mathematical description that you recall that it is ultimately just a way to use parity bits.The presentation of the CRC is based on two simple but not quite “everyday” bits of mathematics: polynomial division and arithmetic over the field of integers mod 2.Arithmetic over the field of integers mod 2 is simply arithmetic on single bit binary numbers with all carries (overflows) ignored. So 1 + 1 = 0 and so does 1 – 1. In fact, addition and subtraction are equivalent in this form of arithmetic.Polynomial division isn’t too bad either. There is an algorithm for performing polynomial division that looks a lot like the standard algorithm for integer division. More interestingly from the point of view of understanding the CRC, the definition of division (i.e. the definition of the quotient and remainder) are parallel.When one says “dividing a by b produces quotient q with remainder r” where all the quantities involved are positive integers one really means thata = q b + rand that 0 <=r < bWhen one says "dividing a by b produces quotient q with remainder r" where all the quantities are polynomials, one really means the same thing as when working with integers except that the meaning of "less than" is a bit different. For polynomials, less than means of lesser degree. So, the remainder of a polynomial division must be a polynomial of degree less than the divisor.Now, we can put this all together to explain the idea behind the CRC. Any particular use of the CRC scheme is based on selecting a generator polynomial G(x) whose coefficients are all either 0 or 1. 4Just to be different from the book, we will use : x3 + x2 + 1 as our example of a generator polynomial. 4Given a message to be transmitted: bn bn-1 bn-2 . . . b2 b1 b0,  view the bits of the message as the coefficients of a polynomial B(x) = bn xn + bn-1 xn-1 + bn-2 xn-2 + . . . b2 x2 + b1 x + b0  Multiply the polynomial corresponding to the message by xk where k is the degree of the generator polynomial and then divide this product by the generator to obtain polynomials Q(x) and R(x) such that: xk B(x) = Q(x) G(x) + R(x)Treating all the coefficients not as integers but as integers modulo 2. Finally, treat the coefficients of the remainder polynomial, R(X) as "parity bits". That is, append them to the message before actually transmitting it. Since the degree of R(x) is less than k, the bits of the transmitted message will correspond to the polynomial: xk B(x) + R(x)Since addition and subtraction are identical in the field of integers mod 2, this is the same asxk B(x) - R(x)From the equation that defines division, however, we can conclude that:xk B(x) - R(x) = Q(x) G(x)In other words, if the transmitted message's bits are viewed as the coeeficients of a polynomial, then that polynomial will be divisible by G(X).This last fact is the basis of error checking using the CRC. When a message is received the corresponding polynomial is divided by G(x). If the remainder is non-zero, an error is detected. Otherwise, the message is assumed to be correct 4.A brief description of WiFiWi-Fi is the name of a wireless networking technology that uses radio waves to provide high-speed network and Internet connections. The Wi-Fi Alliance, the organization that owns the Wi-Fi (registered trademark) term specifically defines Wi-Fi as "wireless local area network (WLAN) products that are based on the Institute of Electrical and Electronics Engineers' (IEEE) 802.1111 standards." Initially, Wi-Fi was used in place of only the 2.4GHz 802.11b standard, but the Wi-Fi Alliance has expanded the generic use of the Wi-Fi term to include any type of network or WLAN product based on any of the 802.11 standards, including 802.11b, 802.11a, dual-band, and so on, in an attempt to stop confusion about wireless LAN interoperability.13Wi-Fi works with no physical wired connection between sender and receiver by using radio frequency (RF) technology, a frequency within the electromagnetic spectrum associated with radio wave propagation. When an RF current is supplied to an antenna, an electromagnetic field is created that then is able to propagate through space.13The cornerstone of any wireless network is an access point (AP). The primary job of an access point is to broadcast a wireless signal that computers can detect and "tune" into. In order to connect to an access point and join a wireless network, computers and devices must be equipped with wireless network adapters.13Wi-Fi is supported by many applications and devices including video game consoles, home networks, PDAs, mobile phones, major operating systems and other types of consumer electronics. Any products that are tested and approved as "Wi-Fi Certified" (a registered trademark) by the Wi-Fi Alliance are certified as interoperable with each other, even if they are from different manufacturers. For example, a user with a Wi-Fi Certified product can use any brand of access point with any other brand of client hardware that also is also "Wi-Fi Certified". Products that pass this certification are required to carry an identifying seal on their packaging that states "Wi-Fi Certified" and indicates the radio frequency band used (2.5GHz for 802.11b, 802.11g, or 802.11n, and 5GHz for 802.11a).13A common misconception is that the term Wi-Fi is short for "wireless fidelity." This is not the case. Wi-Fi is simply a trademarked term meaning IEEE 802.11x. The false notion that the brand name "Wi-Fi" is short for "wireless fidelity" has spread to such an extent that even industry leaders have included the phrase wireless fidelity in a press release. You'll also find references to Wi-Fi being short for wireless fidelity on a number of well-known and respected technology-focused publications and websites. The truth is, Wi-Fi isn't short for anything — and it never was.14The current confusion seems to stem from a brief period early in the days of the Wi-Fi Alliance when a regrettable tag line was added that stated, 'The Standard for Wireless Fidelity.' This was not part of the original name and was not created by Interbrand, but it was added as an afterthought in an attempt to help users make sense of the new and somewhat nonsensical word, Wi-Fi.14 References1. http://www.linfo.org/data_link_layer.html2. https://www.webopedia.com/DidYouKnow/Computer_Science/wifi_explained.asp3.  "5.2 RM description for end stations". IEEE Std 802-2014, IEEE Standard for Local and Metropolitan Area Networks: Overview and Architecture. ieee.4. https://cardinalpeak.com/blog/understanding-the-cyclic-redundancy-check/5. https://en.wikipedia.org/wiki/OSI_model6.  "The OSI Model's Seven Layers Defined and Functions Explained". Microsoft Support. Retrieved 2014-12-28.7.  "ITU-T Recommendataion X.800 (03/91), Security architecture for Open Systems Interconnection for CCITT applications". ITU. Retrieved 14 August2015.8. https://en.wikipedia.org/wiki/Data_link_layer9.https://view.officeapps.live.com/op/view.aspx?src=https://www.cise.ufl.edu/~helmy/F15/Chapter5-helmy-F15.ppt10. https://en.wikipedia.org/wiki/Network_interface_controller11.  International Organization for Standardization (1989-11-15). "ISO/IEC 7498-4:1989 -- Information technology -- Open Systems Interconnection -- Basic Reference Model: Naming and addressing". ISO Standards Maintenance Portal. ISO Central Secretariat. Retrieved 2015-08-17.12.https://www.ieee.org/index.html13.https://www.webopedia.com/TERM/W/Wi_Fi.html14. https://www.webopedia.com/TERM/W/Wi_Fi_Alliance.html15. http://www.dsi.unive.it/~franz/reti/dll/Protocolli.html16.  "What is layer 2, and Why Should You Care?". accel-networks.com. Archived from the original on 2010-02-18. Retrieved 2009-09-29.17. Regis J. Bates and Donald W. Gregory (2007). Voice & data communications handbook (5th ed.). McGraw-Hill Professional. p. 45. ISBN 978-0-07-226335-0.