Sunday, September 27, 2009

The Hard Stuff: Cables and other Transmission Media


That's right, everybody! This week it's hardcore, hard-wired hardware!*

So you've got a bunch of computers to network and they're ready to go. How do you go about actually connecting them? You've got three options:

  1. You don't physically connect them, relying on a wireless signal. This can be convenient, but you're using radio waves. And, well:
    "Radio is bad. I mean, it's necessary. I'm not saying we don't all use it. I do. I've got WiFi here. I've got it wrapped up in a WPA encryption with a passphrase from hell that I got from GRC.com/passwords. So I'm as secure as I can be. But several times during the history of this podcast we've talked about vulnerabilities in, for example, Intel's WiFi drivers. There was one not even that long ago where it was found that down in the actual packet processing, way down at the bottom, the first place the packets go when it comes hot in off the aerial, off the radio antenna, had an overflow. So before encryption and decryption, before authentication, before anything else, it was possible to simply broadcast a malformed, deliberately malicious bit of radio noise and take over a machine." - Steve Gibson (Security Now Episode 158)
    (There will be more about wireless networking in 5 posts.)
  2. You use cables of some kind to connect your devices. This is more secure and often more reliable, sometimes cheaper, and often a higher-performance option than wireless.
  3. You give up and kick it old school.
For the purposes of this blog post, we're going to assume that option 3 is not an option, and, realistically, in today's marvelously high-tech world, it's really not.

Unlike my two blog posts previous, I'm going to diverge a bit from the order the book uses and talk about cables first, because in my humble opinion, it makes more sense to do it that way.

There are two main types of cable:
  • Copper Wire: This can be anything from Coaxial cable, (yep, the exact same stuff you get cable TV through) Unshielded Twisted Pair, (which is some of the most evil stuff on the planet, but more on that later) and Shielded Twisted Pair. These all have their sub-types, but those are the basics.
  • Fiber Optic: The "good stuff" as it were, fiber optic cable sends data as light rather than electricity. As you would expect, fiber optic cable is very fast, but it's also expensive.
These cables carry data in one of two ways: analog or digital.

  • Analog Data: Analog data is kind expressed as a wave. The human voice is an analog signal, and if you compare it to one of those horrific automated talking phone systems, you'll immediately grasp one of the major benefits of analog - it's able to carry a lot more data than digital over a similar medium. However, it's extremely vulnerable to noise. Noise is anything that interferes with the signal in this case. For a perfect example of noise, just put something on the radio and drive past a hospital. When the signal cuts out and is replaced by static, you are experiencing noise.
  • Digital Data: Digital data is sent as a series of pulses. It has the advantage of being more noise resistant, because either there's light/voltage or there isn't.And there you have it; the basics of the physical parts of a network.
And there you have it. The hardware end of network connections.

Tuesday, September 1, 2009

The Standards of Networking and the OSI Model

Welcome back! This time around, we're going to deal with two topics; Networking Standards organizations and the Open Systems Interconnection (OSI) model. This post is likely going to be quite vocabulary-heavy.

Networking Standards Organizations

Like just about everything else, networking has its own set of standards. On a base level, this means that the industry has agreed on a set of dimensions, pin locations, etc. that will apply universally for similar equipment across the entire industry. Or, to put it another way, it's the same principle in play that allows you to plug your blender and your television into the same type of electrical outlet.

An important note: where performance is concerned: standards refer to the minimum performance that is acceptable for a given thing. Going above this is often desirable. Those of you who read this and are familiar withPC gaming need look no further than this: while a mid-range Dell from a year back will run high-end games like Crysis, it won't do so nearly as well as a custom-built gaming rig. (Or a pre-assembled gaming PC from a high-end company like Falcoln Northwest.) In gaming, it's almost always a good idea to exceed the minimum system requirements by as much as is practical. The same goes for network components. Just like a Core i7 or Phenom II is a better choice than an athlon or centrino, so often is a higher-grade cable a better choice than a cheap one.

Unlike a lot of industries, the computer industry has been around for a comparatively short time, even when compared to other newer technologies like television. Because of this, there's no one central governing authority over network standards. In my personal opinion, this is actually a good thing. The various organizations are able to specialize, which (at least, it seems to me) offers better results overall.

Some of the Major Players:

