Networks 201
Volume Number: 16
Issue Number: 4
Column Tag: Network Management
Networks 201
by John C. Welch
The technical introduction to networks
Good Morning
Hopefully, the title has made you think a little bit. Usually, introductory articles such
as this one use the number '101', to indicate a beginner's course. Well, both various
articles in MacTech, and other publications both in and out of the Macintosh
networking space have covered that area quite adequately, so this is the next level. This
is going to be a technical introduction to networks, and, while pointed at all of
MacTech's readers, has two particular groups in mind. The first is the Mac network
admin, whom, after years of elegant, (relatively), easy plug and play AppleTalk
networking, suddenly finds themselves dealing with TCP/IP1, SMB2, and all the
wonderful new acronyms that are keeping you at work late at night. The second target
is the developer who is trying to make sure that their product is network enabled, or
at least not network hostile, but only has a very high-level idea of networks and
networking.
The purpose of this article is to take you from the 30,000 ft view of the 'Networking
101' articles, where you know the basics, and have a general view of what's going on,
and drop you down to about 300 feet. At this level, you can make out most of the details
of what is going on, and how it's happening. We aren't going to get into the actual API3
for programming networkable applications on the Mac, as that would be the 3 inch
view, and fodder for another time. Also, for this article, we will concentrate on
creating a way to classify networks and network services, and look at what those
classifications mean. In following articles, we'll apply this classification to things like
Ethernet, TCP/IP, FTP4, etc.
Functional Description
To start with, we need to have a model to describe networks as a thing. Mostly because
a good model is like a table of contents, but also because most of us relate better to a
thing than an amorphous concept. While there are as many ways to create a network
model, the one most frequently used is the OSI5 model. This model breaks the network
into seven parts, or layers. Each of these layers has a specific purpose, and a specific
functionality. The purpose of each layer is to receive information from the layer above
or below it, and perform its function on that information, then pass it onto the next
layer. The only two layers that don't do this are the very top and bottom layers. The
bottom layer, or physical layer, has only the layer above it, and the physical network
connection below it. The top layer, or application layer, has only the layer below it,
and the user above it. Each of the middle layers is in essence, performing two tasks: a)
adding information to, or removing information from a piece of a message, or an entire
message, and b) communicating with the matching layer on the other end of the
transmission. So now that we know that we are going to be using the OSI model, and
that the OSI model has seven layers, let's take a brief look at some of the details within
this model, since it is so critical to our ability to model networks.
OSI Reference Model
Again, this is the model used to describe essentially every network in use. Regardless
of how exactly a given network type, such as AppleTalk or TCP/IP actually fits into the
OSI model , they still manage to coerce their actual structure it into one that is
compliant with the way the OSI model displays a network's architecture. The OSI model
was designed approximately 20 years ago in an attempt to overcome the completely
proprietary network design of the time. At this time all networks were worlds unto
themselves with no way to connect to other networks and the vendors of these networks
highly discouraged any sort of interconnection. Needless to say the OSI reference model
was considered highly radical for the time. Even more radical was the fact that the OSI
was not just a reference model but was intended to be a physical network type along
with Novell, IBM, and AppleTalk. However the actual OSI network was balky,
unwieldy, and almost impossible use with the equipment of that time. Also by the time
that anyone started seriously considering moving to an actual OSI network TCP/IP had
come upon the scene and had become the defacto standard that it is today. But, the OSI
had created the model that is the basis for visualizing networks and network functions.
As I mentioned before, the OSI model has seven layers. In the creation of these layers
five essential principles who were used to decide what would make up a layer and its
related functions.
A layer should be created where a different level of
abstraction is needed. That is to say, that if you need to create a new
representation of what this layer is doing, a new layer should be created to fit
this representation. In other words, each player should only a one
representation of its function.
Each layer should perform a well defined function. This
principle dictates that there should be a one-to-one match between the
function of each layer and the layer itself. Although ideally this would mean
any single layer only had a single function, as we study the lower layers and
particularly the data link layer, we shall find that in fact this is impossible to
maintain.
The function of each layer should be chosen with an eye
toward defining internationally standardized protocols. In other
words, don't create a function that can only be performed by a privately
owned, proprietary, networking protocol.
The layer boundary should be chosen to minimize the
information flow across the interfaces. You don't want to set up layers
that require huge amounts of data of more information flow across their
interfaces. Besides violating principle two, this will also slow down the speed
of your network, and make it harder for third-party providers to create
products that use your network.
The number of layers should be large enough that distinct
functions need not be thrown together in the same layer out of
necessity, and small enough that the architecture does not become
unwieldy. Finally, you want to make sure that you have enough layers, so
that each function can have its own layer or as close as possible to that. But
you also don't want to have so many layers that it's impossible to actually use
your network in a real-world situation.
Now that we have looked at a bit of the OSI model's history, and guiding principles,
let's move on to the layers themselves.
Layer One: Physical
The physical layer is concerned with essentially two things: bits and signals. This is
the layer that controls the actual transmission of ones and zeros or actually the
electrical signals that make up a one or a zero across the network cabling or
transmission media be it wireless, copper cable, or optical fiber. This is the layer
that ensures that when the sender transmits a signal that is a one, that the receiver
receives that signal as a one. This is also layer that decides exactly how many volts
equal a binary one or a binary zero, (for example, if we use TTL6 logic levels, then a
+5 volt signal is used to represent a binary one, and a 0 volt signal is used to
represent a binary zero. ) this letter also establishes how long a signal needs to be in
duration to be considered a valid one or zero whether or not communications can
proceed in both directions simultaneously, (duplex), or only one direction at a time
(simplex). So this is the layer that decides how many wire pairs you need for a given
type of network, the required quality of the wire, how many twists per inch for
twisted pair cable, or the mode type for fiber.
This layer receives frames of data from Layer 2, the Data Link Layer, and sends them
out onto the transmission media as a serial stream of ones and zeros. It also receives
ones and zeros from the transmission media, and sends them up to Layer 2 so they can
be assembled into frames.
Note: the physical layer is the functional representation only. It only deals with the
processes and mechanisms that place signals on to, and receive signals from the
transmission media. It does not include the physical transmission media, itself. In
other words the physical layer ends at the network port on the network interface, be
that Ethernet, ATM, or wireless. While the particular physical layer device or media
may create specifications for a particular type of transmission media, the actual type
of media itself is outside of the physical layer functionality. Informally, the physical
transmission media tends to be called Layer zero.
The Physical Layer is where we become concerned with things like baud, (which is the
number of physical changes in a signal per second.), and bps, or bits per second,
(which is the number of physical bits being forced down the line)7. Most of the
equations that determine line capacity are in the realm of the Physical layer. Although
there are quite a few, we will look at only the most important, which decreases the
number quite a bit. The first of these is Nyquist's theorem, which was developed in the
mid-1920s. This theorem deals with maximum data rate on a clean line. This theorem
also proves that if a signal is run through a low - pass8 filter set to a bandwidth of H,
then the signal can be reconstructed by making 2H samples per second. The fact that a
the filter is a low-pass filter limits the maximum effective sampling rate to 2H, as
anything higher has already been filtered out. So, if the signal contains V discrete
levels, then the theorem is expressed as :
Maximum data rate = 2Hlog2Vbits/sec
So by applying this theorem, a perfectly noiseless channel, with a bandwidth of 3KHz,
can transmit a binary signal at a maximum data rate of 6Kbps. Now obviously, the only
place a perfectly noiseless channel exists is on paper, so Nyquist's theorem is only
useful for finding the theoretical maximum capability of a physical medium. To
measure the amount of noise on a channel compared to the amount of signal on the same
channel, we use the idea of the signal-to-noise ratio. By using S to represent signal,
and N to represent noise, we have our common equation of S/N. This ratio is usually
not expressed in a raw format. Rather, the quantity 10log10S/N is used. This gives
you the S/N in decibel units, or dB, so a ratio of 10 is 10dB, 100 is 100dB, and so on.
Usually the dB is implied. To establish what the maximum bandwidth of a signal is for
a line with a given S/N, Claude Shannon carried on with Nyquist's work, and in 1948,
came up with the theorem that calculates this bandwidth. This theorem express the
maximum bandwidth for a noisy channel with H Hz bandwidth, and a signal-to-noise
ratio of S/N as:
Maximum bps = Hlog2(1+S/N)
So, for a 3KHz channel, with a S/N of 30dB, (typical for an analog telephone line), the
best data rate can be no higher than 30Kbps, regardless of signal levels, or sampling
rate.
These two theorems give us the ability to figure out capacity for almost any line type
that uses electrical signals, the obvious exception being fiber optic communications,
which are subject to different levels. For fiber networks, the limiting factor besides
distance and signal power, is attenuation. As the laser pulse travels down the fiber, it
is attenuated by imperfections in the glass, dust particles etc. To establish the
inherent attenuation in a given piece of fiber, so that the physical layout of the
network can be established, the following equation is used:
Attenuation in dB = 10log10(transmitted power/received power)
So, if the difference between transmitted power and received power is 2, then the line
attenuation is 3dB.
Although technically outside of the physical layer, since these equations directly affect
what the physical layer is transmitting over, it is important to understand them. By
knowing these aspects of the physical part of a network, and the OSI physical layer, we
can determine the best ways to build this level of a network, and how to use it. They
also allow us to understand some of the reasons why 10Mbps Ethernet only has a real
world throughput of 6-8 Mbps.
Layer Two: Data Link.
This layer communicates with Layers 1 and 3. It has a more complex function than
Layer 1, as it is dealing with more complex functions. At the most basic level, the
receives data and routing information from Layer 3, the Network Layer, and assembles
them into frames which are passed onto the Physical Layer. It also receives serial
bitstreams from the Physical Layer, and assembles these into frames, which are then
passed onto Layer 3.
The actual functions of the layer are a bit more complex. First of all, the Data Link
Layer is responsible for ensuring successful delivery of the frame to the destination.
This is done via having the recipient send back an acknowledgement frame for each data
frame it receives. When receiving a frame, the Data Link Layer also examines the
frame content to ensure the contents of the frame arrived in the correct order and
content. This is accomplished via special bit patterns at the beginning of each frame.
This is also where error checking, such as CRC9 checks are used. If the network
supports duplex communications, then the acknowledgement frames are used to
'piggyback' the data frames from the other end of the communication.
The Data Link Layer also deals with issues such as damaged, lost, and duplicate frames.
It may do this by giving the Network Layer multiple classes of service, each with
different quality guarantees. If the network has end nodes capable of transmitting data
at many different rates, the Data Link Layer has to be able to act as a traffic cop, and
ensure that slower end nodes do not get overrun by the faster nodes. If the network is a
broadcast network, (all stations receive all messages) then the Data Link Layer has to
control access to the media. For these networks, such as Ethernet, and wireless
networks ala the AirPort, the Data Link Layer has a special sublayer, called the
medium access layer is used, (although it is an important aspect of networking,
medium access is literally the difference between most common network types, will
only be covered in the most general sense in this article, as the amount of information
that pertains to this is best dealt with on its own.)
Of the types of services the Data Link Layer can provide, there are three common
types:
• Unacknowledged connectionless service.
• Acknowledged connectionless service.
• Acknowledged connection-oriented service.
The first type, unacknowledged connectionless service, is when the source transmits
all of its data to a destination without acknowledgement of any of the frames. No
connection is established between the source and the recipient, and there is no
verification of data reception. This type of service is most often used where time is a
critical factor, such as live speech or video. In this type of service, missing a frame or
two is not as bad as having a live transmission halted or dropped for error recovery
procedures.
The second service type, acknowledged connectionless service, is used where data
integrity is critical, but a connection cannot be reliably established. Even without a
connection, the data is acknowledged on a frame-by-frame basis, so that reliability is
maintained. This type of service is seen on wireless systems.
The final type is where both connection reliability and data integrity are of the utmost
importance. In this service, a connection is established between two nodes. Each frame
sent is numbered, and the Data Link Layer provides a guarantee that all frames are
received once, and in correct order. Once the data transfer is complete, the connection
is explicitly torn down, and resources freed for the next connection. This type of
service is frequently seen on leased-line, wide area networks.
Earlier I mentioned that the Data Link Layer receives and transmits frames to and
from the Network Layer. This is done because the interface with the Network Layer
assumes that frames are being sent. It is up to the Data Link Layer to create and break
down the frames when interfacing with the Physical Layer. One of the more difficult
parts about frames is their delineation. In other words, how does the Data Link Layer
know the beginning and end of a frame? One of the most obvious ways would be a time
gap between frames. However, time is not a guarantee on a small network, and if the
Internet is involved, then making a time guarantee is almost impossible, as any of us
who are waiting on critical emails can attest to.
There are four basic ways to delineate frame boundaries: