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]