Skip to main content

Examining RFC 791

 This will be the start of several posts that will examine the RFC 791 documentation. RFC 791 covers the Internet Protocol and provides an introduction, overview, and specifications of the protocol. For this post, we'll be reviewing the introduction, as well as outlining some key terminology needed to understand the protocol. This review will be somewhat limited, and may not be overly technical, but it should provide a decent overview of the Internet Protocol. 

To start, we'll cover the "who", the "why", and the "how's" of IP and give a small background on the history of the protocol.  We will also cover the basics of packet switching networks, the OSI and TCP/IP, and the structure of Internet datagrams. Hopefully, by the end of this post, you will be able to understand what these concepts are and how they fit into the Internet Protocol, as well as other protocols and standards. 

The document we will be examining is RFC 791, this is not the first IP document to be written & submitted to RFC, nor is it the most recent document, but it does provide a decent overview of the protocol and the basics of its operation. RFC 791 was originally prepared for the Defense Advanced Research Projects Agency (DARPA). The document was written by the Information Sciences Institute of the University of Southern California and was submitted in September of 1981. At the time, the internet did not exist in its current form. Networks were mostly limited to communication within themselves, and it was necessary to come up with a method of sharing information from one network to another. This is where IP comes in. 

IP was designed for interconnected systems of packet-switched networks. Packet-switching being a method of grouping data that is to be transmitted over a network. In a packet-switched network, "packets" are datagrams that consist of a header and a payload. The header stores data related to the delivery and assembly, and the payload contains the information that is being sent. Packet-switched networks also work asynchronously. This means that the packets are not necessarily received in order of assembly. As an example, look at the following media item. 

By Oddbodz - Own work, CC BY-SA 3.0,

The specific path that the packets take is determined by the address stored in the header of the datagram. You might think of a datagram as an envelope. The envelope has an address on it that the post office uses to deliver. This is the header. The content of the envelope is the payload. As for how this information is addressed and packaged into a datagram, that will be covered in later posts.

To rehash, a datagram is a transfer unit that typically contains a header and a payload, and a packet-switched network is a network that uses packets or datagrams to transfer information. 

Delving further into the transfer of information from a local network to an external network, it is important to understand the TCP/IP stack and the OSI model. The images below show the OSI model and the TCP/IP stack.

These models both show how information travels across multiple "layers" to reach its destination. It is important to understand how these layers are connected to each other, and how data is processed and repackaged across them. 

For a brief overview, the green portion of the image covers information that is being transferred across the local network. The blue section covers internetworking, or internet transmission. The red section contains protocols such as TCP and UDP, that are used to provide reliable delivery of information. Finally, the yellow section covers application protocols such as pop3, HTTP, or ssh. Information travels across all of these layers in order to get from point to point, and understanding the interconnectivity of the layers is very important in regards to safeguarding secure information. 

A small end of post warning. I am learning about these topics as I post about them, and therefore cannot guarantee that the information present is 100% correct.

RFC 791 can be found here,


Popular posts from this blog

Using PGPy to encrypt and decrypt files and messages

 PGPy is a library for python that enables the creation, storage, and encryption/decryption of PGP keys and files in python. Recently, in a small project to reacquaint myself with python, I used PGPy for key generation and encryption and decryption. That project can be found in my github at . The goal of the project was to use command-line switches to control the program, and to provide basic encryption and decryption capabilities, along with rot13 and base64 encoding.  First, to load in a key use key, _ = pgpy.PGPKey.from_file(keyfilename) . This loads the key from either a binary or ASCII armored file. You can swap out .from_file for .from_blob , if you plan on using a key stored in a string or bytes object rather than a file. In my example code, I pull the key from a file, as I found it to be the simpler method.  Next, you'll need to open a file or create a string or bytes object that contains the message you wish to encrypt. We'll call this file

Using the Ubertooth One to sniff and intercept Bluetooth packets

While researching for my individual video project I came across this tool which allows for the sniffing and interception of bluetooth packets. This article covers some of the basic functionality of an Ubertooth One.  It's really quite interesting to see all the possibilities with devices like these. The tech behind them is very interesting as well. Hopefully, I'll be able to integrate some of this technology into my project video and include a demo of some of the interesting things it can do.

Installing the Ubertooth on the Mac mini M1

 For my video project, one of the demonstrations included using an Ubertooth One to scan for Bluetooth and BLE packets. This blog post will cover the installation of the Ubertooth One on the Mac mini M1. The official install guide for Mac devices didn't work very well for me, and I had to install some extra tools in order to get it to work. The examples assume you are using Python 3, and have homebrew installed.  To begin, follow the instructions found here: . Additionally, you may find that you need to install pytq5, numpy, and qtpy. To do this, simply run Python3 pip install pyqt5, numpy, qtpy. This will install the required libraries needed to run the Ubertooth tools. There are multiple ways to install pip on an OS X device, but I suggest using homebrew to install python3, which should install pip as well. Next, you will need to update the firmware of the device. When downloading the tools, a firmware directory sh