Looking Inside A Network Frame

Data is converted into a signal by network devices before being sent down the cable. But how do they actually achieve this? What else could be lurking in the signal? To detect network intrusions, perform audits, and generally diagnose problems, a network professional must examine what is in the network signal.

We know that the NIC begins by receiving the message to be sent across the network. The message is then converted into binary numbers, a series of 0’s and 1’s. Following that, it encodes these numbers and transmits corresponding voltage signals via an attached network cable.

The signal is a series of voltage changes transmitted through the cable. The message is concealed within it.

What Is A Frame?

Data transmission via cable follows the same principles as electricity transmission along a length of metal wire. To put it simply, data sent over a cable is converted into binary code, which is a collection of 1s and 0s. The device sending the data will send current along the cable at two different voltages (for example, 0V and 5V), with one voltage representing 1s and the other representing 0s. The device receiving the data will interpret the current as binary code and then convert it back to the original format of the data before sending it.

Network devices use protocols, which are a set of guidelines or rules for network conversation, to communicate effectively. These protocols address issues such as how quickly data can be transmitted and how data will be structured when transmitted.

Most protocols specify a message size limit, which means that messages must be separated into separate packages and labeled with information about where the message came from and where it’s going.

Network messages come in two kinds of packages: frames and packets.

Packets are encapsulated in frames. In this tutorial, we’ll go over frames and packets in great detail.

In computer networking and telecommunications, a frame is a digital data transmission unit. A frame is a simple container for a single network packet in packet switched systems.

The following is the structure of a frame:

PreambleStart frame delimiter(SFD)Destination MAC addressSource MAC address802.1Q tag (optional)EthertypePayloadFrame check sequence (32‑bit CRC)Interpacket gap

A frame is a logical structure of bits that organizes network traffic so that every device can read the information contained within it. A packet is a structure that exists within the frame. It’s the frame’s meat.

Let’s take a look:

- Looking Inside A Network Frame
zdS biCMA6exa7K7vGYcXaVHxVuGNewhC6uezIgpfU4QjnWZfF8r5N8A4oqkq684nLc4zckymzSjdN3ir 2ZcCzwLSQTKpX QvHnOAG DBRI634gBvZcWCBJDm92r1ymVENBVfq5HOFZFAVznQuT7vYb4lffdfXje3m0nRe1imIgZybvrh IuaEEL12BOw - Looking Inside A Network Frame

We’ve written a frame in binary below to give you an idea of how much information is packed into ONE frame.

10101010 10101010 10101010 10101010 10101010 10101010 10101010 10101011 00000000 00100101 01000010 11111111 00111011 10011000 00000000 00010010 00110111 00111111 01101100 10101010 10111110 11101110 10101010 10101010 10101010 10101010 10101010 10101010 10101010 10101010 10101010 10101011 00000000 00100101 01000010 11111111  00111011 10011000 00000000 00010010 00110111 00111111 01101100 10101010 10111110 11101110 10101010 10101010 10101010 10101010 10101010 10101010 10101010 10101010 10101010 10101011 00000000 00100101 01000010 11111111 00111011 10011000 00000000 00010010 00110111 00111111 01101100 10101010 10111110 11101110 10101010 10101010

If we break this frame: 

Preamble(First 7 Bytes) 

10101010 10101010 10101010 10101010 10101010 10101010 10101010

SOF(1 Byte after Preamble)

10101011

Destination MAC Address (6 Bytes after SOF)

00000000 00100101 01000010 11111111 00111011 10011000

Source MAC Address (6 Bytes after Destination MAC Address)

00000000 00010010 00110111 00111111 01101100 10101010

Ether Type(2 Bytes after Source Mac Address)

10111110 11101110

Payload(some Bytes after Ether Type)

Try to figure this out yourself

CRC Checksum(4 Bytes after Payload)

10111110 11101110 10101010 10101010

To understand the concept of using frames to send data or signals, assume Hermione is writing a letter to Ron, but Ron’s mail slot can only take envelopes the size of a small index card. Instead of writing her letter on regular paper and then stuffing it through the mail slot, Hermione divides her letter into much shorter sections, each a few words long, and writes these sections on index cards. She delivers the stack of cards to Ron, who arranges them so that the entire message can be read.

What Is A Packet?

Let us repeat ourselves. To transport data efficiently, we encode and decode signals. Frames provide that data structure, but do they provide enough structure to package our data?

A network frame contains nested structures that allow us to efficiently pack and unpack data. The frame is made up of the following elements:

Frame Header: It contains the source and destination addresses for the frame.
Payload: The message to be delivered is contained in the payload field.
Flag: The flag indicates the start and end of the frame.
Trailer: The error detection and correction bits are contained.

Let us look at a simplified version of a frame.

