In the last two posts, we've been going deep, learning about how information is transmitted over the Internet. In Part I, we learned how data is divided into packets, sent to its destination and reassembled. In Part II, we learned how data sent over the Internet can be encrypted and protected. But how does data know how to get from one IP address to another? This is the subject of today's post.
Every device that can be connected to the Internet has a network interface card (NIC), which is a piece of hardware installed on the device that allows it to make a network connection. Each NIC has a media access control (MAC) address that is specific to only that device.
A modem is a device that connects to the Internet. Other devices can connect to the modem in order to receive Internet transmissions. A wireless router is capable of receiving wifi transmissions. The router connects to the modem, and other devices connect wirelessly to the router in order to receive data from the Internet. Many Internet service providers (ISPs) provide customers with a combination modem/router, which connects to the Internet and sends and receives wireless signals.
In Part I, we learned that every device connected to the Internet has an IP address. An IP address is different from a MAC address in that the MAC address is assigned by the manufacturer of the device, and an IP address is assigned by the network. An IP address has two sections, called the subnet and the host. The subnet refers to one subsection of the entire Internet. The host is the unique identifier for the device on the network. The IP address combines these two numeric values using bitwise operations. You can't look at an IP address and say that the numbers on the left make up the subnet and the numbers on the right make up the host; it doesn't work that way. The IP address is more like a sum of two long numbers.
As mentioned in Part I, when a packet of data is sent from a server to a client, it is sent with the IP address of the destination. In order to get to that destination, the packet will hop from one network to another. The routing protocol of the Internet is called the Border Gateway Protocol (BGP). This is a system that helps determine a route that will traverse the least number of networks to get to the destination. Every router in a network has a series of routing tables, which are sets of directions for how to get from one network to another.
When a packet of information is first sent to the network's router, it looks at the IP address of the destination and determines if the directions to the destination are available in the routing tables. If they are not, the BGP is used to determine the next logical network where the packet should be sent. A gateway is an entrance to a network, and a default gateway is the address that the request is sent to if there's no knowledge of a specific address in that network. When a packet arrives at the new gateway, the BGP calculates the next appropriate destination.
After traversing through networks in this way, eventually the packet arrives at the router for the network that contains the IP address of the destination. The router determines the MAC address of the destination and sends the packet to that address.
One more important feature of networking is the use of a proxy server. A proxy server is a server that is positioned between the client and the destination server. It is configured so that any requests your client makes will go through the server before it gets to its destination. There are many uses for a proxy server; the main use is to keep the actual address of a site or a router private. Proxy servers can also be used by hackers to intercept requests, especially on a public network. Finally, proxy servers are a great way to do security testing! Using a tool like Fiddler or Burp Suite, you can intercept the requests that you make to your application and the responses you receive in return. You can learn more about how to use Burp Suite in this post.
This concludes my three-part series on how the Internet works. I hope that you have found it helpful, and that you can apply these concepts when testing!
As I mentioned in a previous post , it's my goal this year to read and review one tech-related book each month. This month, I read The ...
This week I'm writing about three things not often associated with testing: logging, monitoring, and alerting. Perhaps you've taken...
This week, we'll be talking about adding assertions to our Postman requests. In last week's post , we discussed what various API re...
The concept of measuring quality can be a hot-button topic for many software testers. This is because metrics can be used poorly; we've...