The Internet Protocol Suite
There is a suite of protocols that you might have read about or heard of called "TCP/IP". This is actually two protocols - TCP and IP - but it's also just a name for what is a much bigger suite of protocols.
These protocols are what we're going to go over throughout this part of the course.
The TCP/IP Model
The protocols are divided among multiple "layers", each describing the function or objective of a protocol that operates at that layer. The confusing thing about this layer system is there are different definitions:
- RFC 1122, Internet STD 3
- Cisco Academy
- Stallings
- Arpanet Reference Model
- OSI model
The "OSI model" is by far the most commonly referenced among them all, but I'm going to be using the much simpler, easier to work with TCP/IP model, which looks like this:
- Link Layer
- Internet Layer
- Transport Layer
- Application Layer
Just four layers to remember and work with, and we're not even going to bother with the "Link Layer" as you simply won't need to work with it in a public Cloud based environment. That being said let's briefly review each layer so that we can understand its functional and objective in the model.
Link Layer
The part of this that reads, "The link includes all hosts accessible without traversing a router" means everything on the local network segment or the LAN (Local Area Network.)
At home you likely have a router that your computer connects to, your mobile phone, your tablet, and so on - they're all connected to your own LAN. If they talk to each other then they're operating at the Link Layer because they do not need to "leave" your LAN (which requires a router.) If they want to talk another system on the Internet, say Google, then they need to leave the Link Layer, via a router, and enter the Internet Layer.
This concept doesn't really translate to any of the work you're going to be doing in public Cloud environments as the Link Layer is abstracted away for you. And although you will work with subnets, which work at the Link Layer, you'll treat them more as "containers" of systems at the network level versus the physical nature the Link Layer refers to.
Internet Layer
So now we're talking about one network talking to another network. Even though your local computer, mobile phone, tablet, etc. do not represent an entire network (they're a node on the network) they are inside of a network (a LAN.) Because you're trying to talk to another node inside of another network, you're now talking about internetworking which is how the entire concept of the (public) Internet works.
By trying to talk to another computer in another network, you need to route the connection between the two networks. We use IP addresses to achieve this and that's why we talk about IPv4 and IPv6 later in this chapter.
Transport Layer
This is where TCP, UDP and QUIC come into the picture. At this layer we're talking about how we "wrap" up data inside of TCP, UDP and QUIC segments and then send them to another machine using the Internet Layer. This layer is "envelope" that you put your letter inside of, and the Internet Layer is the address you write on the front.
Application Layer
In my opinion this is the layer where all the fun happens. It's this layer where we find HTTP(S), DNS, SSH, TLS/SSL, IMAP, POP and all the other protocols we use daily as we consume Internet facing services like Google and Reddit.
This is the layer where most of your work gets done, as the lower level stuff doesn't change all that much or that often. Instead as an engineer working in the public Cloud space you'll mostly be setting things up to work with these higher level protocols.
The OSI Networking Model
You're going to read about and see the OSI networking model referenced way more than the TCP/IP model in academic papers, assignments, lecture slides, etc. It's more complicated but it goes into more detail and is used more in the industry as a reference. The TCP/IP model, however, is really how people work with networking: it's just easier to work with and understand.
The OSI (Open Systems Interconnection) model, developed by the International Organization for Standardization (ISO), is a framework that outlines the functions of a networking system, much like the TCP/IP model above. It divides these functions into seven distinct layers (versus the 4 of the TCP/IP model), each one building upon the last to facilitate communication between different systems.
Let's look at each layer, starting from layer 1 (the bottom) and working our way up to layer 7. I think you'll find a lot of overlap with the TCP/IP model.
Brace yourself...
This is where things get dry and technical.
Physical Layer
This is the lowest layer of the OSI model and it defines the physical and electrical medium for data transfer. This includes the layout of pins, voltages, cable specifications, hubs, repeaters, network adapters, and more. It’s essentially concerned with transmitting raw bits over a communication channel.
Data Link Layer
The data link layer provides node-to-node data transfer—a link between two directly connected nodes. It also handles error correction from the physical layer. In this layer, data packets are encoded and decoded into bits and it is responsible for the MAC (Media Access Control) address which is necessary for communication between devices on the same network. Protocols like Ethernet and PPP operate at this layer.
Network Layer
This layer is responsible for the delivery of packets from the source host to the destination host based on their addresses. It defines the routing of packets, including routing protocols and routing tables in routers. The network layer manages packet fragmentation and reassembly, and handles logical addressing (such as IP addresses) which is essential for routing through complex networks.
Transport Layer
The transport layer provides transparent transfer of data between end systems, or hosts, and is responsible for end-to-end error recovery and flow control. It ensures complete data transfer. This layer includes protocols such as TCP (Transmission Control Protocol), which provides connection-oriented communications, and UDP (User Datagram Protocol), which provides connectionless communication.
Session Layer
The session layer establishes, manages, and terminates connections between applications. It sets up, coordinates, and terminates conversations, exchanges, and dialogues between the applications at each end. It handles service requests and responses in a network and manages session tokens which keep track of session information.
Presentation Layer
This layer formats or translates data for the application layer based on the syntax or semantics that the application accepts. This layer is responsible for compression, decompression, encryption, and decryption. It acts as a data translator for the network and can be thought of as the data format layer.
Application Layer
The application layer provides services directly to user applications. It enables the user, whether human or software, to interact with the network. This layer provides application services for file transfers, email, and other network software services. Protocols like HTTP, FTP, SMTP, and DNS operate at this layer.
This seven-layer model helps differentiate between the functions performed at each level and provides a modular approach to network design. In practical scenarios, like with the simpler TCP/IP model above, the OSI model serves more as a guideline or a point of reference. The TCP/IP model is more aligned with what you see being used in the real world.