ANSI: ANSI (American National Standards Institute) is the proverbial "big boy" on the block - it's an organization composed of over a thousand industry and government types, and they determine far more than just computer standards. Unlike many governmental and pseudogovernmental organizations out there, they enforce their standards through voluntary compliance rather than through more heavy-handed measures. They have their fingers in a lot of pies - this organization is extremely influential, and getting ANSI's stamp of approval on something is rightly viewed as a favorable thing due to their rigorous testing.

EIA and TIA: The Electronic Industries Alliance and Telecommunications Industry Alliance, respectively. The EIA is a trade organization that draws its membership from US electronics manufacturing firms. The TIA is a spun-off branch of the EIA that then merged with the United States Telecommunications Suppliers Association (hereafter referred to in the mercifully-shorter form of USTSA). THe EIA helps ANSI set standards, the TIA regulates what its name would lead you to believe it does - basically anything AT&T has its hands in (phone, wireless, satellite, fiber optics, the Death Star*)
*Okay, not really the Death Star.

IEEE: Not just a phoenetic spelling of a high-pitched scream, the IEEE (Institute of Electrical and Electronic Engineers) is the first international organization on our list. (They are often referred to as "I-triple-E.") The goal of this organization is to promote, in a nutshell, the advancement of all things Information Technology. They host a lot of symposiums, conferences and the like, and they also publish papers on various technology topics. This is a highly-respected and, frankly, very cool organization. If you're only going to click on one link in this post, make it the one attached to this paragraph.

As I was looking up the various sites for this paragraph, I actually got somewhat distracted on the IEEE's page, and followed a link to one project of theirs that I thought was particularly interesting: http://www.trynano.org/.


ISO: The International Organization for Standardization is headquartered on famously-neutral ground in Geneva, Switzerland. Its membership is drawn from a staggering 157 countries, and its goal is to foster global exchange of information and free trade through technological standards, which makes them almost as cool as the IEEE in my book. Like ANSI, they aren't limited to
computers, but have influence over a wide range of different spheres including a lot of the technologies used to bring things to market (shipbuilding, packaging, etc.) and banking.

ISO's name isn't a scrambled acronym, but rather the Greek word for "equal," the use of which is meant to convey their dedication to standards.

ITU: The International Telecommunications Union is a UN agency that regulates international telecommunications. These are the people who regulate things like radio frequencies. Founded in Paris in 1865 and since relocated to Geneva, Switzerland, they're more focused on issues than standards, but they are deeply involved in global internet implementation.

ISOC: ISOC is the shortened form of Internet Society. They're a relatively new organization (founded in 1992 -unsurprising given the relative youth of IT) and they concern themselves with technical standards for the Internet. Subgroups include the IAB (Internet Advisory Board) and IETF (Internet Engineering Task Force). Interestingly, the IETF is wide open - anyone can submit astandard for approval.

IANA and ICANN: There's a lot in the textbook about these two, but it boils down to this: these are the central authority for IP and domain name addressing. (Yeah, just a little bit important!)

The OSI Model

The OSI model was created by ISO, the International Organization for standards. (Anyone else think they named it that just so they could have a full set of the ways you can arrange I, S, and O?) The acronym stands for Open Systems Interconnection and is used to describe how various parts of a network interrelate. It's admittedly a little vague as to what goes in which layer at times, but it's still a useful abstraction. As the previous sentence infers, the OSI model is based on a set of layers, seven, in fact. Those layers are, from highest to lowest:

Quick vocabulary note: Where computers are concerned, "lower"

7. Application: One quick piece of disambiguation: This doesn't mean the program that sent the packet. (So, for example, this doesn't mean Skype or Outlook or your BitTorrent client.) The application layer is there to allow those other programs a means by which to communicate with the lower levels of the network. An example of this layer in action: a user punches a URL into their browser and hits Enter. The browser's API hands the request off to HTTP. HTTP then sens the request on from there. This process and the HTTP protocol live up in the application layer. (Along with other protocols like DNS and FTP)

6. Presentation: Presentation layer protocols function as translators. Translation layer protocols are what translate a stack of ones and zeros into something humans can interact with. When you
need an MP3 turned into music or a blob of encrypted data turned back into something intelligible, it's going to happen on the Presentation layer.

