The OSI model breaks the various aspects of a computer network into seven distinct layers. These layers are kind of like the layers of an onion: Each successive layer envelops the layer beneath it, hiding its details from the levels above. The OSI model is also like an onion in that if you start to peel it apart to have a look inside, you’re bound to shed a few tears.
The OSI model is not a networking standard in the same sense that Ethernet and TCP/IP are networking standards. Rather, the OSI model is a framework into which the various networking standards can fit. The OSI model specifies what aspects of a network’s operation can be addressed by various network standards. So, in a sense, the OSI model is sort of a standard of standards.
Table 1-1summarizes the seven layers of the OSI model.
TABLE 1-1The Seven Layers of the OSI Model
Layer |
Name |
Description |
1 |
Physical |
Governs the layout of cables and devices, such as repeaters and hubs. |
2 |
Data link |
Provides Media Access Control (MAC) addresses to uniquely identify network nodes and a means for data to be sent over the physical layer in the form of packets. Bridges and switches are layer 2 devices. |
3 |
Network |
Handles routing of data across network segments. |
4 |
Transport |
Provides for reliable delivery of packets. |
5 |
Session |
Establishes sessions between network applications. |
6 |
Presentation |
Converts data so that systems that use different data formats can exchange information. |
7 |
Application |
Allows applications to request network services. |
The first three layers are sometimes called the lower layers. They deal with the mechanics of how information is sent from one computer to another over a network. Layers 4 through 7 are sometimes called the upper layers. They deal with how application software can relate to the network through application programming interfaces.
The following sections describe each of these layers in greater detail.
The seven layers of the OSI model are a somewhat idealized view of how networking protocols should work. In the real world, actual networking protocols don’t follow the OSI model to the letter. The real world is always messier. Still, the OSI model provides a convenient — if not completely accurate — conceptual picture of how networking works.
The bottom layer of the OSI model is the physical layer. It addresses the physical characteristics of the network, such as the types of cables used to connect devices, the types of connectors used, how long the cables can be, and so on. For example, Ethernet spells out the exact Layer 1 requirements for twisted-pair cables that can be used at various speeds — 100 Mbps, 1 Gbps, 10 Gbps, and even faster. The star, bus, ring, and mesh network topologies described in Book 1, Chapter 2apply to the physical layer.
Another aspect of the physical layer is the electrical characteristics of the signals used to transmit data over the cables from one network node to another. The physical layer doesn’t define any meaning to those signals other than the basic binary values of 1 and 0. The higher levels of the OSI model must assign meanings to the bits that are transmitted at the physical layer.
One type of physical layer device commonly used in networks is a repeater, which is used to regenerate the signal whenever you need to exceed the cable length allowed by the physical layer standard. In the old days, we used to use physical layer devices called hubs to split an Ethernet segment to multiple devices. Technically, hubs are known as multiport repeaters because the purpose of a hub is to regenerate every packet received on any port on all the hub’s other ports. Repeaters and hubs don’t examine the contents of the packets that they regenerate, though. If they did, they would be working at the data link layer, and not at the physical layer.
The network adapter (also called a network interface card; NIC) installed in each computer on the network is a physical layer device. You can display information about the network adapter (or adapters) installed in a Windows computer by displaying the adapter’s Properties dialog box, as shown in Figure 1-1. To access this dialog box in Windows, open the Control Panel, choose Network and Internet, choose Network and Sharing Center, and then choose Change Adapter Settings. Then right-click the Local Area Connection icon and choose Properties from the menu that appears.
FIGURE 1-1:The Properties dialog box for a network adapter.
Windows 10 seems to bury some of the most useful settings pages, making them difficult to find. Even the incredibly useful Control Panel can be a chore to find. I suggest you pin the Control Panel to both the Start menu and the taskbar. You can find the Control Panel by pressing the Windows key, typing Control Panel, right-clicking the Control Panel icon, and choosing both Pin to Start and Pin to Taskbar so the Control Panel will always be readily available.
While you’re at it, switch Control Panel from Category view to Small Icons view. This step will eliminate a lot of extra navigation trying to get to the settings pages you need. For example, in Small Icons view, you can go directly from Control Panel to Network and Sharing Center without first having to open the Network and Internet link.
The data link layer is the lowest layer at which meaning is assigned to the bits that are transmitted over the network. Data link protocols address things such as the size of each packet of data to be sent, a means of addressing each packet so that it’s delivered to the intended recipient, and a way to ensure that two or more nodes don’t try to transmit data on the network at the same time.
The data link layer also provides basic error detection and correction to ensure that the data sent is the same as the data received. If an uncorrectable error occurs, the data link standard must specify how the node is to be informed of the error so that it can retransmit the data.
At the data link layer, each device on the network has an address: the MAC address. This address is hard-wired into every network device by the manufacturer. MAC addresses are unique; no two network devices made by any manufacturer anywhere in the world can have the same MAC address.
You can see the MAC address for a computer’s network adapter by opening a command window and running the ipconfig /all
command, as shown in Figure 1-2. In this example, the MAC address of the network card is A0-8C-FD-D0-E6-2E. (The ipconfig
command refers to the MAC address as the physical address. )
One of the most import functions of the data link layer is to provide a way for packets to be sent safely over the physical media without interference from other nodes attempting to send packets at the same time. The two most popular ways to do this are CSMA/CD and token passing. (Take a deep breath. CSMA/CD stands for Carrier Sense Multiple Access/Collision Detection.) Ethernet networks use CSMA/CD, and token ring networks use token passing.
Читать дальше