I want to summarize the most salient things that I needed to know to get this to work. These ideas made the whole project easier to understand.
First off, the idea of networks is simple. Devices need to send data i.e. electric pulses and signals to one another by some medium (e.g. copper wires, fiber optics, etc.). These pulses can represent things from emails to pictures to numbers because of the plasticity of binary. (For a good read on the origins of binary aka digital representation, read Turing's Cathedral.) The vocabulary used to describe networks is not simple, however. The people who created network theory really loved to call things by esoteric names like "protocol" and give everything initialisms.
Networks, by their very nature, require addresses. When we want to send data to another device, it should conjure up the metaphor of sending a letter. We can only do this if we know friend's address and our own. Even the stamp has a role in the metaphor, but I will describe that later. There are two schemes for addressing electronic devices.
- Every device that can be networked is uniquely identified by a MAC address. Unique means that out of all electronics made that can be networked, your device is the only device that has that number. This is a way to identify your device on a network e.g. laptop or Netduino.
- The internet has its own address system called IP (Internet Protocol) addressing. This makes it possible to group networks together logically. This means you can look at the digits that form the IP address and deduce that two networks are related if certain digits are the same. This logical structure wouldn't be possible with the MAC address alone. Think of a ZIP code: there is a relationship between location and the numbering. Any ZIP starting with "98" is in a certain region of the USA. You can achieve the same type of awareness by looking at an IP. Anything starting with "192.168" belongs to the local network, for example. Now, if you were given a house number (i.e. a MAC address) you wouldn't be able to tell me much about where it is located in the country.
Your router that connects you to the Internet serves its own control interface that can be accessed at 192.168.1.1. It lets you configure local IP addressing, security, and passwords. The most important configuration that occurs in the router is something called DHCP (Dynamic Host Configuration Protocol). As the name suggests, it configures the hosts on the network dynamically (isn't that so simple to understand?) In easier terms, it assigns IP addresses to all the hosts i.e. devices on the network depending on which IP addresses are not in use or are restricted. This means devices won't necessarily receive static (unchanging) addresses which is good for security reasons. However, DHCP reservations can be made so that certain IP addresses will always associate with a particular device (MAC address).
The final thing that helped me work on this project is demystifying the Internet in my mind by viewing it simply as a network. I feel as though the Internet is referred to as though it were God -- the first letters are even capitalized as such -- and people feel like the answers and resources it can produce are magical. In reality, it is a group of devices that hold a lot of data and information. It is huge and it stores a lot of knowledge, but it's not god. Think of your home network as a small "internet". If the information you share is important, it might be a really important internet. However, the main difference between the Internet and a local network (LAN) is that the Internet fulfills the idea of a "concatenated network" where many separate networks are linked. Your LAN is not concatenated because it represents one network. Connect your LAN with your neighbor's and it becomes closer to becoming a full-fledged Internet.
As for my earlier postage stamp analogy, we all pay a price to connect to the infrastructure that makes wide communication possible. Our electrons become the messengers and they roll down fiber optic roads like mail trucks to do our bidding.
I hope to write another post that will summarize the idea of Network Interfaces and how to make connections in C#.
As for my earlier postage stamp analogy, we all pay a price to connect to the infrastructure that makes wide communication possible. Our electrons become the messengers and they roll down fiber optic roads like mail trucks to do our bidding.
I hope to write another post that will summarize the idea of Network Interfaces and how to make connections in C#.