Most every computer science graduate can quote you the 5 layers of the TCP/IP network stack. Chances are they can even program their own tool to communicate on the top four parts. But most people in general don’t understand what happens when they click “Go” on their browser url bar or what’s happening when they try to pull up their friends’ relationship status in Facebook.
You know, for the most part I’m coming to grips with the fact that people don’t know this stuff. Actually, that gives me some sort of value to put on the education I received, but that’s not what I want in the long run. I’d love for everyday users to understand more about how these machines work. That’s why I’m about to tell you, the lay person, the single most hidden facts about computer networks: they’re just like really big, really fast postal systems.
Application Layer
When you want to send data to someone, you need to actually have the data first. It’s a simple rule, but a valid one. The application layer of the computer is what that’s all about. When you get hungry, you need to write a letter to Grandma asking for her Deliciously-Peanut-Buttery-White-Chocolatey-Macadamia-Nut-Cookie Recipe. So you get out a pen and paper and write it down, just a like a computer writes down information in the application layer. Let’s just say that you are a demanding grandchild: “Please send me your delicious Deliciously-Peanut-Buttery-White-Chocolatey-Macadamia-Nut-Cookie Recipe! I need it now!”.
Transportation Layer
So here’s the big question: how do the people on that end (i.e. your grandparents and uncle Fred) know which one of them the letter is for? Should they all read the whole letter until one of them guesses who it’s talking about? Probably not. What if Fred has a Deliciously-Peanut-Buttery-White-Chocolatey-Macadamia-Nut-Cookie Recipe, but his are synthetic cookies for people who have lost the will to live (i.e. they’re healthy cookies)? The easiest way to do this is to put Grandma’s name right at the top of the letter: “Dear Grandma”.
If we put this in place, it makes a lot of sense up until when Grandma tries to figure out who sent the letter. If she doesn’t know who it was then how can she write back? To prevent potentially devastating failure of communication you need only include your name on the bottom “Love, Me”, and at this point this letter is complete and comprehensible (Note: Me is your name, not just “Me”. What are you trying to do, screw this whole lesson up?) . Not only is this a functional letter, but it’s also an exact copy of what happens in the Transportation layer. Ports, just like names, specify who is supposed to get the information on the other machine when the information gets there. You can pick almost any port you want to, but unless you pick someone who exists then you’re not going to get much result. If you write “Dear Uncle Dishwasher”, it’s like sending information to a port that isn’t active. But a computer, like a household, usually has a few entities that are checking the mail.
(An interesting notion here is that of the firewall. If a firewall is ‘on’ it can look at what’s trying to talk to a computer’s port. Just like a nosy secretary, it can see that Little Jimmy isn’t supposed to get any mail because he’s so impressionable. He definitely shouldn’t be getting this letter saying “How to get all the free candy you want just by sharing the shiny card in mommy’s purse!”)
Network Layer
It’s easy to write a letter requesting Grandma’s Deliciously-Peanut-buttery-White-Chocolatey-Macadamia-Nut-Cookie Recipe, sure, but it’s just a piece of paper if we don’t send it. There are millions of Grandmas (numerical ports) in the world, and we need someway of specifying the house (computer) at which the request must arrive. So you grab an envelope and fill in your grandmother’s address in the center. By doing this you’re providing some information that the postal carrier can use to get the letter to where it needs to be. In the real world we have street addresses and cities and states, but in networking we have Internet Protocol (IP) addresses (ex. 72.14.207.99). But like the second name (port) on the letter (application data) we need a return address too, so you put your address in the top left of the envelope.
We can skip ahead and see how this is used later on by envisioning the post office downtown. When they get a letter, they look at the address and start doing some thinking. If it’s a local address they’ll send it out one way, and if it’s a foreign address they’ll send it another way. Each post office that you reach will do the same thing. Actually, you probably have a small networking “post office” in your house, it’s called a router.
Link Layer
You think it’s done, right? Wrong. How does the letter get out of your house? You’ve got to get the letter in the mailbox. In this way, the link layer comes in to play. So you stop, and you ask yourself “This letter is going very far away, and I don’t know how exactly it’s going to happen….but how do I get the process started?” You then remember that by sticking the envelope in the mailbox you can get the mail to the mail carrier. So you do so, and wait.
Some time passes and the mail carrier checks your mailbox for new mail. Oh ho, he thinks to himself, “This letter appears to be going very far away, and I don’t know how exactly it’s going to happen….but how do I get the process started?” He then remembers that it needs to go to the truck first, so he brings it there. When he get’s back to the post office he sees the letter and asks again “This letter appears to be going very far away…” He remembers that he needs to drop the letters off inside for sorting and mailing, and does that.
Most people don’t know about this process in networking, but if you’ve heard of something called a ‘MAC address’ then you at least know a little bit. A MAC address is pretty much like the idea of what to do next in order to get to the final destination. This is a little different than how a mailman always puts the mail in the truck, but it’s not that big of a difference. Just imagine that if a mailman were “linkman” he would basically get the letter and stand in one place screaming “WHO KNOWS WHERE I SHOULD PUT THIS?” He would then listen closely for someone to shout back “Put it on the truck, you idiot!” He would do that and then shout “OKAY NOW WHERE?” and someone would shout back “Go to the flippin’ post office with it!” Good thing that’s not the way it works or we’d have a lot of annoyed mailbox owners.
Physical Layer
This one is actually cheap, because we’ve already talked about it. Remember when the mailman walked the letter from the box to the truck when he remembered that first short step? It also happened when the truck drove to the post office; that was the physical layer. It’s just the process of sending the letter over a distance without thinking about it. In technical terms, it’s what happens when you send the data through the cable from one plug to another. Essentially this step is carried out by two types of cable in the networking universe: copper (”networking cable” or ethernet, short range) and fiber (looong range).
When accidents happen, say on the road between two mail trucks, a kind of non damaging explosion happens. The mailmen both go to the hospital and the trucks explode with your letter and the letter in the other truck (Note: only one letter per truck and only one lane [shared] per road. I know it’s hard to swallow, but that’s the way it works. Think about if the gas only cost 1/1000 of a cent per gallon and it cost trillions to build roads.). Anyway, the news would tell everyone “Don’t use the public mail for a while, stuff just blew up.” and they’d air it non-stop all week and people would hold off for a while during the quiet time and then send their letters again.
Summary
It’s important to emphasize that there are lot of holes in this comparison, but it’s not altogether that far off from what you need to know as a layperson. The biggest difference is the speed that happens when you do this. A letter can take several days to get somewhere and spends most of the time in transit on the physical layer (by car/truck, walking, flying, etc). A “packet” can take only a few seconds to get somewhere and often much less, and the slowdown typically happens in the routing process (i.e. post offices).
There are countless other issues too, including personal favorites: “How do people know when to send the mail again after mail-collision?” and “How did I get Grandma’s address?” (the latter saved for another analogy). But really this is the core of it all. Just remember that not everything comes as one letter; things like movies are basically like the postal carrier parking outside Grandma’s house with a SASE Gatlin Gun and firing through the front door until Grandpa and Uncle Frank run out the back door screaming (read: angry roommates hate your bandwidth usage).
Please feel free to leave comments about this explanation. I hope it helps you relate to your boyfriends and girlfriends again. Maybe they’ll even start speaking to you again after the time you tried to explain RISC during a romantic evening out.