Kaigai Blog living abroad in my twenties

【My Study Note】The TCP/IP Five-Layer Network Model

Infotech Networking

The TCP/IP Five-Layer Network Model

# Layer Name Protocol Protocol Data unit Addressing
5 Application HTTP, SMTP, etc… Messages N/A
4 Transport TCP/UDP Segment Port #’s
3 Network IP Datagram IP address
2 Data Link Ethernet, Wi-Fi Frames Mac address
1 Physical 10 Base T, 802.11 Bits N/A

Physical Layer


This represents the physical devices that interconnect computers. This includes the specifications for the networking cables and the connectors that join devices together along with specifications describing how signals are sent over these connections. 

Data Link Layer


Some sources will call this layer the network interface or the network access layer. While the physical layer is all about cabling, connectors, and sending signals, the data link layer is responsible for defining a common way of interpreting these signals, so network devices can communicate. 

Lots of protocols exist at the data link layer, but the most common is known as Ethernet, although wireless technologies are becoming more and more popular. Beyond specifying physical layer attributes, the Ethernet standards also define a protocol responsible for getting data to nodes on the same network or link. 

Network Layer


This is sometimes called the Internet layer. It’s this layer that allows different networks to communicate with each other through devices known as routers. A collection of networks connected together through routers is an internetwork, the most famous of these being the Internet. While the data link layer is responsible for getting data across a single link, the network layer is responsible for getting data delivered across a collection of networks. 

Think of when a device on your home network connects with a server on the Internet. It’s the network layer that helps gets the data between these two locations. 

The most common protocol used at this layer is known as IP (Internet Protocol). IP is the heart of the Internet and most small networks around the world. Network software is usually divided into client and server categories, with the client application initiating a request for data and the server software answering the request across the network. 

Transport Layer


A single node may be running multiple client or server applications. So, you might run an email program and a web browser, both client applications, on your PC at the same time, and your email and web server might both run on the same server. Even so, emails end up in your email application and web pages end up in your web browser. 

That’s because of the transport layer. While the network layer delivers data between two individual nodes, the transport layer sorts out which client and server programs are supposed to get that data.

The most commonly used protocol in this layer is TCP (Transmission Control Protocol) and UDP (User Datagram Protocol). The big difference between the two is that TCP provides mechanisms to ensure that data is reliably delivered while UDP does not. 

It’s important to know that the network layer, such as IP, is responsible for getting data from one node to another. And the transport layer, mostly TCP and UDP, is responsible for ensuring that data gets to the right applications running on those nodes. 

Application Layer


There are lots of different protocols at this layer, and as you might have guessed from the name, they are application-specific. Protocols used to allow you to browse the web or send and receive emails are some common ones. 

The protocols at play in the application layer will be most familiar to you since they are ones you probably interacted with directly before even if you didn’t realize it. 

Conclusion


You can think of layers like different aspects of a package being delivered. The physical layer is the delivery truck and the roads. The data link layer is how the delivery trucks get from one intersection to the next over and over. The network layer identifies which roads need to be taken to get from address A to address B. The transport layer ensures that the delivery driver knows how to knock on your door to tell you your package has arrived. And the application layer is the contents of the package itself.