In the previous tutorial, we discussed how to load a mobile app onto an android phone for basic testing. In this tutorial, we’ll go over the basics of network systems and protocols to better understand how that app works. This understanding will help us customize a solution for you to connect your system to others. If you have questions on how to enable your customization, please reach out and we’ll provide a complimentary consultation to see how we can help.
Due to great advances in technology such as the internet and computers, our lives are more connected than ever. Regardless of almost any website that you browse, your computer connects to another computer and sends as well as receives data. This is a simplified view:
Right before you began reading this page, your computer or mobile device connected to our server and transmits bursts of data, in which each burst looks like Fig. 3. Let’s dig deeper. Every computer on the internet has an Internet Protocol (IP) Address, which is used to distinguish itself from the rest of the web. Currently, simplonics.com has a current IP address of 220.127.116.11, which my computer uses to connect to it. Another important concept is the port abstraction, which are operating system interfaces that provide a concept similar to mailboxes. When you send mail to an apartment address, which is similar in concept to IP addresses, you also have to specify the apartment number, which is analogous to ports in the network system world. HTTPS, which is HTTP and TLS, uses port 443 by convention.
By “pinging” simplonics.com with a command-line terminal, as shown below, we’re able to find its IP address:
But, how does your computer know that simplonics.com corresponds to 18.104.22.168? Great question! It turns out that there are servers on the web called Domain-Name System servers that basically map domain names (ex: simplonics.com ) to IP addresses. It turns out that there can be a many to one mapping between domain names and IP addresses (but not the other way around). Common reasons for why this is include reverse-proxying for security enhancements and load balancing, which is what high load servers, like google use to distribute web traffic based on geographical considerations. These topics are advanced and out of scope for this tutorial but quite interesting.
Ok, so we are building the understand of Fig. 3. The IP protocol helps to get data from one computer to the other and Transmission Control Protocol (TCP) is what is used to help ensure data reliability.
How does TCP ensure data reliability?
Well, this transport layer protocol is complex, but in a nutshell, the sender retransmits data whenever the receiver does not send an acknowledgements of receiving a certain range of numbered packets.
Alright! We successfully sent a packet through the internet with this understanding! What’s next?
Furthermore, Transport Layer Security (TLS) is part of the presentation layer of the OSI model. At the sender side, TLS encrypts each packet based on a complicated algorithm called a cipher, and at the receiver side, TLS decrypts each packet. SHA-256 is one example algorithm and TLS has two primary variants, namely, symmetric and asymmetric key algorithms. The former uses the same key for encryption and decryption, whereas the latter (and more popular version on the web) uses asymmetric key algorithms (aka public-key cryptography).
Lastly, we’ve arrived at the Hyper-Text Transfer Protocol (HTTP), which is an application layer protocol. This protocol sends the request to “GET” a webpage, for example.
So, in summary,
1. Finds the IP address of the target server with DNS
2. Create an IP packet that includes source and destination IP addresses
3. Places the IP packet in a TCP packet with additional information
4. Embed HTTP requests or responses in the TCP packet
5. Encrypts the TCP packet with TLS
6. Sends the packet to the internet
At the receiver, the target server:
1. Receives the packet
2. Decrypts the packet
3. Extracts the HTTP request
4. Processes the request and sends data (similar in fashion to the sender’s steps above)
This is a high-level view of how the web works, and with this understanding, we are able to build pretty complex, yet modular systems. Please like this page if you found this useful and let us know your thoughts on how we can improve this article.