5. Session: Session layer protocols are used as a kind of maintenance system that manages connections between multiple nodes. They detect interruptions in service between the two nodes and synchronize communication. While not as sexy as the stuff up in the presentation or application layers, they're important because they can help you figure out when something has gone amiss. An example: you're downloading something. Something big. If not for session protocols, if you lost the connection, you might not know it for much much later.

4. Transport: The data-transfer protocols like TCP and UDP that do the actual heavy lifting of file transfer live in this layer. These protocols can vary a bit. Some just push data through without verifying whether it gets there or not (UDP) others, like TCP, establish a three-way "handshake" of acknowledgements from both ends to ensure every last bit of data gets there, re-sending bits that get lost.

If you're wondering what you would use UDP for after this (like I was when I first heard about it) look no further than VOIP. A lost packet in VOIP will just cause a little blip or bit of random noise not unlike static on a VOIP connection. For something more critical like transferring a large file, though, it would be pretty risky to use an unverified protocol. For a much better description than I'm capable of giving, I direct you to Security Now, Episodes 25 and 26. Steve Gibson does an absolutely fantastic job of explaining the underpinnings of the internet. (Also: if you're reading this and aren't already listening to that excellent podcast, download an episode for your next long drive. It'll hook you.)

3. Network Layer: Routing takes place on this layer. Data that's been passed down through the Application, Presentation, Session, and Transport layers becomes packets here and a route from its origin to its destination is determined. This is a fairly intelligent process that accounts not only for where the packet needs to go, but how high-priority it is and how much congestion is being caused by other traffic that is already on the network. The protocol that you've probably heard of that
operates on this level is IP (Internet Protocol - one guess as to where that's used).


Segmentation and Fragmentation: both of these processes are used to pare big hunks of data down into smaller ones. It's usually better to segment data on the Transport layer, but if that's not viable for some reason and the data is still in pieces too large for a network to handle, fragmentation occurs down on the Network layer.

2. Data Link Layer: Really two sub-layers, the Logical Link Control or LLC and Media Access Control (MAC), the Data Link Layers does error checking and flow control, and preps data to flow through the Physical layer.


1. Physical Layer: Here's where the data gets transformed for transmission. What it's transformed into depends on what it's being sent through. If it's going through a copper wire, it'll be voltage. If it's going through fiber-optics, it'll be light, and if it's going over the air, it'll be radio waves. At the destination, the other node picks up the signal and repeats the process through the layers in reverse.

[This post composed in Google Chrome running on Windows 7]

Sunday, August 30, 2009

The Basics of Networking

Most (possibly all) of the posts in this blog will be a paraphrasing of one of the chapters in my textbook. I'm going to go into a bit more depth than is strictly required for the class, and I'm also going to try to make this as entertaining and accessible as possible, so even if you aren't my instructor or one of my classmates, you'll hopefully get something out of reading this. I have another ulterior motive, too. I figure if I make this interesting to read, it'll make it better as a study aid for me when the time to study for the Network+ exam rolls around. This one's going to be pretty long and dense because I'm defining a lot of terms.

The Benefits of Networks

On a base level, any time two electronic devices are connected to each other so they can communicate, you have a network. Many people in the modern world have built simple networks without even realizing it - the act of connecting an MP3 player to a computer so one can transfer music files over is a basic and user-friendly form of networking. The advantages of networking are apparent in that same example; being able to share data across the network allows you to achieve a result easily with the two devices combined that would, at the minimum, be substantially more difficult than if they weren't connected. The computer can connect to the internet to download music quickly and store a huge amount of it on its internal hard drives (especially in today's world of the $80 1TB HDD). The MP3 player, if it can access the internet at all, is probably slower and almost certainly has less storage space than the PC, but it's small enough to take with on a jog or in the car with a minimum of hassle.

Other benefits of networking (beyond portable music) include the diminished need for devices in a business setting. If everybody can use one printer, one internet connection, and one centralized server or NAS, it cuts down dramatically on the cost in time, space, and money of setting up a digital office and allows for easier collaboration, too. Need to send the spreadsheet file down to Tom in accounting? No problem. Just send it to his computer via the network rather than putting it on a disk and walking it down to him like they did in the old days.

Networking also makes wondrous things like SaaS available, a good example being Google Docs. Which allows a group of collaborators spread all over the world to use the same program to edit the same files without ever meeting face-to-face.

The Flavors of Networking

Networks come in a variety of flavors, but the most common types are peer-to-peer and client/server.

Peer to Peer networking: Peer-to-peer (abbreviated P2P) networks are links of direct communication between two or more computers. No computer exercises any sort of authority over the other(s) and no computer screens any traffic as it passes between two computers on the network. Peer-to-peer has something of a shady reputation from the old days of Napster, Kazaa, and the like, and it continues today as bazillions of people use P2P BitTorrent connections to pirate movies, music, and computer software at a rate that would bring a tear to Edward Teach's eye. However, P2P utility doesn't stop there - if you've ever used Skype to talk to someone over the internet, you've used a P2P network. Walkie-talkies are a simple P2P network. P2P networks are simple to configure and cheap, but they suffer from inflexibility, potential insecurity, impracticality once they get large, and of course, their shady reputation. Yarr.

Client/Server Networks: This is where the real fun starts. Client/Server networks rely on a central computer (called a sever) to route traffic around the network to other computers called (three guesses...) Clients. Clients are usually personal computer. In an office environment, they're typically called workstations. Another way to think of how traffic moves around a client/server network is the post office or a shipping company. Instead of directly moving the mail from its origination point to its endpoint, it goes to a hub of some sort first and is then sorted and sent on its way from there. This is inefficient if you, say, want to send something to your neighbor (that's a better use for a P2P type connection) but what if you want to send a bunch of packages (like Christmas cards, for example) to a bunch of people? Suddenly the P2P model is a lot less efficient.

