IT and Business Insights for SMB Solution Providers

Understanding Network Data Delivery: Layers 2 and 3 of the OSI Model

<img src="/%5Bimages%7COpenAccessDataProvider%5D3e772d59-d893-4b19-a925-651d89229c46" data-displaymode="Original" alt="A young man working at a desk with a notepad and laptop." title="12.2 Blog Thumbnail"><p>The Open Systems Interconnection (OSI) model is a series of layers through which computer systems use to communicate. There are seven layers, and the networking layer would be layer 3. The network layer is responsible for packet forwarding, including routing through intermediate routers. However, when it comes to understanding network data delivery, we need to get through layer 2 before we can move on to layer 3.</p> <p>The data link layer, or layer 2, is the protocol layer that transfers data between nodes on a network segment across the physical layer, or what is commonly known as a host’s physical address. Layer 2 is divided into two parts, consisting of the MAC and data link sublayers, detailing addressing and the layout of data frames, and Layer 3 includes a host’s logical address. Let’s take a closer look at how these layers work together to ensure a delicious flow of data.</p> <h2>What Are the Seven Layers of the OSI Model?</h2> <p>Before we dig deep into layers 2 and 3, let’s start with a little bit of background on the Open Systems Interconnection (OSI) model. The OSI model was developed by the <a href="/%3Ca%20href%3D"">International">">International Organization for Standardization (ISO)</a>. It describes the layers that computer systems use to communicate over a network and was the first standard model for network communications adopted by all major computer and telecommunication companies in the early 1980s.</p> <p>The OSI model has seven layers:</p> <ol><li>Physical</li><li>Data Link</li><li>Network</li><li>Transport</li><li>Session</li><li>Presentation</li><li>Application</li></ol> <h2>What Is Layer 2 in the OSI Model?</h2> <p>As mentioned above, layer 2 is split into two parts: the media access control (MAC) sub layer and the data link sub layer. These sub layers each do their part to make up the computer’s physical address.</p> <h3>Media Address Control (MAC) Sub Layer</h3> <p>To gain an appreciation of the characteristics of addressing, it is helpful to bring forward an example that may be familiar and easy to understand.</p> <p>Let’s think about this in terms of a mobile home community. Each of the mobile homes have a serial number permanently attached to the home’s frame. Computers have a similar address, called its media access control (MAC) address. That address is “burnt” on to the computers network interface card and is unique in nature. An example of the MAC address is shown in figure 1 below.</p><br>

<div class="center"><img title="12.2 Blog Article" alt="A photo of media access control (mac) address" src="/%3Ca%20href%3D""></div>">

<p align="center">Figure 1: Media Access Control (MAC) address</p> <p>MAC (or physical) addressing provides an effective method of moving data across a small community of computing devices where routing traffic between multiple communities is not required. Traffic distribution for these small networks is handled by layer 2 switches that learn the MAC addresses of the computers connected to ports on the switch. The switches then send packets from the sending computer directly to the receiving device. This method of directing traffic helps reduce potential network congestion.</p> <p>A MAC address consists of a series of 12 hexadecimal numbers. The first six numbers are useful in identifying the manufacturer of the network interface card. The last six numbers are assigned by the card manufacturer, providing a unique addressing scheme. This avoids the possibility of having two computers on the same network with the same physical address.</p> <h3>Data Link Sub Layer</h3> <p>Another layer 2 function is to establish protocols that relate to the structure of data frames that are placed on the network for data transmission. Uniformity is an important characteristic and includes placing both addresses for the data sender as well as the data recipient. Figure 2 below provides an example of an Ethernet II frame.<br>

</p><div class="center"><img title="12.2 Blog Article 2" alt="A screenshot of an ethernet ii frame" src="/%3Ca%20href%3D""></div>">

