Back to the dissection lab!

Just like an Ethernet frame encapsulates an IP datagram, an IP datagram encapsulates a TCP segment. A TCP segment is the protocol data unit (mentioned in my previous post) that contains a TCP header and an application data piece (packet) which comes from the (upper) Application Layer. We typically refer to transport layer data as a segment and network layer data as a datagram.

Here’s how they all of our Lego pieces fit together: 

Source: Google

So remember, an Ethernet frame has a special payload section which is really just the entire contents of an IP datagram. 

Also remember that an IP datagram has a payload section and this is made up of what’s known as a TCP segment. 

A TCP segment is made up of a TCP header and a data section (packet). 

The data section in the TCP segment is just another payload area for where the Application layer places its data. 

The TCP header is split into lots of fields:

Source: Google

Source Port – A high numbered port chosen from a special section of ports known as ephemeral ports. A source port is required in order to keep lots of … Read the rest

Dig In

We’ve arrived at our final two layers in the TCP/IP 5 layer model: the Transport and Application layers. So what are they?

Put simply, the transport layer allows traffic to be directed to specific network applications, while the application layer allows these applications to communicate in a way they understand (via an operating system).

The two major protocols we need to be aware of here are the Transmission Control Protocol (TCP) and User Datagram Protocol (UDP). What are they? Like most great explanations, here’s the perfect meme to help us understand:

TCP is a connection orientated protocol and it provides reliable message transfer. UDP is a connection-less protocol and it does not guarantee message delivery, i.e. some of the water reaches the mouth, but the rest splashes everywhere. The UDP protocol works almost similar to TCP, but it throws all the error-checking stuff out, all the back-and-forth communication and deliverability. Why is this a good thing? Well, sometimes speed matters more than quality. UDP supports bandwidth-intensive applications that tolerate packet loss (a.k.a Zoom calls) and allows small transaction (DNS lookup). TCP, on the other hand is best utilized when quality matters, like delivering a Wikipedia article.

Some real-world UDP … Read the rest

Dig In

Welcome to the Matrix.

The grid matrix below, that is. Where we step into the third layer, known as the Network layer. 

Back in layer 2, we talked about switches and how they’re a lot better than hubs because they can utilize a node’s MAC address in order to learn where to route data vs. sending the same data to every machine. While this is clever and effective for a home or small office LAN, it doesn’t scale very well. Imagine…every single device connected to a network has a MAC address and they aren’t ordered in any systematic way. There’s no way of knowing where on the planet a certain MAC address might be at any one point in time, so it’s not ideal for communicating across distances. 

That’s exactly why we need another layer and another protocol (IP) to help route our data quickly and efficiently in a scalable manner. 

Let’s dive in!

IP addresses are 32-bit long numbers made up of 4 octets. Remember a single octet can represent all decimal numbers from 0 to 255. This means 12.30.56.78 is a valid IP address, but something like 123.456.789.300 is not because it has numbers larger than what can be … Read the rest

Dig In

While ARP may seem like the sort of sound a seal makes, we have a very different usage when it comes to networking. 

ARP stands for Address Resolution Protocol and it is a major piece of the puzzle that helps explain how MAC addresses and IP addresses relate to each other. 

Remember, an IP address is used to locate a device on a network, whereas a MAC address is what identifies the actual, physical device. 

ARP is used to discover the hardware address of a node (a device connected to a network) with a certain IP address. Or said another way, ARP is used to resolve IP addresses to MAC addresses.

Once an IP datagram is created, it needs to be encapsulated inside an Ethernet frame. This means the transmitting device needs a destination MAC address to complete the Ethernet frame header. Almost all network connected devices have a local ARP table, which is just a list of IP addresses and the MAC addresses associated with them. 

So let’s say we want to send some data to the IP address 172.16.254.1. Let’s also say that this destination doesn’t have an entry in the ARP table. Whenever this happens, the … Read the rest

Dig In

Welcome to the Jamie Ops anatomy lab. Don’t worry, we won’t be dissecting cats or frogs here, just data packets.

We need to start by understanding the term Data Packet. A data packet is an all-encompassing term that represents any single set of binary data being sent across a network link. The term data packet isn’t tied to any specific layer or technology, it just represents the concept of one set of data being sent from point A to point B. 

When we have a data packet at the Ethernet level (aka Data Link Layer) it is known as an Ethernet frame. An Ethernet frame is a very structured collection of information presented in a very specific order. It’s like a conversation. We wouldn’t start a conversation by saying, “Goodbye!” The structure of a typical conversation starts with a greeting, some sort of back and forth conversation and then closes out with a farewell statement. If things are out of order, communication breaks down quickly. This is the same reason we have a highly structured Ethernet frame. 

Our Ethernet frame is used by network interfaces at the physical layer to convert a long sequence of bits, traveling across … Read the rest

Dig In