Servers: Typically servers are fairly powerful (and often expensive) computers. Modern servers often have several fast multi-core processors, a large amount of storage, etc. Prices for them in the tens of thousands of dollars are not uncommon at all.

Clients: Client computers are typically "normal" computers. They typically only cost tens of thousands of dollars when their owner is a rabid gamer.

Client/Server networks also have the advantage of being potentially much more secure. Servers can impose access limits, various forms of authentication, and other controls on traffic moving throughout the network. This type of network also makes things like printer sharing a workable reality. Their biggest downside is that they can get complex pretty quickly.

LAN, MAN, WAN
And maybe the loss of some SAN

LAN, MAN, and WAN are terms used primarily to describe the size and scope of a network.

LAN: A LAN, or Local Area Network, is a network typically confined to a single building. That doesn't, however, mean that it's small. The single server and 18 workstations (13 cash registers, 4 search terminals, and 1 receiving computer, plus 7 handheld mini-computers used for inventory) that I have at my current workplace is a lot smaller than the network used at the MCC (the college I attend) but both are LANs because they're both confined to a single building. (MCC says that it's multiple buildings for organizational purposes, but you can walk through them all without ever stepping outside, so screw it, it's a LAN.)

MAN: A network that extends beyond the boundaries of a building (again, no matter how huge - even the Pentagon is still just one building!) becomes a MAN, and no that doesn't mean it's undergone some rite of passage or that it's somehow a male network now - MAN stands for Metropolitan Area Network. An example of a MAN is a modern military base (particularly an Air Force one) with a large number of computers spread around various building all part of the same network.

WAN: The 800lb gorilla of networks, WAN stands for Wide Area Network. Wans cover even bigger areas than MANs. If you have a computer in Miami communicating with a computer in Anchorage (or even one in Atlanta) congratulations, you have a WAN. The internet can be seen as a humongous WAN.

Other "ANs"
CAN: Campus Area Network
GAN:
Global Area Network
PAN:
Personal Area Network (in this case not actually a network at all - just a wire management system, but can also refer to things like a bluetooth headset and cell phone)

"Okay, So How Do You Build One?"

Networks do not just spring up out of the proverbial earth. Like any other complex device, they need to be assembled. Here's a list of some of the more common components you'll see when building a network:

