Here
we will try to sum up a few things in a nutshell.
Devices on a network communicate by way of packets and
datagrams. These packets are merely oscillating signals that
vary as a regulated flow of electrons while traveling down
copper wire or as light pulses while traveling down fiber optic
links. These modulations allow data to be broken up into
chunks, and each chunk can carry field and flag information.
As an analogy, think
of a large manila envelope or a shipping package from UPS. It
has a “TO” and “FROM” field, and the package is used to address
and deliver its contents. Well, that’s what a packet is, but the
“TO” and “FROM” are binary bits represented by modulations in
amplitude and frequency, were you to view them through an
oscilloscope.
Remember weeks ago
when we were talking about Moore’s Law? The internet started out
as ArpaNet. It was in actuality a military endeavor spawned by
the cold war (ahh, those were the days…). Through the shaky
policy of MAD (Mutually Assured Destruction, if you’re not a
cold war buff), TCP/IP was developed as a protocol stack to
allow damaged data to be re-transmitted with a checksum in the
event of severe infrastructure damage and electromagnetic pulses
(EMPs) and interference. This way, in the event of a full
nuclear exchange, even though we would all be dead or dying, any
survivors could send text messages and launch codes with their
last dying gasps. Hurray! Hey, MAD worked, didn't it? Neither
side launched a strike against the other. Or, maybe we just got
lucky... Hmmm...
So, never let anyone
tell you that nothing good came out of the arms race and the
cold war and all that U.S. vs. U.S.S.R. saber rattling. And
we're not talking just TCP/IP, but awesome 80's cold war tunes
like "99 Luft Baloons" and "Party Like It's 1999" and Sting's
"The Russians Love Their Children Too"... And colorful Miami
Vice shirts and really huge, gi-normous BIG hair, well, maybe
that wasn't due to the cold war, but it was 80's anyways... So
back to the point, what’s a protocol, and how do you stack them?
A protocol is a
computer language whereby two computing devices communicate.
There are many different protocols, and a PC can speak many of
them. The only requirement for two devices to communicate is
that they use the same protocol, as you and I must use the same
language when we communicate. If you speak English, but
si elijo hablar en español pero usted
está escuchando en inglés,
no nos comunicaríamos muy bien. :-)
Unless you know both
English and Spanish, we can’t communicate effectively. Even if
we know both languages, it’s more efficient if we decide on one
or the other as the “agreed upon protocol” to exchange our
information. That’s what network devices use; they search
through the protocols they understand until they find one in
common with a device that wants to transfer information. I go
into detail about protocols below; this is a generalization – so
hang in there!
The most important of
the protocols is the TCP/IP stack. In this stack of multiple
protocols, IP makes packets routable and TCP makes data
transmission reliable. TCP does this by calculating a checksum
before a packet leaves. This checksum is re-calculated when a
packet arrives at its destination. If the packet is damaged by
electromagnetic radiation, cross talk or signal attenuation in
transit, the checksums differ. The receiving device will then
request that the sending device resend the packet.
In addition to TCP/IP,
networks need a means of controlling traffic. For a category 5e
network, CSMA/CD (Carrier Sense Multiple Access with Collision
Detection) functions as the traffic cop. There are 8 wires
employed in 5e Ethernet, though only 4 are used in UTP cable.
(Sure, STP is better - it's shielded, but sooo expensive. So
usually UTP is the most common media.) Two wires transmit and
two wires receive. There is no TOKEN packet, as in a
MAU/token-ring network, so many times there are collisions on an
Ethernet network. When CSMA/CD detects this due to a device
receiving a simultaneous signal while it is transmitting, it
issues an “all stop” to transmitting devices and they wait a
random interval to resend information asynchronously.
In contrast, wireless
standards such as 802.11 a/b/g/n utilize CSMA/CA (Carrier Sense
Multiple Access with Collision Avoidance). Another way of
minimizing collisions is by using switches which configure ASICs
(that's Application Specific Integrated Circuits, for you people
with lives) to form virtual circuits between their port
connections. A MAC table then stores addresses and eventually,
after learning enough, can allow simultaneous full-duplex
communication between multiple network devices. (Sure, the
switch cost more, but boy do you get what you pay for! Way
better than a hub...)
All
devices on a network have a MAC address, usually in EEPROM, and
the address resolution protocol (ARP) glues a unique IP address
at the software or OS level to this MAC address. These IP
numbers are like phone numbers, every device must have a unique
one. In a moment we will go into IP addressing. We are still
summarizing for now.
These IP addresses are limited by the number of hosts and the
number of networks they can provide. We currently use IPv4
(billions of addresses) and are moving to IPv6 which will offer
trillions of addresses in a MAC-like format. Think of the host
portion of a network address as the street number where your
house is located. Think of the network portion as the street
name. IP addresses need to be sub-netted and super-netted to
control broadcast domain traffic, provide for security and
filtering and allow a network to be divided and managed by site
locations. When this occurs through CIDER, VLSM or classful IP
sub-netting, it is called routing.
Now,
roll the 'R' on your tongue like that guy from Saturday Night
live who does the Subway commercials and says "Eat Frrresh!",
only say "IP handles Rrrrouting!". O.k., you don't really have
to do this, how would I know? But it might be a mnemonic device
and well, we must have SOME fun ... ;-)
Within the TCP/IP
stack, IP handles routing. Routers have routing tables that can
contain static entries or dynamically added entries through
protocols like RIPv1, RIPv2, OSPF, IGRP and EIGRP. These allow
packets to traverse subnets.
There is a Diagnostic
Model that bears mentioning here – the seven layers of the Open
Systems Interconnect (OSI) model. (This is not as tasty as a
7-layer burrito from Taco Bell, which I am really craving right
now - with extra guacamole, but that’s beside the point, I
suppose.) Let’s list them:
1 – Physical
Layer
2 – Data Link Layer
3 – Network Layer
4 – Transport Layer
5 - Session Layer
6 – Presentation Layer
7 – Application Layer
Besides being an
annoying repetitive multiple-choice quiz item on several
certification exams, it actually has real meaning and purpose!
:-) At layer 1 are the physical aspects of a network – cables
and fiber, NIC cards and media converters, etc. At layer 2, MAC
addresses and ARP function. At layer 3, routing takes place and
devices are addressed with classful, CIDER or VLSM addressing.
At layer 4, most protocols operate. At layer 5, sockets
consisting of a protocol selection and IPs are maintained. At
layer 6, data is massaged and unpacked to make it palatable to
the last layer. At layer 7, applications actually do something
with the data! Yay!
As a packet leaves a
device to travel across the network, it goes through
encapsulation. In this process, a packet starts at layer 7, the
application layer, and frames of data are tagged and fields and
flags are set by each subsequent layer as it moves down the
layers. For example, at layer 3, source and destination IPs are
added, while at layer 2 source and destination MAC addresses are
added. Finally, when the data reaches layer 1, it is broken up
into electromagnetic fluctuations or light pulses and sent out
across the network. When the data gets to the other side, it
follows a reverse process of de-encapsulation. Starting at layer
1, it moves up to layer 7.
Besides being a way to
understand how networking functions, I use the OSI as a
diagnostic tool. I always start at the bottom layer. If there’s
a connection problem, why bother checking the higher layers? If
you verify that lower layers are functioning with a network
tester, move up to higher layers and test ARP cache entries and
MAC tables, then IP addresses and subnet masks and routing
tables, then protocol compatibility, then OS, software and
firewall settings, and finally application settings.
I say this from many
sour experiences of starting at higher levels on a "hunch",
thinking I could be sure that the lower levels were functioning.
I would waste hours of time, only to discover it was something
simple at a lower level (like rats chewing through a patch panel
or a tiny pin bent on wire 6 in an obscure switch closet that
got hit by the cleaning crew.) Over the years I have found it
best to ask the simple questions first – start at the LOWER
layers. The author of your text seems to agree with me. However,
to be less biased and present the opposing perspective, I must
admit I have met those who prefer to start at the top layer and
work their way down. Usually you find, after conversing with
them for a while, that their mama dropped them on their head
when they were young, but. Naw. I'm just kidding!
When resolving network
connectivity and configuration issues, where would you start?
Share your tips and tricks with the class.
©2005 C.
Germany