w4IKYRhZlDq4MauW4KWVpsklPcos3lTi8AHnUkdo7tOE9kCp5ubo h5LTlHoUywi4QrndwqNt4vRBHvqhqLCtlb6niQclgGIyV3QmDb0diKA4n3LC1ZmGWFUPjBAKZVhBwl3krFUScKkfpCYhSjY AF2NW0QEorOkasklTcaQ29P1a04dFb5F23bEWtbwA - Looking Inside A Network Frame

A frame’s payload is actually a structure nested within the frame. It’s referred to as a packet, and the EtherType field specifies the type of packet contained in the payload.

7YEiQQJ7eGoW2RFI6DLgE2GabpzFJ3ddOdJeSAl2y4Z8Ib7NrDe8bJwIEwGkchc35UAnvYOGHeT1KgGL3KwIHJfp488X1ggovmE8nn2u G 6gRRmjV89qUK U9f2DXDHPQw1 GqN2VJXykIhHAj8fb8wQRt7ij0dNUBb9z4S1pVBfwR0 9SWkHKujNJw - Looking Inside A Network Frame

There are several types of packets. As you can see, there is a lot of data packed into these packets. All of those “fields” contain data that aids the packet’s traversal in the network.

Packets are made up of two parts: the header and the payload. The header contains information about the packet, such as the origin and destination IP addresses. The payload is the data itself. 

liNbMoMUEuMHVngw2BGrX4 iQCHS2RbLi9SGNwvOpMGyRBR3OLeCFhSgHvJOuOV20 C0 R84IxKD0tY5JEW4ZK1yLBz8yY0D2NqETHVl5UC90myofTIiHoOX5hexK2XBA45UoioQwh9bIkLqC1Q7TKdkvbqCJYR SnYdJGyK07gEGNNKTWOzBr6WkSnklQ - Looking Inside A Network Frame

There are numerous layers in the concept of computer networks. You can look up the OSI model and the TCP/IP model on the internet. Technical terms are used to refer to the data represented at each layer of the models mentioned above. At the network layer, this is known as a packet. However, regardless of the layer, data moving in a network is commonly referred to as packets.

Most networking tutorials focus on the packet rather than the frame. There is a solid reason behind this. It is the packet that we are most interested in. The reason for this is due to the Internet. We are more likely to build a network that can connect to the internet than a network that will only be used by us. It will become clearer in a subsequent tutorial.

For now, keep in mind that switches think in terms of frames. A switch reads the signal as a frame and uses the frame’s information to send it to its intended destination. The following example illustrates the relationship between frame and packet.

You sent a cat video to a friend (who doesn't like cat videos). A lot happens in the split second between clicking "send" and the video arriving in your friend's inbox.

First, your computer divides the video into smaller chunks, each of which contains a portion of the video. This is accomplished by tagging network packets with identifiers that the recipient computer recognizes and reassembles into the original video.

To ensure even distribution of network traffic data, each packet is sent off separately through the best available route into the internet network. As a result, all packets take a suitable route to their destination and do not become stuck in one route. There are times when a packet may be lost, but we'll get to that later

When it reaches the appropriate program on your friend's computer, the "headers" and "trailers" are removed, and the payloads/data are assembled, each in its proper place as indicated by its identifiers, to display the video. They watch it and are amused - no one questions how all of this was transferred so quickly!

The benefit of sending packets over whole data:

  1. Smaller packets are easier to send than one large chunk.
  2. If a packet fails, it can be resent; if the entire file is sent at once and fails in the middle, the entire file must be downloaded again because the previously downloaded portion is useless.
  3. Because the devices involved in transmitting these data are also involved in transmitting hundreds of other files, they can switch to sending some data to each and not just focusing on one single person’s data, ensuring that everyone gets what they want.
  4. In the event of a network failure, if your downloader is capable, it can re-request to send only the remaining packets, even if a significant amount of time has passed.

Behind the Scene

We have not yet reached the point where we can provide you with an explanation that you will fully comprehend. We still have a lot of technical terms to go over before it all makes sense to you. 

In this section, we will simply tell you how frames and packets relate. In our video example, the video is divided into many small packets. Each packet is assigned a source ip address, a destination ip address, and other fields after passing through multiple layers. Following the assignment, the packets are routed to a network interface card. We will talk about the layers later. 

The packets received by the NIC are encapsulated into an Ethernet frame in the data link layer.

The NIC then serves as a network gateway, through which your computer connects to a network via cables (such as fiber, coax, etc.) or wirelessly to reach a recipient computer or device. The frames are sent as signals from the NIC to the destination devices where they are reassembled to display original information (such as texts, graphics, etc.) or initiate commands.

That’s all for now in terms of frames and packets. We’ll get back to them later.

Share The Tutorial With Your Friends
Twiter
Facebook
LinkedIn
Email
WhatsApp
Skype
Reddit

Check Our Ebook for This Online Course

Advanced topics are covered in this ebook with many practical examples.