<p align="center">Figure 2: Ethernet II frame</p> <p>Each frame includes the MAC address of the source of the frame and the MAC address of the intended recipient. When a device sends a packet to the broadcast MAC address (FF:FF:FF:FF:FF:FF), it is delivered to all stations on the local network.</p> <p>In the early days of networks, MAC addressing worked well, with only a few computing devices on a single flat network. Because of this, it was unnecessary to extend the network past its limited physical boundaries. Through a process associated with linking a computing device name to its MAC address, either by way of a table or through broadcast protocols like Microsoft’s NetBEUI, devices were able to effectively communicate.</p> <p>However, as networks grew, network traffic grew, and traffic congestion became problematic. As a consequence, a second layer of addressing designed to facilitate connecting two or more networks together became necessary to deal with both traffic congestion and latency issues. Thus, the data link sub layer was born.</p> <h2>Understanding OSI Layer 3</h2> <p>Commonly referred to as the networking layer of the OSI model, layer 3 provides the structure relating to how data can be efficiently transferred from one network to another. Let’s go back to the mobile home community example. .</p> <p>When a unit is placed in a mobile home community, it is typically located on a lot (often referred to as a space). The lot address can be used for postal service purposes. As you know, if you want to mail a package from one mobile home to another, serial numbers won’t work. But if you address the package properly, using the format the postal service requires, we have some assurance of delivery.</p> <p>When it comes to computer networking, our postal service consists of computing devices known as routers. Functioning at layer 3 requires the creation of an outside envelope over the layer 2 frame, that includes the layer 3 address of the sender of the packet, along with the layer 3 address of the recipient.</p> <p>Layer 3 addresses are divided in a fashion that identifies a specific network address and a specific host or group of hosts. When it is determined that the recipient’s network address is different from the sender’s network address, packets are directed to the network’s router for delivery handling.</p> <p>In today’s modern networking, we use the TCP/IP suite of protocols for communication that crosses networks. The postal service provides a vehicle for understanding how logical addressing using IP protocol works.</p> <p>Using the logic address above, the postal service would be able to deliver a package based upon the following:</p>

<div class="center"><img title="Code Screenshot 1" alt="Code screenshot 1" src="/%3Ca%20href%3D""></div>">

<p>Using the IP (version 4) addressing scheme for the IP address, the address breaks out as:</p>

<div class="center"><img title="Code Screenshot 2" alt="Code screenshot 2" src="/%3Ca%20href%3D""></div>">

<p>The processes and procedures associated with logical networking as it relates to subnetting and supernetting are beyond the scope of this article.</p> <p>What is important is that you understand that a portion of an IP address is allocated for both network and host identification. Devices that are located on the same network will be able to communicate effectively at layer 2. Devices that are on different networks will communicate by directing their output data to routers that will be charged with the responsibility of delivery.</p> <h2>Get Started with CompTIA Network+</h2> <p>If computer networking piques your interest, <a href="/%3Ca%20href%3D"">CompTIA">">CompTIA Network+</a> can help you develop your IT career. CompTIA Network+ certification holders are often hired as network field technicians, engineers, analysts and support specialists – just to name a few.</p> <p>Technology employers hire IT pros with CompTIA Network+ because the credential ensures you have the knowledge and skills to do the following:</p> <ul><li>Design and implement functional networks</li><li>Configure, manage and maintain essential network devices</li><li>Use devices such as switches and routers to segment network traffic and create resilient networks</li><li>Identify benefits and drawbacks of existing network configurations</li><li>Implement network security, standards and protocols</li><li>Troubleshoot network problems</li><li>Support the creation of virtualized networks</li></ul> <p>There are a variety of ways to start studying for CompTIA Network+, including self-study eLearning with <a href="/%3Ca%20href%3D"">CertMaster">">CertMaster Learn</a> or <a href="/%3Ca%20href%3D"">CompTIA">">CompTIA Labs</a>, using the Official CompTIA Network+ <a href="/%3Ca%20href%3D"">Study">">Study Guide</a> or taking CompTIA live <a href="/%3Ca%20href%3D"">online"> instructor-led training</a>. (P.S. I currently teach with CompTIA.)</p> <p><em><strong>Want to start a career in computer networking? <a href="/%3Ca%20href%3D"">CompTIA">">CompTIA Network+ can help you get there. Download the exam objectives for free to get started.</a></strong></em></p> <p><em><a href="/%3Ca%20href%3D"">Steve">">Steve Linthicum</a></em><em>&nbsp;taught cybersecurity courses for decades as a professor at the college and university levels. He holds an array of IT and cybersecurity industry certifications, including <a href="/%5Bf669d9a7-009d-4d83-ddaa-000000000002%5D4397bc64-a934-6311-a3b7-ff00008d0b43">CompTIA Certified Technical Trainer (CTT+)</a></em></p>

About the Author

With more than 2,000 members, 3,000 academic and training partners and tens of thousands of registered users spanning the entire information communications and technology (ICT) industry, CompTIA has become a leading voice for the technology ecosystem.

ChannelPro SMB Magazine

Get an edge on the competition

With each issue packed full of powerful news, reviews, analysis, and advice targeting IT channel professionals, ChannelPro-SMB will help you cultivate your SMB customers and run your business more profitably.