Previously on FUAQ, I spoke about how IP and MAC addresses are used to send data. On this installment, I will cover subnet masks, private address spaces, and network address translation.
Recap: My computer (184.108.40.206) wants to send something to http://www.google.com (220.127.116.11). My computer will make a letter to 18.104.22.168 and send it to the post office (router). To send something to the router, my computer (F4:5C:89:XX:XX:XX) will use the local address of the router (08:EA:44:XX:XX:XX). So my computer puts the letter to google in an envelope, writes google’s address on it. Then puts that envelope in a box and addresses the box to my router.
A big issue here is that my computer is using one address, and Google is using another. Why is that an issue? There are only 4 billion addresses available in IPv4! There are more than 4 billion devices in the world, though, so how do we handle this? Network Address Translation (NAT) allows multiple computers to use many private network addresses through one public network address.
Example: A grandmother wants to send a letter to her two grandkids that both live in the same house. When she addresses the letters, they are both sent to the same street address, same town, same state. But thanks to their mother’s intelligence, each letter makes it to the right person.
This is how NAT works. A company (house) has 200 employees (grandkids) that all need IP addresses. Instead of using 200 public addresses (street addresses), they put up a router (mother) which gets one public address while giving the employees their own private addresses.
This brings us to the idea of private address spaces. When a company chooses a block of addresses to use behind their router, they want to make sure that their addresses are not going to be used as a public address for a different computer (imagine if behind my router, my computer used the address 22.214.171.124 (Google) and then my wife tried to send data to Google. My router would get very confused about where the traffic was supposed to go). Not to worry, a few chunks of addresses have been set aside for private use only, known as the private address space.
Let’s jump back for a second to FUAQ Pt. 1 and recall that VLANs separate the network into multiple broadcast domains. VLANs are useful because computers are very chatty. When your computer turns on, it will start asking everyone that can hear it what their address is (further reading: ARP). Each one of these questions (asking people for their address) is a broadcast, which means every computer that can hear it must analyze the data and decide not to respond (unless the question was meant for them). What we see is that very quickly as the number of computers in a LAN grows, the slower the network moves due to broadcasts. VLANs help to separate the network into smaller chunks that contain these broadcasts.
Each VLAN, though, is considered its own neighborhood. It needs its own set of addresses. Therefore, we need a way to tell the computers, “Hey, in your neighborhood, only these 254 addresses are used. If you have data for someone outside your neighborhood, send it to your router (post office), they will know what to do.”
Enter the subnetwork mask.
A subnet mask is a description of the amount of addresses available in a VLAN. The general notation is either a /x or x.x.x.x. Many of you have probably seen this without knowing what it meant. My home network uses the 10.0.0.0 private address space. I don’t have a need for 16 million addresses, so I use a smaller chunk of the space and have a /24 subnet mask (also written 255.255.255.0). This means that at my house, the available addresses for use are 10.0.0.1 – 10.0.0.254. For more information on subnetworks and subnet masks, check the “Further down”.
Hopefully having a basic understanding of NAT and private addresses helps gain you an understanding of how your networks function. Next time I will discuss adjacent-channel interference and co-channel interference.
See you next time!