Hardware and Software
  • Client: A computer (or sometimes the person behind it) that asks for data, access, or other resources from a...
  • Server: A computer at the center of the network that manages the resources the client asks for.
  • NIC: Network Interface Card. This is where you plug the cables that connect computers to each other on a wired network in. Most modern PCs come with at least one standard on the motherboard.
  • NOS: Network Operating System. A server OS optimized for, well, server tasks. It's great at routing data around the network, but probably wouldn't be your first choice for, say, computer games.
  • Node: Something on the network with a unique address. The Server is a node. So is each workstation. So, for that matter, is that crummy old printer that's destined for a beatdown in the parking lot someday.
  • Connecitivity Device: A device used to connect multiple networks or multiple parts of a network to each other. The DSL modem/router your home ISP gave you would fall into this category. Companies like Linksys and D-Link make a lot of their money selling consumer Connectivity Devices.
  • Transmission Media: The wires or radio waves used to actually transmit packets around a network.
General Concepts:

  • Segment: If the network is a city, a Segment is a neighborhood wrapped around a cul-de-sac. It's a bunch of devices (nodes) that use the same communication channel for their traffic.
  • Backbone: The part of the network that does all the traffic management. Usually made up of Servers and Connectivity devices.
  • Topology: The actual, physical shape the network takes (or at least the one it takes if you draw a diagram). A P2P network would look like a so-called "ring" or "bus" layout, with a bunch of computers all connected in a line (bus) or, well, ring. A Client/Server network will have more of a "star" configuration, with connections radiating out from a central point.
  • Protocol: A standard method or format that is used for communication between the nodes on a network. Protocols are important, because without them, you'd never get reliable data transfer. Data is broken into packets before being sent, and if these get jumbled, you might as well have pseudo-random "noise" at the end for all the good it'll do you.
  • Packets: Basically bite-sized chunks of larger blobs of data. Big files are chopped into packets before transmission.
To picture how data transfer with packets over a network goes, just imagine getting a bicycle shipped to you via UPS or a similar carrier. Instead of putting the bike pre-assembled in a HUGE box and sending that, the manufacturer will probably break it down into three: you'll get a round box with the wheels, the frame with a label on it, and a box with all the smaller parts (tires, chain, gear shifter, etc.) in it. When the packages arrive, they'll say something like 1 of 3, 2 of 3, and 3 of 3 and you'll have to assemble them from there. Packets work kind of like that.
  • Addressing: Remember those unique addresses all the nodes have? This is the system used to assign them. A common and widely-used type of address that a node might have is an IP (Internet Protocol) address. Those are what's used on the Internet to route traffic.

"So What do I do With it?"

So we've established how networks go together and their component pieces, and even what the benefits of them are, but not the Why to go with the What and How. Here are some common uses of networks:

  • Communication: I mentioned Skype back under P2P networks, but there's also Vonage, Ventrillo, and other VOIP (Voice Over Internet Protocol) services out there, to say nothing of Instant Messenger clients, email, forums, newsgroups, Blogs, and (God help us) even Twitter. Oh, and that cell phone you've got? It's part of a network, too.
  • File Sharing: You're on the first floor. Your boss, on the eleventy-third floor needs that document now. The elevator is running slow as usual. And you don't want to run up eleventy-two flights of stairs. Send it to him through the network. Not only have you saved yourself the time of actually walking there, you don't have to take the time to write the file to a disk, CD, or USB drive, either.
  • Printer Sharing: So there's thirty of you in the office. You tell me what's a better use of the money - a cheap, crummy printer on every desk that gets in the way anyhow or a halfway decent one that you all share and better coffee in the office? Especially since none of you print much anyhow. Similar principles apply to sharing of other resources, too. (For example, scientific instruments)
  • Cloud Computing: This is getting more popular these days. I already mentioned Google Apps, but things like Amazon's S3 would also apply, here.
  • Gaming: Ever been to a LAN party? They're fun. A bunch of people supply their own computers, create a temporary LAN, and play some sort of multi-player game. Good clean fun.
  • Secure Access: If you've got important data that needs to be seen by only certain eyes, a properly bolted-down network can make being sure that those eyes and ONLY those eyes see it much, much easier than doing the old routine where you handcuff a case to some guy's arm.
  • Management Services: Or, keeping the IT department from going hair-pulling bald. Networks offer a lot of flexibility and functionality for managing the individual nodes hooked up to them. It's possible to do things like tracking software usage, software-level system maintenance, etc. from a server on a network rather than walking around and sing each workstation separately. One can also monitor and regulate user behavior from a central location.
So there it is: the basics of computer networking. From here on is, it gets a lot more specific.

[This post written in Mozilla Firefox 3.5 under Windows XP]