|
TCP/IP organizes protocols in five layers, which are stacked up in the TCP/IP model like a five-layer cake.
 | Technically, the five layers in the cake are called a stack, and the protocols that sit in these layers are called a protocol stack. Each layer of the stack depends on the layers below it; that is, each layer provides services to the layer above it. When two peer computers are communicating, each computer has its own set of layers. When you send a message to another computer on the network, your information starts at the top layer of your computer, travels down all the layers to the bottom of the stack, and jumps across to the other computer. When your information gets to the other computer, it starts at the bottom layer and moves up the stack to the application in the top layer, as shown in Figure 1. |
Figure 1: Information travels layer by layer.
Each layer has a special function. The lower layers are hardware-oriented. The highest layer does user stuff, such as e-mail and file transfers.
Layer 1: The physical layer
The physical layer at the bottom of the stack (or cake) is pure hardware, including the cable, satellite, or other connection medium and the network interface card. This is where electrical signals move around, and we try not to think too hard about how it works.
Layer 2: The data link layer
This is another layer we don't want to strain our brains trying to figure out. Again, hardware is involved. This is the layer that splits your data into packets to be sent across the connection medium. Here's where wiring, such as Ethernet or token ring, gets involved. After the information is on the wire, the data link layer handles any interference. If there is heavy sunspot activity, the data link layer works hard to make sure that the interference doesn't garble the electric signals.
 | Sunspot activity and solar flares tend to disturb all sorts of transmissions, not just network signals. Your cellular telephone and television reception (including cable TV), for example, can degrade during solar episodes. |
Layer 3: The Internet layer
The bottom two layers are about hardware, while TCP/IP is software. Layer 3 is the first place where a TCP/IP protocol fits into the networking equation. IP is the TCP/IP protocol that works at this layer. This layer gets packets from the data link layer (Layer 2) and sends them to the correct network address. If more than one possible route (or path) is available for your data to travel, the network layer figures out the best route. Without this layer, your data couldn't get to the right place.
Layer 4: The transport layer
Although the network layer routes your information to its destination, it can't guarantee that the packets holding your data will arrive in the correct order or that they won't have picked up any errors during transmission. That's the transport layer's job. TCP is one of the TCP/IP protocols that work at the transport layer; UDP is another one. The transport layer makes sure that your packets have no errors and that all the packets arrive and are reassembled in the correct order. Without this layer, you couldn't trust your network.
Layer 5: The session layer
The other protocols that make up TCP/IP sit on Layer 5 and above. Layer 5 does the following:
- Establishes and coordinates a session. A session is a connection between two computers. A session must be established between two computers before they can transmit data between themselves. A session announces that a transmission is about to occur and at the end of the transmission, determines whether the transmission was successful.
- Works with operating systems to convert files from one format to another, if the server and client use different formats. Without file format conversion, file transfers could only happen between computers that had the same file format.
- Sets up the environment so that applications can communicate with each other and with users. Requests for service and data start at the application layer and move down through the remaining four layers before going out across a network. The application layer is also where secure protocols for specific applications such as Web browsing and e-mail reside.
|