COMPUTER NETWORKS temp
COMPUTER NETWORKS temp
Chapter 1: Introduction/Overview
1.1. Content:
i. Topology and architecture of computer networks.
ii. Layered protocols.
iii. OSI and TCP/IP protocols. Local area networks.
iv. Wide area networks. Routing protocols. Gatewaying.
Networks therefore use two types of wiring schemes to minimize interference: Twisted Pair
(TP) and Coaxial.
2.2.1 Twisted pair – also used in telephone. Each wire is coated with an insulating material
and twisted together. Such twists change the electrical properties of the wire making it
suitable for use because the twists help prevent electric currents on the wire from radiating
energy that interfere with other wires and they also prevent signals in other wires from
interfering with the pair.
2.2.2 Coaxial cable – provides more protection from interference than twisted pair. The
metal shield (heavier) provides a barrier to electromagnetic radiation. Copper mesh is the
metal shield.
Fig 2.2: Coaxial cable
The inner wire transmits and the outer wire returns. It provides more protection from
interference than twisted pair. The metal shield (heavier) provides a barrier to
electromagnetic radiation in both directions. There are also shielded twisted pair. Such
shielded wiring is often used when wires from a network pass near equipment that generates
strong electric or magnetic fields e.g. a large air conditioner.
Disadvantages:
Installing fiber requires special equipment that polishes the ends to allow light to pass
through (expensive)
If a fiber breaks inside the jacket, finding the location of the problem is difficult.
Repairing a broken fiber is difficult since it requires special equipment to join two
fibers so that light can pass through the joint (expensive).
2.6 Microwave
They are electromagnetic radiation beyond the frequency range used for radio and tv
(wavelength ranging from 1m to as short as 1mm implying frequencies between 300MHz to
300GHz, includes UHF and EHF millimeter waves) and are used mainly by long-distance
telephone companies. Their transmissions can be aimed in a single direction thus preventing
others from intercepting the signal. They carry more information than lower frequency RF
transmissions. They require a clear path between the transmitter and the receiver since they
cannot penetrate metal structures. They also require mounting of two towers each aimed
directly at the other i.e. transmitter aimed at receiver.
2.7 Infrared
They are electromagnetic radiation with longer wavelengths than those of visible light –
frequency range of 430THz to 300GHz and are used in industrial, scientific and medical
applications e.g. night vision devices. They are the wireless remote controls used with
appliances such as TV and stereos. They are limited to a small area e.g. single room and
require the transmitter to point at the receiver. They are comparatively inexpensive and
require no antennas. A room equipped with a single infrared connection can provide network
access to all computers in the room.
NB: Notice the delay between the 4th and 5th bits.
The sending and receiving hardware must agree on the length of time the voltage will be held
for each bit. Thus technically, transmission hardware is rated in baud. But usually to make
RS-232 hardware more general, manufacturers usually design each piece of hardware to
operate at a variety of baud rates. The baud rate can then be set either manually using
switches in hardware installed in the computer or automatically by device driver software in
the computer. After this, the sending and receiving hardware must be configured to use the
same baud rate otherwise framing errors occur.
Fig 3.2: A diagram showing minimal wiring required for full-duplex RS-232 communication.
Although the two wires carry data independently, it is possible for them to share a single
ground wire.
Each transmission system has a limited bandwidth which is the maximum rate at which the
hardware can change a signal. It is measured in cycles per second, Hz.
A fundamental relationship exists between the bandwidth of a transmission system and the
maximum number of bits per second that can be transferred over that system. This is
Nyquist’s sampling theorem (1920) which provides a theoretical bound on the maximum
speed at which data can be sent. For RS-232 that uses two values of voltage to encode data, it
states that the maximum data rates in bits per second that can be achieved over the
transmission system of bandwidth B is 2B.
Generally, if the transmission system uses K possible values of voltage instead of two, it
becomes
D = 2Blog2K,
D = maximum data rates in bits/second.
To send data, a transmitter modifies the carrier slightly. This is called modulation. E.g. a
radio station uses a continuous carrier wave that oscillates at an assigned frequency and uses
an audio signal to modulate the wave. Receivers on the other side use it to reconstruct the
original audio signal.
NB: Users are forced to use leased lines as each cannot single handedly bear the costs i.e.
utility companies provide the service to which you subscribe.
Fig 4.3: The concept of Frequency Division Multiplexing. Each pair of source and destination
can send data over the shared channel without interference. In practice, each end requires a
multiplexor and demultiplexor for 2-way communication, and a multiplexor may need
circuitry to generate the carrier waves.
A minimum separation between carriers is maintained to keep off interference. Thus, FDM is
often used only in high-bandwidth transmission systems i.e. systems that can send a wide
range of frequencies.
NB: There is also Wave Division Multiplexing (WDM) which operates by sending multiple
light waves across a single optical fiber. At the receiving end, an optical prism is used to
separate the frequencies. This is possible because light at a given frequency doesn’t interfere
with light at another frequency.
Time Division Multiplexing (TDM) – the general alternative to FDM in which sources
sharing a medium take turns to use a channel.
NB: A disadvantage of overhead occurs in framing i.e. a framing scheme that delimits both
the beginning and the end of each frame sends an extra unnecessary character between blocks
of data. The chief advantage of sending a character at the beginning and ending of a frame is
clear when one considers large delays and computers that crash.
The main disadvantage is that for each pair of computers, the number of connections grows
quickly as the size of the set increases i.e.
Several LAN designs exist based on e.g. the voltages and modulation techniques used, and
the approach to sharing i.e. mechanisms used to coordinate access and transmit packets. The
net economic impact of sharing is reduced costs.
6.5.1 Ethernet
It employs bus topology and controlled by IEEE. Ethernet LAN consisted originally of a
single coaxial cable called segment, to which multiple computers attached. Each segment is
limited to 500m and computer separation is 3m. Originally it operated at 10 megabits per
second. Fast Ethernet operates at 100Mbps while gigabit Ethernet operates at 1000Mbps.
The sender sends a signal that propagates to both ends of the cable. It has exclusive use of the
cable and the rest must wait. The others can then transmit once it completes.
CSMA/CD both detects and recovers from such collisions. Each computer randomly chooses
a delay less that d, the maximum possible, and so the computer with the smallest delay will
transmit first.
If two or more computers use the same delay to bring further collision, they are required to
double such delays for each subsequent collision until a solution is found e.g. from 0 – d, then
0 – 2d, then 0 – 4d etc. This doubling of delay range is referred to as “binary exponential
back off”.
Wireless LANs hardware uses antennas to broadcast RF signals through the air unlike cables.
Participating computers in this case are configured to the same RF and so must take turns in
sending packets. Wireless LAN transmitters have only enough power to transmit a short
distance and so cannot use CSMA/CD technique, but apply CSMA with collision avoidance,
CA.
In the above diagram, comp1 and comp3 are too far apart to receive each other’s
transmission, e.g. when both send to comp2 simultaneously they have no idea of collisions
except comp2 knows. The CSMA/CA triggers a brief transmission from the intended receiver
before a packet is transmitted i.e. comp1 sends first a brief control message to comp2 before
it transmits. The response from comp2 is received by all computers within the range of its
antenna.
Collision of control messages can still occur with CSMS/CA but the transmitting computers
will apply the idea of random back offs.
As the sending computer transmits a frame, the bits pass through all the other computers and
back to the sender. This allows the sender to verify that what is received is what was sent.
Only the recipient makes a copy of the transmission but the others simply forward it i.e. the
frames.
Token ring does not use CSMA/CD but the token ring hardware moves among all the
computers to ensure that the permission is passed to each computer in turn. Such coordination
uses a special reserved message called “token”. It gives a computer permission to send one
frame only at a time. This ensures fairness.
6.5.3 Fiber Distributed Data Interconnect, FDDI (an example of ring network)
Problem with token ring is susceptibility to failures e.g. failure on one machine disables the
entire network.
FDDI is a very fast token ring technology transmitting data at 100 million bits per second and
uses optical fiber instead of copper cables to interconnect computers. It also applies the
concept of redundancy to overcome failures i.e. two complete rings if one fails the other takes
over. (See fig. 6.7 below).
Fig. 6.7: Transmission in FDDI
Data flows opposite in each of the two rings. If breakage occurs, the computers reconfigure to
use the inner network. Such process to reconfigure is referred to as “self healing”.
A frame addressed to a non-existent station is ignored and since the hardware interface and
CPU are separate, the capture and address comparisons do not interfere with normal
computing.
Static addressing: has the advantage of ease of use and permanence. The
addresses are globally unique across the various manufacturers.
Dynamic addressing: has the advantage of eliminating the need for hardware
manufacturers to coordinate in assigning addresses and allows each address to
be smaller, since uniqueness of an address is important only within a single
LAN. Its disadvantage includes lack of permanence and potential conflict
since each time of reboot, a station obtains a new address.
7.4 Broadcasting
Refers to transmissions available to a large audience i.e. any broadcast avails data to all other
computers on the network. It is useful e.g. when a computer is trying to find a particular
printer in a network i.e. it broadcasts and only the specified printer responds.
In this case, even though all stations receive a signal, the hardware interface on each station
uses the frame’s destination address to determine whether to keep a copy. To be efficient,
most LAN technologies extend the addressing scheme such that both the computer’s address
and a special reserved address called “broadcast address” are included. A frame arriving with
either of the two addresses will therefore be delivered to the computer’s operating system.
7.5 Multicasting
Broadcasting is wasteful in the sense that discarding frames involves using the CPU to make
a decision. Multicasting therefore is a restricted form of broadcasting but in this case the
network interface does not automatically forward frames to the CPU. The hardware is
programmed to know which multicast frames to accept or reject i.e. it is the one that decides
and not the CPU now.
Multicasting extends the addressing scheme by reserving some addresses for multicast, and
extends the network interface hardware by allowing it to recognize additional set of
addresses. On booting, the interface is programmed to recognize only the computer’s address
and the broadcast address. If therefore an application on the computer wishes to receive
multicast frames, it must inform the interface which multicast address to use. The interface
then adds the address to the set it will recognize and begins accepting frames sent to that
address.
NB: Each LAN technology defines a frame format and most technologies consist of a header
followed by a data area. All frames used with a given technology have the same header
format because the size and format of the header is fixed, but data area depends on the
amount of data sent.
For networks that do not have self-identifying frames, i.e. do not have a type field in the
frame header, the approaches they use to know the type of data are:
i. Before any data is sent, the sender and receiver agree to use a single format.
ii. Before any data is sent, the sender and receiver agree to use the first few octets of the
data field to store type information.
Analyzers consist of a standard portable computer e.g. notebook PC with a standard LAN
interface and it must be dedicated i.e. specific to analyzing only.
To read packets, the analyzer software places the computer’s network interface hardware into
promiscuous mode i.e. accept all frames. It places a copy of each frame in the computer’s
memory and interrupts the CPU to inform it that a frame has arrived.
NB: The analyzer is configurable and the exact configuration a user selects determines what
field the analyzer examines and what information it keeps.
Chapter 8: LAN Wiring, Physical Topology and Interface Hardware
Networks are designed to operate at the highest rate the hardware can support and the speed
at which they operate is fixed in design i.e. does not depend on the CPU rates of the attached
computer.
The network interface hardware i.e. NIC or network adapter card, handles all the details of
packet transmission and reception. The NIC understands the electrical signals used on the
network, the rate at which data must be sent or received and the details of the network frame
format. Thus, NIC for Ethernet cannot be used for Token Ring network etc.
To transmit on the network, the CPU forms a packet in memory and instructs NIC to start
transmission. The NIC uses the computer’s interrupt mechanism to inform the CPU when
transmissions complete. Again, NIC can receive incoming packets without the CPU’s
intervention. The CPU only allocates buffer space in memory and instructs NIC to read in.
The NIC then interrupts the CPU accordingly.
The connection between the NIC and the network may take different forms i.e. depends on
the network technology i.e. the NIC may or may not contain all the intelligence required and
so may or may not require extra devices to help it join on the network. We will use an
example of Ethernet wiring schemes as a case study.
i. Original Thick Ethernet Wiring: - also called “thick wire Ethernet” or “thick net”
or 10Base5. Consists of a large coaxial cable. Includes an NIC with circuitry to handle
the digital aspects of communication, including error detection and address
recognition. The NIC does not include analog hardware and so does not handle analog
signals e.g. does not detect a carrier, convert bits to appropriate voltages for
transmission, or convert incoming signals to bits. This is achieved by a separate
device called “transceiver” which is required for each computer. (See fig. 8.1below)
Fig. 8.1: Original Thick Ethernet Wiring. An AUI connects the NIC in each computer to its
corresponding transceiver.
Since it can be cumbersome and expensive to use a single transceiver for each computer,
connection multiplexing is advisable, that allows multiple computers to attach to a single
transceiver. (See fig. 8.2 below)
Fig. 8.2: A Connection Multiplexor, Multiplexor attaches to a single transceiver, multiple
computers connect to multiplexor, each computer operates as if it connects directly to a
transceiver.
Fig. 8.3: Thin Wire Ethernet. Flexible cable connects from NIC on one computer to the NIC
on another computer.
NB:
It is possible to mix the wiring schemes in one network since they use a standard
frame format.
To make it possible to change wiring schemes without changing NIC, they may
support multiple wiring schemes e.g. the three wiring schemes on one NIC (See fig.
8.5 below).
But only one scheme may be active at a time (i.e. activated by software)
The computer’s physical address remains the same when moving to a new wiring
scheme since the physical address is assigned to the NIC.
Fig. 8.5: Ethernet Interface Card, each wiring scheme uses a different style connector.
Notes:
i. Category 5e (Category 5 enhanced) Ethernet cables are newer
than category 5 cables and support faster, more reliable data transmission
through networks. CAT5 cable is able to transmit data at 10 to 100Mbps
speeds, while the newer CAT5e cable should be able to work at up to
1000Mbps. The CAT5e cable is also better than the CAT5 at ignoring
"crosstalk," or interference from the wires within the cable itself.
Though CAT6 and CAT7 cables exist and can work with even faster
speeds, CAT5e cables will work for most small networks.
ii. Cat6 and Cat6a
The most distinctive difference between Cat6 and Cat6a is the data transmission speed. Both
Cat6 cables and Cat6a cables can support data transmission rates to 10 Gbps. But Cat6 cables
can only keep 10 Gbps to 37~55 meters (121~180 feet), and Cat6a cables can relay 10 Gbps
up to 100 meters (328 feet).
Chapter 9: Extending LANs: Fiber Modems, Repeaters, Bridges and
Switches
9.1 Distance limitation and LAN
Network design needs to consider capacity, maximum delay and distance achievable at given
cost. There is need for fair access mechanisms that provide for one main motivation to limit
LAN length. Also, the longer the length, the weaker the signals.
Fig 9.1: Optical Fiber and Fiber Modems used to provide connection between a computer and
a distant Ethernet.
ii. Repeaters
They are analog devices and transmit an amplified copy of a signal from one segment to
another. They do not understand frames and have no physical addresses. Do not wait for
complete frames to retransmit. The maximum Ethernet size is 500m. With repeaters, the
source/destination cannot determine whether they are/are not on the same segment. There
should be no more than four repeaters separating a pair of stations. Originally designed for
close proximity e.g. in a building, but can now be extended via fiber modems to separate
buildings. Problem is that they can even retransmit interfered with signals.
Fig 9.2: A repeater R connecting two Ethernets
iii. Bridges (Network bridges are considered digital devices, as they operate at the data
link layer of the OSI model, which deals with binary data and MAC addresses,
making them inherently digital in their function.)
They handle complete frames. They listen to traffic on each segment in promiscuous mode
(promiscuous mode – it is a network security, monitoring and administration technique that
enables access to the entire network data packets by any configured network adapter on a
host system ie used to monitor traffic). They help in isolating problems on different segments
and use same network interface as conventional computer i.e. consists of a conventional
computer, CPU, memory and two NICs.
Fig 9.3: Six computers connected to a pair of bridged LAN segments. Bridge receives
complete frames.
They perform frame filtering and are dedicated to a single task i.e. do not run application
software i.e. CPU executes code from ROM. They do not unnecessarily forward frames from
one segment to segment unless under broadcast/multicast. Most are called adaptive/learning
bridges since they automatically learn computer locations on a LAN. See the list below.
Fig 9.4: A sequence of events for the example network fig 7.3 above and the locations of
computers that the bridge has learnt.
When planning a bridged network, it must be noted that the bridge hardware is designed to
permit communication on separate segments simultaneously i.e. parallelism. Thus, a set of
computers that interact frequently should be on the same segment.
Note that fiber modems can be used to extend LANs with bridges as in repeaters.
Bridging across longer distances can be achieved via the use of leased serial lines or leased
satellite channels.
Fig 9.5: A bridge using a leased satellite channel to connect LAN segments at two sites. A
satellite bridge can span arbitrary distance.
The leased line is cheaper than the satellite. Bridged LANs or leased type use low-bandwidth
connections to reduce costs. The bridge hardware must perform buffering because the LAN
segment forwards frames faster than the satellite. If the buffer is full, some frames are
discarded or some method of control must be implemented.
NB: Not all bridges can be allowed to forward frames or a cycle of bridges introduces the
problem of infinite forwarding. See fig below.
Fig 9.6: A bridged network that consists of eight segments connected by seven bridges.
Computers can be attached to any of the segments.
Fig 9.7: Bridges connected in a cycle, problem occurs if all bridges forward broadcast frames.
Therefore, in order to prevent the problem of infinite loops, a bridged network must not allow
both of the following conditions to occur simultaneously:
All bridges forward frames
The bridged network contains a cycle of bridged segments.
9.2 Switched LANs (Network switches are considered digital devices, as they manage and
route digital signals within a network, meaning they transmit data in the form of binary
bits (ones and zeros) rather than continuous analog waves.)
Consist of an electronic device i.e. switch, that allows multiple computers to attach to it and
to send and receive data. Similar to a hub though a hub simulates a single shared medium
while a switch simulates a bridged LAN with one computer per segment. Since switches are
more expensive than hubs due to the higher aggregate data rates than a hub, some
organizations mix the two. Each hub connects to a switch port and multiple computers attach
to the hub. Computers on a hub therefore behave as segments on their own while parallelism
is maintained by the switch across such segments.
Fig. 9.8: The concept underlying a switched LAN. Electronic circuits in the switch provide
each computer with the illusion of a separate LAN segment connected to other segments by
bridges.
Chapter 10: WAN Technologies and Routing
10.1 Network technologies can be classified as:
LAN – spans a single building or campus
MAN – spans single city
WAN – spans several cities, countries or continents.
The main difference between a LAN and a WAN is that a WAN must be able to grow as
needed to connect many cities spread across large geographic distances, with many
computers at each site.
Fig. 10.1: A packet switch with two types of I/O connectors. One connects to other packet
switches and the other to computers.
To form a WAN, you require a set of interconnected switches. See fig 10.2 below.
Fig 10.2: A small WAN formed by interconnecting packet switches. Connections between
packet switches usually operate at a higher speed than connections to individual computers.
10.3 Store-and-Forward
This is the technique that enables computers to communicate in a WAN simultaneously by
buffering packets in memory. During store, the I/O hardware inside the packet switch places
a copy of the arriving packet in the switch’s memory, informs the processor via interrupt.
During forward, the processor examines the packet, determines over which interface it should
be sent and starts the output hardware device to send the packets.
Addressing in a WAN is done hierarchically, usually divided into two parts, first identifies a
packet switch, and second identifies a computer attached. The address otherwise is
represented as a single binary value allowing users and applications to treat the address as a
single integer. See fig. 10.3 below.
Fig 10.3: Example of hierarchical addressing in WAN. Each address consists of two parts:
first part identifies switch; second part identifies computer connected to the switch.
The table with next hop information is called “routing table” and the process of forwarding
packets is called “routing”.
Fig 10.6: The routing table for each node in the graph of fig 10.5. The next-hop field in an
entry contains a pair (u, v) to denote the edge in the graph from node u to node v.