Eec 2502 Computer Networks Lecture 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

EEC 2502 COMPUTER NETWORKS

LECTURE NOTES

BSC. ECE YEAR V – SEM I

(2021)

DEPARTMENT OF ELECTRICAL AND ELETRONIC ENGINEERING

JOMO KENYATTA UNIVERSITY OF AGRICULTURE AND TECHNOLOGY

LECTURER: EPHRAIM MUREU

COURSE DESCRIPTION
Economic and technological consideration; digital data transmission; Error detection coding and synchronization. Error
detection and recovery; network configurations; principles of data networks and queuing theory. International Organization
for Standardization (ISO), Open systems Interconnection (OSI) reference model; circuit switching, packet switching.
Communication protocol: physical, data link, network and transport layers including Transmission Control Protocol
(TCP/IP); local area networks (LANs). Contention and token passing system (e.g. Carrier Sense Multiple Access with
Collision Detection (SCMA/CD), token bus, token ring, distributed queue dual bus (DQDB), Fiber Distributed Data
Detection Interface (FDDI); current international standards including Integrated Services Digital (ISDN), Broadband –
ISDN(B-ISDN) and Asynchronous Transfer Mode (ATM); data compression; encryption and decryption.

TEXT BOOKS:

1. Computer Networks - Andrew S Tanenbaum, 4th Edition, Pearson Education.


2. Data Communications and Networking - Behrouz A. Forouzan, Fifth Edition TMH, 2013.

REFERENCES BOOKS:
1. An Engineering Approach to Computer Networks - S. Keshav, 2nd Edition, Pearson Education.
2. Understanding communications and Networks, 3rd Edition, W. A. Shay, Cengage Learning.
3. Computer Networking: A Top-Down Approach Featuring the Internet, James F. Kurose, K. W. Ross, 3rd Edition,
Pearson Education.
COMPUTER NETWORKS

A network is the interconnection of a set of devices capable of communication. In this definition, a device can
be a host (or an end system as it is sometimes called) such as a large computer, desktop, laptop, workstation,
cellular phone, or security system. A device in this definition can also be a connecting device such as a router,
which connects the network to other networks, a switch, which connects devices together, a modem (modulator-
demodulator), which changes the form of data, and so on. These devices in a network are connected using wired
or wireless transmission media such as cable or air. When we connect two computers at home using a plug-and-
play router, we have created a network, although very small.
Computer networks are set up to carry computer data. Hence, they are part of the data communication system.
Computer Networks come in many sizes, shapes and forms, as we will see later. They are usually connected
together to make larger networks, with the Internet being the most well-known example of a network of
networks.

The uses of a computer networks include:


• Sharing: programs (O.S., applications), data, equipment (printers, disks).
• High reliability: users are more immune from hardware/software failure.
• Less cost: It is easy to increase the capacity by adding new machines.
• Communications medium: Users have access to email and the Internet

Computer Networks Social Issues


With the good comes the bad, as this new-found freedom brings with it many unsolved social, political, and
ethical issues.
Social networks, message boards, content sharing sites, and a host of other applications allow people to share
their views with like-mindedindividuals. As long as the subjects are restricted to technical topics or hobbies like
gardening, not too many problems will arise.
The trouble comes with topics that people actually care about, like politics,religion, or sex. Views that are
publicly posted may be deeply offensive to some people. Worse yet, they may not be politically correct.
Furthermore, opinions need not be limited to text; high-resolution color photographs and video clipsare
easily shared over computer networks. Some people take a live-and-let-live view, but others feel that posting
certain material (e.g., verbal attacks on particular countries or religions, pornography, etc.) is simply
unacceptable and that such content must be censored. Different countries have different and conflicting laws in
this area. Thus, the debate rages.
Computer networks make it very easy to communicate. They also make it easy for the people who run the
network to snoop on the traffic. This sets up conflicts over issues such as employee rights versus employer
rights. Many people read and write email at work. Many employers have claimed the right to read and possibly
censor employee messages, including messages sent from a home computer outside working hours. Not all
employees agree withthis, especially the latter part.
Another conflict is centered around government versus citizen’s rights.
A new twist with mobile devices is location privacy. As part of the process of providing service to your mobile
device the network operators learn where you are at different times of day. This allows them to track your
movements. They may know which nightclub you frequent and which medical center you visit.

Data communication System fundamental characteristics


The effectiveness of a data communications system depends on four fundamental characteristics: delivery,
accuracy, timeliness, and jitter.
I. Delivery. The system must deliver data to the correct destination. Data must be received by the intended
device or user and only by that device or user.
2 Accuracy. The system must deliver the data accurately. Data that have beenaltered in transmission and left
uncorrected are unusable.
3. Timeliness. The system must deliver data in a timely manner. Data delivered late are useless. In the case
of video and audio, timely delivery means delivering data as they are produced, in the same order that
they are produced, and without significant delay. This kind of delivery is called real-time transmission.
4. Jitter. Jitter refers to the variation in the packet arrival time. It is the unevendelay in the delivery of audio
or video packets. For example, let us assume that video packets are sent every 30 ms. If some of the
packets arrive with 30-ms delay and others with 40-ms delay, an uneven quality in the video is the result.

Components of a data communication system


A data communications system has five components
I. Message. The message is the information (data) to be communicated.Popular forms of information
include text, numbers, pictures, audio, and video.
2 Sender. The sender is the device that sends the data message. It can be acomputer, workstation,
telephone handset, video camera, and so on.
3. Receiver. The receiver is the device that receives the message. It can be a computer, workstation,
telephone handset, television, and so on.
4. Transmission medium. The transmission medium is the physical path by which a message travels
from sender to receiver. Some examples of transmission media include twisted-pair wire, coaxial
cable, fiber-optic cable,and radio waves.
5. Protocol. A protocol is a set of rules that govern data communications. It represents an agreement
between the communicating devices. Without a protocol, two devices may be connected but not
communicating, just as a person speaking French cannot be understood by a person who speaks only
Japanese.

Data Representation

Information today comes in different forms such as text, numbers, images, audio, and video.
Text:
In data communications, text is represented as a bit pattern, a sequence of bits (Os or Is). Different sets of bit patterns have
been designed to represent text symbols. Each set is called a code, and the process of representing symbols is called coding.
Today, the prevalent coding system is called Unicode, which uses 32 bits to represent a symbol or character used in any
language in the world. The American Standard Code for Information Interchange (ASCII), developed some decades ago in
the United States, now constitutes the first 127 characters in Unicode and is also referred to as Basic Latin.

Numbers:
Numbers are also represented by bit patterns. However, a code such as ASCII is not used
to represent numbers; the number is directly converted to a binary number to simplify mathematical operations. Appendix B
discusses several different numbering systems.

Images:
Images are also represented by bit patterns. In its simplest form, an image is composed of a matrix of pixels (picture
elements), where each pixel is a small dot. The size of the pixel depends on the resolution. For example, an image can be
divided into 1000 pixels or 10,000 pixels. In the second case, there is a better representation of the image (better resolution),
but more memory is needed to store the image. After an image is divided into pixels, each pixel is assigned a bit pattern.
The size and the value of the pattern depend on the image. For an image made of only black and- white dots (e.g., a
chessboard), a 1-bit pattern is enough to represent a pixel. If an image is not made of pure white and pure black pixels, you
can increase the size of the bit pattern to include gray scale. For example, to show four levels of gray scale, you can use 2-
bit patterns. A black pixel can be represented by 00, a dark gray pixel by 01, a light gray pixel by 10, and a white pixel by
11. There are several methods to represent color images. One method is called RGB, so called because each color is made of
a combination of three primary colors: red, green, and blue. The intensity of each color is measured, and a bit pattern is
assigned to it. Another method is called YCM, in which a color is made of a combination of three other primary colors:
yellow, cyan, and magenta.

Audio:
Audio refers to the recording or broadcasting of sound or music. Audio is by nature different from text, numbers, or images.
It is continuous, not discrete. Even when we use a microphone to change voice or music to an electric signal, we create a
continuous signal.

Video:
Video refers to the recording or broadcasting of a picture or movie. Video can either be produced as a continuous entity
(e.g., by a TV camera), or it can be a combination of images, each a discrete entity, arranged to convey the idea of motion.
Again we can change video to a digital or an analog signal.

Data Flow
Communication between two devices can be simplex, half-duplex, or full-duplexas shown in Figure.

Simplex In simplex mode, the communication is unidirectional, as on a one-way street. Only one of the
two devices on a link can transmit; the other canonly receive (Figure a). Keyboards and traditional monitors
are examples of simplex devices.
Half-Duplex
In half-duplex mode, each station can both transmit and receive, but not at the same time. When one device is
sending, the other can only receive, and vice versa (Figure b). Walkie-talkies and CB (citizens band) radios are
both half- duplex systems.
Full-Duplex
In full-duplex, both stations can transmit and receive simultaneously (Figure c). One common example of full-
duplex communication is the telephone network.When two people are communicating by a telephone line,
both can talk andlisten at the same time. The full-duplex mode is used when communication inboth
directions is required all the time.

Network Criteria
A network must be able to meet a certain number of criteria. The most important of these are performance,
reliability, and security.
Performance
Performance can be measured in many ways, including transit time and response time. Transit time is the amount
of time required for a message to travel from one device to another. Response time is the elapsed time between
an inquiry and a response. The performance of a network depends on a number of factors, including the number
of users, the type of transmission medium, the capabilities of the connected hardware, and the efficiency of the
software.
Performance is often evaluated by two networking metrics: throughput and delay. We often need more
throughput and less delay. However, these two criteria are often contradictory. If we try to send more data to
the network, we may increase throughput but we increase the delay because of traffic congestion in the network.
Reliability: In addition to accuracy of delivery, network reliability is measured by the frequency of failure, the
time it takes a link to recover from a failure, andthe network's robustness in a catastrophe.
Security: Network security issues include protecting data from unauthorized access, protecting data from
damage and development, and implementing policies and procedures for recovery from breaches and data
losses.

Physical Structures
Before continuing discussing networks, we need to define some network attributes.

Type of Connection
A network is two or more devices connected through links. A link is acommunications pathway that
transfers data from one device to another.
There are two possible types of connections: point-to-point and multipoint:
Point-to-Point. A point-to-point connection provides a dedicated link betweentwo devices. The entire
capacity of the link is reserved for transmission between those two devices. Most point-to-point connections
use an actual length of wire or cable to connect the two ends, but other options, such as microwave or
satellite links, are also possible
When you change television channels by infrared remote control, you are establishing a point-to-point
connection between the remote control and the television's control system.
Multipoint. A multipoint (also called multi-drop) connection is one in which more than two specific devices
share a single link. In a multipoint environment, the capacity of the channel is shared, either spatially or
temporally. If several devices can use the link simultaneously, it is a spatially shared connection. If users must
take turns, it is a timeshared connection.
Physical Topology
The term physical topology refers to the way in which a network is laid out physically.
Two or more devices connect to a link; two or more links form a topology. The topology of a network is the
geometric representation of the relationship of all the links and linking devices (usually called nodes) to one
another.
There are four basic topologies possible: mesh, star, bus, and ring

MESH:
A mesh topology is the one where every node is connected to every other node in the network.

A mesh topology can be a full mesh topology or a partially connected mesh topology.
In a full mesh topology, every computer in the network has a connection to each of the other computers in
that network. The number of connections in this network can be calculated using the following formula
(n is the number ofcomputers in the network): n(n-1)/2.
In a partially connected mesh topology, at least two of the computers in the network have connections to multiple
other computers in that network. It is an inexpensive way to implement redundancy in a network. In the event
that one of the primary computers or connections in the network fails, the rest of the network continues to
operate normally.
Advantages of a mesh topology
 Can handle high amounts of traffic, because multiple devices can transmitdata
simultaneously.
 A failure of one device does not cause a break in the network or transmissionof data.
 Adding additional devices does not disrupt data transmission between otherdevices.
Disadvantages of a mesh topology
 The cost to implement is higher than other network topologies, making it aless desirable
option.
 Building and maintaining the topology is difficult and time consuming.
 The chance of redundant connections is high, which adds to the high costsand potential for
reduced efficiency.
STAR:

A star network, star topology is one of the most common network setups. In this configuration, every node
connects to a central network device, likea hub, switch, or computer. The central network device acts as
a server and the peripheral devices act as clients. Depending on the type of network card usedin each
computer of the star topology, a coaxial cable or a RJ-45 network cableis used to connect computers together.

Advantages of star topology


 Centralized management of the network, through the use of the centralcomputer, hub, or
switch.
 Easy to add another computer to the network.
 If one computer on the network fails, the rest of the network continues tofunction
normally.
 The star topology is used in local-area networks (LANs), High-speed LANsoften use a
star topology with a central hub.

Disadvantages of star topology


 Can have a higher cost to implement, especially when using a switch or router as the
central network device.
 The central network device determines the performance and number ofnodes the network can
handle.
 If the central computer, hub, or switch fails, the entire network goes downand all computers
are disconnected from the network

BUS:
A line topology, a bus topology is a network setup in which each computer and network device are
connected to a single cable or backbone.
Advantages of bus topology
 It works well when you have a small network.
 It's the easiest network topology for connecting computers or peripheralsin a linear
fashion.
 It requires less cable length than a star topology.Disadvantages of
bus topology
 It can be difficult to identify the problems if the whole network goes down.
 It can be hard to troubleshoot individual device issues.
 Bus topology is not great for large networks.
 Terminators are required for both ends of the main cable.
 Additional devices slow the network down.
 If a main cable is damaged, the network fails or splits into two.

RING:
A ring topology is a network configuration in which device connections createa circular data path. In a ring
network, packets of data travel from one device tothe next until they reach their destination. Most ring topologies
allow packets to travel only in one direction, called a unidirectional ring network. Others permit data to move
in either direction, called bidirectional.
The major disadvantage of a ring topology is that if any individual connection in the ring is broken, the entire
network is affected.
Ring topologies may be used in either local area networks (LANs) or wide area networks (WANs).
Advantages of ring topology
 All data flows in one direction, reducing the chance of packet collisions.
 A network server is not needed to control network connectivity betweeneach
workstation.
 Data can transfer between workstations at high speeds.
 Additional workstations can be added without impacting performance ofthe network.
Disadvantages of ring topology
 All data being transferred over the network must pass through each workstation on the
network, which can make it slower than a star topology.
 The entire network will be impacted if one workstation shuts down.
 The hardware needed to connect each workstation to the network is more expensive than
Ethernet cards and hubs/switches.

Hybrid Topology A network can be hybrid. For example, we can have a main star topology with each
branch connecting several stations in a bus topology asshown in Figure

Types of Network based on size


The types of network are classified based upon the size, the area it covers andits physical architecture. The
three primary network categories are LAN, WAN and MAN. Each network differs in their characteristics such
as distance, transmission speed, cables and cost.
Basic types
LAN (Local Area Network)
Group of interconnected computers within a small
area. (room, building,campus)
Two or more pc's can from a LAN to share files, folders, printers, applicationsand
other devices.
Coaxial or CAT 5 cables are normally used for connections.
Due to short distances, errors and noise are minimum.
Data transfer rate is 10 to 100
mbps.Example: A computer lab in a
school.
MAN (Metropolitan Area
Network)
Designed to extend over a large area.
Connecting number of LAN's to form larger network, so that resources can be
shared.
Networks can be up to 5 to 50 km.
Owned by organization or
individual. Data transfer rate is low
compare to LAN.
Example: Organization with different branches located in the city.
WAN (Wide Area Network)
Are country and worldwide
network.Contains multiple
LAN's and MAN's.
Distinguished in terms of geographical range.
Uses satellites and microwave relays.
Data transfer rate depends upon the ISP provider and varies over the location.Best
example is the internet.

Other types
WLAN (Wireless LAN)
A LAN that uses high frequency radio waves for communication.
Provides short range connectivity with high speed data transmission.
PAN (Personal Area Network)
Network organized by the individual user for its personal use.
SAN (Storage Area Network)
Connects servers to data storage devices via fiber-optic cables.E.g.:
Used for daily backup of organization or a mirror copy.
Network Architecture
To reduce the design complexity, most networks are organized as a series of layers or levels,
each built upon on the one below it. The number of layers, the name of each layer ,the contents
of each layer ,and the function of each layer differ from network to network However, in all
networks the purpose of each layer is to offer certain services to the higher layers ,shielding
those layers from the details of how the offered services are actually implemented.

Layer n on one machine carries on a conversation with layer n on another machine. The rules
and conventions used in this conversation are collectively known as the layer n Protocol. The
entities comprising the corresponding layers on different machines are called Peers.

The interface defines which primitive operation and services the lower layer offers to the upper
one.
A set of layers and protocol is called network architecture.
REFERENCE MODELS

The ISO OSI REFERENCE MODEL


In 1947, the International Standards Organization (ISO) proposed a network model that covers
all network communications. This model is called Open Systems Interconnection (OSI) model.
An open system is a model that allows any two different systems to communicate regardless of
their underlying architecture.
The OSI model is built of seven layers: Physical (layer 1), Data link (layer 2), Network (layer 3),
Transport (layer 4), Session (layer 5), Presentation (layer 6) and Application layers (layer 7).
Within a single machine, each layer calls upon the services of the layer just below it.layer 3,for
example, uses the services provided by layer 2 and provides for layer 4.Between machines layer
x on one machine communicates with layer x on another machine. This communication is
governed by protocols. The processes on each machine that communicate at a given layer are
called peer –to – peer processor.
At the physical layer, communicate is direct: Machine A sends a stream of bits to machine B. At
the higher layers, however, communication must move down through the layers on machine A,
over to machine B, and then back up through the layers. Each layer in the sending machine adds
its own information to the message it receives from the layer just above it and passes the whole
package to the layer just below it. This information is added in the form of headers or trailers.
Headers are added to the message at layers 6, 5, 4, 3, and 2.At layer 1 the entire message
converted to a form that can be transferred to the receiving machine. At the receiving machine,
the message is unwrapped layer by layer, with each process receiving and removing the data
meant for it.
Organization of the layers:
The seven layers can be thought of as belonging to three subgroups. Layers 1, 2, 3 –are the
network support layers; they deal with the physical aspects of moving data from one machine to
another. Layers 5, 6, 7—can be thought of as user support layers: they allow interoperability
among unrelated software systems. Layer 4, the transport layer, ensures end to end reliable
transmission while layer 2 ensures reliable transmission on a single link. The upper layers are
implemented almost always in software; lower layers are a combination of hardware and
software, where as physical layer is mostly hardware.
Functions of the Layers
Physical Layer:
 Physical characteristics of interfaces and media
 Representation of bits.
 Data rate
 Synchronization of bits
 Line configuration (point to point or multipoint)
 Transmission Mode
 Physical Topology
Data Link Layer:
 Framing
 Physical addressing
 Error control
 Flow control
 Access control
Network Layer:
 Routing
 Congestion control
 Billing

Transport Layer:
 Service – Point addressing
 Segmentation and reassembly
 Flow control
 Error control
Session Layer:
 -Dialog control
 -Synchronization
Presentation Layer:
 Data encoding
 Encryption
 Compression

Application Layer:
 File Transfer
 Mail services
 Directory services

TCP/IP reference model

TCP/IP (Transmission Control Protocol/Internet Protocol) is a protocol suite (a set of protocols


organized in different layers) used in the Internet today. It is a hierarchical protocol made up of
interactive modules, each of which provides a specific functionality. The term hierarchical
means that each upper level protocol is supported by the services provided by one or more lower
level protocols. The original TCP/IP protocol suite was defined as four software layers built
upon the hardware. Today, however, TCP/IP is thought of as a five-layer model. The figure
below shows both configurations.
To show how the layers in the TCP/IP protocol suite are involved in communication between
two hosts, we assume that we want to use the suite in a small internet made up of three LANs
(links), each with a link-layer switch. We also assume that the links are connected by one router,
as shown in below Figure.
Layers in the TCP/IP Protocol Suite
After the above introduction, we briefly discuss the functions and duties of layers in the TCP/IP
protocol suite. Each layer is discussed in detail at a later stage. To better understand the duties of
each layer, we need to think about the logical connections between layers. Below figure shows
logical connections in our simple internet.
Using logical connections makes it easier for us to think about the duty of each layer. As the
figure shows, the duty of the application, transport, and network layers is end-to-end. However,
the duty of the data-link and physical layers is hop-to-hop, in which a hop is a host or router. In
other words, the domain of duty of the top three layers is the internet, and the domain of duty of
the two lower layers is the link. Another way of thinking of the logical connections is to think
about the data unit created from each layer. In the top three layers, the data unit (packets) should
not be changed by any router or link-layer switch. In the bottom two layers, the packet created by
the host is changed only by the routers, not by the link-layer switches. Below figure shows the
second principle discussed previously for protocol layering. We show the identical objects below
each layer related to each device.
Note that, although the logical connection at the network layer is between the two hosts, we can
only say that identical objects exist between two hops in this case because a router may fragment
the packet at the network layer and send more packets than received (see fragmentation in
Chapter 19). Note that the link between two hops does not change the object.
Description of Each Layer
After understanding the concept of logical communication, we are ready to briefly discuss the
duty of each layer.
Physical Layer
We can say that the physical layer is responsible for carrying individual bits in a frame across the
link. Although the physical layer is the lowest level in the TCPIIP protocol suite, the
communication between two devices at the physical layer is still a logical communication
because there is another, hidden layer, the transmission media, under the physical layer. Two
devices are connected by a transmission medium (cable or air). We need to know that the
transmission medium does not carry bits; it carries electrical or optical signals. So the bits
received in a frame from the data-link layer are transformed and sent through the transmission
media, but we can think that the logical unit between two physical layers in two devices is a bit.
There are several protocols that transform a bit to a signal.
Data-link Layer
We have seen that an internet is made up of several links (LANs and WANs) connected by
routers. There may be several overlapping sets of links that a datagram can travel from the host
to the destination. The routers are responsible for choosing the best links. However, when the
next link to travel is determined by the router, the data-link layer is responsible for taking the
datagram and moving it across the link. The link can be a wired LAN with a link-layer switch, a
wireless LAN, a wired WAN, or a wireless WAN. We can also have different protocols used
with any link type. In each case, the data-link layer is responsible for moving the packet through
the link. TCP/IP does not define any specific protocol for the data-link layer. It supports all
the standard and proprietary protocols. Any protocol that can take the datagram and carry it
through the link suffices for the network layer. The data-link layer takes a datagram and
encapsulates it in a packet called «frame. Each link-layer protocol may provide a different
service. Some link-layer protocols provide complete error detection and correction, some provide
only error correction.
Network Layer
The network layer is responsible for creating a connection between the source computer and the
destination computer. The communication at the network layer is host-to-host. However, since
there can be several routers from the source to the destination, the routers in the path are
responsible for choosing the best route for each packet. We can say that the network layer is
responsible for host-to-host communication and routing the packet through possible routes.
Again, we may ask ourselves why we need the network layer. We could have added the routing
duty to the transport layer and dropped this layer. One reason, as we said before, is the separation
of different tasks between different layers. The second reason is that the routers do not need the
application and transport layers.
Transport Layer
The logical connection at the transport layer is also end-to-end. The transport layer at the source
host gets the message from the application layer, encapsulates it in a transport layer packet
(called a segment or a user datagram in different protocols) and sends it, through the logical
(imaginary) connection, to the transport layer at the destination host. In other words, the
transport layer is responsible for giving services to the application layer: to get a message from
an application program running on the source host and deliver it to the corresponding application
program on the destination host. We may ask why we need an end-to-end transport layer when
we already have an end-to-end application layer. The reason is the separation of tasks and duties,
which we discussed earlier. The transport layer should be independent of the application layer. In
addition, we will see that we have more than one protocol in the transport layer, which means
that each application program can use the protocol that best matches its requirement.
Application Layer
The logical connection between the two application layers is end to-end. The two application
layers exchange messages between each other as though there were a bridge between the two
layers. However, we should know that the communication is done through all the layers.
Communication at the application layer is between two processes (two programs running at this
layer). To communicate, a process sends a request to the other process and receives a response.
Process-to-process communication is the duty of the application layer. The application layer in
the Internet includes many predefined protocols, but a user can also create a pair of processes to
be run at the two hosts.

You might also like