Data Communication Lecture Note
Data Communication Lecture Note
Data Communication Lecture Note
This course equips students with the basic knowledge and skills for computer networking. As an
introductory level course, this tutorial gives very good understanding on basic concepts related
to Data Communication and Computer Networks. After completing this tutorial, you will find
yourself at a moderate level of expertise in knowing DCN, from where you can take yourself to
next levels.
.
Table of Contents
b
2.3.7 Application Layer ............................................................................................. 20
2.3.8 OSI Operation ................................................................................................. 20
2.4 The TCP/IP Model ................................................................................................. 22
2.5 Comparing the OSI Model with the TCP/IP Model.................................................... 24
2.6 Layers and Protocols............................................................................................... 25
2.7 Chapter Questions .................................................................................................. 29
CHAPTER THREE: TRANSMISSION MEDIA ................................................................... 30
3.1 Chapter Two Objectives .......................................................................................... 30
3.2 Types of Transmission Media .................................................................................. 30
3.3 Characteristics of Transmission Media ...................................................................... 31
3.3.1 Bandwidth ....................................................................................................... 32
3.3.2 Band Usage ..................................................................................................... 32
3.3.3 Attenuation ...................................................................................................... 33
3.3.4 Electromagnetic Interference ............................................................................. 33
3.4 Guided Transmission Media (Wired Media) ................................................................ 34
3.4.1 Coaxial Cable................................................................................................... 34
3.4.2 Twisted Cable .................................................................................................. 35
3.4.3 Fiber-Optic Cable ............................................................................................. 38
3.5 Comparison of Guided Media .................................................................................. 41
3.6 Unguided Media ..................................................................................................... 41
3.6.1 Reasons for Wireless Technology .......................................................................... 42
3.6.2 Classification of Wireless Networks ........................................................................ 43
3.7 Chapter Questions .................................................................................................. 45
CHAPTER THREE: DATA AND SIGNALS ....................................................................... 46
4.1 Chapter Objectives ................................................................................................. 46
4.2 Analog and Digital signals ........................................................................................ 47
4.2.1 Periodic and Nonperiodic Signals ....................................................................... 47
4.2.2 Periodic Signals ................................................................................................ 47
4.3 Time and Frequency Plots ....................................................................................... 52
4.4 Composite Signals .................................................................................................. 52
4.5 Digital Signals......................................................................................................... 54
4.5.1 Digital signal as a Composite analog signal ......................................................... 55
4.5.2 Transmission of Digital signal ............................................................................ 56
c
4.6 Transmission Impairment ........................................................................................ 56
4.6.1 Attenuation ...................................................................................................... 57
4.6.2 Distortion ........................................................................................................ 57
4.6.3 Noise .............................................................................................................. 57
4.6.4 Digital Rate limits ............................................................................................. 58
4.7 Performance .......................................................................................................... 60
4.8 Chapter Questions .................................................................................................. 63
CHAPTER FIVE: ERROR DETECTION AND CORRECTION ............................................ 64
5.1 Chapter Objectives ................................................................................................. 64
5.2 Causes of errors ..................................................................................................... 64
5.3 Types of Errors ...................................................................................................... 64
5.4 Redundancy ........................................................................................................... 65
5.4.1 Simple Parity Check ......................................................................................... 66
5.4.2 Two-Dimensional Parity Check (Parity block) ...................................................... 67
5.4.3 Arithmetic checksum ........................................................................................ 68
5.4.4 Cyclic Redundancy Check (CRC) ....................................................................... 69
5.5 Detection versus Correction ..................................................................................... 73
5.6 Hamming Code ...................................................................................................... 74
5.7 Chapter Questions .................................................................................................. 76
CHAPTER SIX: ADDRESSING ........................................................................................ 77
6.1 Chapter Objectives ................................................................................................. 77
6.2 Levels of Addressing ............................................................................................... 77
6.2.1 Specific Addresses ............................................................................................ 78
6.2.2 Port Addresses ................................................................................................. 78
6.2.3 Logical Addresses ............................................................................................. 79
6.2.4 Physical Addresses ........................................................................................... 79
6.3 IP Addresses .......................................................................................................... 79
6.3.1 IPv4 Addressing ............................................................................................... 80
6.3.2 Types of addresses in an IPv4 Network .............................................................. 81
6.4 Subnetting.............................................................................................................. 85
6.5 CIDR-- Classless InterDomain Routing ...................................................................... 87
6.6 Types of communication ......................................................................................... 90
6.7 Public and Private Addresses ................................................................................... 91
d
6.8 Chapter Questions .................................................................................................. 92
CHAPTER SEVEN: NETWORK SECURITY...................................................................... 94
7.1 Chapter Objectives ................................................................................................. 94
7.2 Network Security .................................................................................................... 94
7.3 Basic security concepts............................................................................................ 95
7.4 Basic terminologies relating to threats in the Network ................................................ 95
7.5 Vulnerabilities ......................................................................................................... 99
7.6 Attacks .................................................................................................................. 99
7.7 Basic terminologies relating to security in the Network ............................................. 100
7.8 Securing Data on the Network ............................................................................... 102
7.8.1 Cryptography .................................................................................................... 102
7.8.2 Classical Cryptography ................................................................................... 103
7.8.3 Symmetric Key Encryption (Secret Cryptography) ............................................. 104
7.8.4 Asymmetric Key Encryption (Public Cryptography) ............................................ 104
7.9 Securing Communication on the Network ............................................................... 105
8.0 Chapter Questions ................................................................................................ 106
e
COURSE OBJECTIVES
This course equips students with the basic knowledge and skills for computer networking. As an
introductory level course, its treatment is biased on basic concepts such as protocols, layering,
standardization of networking protocols and the design of protocols and mechanisms making up
the hardware components of computer networks. In this course, data communication basic
concepts and layered network models is studied. Digital and analogue signals, encoding and
modulating, transmission media, error detection and correction, data link control and local area
networks. This provides a solid foundation for intermediate and advanced level courses in
networking.
EXPECTED OUTCOMES
Upon completion of this course students are expected to:
o Introduce fundamentals of data and computer communications
o Provide the student with a conceptual foundation for the study of data
communications using the open system interconnection (OSI) layered architecture
model.
COURSE PRESENTATION
The course will be delivered through a series of lectures supported with handouts and tutorials,
lab work and presentations. It is expected that some presentations will be student led. The
tutorial will be in the form of problem solving and discussions and will constitute an integral part
of each lecture. The student can best understand and appreciate the subject by attending all
lectures and laboratory work, by practicing, reading references and handouts and by completing
all assignments and lab works on schedule.
i
REFERENCES AND RECOMMENDED TEXTBOOKS
o Data Communications and Networks, Curt M. White 2010
o Andrew Tanenbaum, Computer Networks, Prentice Hall PTR, 4th edition or later
COURSE ASSESSMENT
Factor Weight Location Date Time
Laboratory 5% In class
Exercises
Grading System
A B C D FAIL
ATTENDANCE
UMaT rules and regulations say that, attendance is MANDANTORY for every student. A total
of FIVE (5) attendances shall be taken at random to the 10%. The only acceptable excuse for
absence is the one authorized by the Dean of Student on their prescribed form. However, a
student can also ask permission from me to be absent from a particular class with a tangible
ii
reason. A student who misses all the five random attendances marked WOULD not be allowed
to take the final exams
OFFICE HOURS
I will be available in my office every Thursday (8.00-10.00hrs) to answering students’ questions
and provide guidance on any issues related to the course.
[email protected] or [email protected]
o Students must endeavour to attend all lectures, lab works and do all their assignments
and coursework.
o Students must be seated and fully prepared for lectures at least 5 minutes before
scheduled time.
o Under no circumstance a student should be late more than 15 minutes after scheduled
time
o NO student shall be admitted into the lecture room more than 15 minutes after the start
of lectures unless pre-approved by me.
o All cell phones, IPods, MP3/MP4s, and PDAs etc MUST remain switched off
throughout the lecture period.
Thank You
iii
SEMESTER PLAN
Week ACTIVITY
No.
1 Discussions on semester workload. Chapter 1:Basic network concepts
2 Chapter 2: Network Models.
3 Chapter 3: Data and Signals
4 Chapter 4: Transmission Media
5 Laboratory Work
6 Chapter 5: Error Detection and Correction
7 Presentations on Multiple Access Protocols
8 Chapter 6: Addressing
9 Laboratory Work
10 Chapter 7: Network Security
11 Defending Lab works, Clearing Assignments
12 Revision
iv
CHAPTER ONE: BASIC NETWORK CONCEPTS
Early data networks were limited to exchanging character-based information between connected
computer systems. Current networks have evolved to carry voice, video streams, text, and
graphics between many different types of devices. The immediate nature of communications
over the Internet encourages the formation of global communities. These communities foster
social interaction that is independent of location or time zone.
Technology is perhaps the most significant change agent in the world today, as it helps to
create a world in which national borders, geographic distances, and physical limitations become
less relevant, and present ever-diminishing obstacles. The creation of online communities for the
exchange of ideas and information has the potential to increase productivity opportunities
across the globe. As the Internet connects people and promotes unfettered communication, it
presents the platform on which to run businesses, to address emergencies, to inform individuals,
and to support education, science, and government.
1
1.3 Data Communication
Before beginning to communicate with each other, we establish rules or agreements to govern
the conversation. These rules, or protocols, must be followed in order for the message to be
successfully delivered and understood. Among the protocols that govern successful human
communication are:
Communication rules may vary according to the context. If a message conveys an important
fact or concept, a confirmation that the message has been received and understood is
necessary. Less important messages may not require an acknowledgement from the recipient.
The techniques that are used in network communications share these fundamentals with human
conversations. Because many of our human communication protocols are implicit or are
ingrained in our cultures, some rules can be assumed. In establishing data networks, it is
necessary to be much more explicit about how communication takes place and how it is judged
successful.
Data communication is the exchange of data between two devices via form of transmission
medium.
A network consists of two or more computers that are linked in order to share resources or
allow electronic communications. The computers on a network may be linked through cables,
telephone lines, radio waves, satellites, or infrared light beams.
o Delivery - The system must deliver data to the correct destination. Data must be
received by the intended device or user.
o Accuracy - The system must deliver data accurately. Data that have been altered in
transmission and left uncorrected are unusable.
2
o Timeliness - The system must deliver data in timely manner. Data delivered late is
useless.
o Jitter - Refers to variation in the packet arrival time. It is the uneven delay of
packets.
For data networks, we use the same basic criteria to judge success. However, as a message
moves through the network, many factors can prevent the message from reaching the recipient
or distort its intended meaning. These factors can be either external or internal.
External Factors
The external factors affecting communication are related to the complexity of the network and
the number of devices a message must pass through on its route to its final destination.
Internal factors
Internal factors that interfere with network communication are related to the nature of the
message itself. Different types of messages may vary in complexity and importance. Clear and
concise messages are usually easier to understand than complex messages. Important
communications require more care to ensure that they are delivered and understood by the
recipient.
Internal factors affecting the successful communication across the network include:
3
o The importance of the message
Large messages may be interrupted or delayed at different points within the network. A
message with a low importance or priority could be dropped if the network becomes
overloaded.
Both the internal and external factors that affect the receipt of a message must be anticipated
and controlled for network communications to be successful. New innovations in network
hardware and software are being implemented to ensure the quality and reliability of network
communications.
o Sender is a device that sends the message. Normally, computer is used as sender in
data communication systems. It is also called source or transmitter.
o Medium is the physical path that connects sender and receiver. It is used to transmit
data. The medium can be a copper wire, a fibre optic cable, microwaves etc.
o Receiver is a device that receives message. The receiver can be computer, printer, or
another computer related device. It must be proficient of accommodating the message.
4
o Devices which often originate messages that comprise our communication. These
include various types of computers (a PC and laptop icon are shown), servers etc.
o Devices, used to direct and manage messages across the network, as well as other
common networking symbols. These include routers, switches, repeaters etc.
5
Hubs and Repeaters
Repeaters are used for strengthening weak signals. It removes noise and regenerates signal.
Hubs are basically a multiport repeater can be used to divide a single LAN into multiple levels of
hierarchy. Smaller hubs have about 4-5 ports with larger hubs having about 8-24 ports. There
are three (3) different types of hubs; Active, Passive and Intelligent hubs.
Passive hubs don’t amplify any electrical signal; Active hubs amplify electrical signals during data
transmission thereby acting as repeaters. An intelligent hub adds extra features to the active
hub. Intelligent hubs have software that allows them perform some remote management
functions and also provide support for Virtual LANS (VLANs).
Switch: uses a filtering mechanism that redirects data flow to the most suitable machines, based
on certain elements found in the data packets.
Bridge: is capable of learning MAC address (Physical address) so that collision domain can be
reduced. It forwards frames upon the obtained address. One way of defining a collision domain
is a network in which one device, also called a node, and forces every other device to listen
when it is transmitting data packets. Bridges reduce the amount of traffic on LAN by dividing it
into segments.
6
Router: determines where to send a data packet between at least two networks. A router
transfers data from one network to another in an intelligent way. It has the task of forwarding
data packets to their destination by the most efficient route. Routers support different WAN
technologies but switches do not.
Gateway: basically converts one protocol to another. It can be hardware (i.e. a router) or
software. A gateway is (typically) a hardware device, or possibly a computer, that provides
access to some upstream network and then offers and distributes it down to machines
connected to it.
Simplex
Simplex refers to transmission in only one direction. One party is the transmitter and the other
is the receiver. The communication is unidirectional, as on a one way street. Simplex mode can
use the entire capacity of channel to send data in one direction. An example of simplex
communications is a simple radio, which you can receive data from stations but can't transmit
data.
Half-duplex
Half duplex refers to the transmission of data in just one direction at a time. Half-duplex is like a
one-lane road with traffic allowed in both directions. When cars are travelling in one direction,
cars going the other way must wait. For example, a walkie-talkie is a half-duplex device because
only one party can talk at a time.
7
Full-duplex
Full duplex refers to the transmission of data in two directions simultaneously. Duplex mode is
like a two way street with traffic flowing in both directions. Most modems have a switch that lets
you choose between full-duplex and half-duplex modes. The choice depends on which
communications program you are running.
In full-duplex mode, the transmitted data does not appear on the screen until it has been
received and sent back by the other party. This enables to validate that the data has been
accurately transmitted. For example, a telephone is a full-duplex device because both parties can
talk at once. .
o Covered distances
o Network architecture
o Transmission mechanism
Covered Distance
According to the geographical area or distance covered network can be divided in
o Local Area Networks (LAN) - a computer network that spans a relatively small area.
Most LANs are confined to a single building or group of buildings. Usually, the simple
LANs cover a distance not more than 1000m.
o Metropolitan Area Network (MAN)- a computer network designed for a town or city. In
terms of geographic breadth, MANs are larger than local-area networks (LANs), but
smaller than wide-area networks (WANs). MANs are usually characterized by very high-
speed connections using fibre optical cable or other digital media.
8
through public networks, such as the telephone system. They can also be connected
through leased lines or satellites. The largest WAN in existence is the Internet.
Network Architecture
According to the architecture computer network can be grouped into:
Transmission Mechanism
According to the type of mechanism used, computer network can be grouped into:
o Message- switched - This mechanism doesn’t require the whole path, connecting the
communicating devices to be established before the start of transmission. The message
is sent to the nearest switch box, where it is stored. After that, the switch box starts to
look for available next part of the path.
If there is more than one available path from this switch box to the next, the switch box, has to
choose the optimal path. This is done on the basis of 2 criteria: minimum distance or minimum
number of switch boxes to reach the final destination.
o Packet-switched - The message is divided into packets. Each packet is sent individually.
The packets may take different routes and may arrive out of order. Each packet to have
its own number to facilitate the re-ordering process in the receiver. In case of error in
some packet, only this packet is re-sent.
9
1.3.6 Network Criteria
A network should be able to meet certain number of criteria. The most important of these are
performance, reliability and security.
Performance
o Performance- can be measured in a number of ways including transmit time and
response time. Transmit time is the amount of time required for a message to travel
from one device to another. Response time is elapsed time between inquiry and
response. Performance is often evaluated by two networking metrics, throughput (a
measure of how much is transmitted at a given period) and delay.
Reliability
o Reliability- is measured by the frequency of failure. The time it takes a link to recover
from failure and the network’s robustness in catastrophe.
Security
o Network security consists of the provisions and policies adopted by the network
administrator to prevent and monitor unauthorized access, misuse, modification, or
denial of the computer network and network-accessible resources.
Point- to-point
Point- to-point provides a dedicated link between two devices. This is used in serial
communication. These types of connections are assumed to be transmitting solely to the station
at the opposite end. Because there is only one device at either end of the connection, no
addresses are necessary. Example when you change television channels using infrared remote
control, you are establishing a point-to-point between the remote control and the television’s
control system.
10
Multipoint
A multipoint connection is one in which more than two specific devices share a single link or
having more than two terminals connected by a single communications channel. The networks
having multipoint configuration are called Broadcast Networks. In broadcast network, a message
or a packet sent by any machine is received by all other machines in a network. The packet
contains address field that specifies the receiver. Upon receiving a packet, every machine checks
the address field of the packet. If the transmitted packet is for that particular machine, it
processes it; otherwise it just ignores the packet.
o Physical Topology means the physical design of a network including the devices,
location and cable installation.
o Logical Topology refers to the fact that how data actually transfers in a network as
opposed to its design.
In computer networks, there are four basic topologies: Bus, Star, Ring and Mesh.
Bus Topology
Bus topology uses a common backbone to connect all the network devices in a network in
a linear shape. A single cable functions as the shared communication medium for all the
devices attached with this cable with an interface connector. The device, which wants to
communicate send the broadcast message to all the devices attached with the shared cable
but only the intended recipient actually accepts and process that message.
11
Advantages
o Easy to connect a computer or peripheral to a linear bus.
o Requires less cable length than a star topology.
Disadvantages
o Entire network shuts down if there is a break in the main cable.
o Difficult to identify the problem if the entire network shuts down.
Star Topology
In the computer networking world the most commonly used topology in LAN is the star
topology. All the computers in the star topologies are connected to central devices like hub,
switch or router. The functionality of all these devices is different. Computers in a network are
usually connected with the hub, switch or router with the Unshielded Twisted Pair (UTP) or
Shielded Twisted Pair cables.
Advantages
o Easy to install and wire.
o No disruptions to the network when connecting or removing devices.
o Easy to detect faults and to remove parts.
Disadvantages
o Requires more cable length than a linear topology.
o If the hub, switch, or concentrator fails, nodes attached are disabled.
o More expensive than linear bus topologies because of the cost of the hubs, switches etc.
12
Ring Topology
In ring network, every computer or devices have two adjacent neighbors for communication. In
a ring network, all the communication messages travel in the same directory whether clockwise
or anti clockwise. Any damage of the cable of any cable or device can result in the breakdown
of the whole network.
Advantages
o Ring is relatively easy to install and reconfigure.
o To add or delete devices requires only changing two connections
o It is easy to detect and isolate faulty device
Disadvantages
o Changes made to network nodes affects the performance of the entire network
Mesh Topology
In a mesh network, each of the network node, computer and other devices, are
interconnected with one another. They are commonly used in WAN configuration. Every
node not only sends its own signals but also relays data from other nodes.
Advantages
o It can withstand high amounts of traffic
o They do not collapse when a single node disconnects or has connection issues.
o It can be easily expanded
13
Disadvantages
o Maintenance and management of it is very arduous
o It is highly expensive to implement because of its demand for constant supervision
1.3.9 Standards
A network standard is a short reference model to make sure products of different vendors can
work together in a network. Standards are essential in creating and maintaining an open and
competitive market. Network standards facilitate the interoperability of network technologies
and are extremely important.
o De facto- standards those have not been approved by organized body but have been
adopted as standard through widespread use. A widespread consensus on a particular
product or protocol which has not been ratified by any official standards body, but which
has a large market share. Example TCP/IP, Microsoft Windows
o De jure- standards that have been legislated by officially recognized bodies. De jure or
formal standards that are developed by accredited standards organizations using rigid
procedures that may periodically be audited.
14
2. Describe the external factors that impact network communication
3. What does quality of service matter on a data network
4. What is a computer network
5. Describe the elements of a data network
6. Distinguish between full duplex data flow and simplex data flow. Illustrate their use by
giving an example of each type of transmission.
7. What is a network standard? Why the need for standards
8. Explain the terms ‘de facto’ and ‘de jure’ when applied to network standards.
9. Explain the term Protocol with respect to data networks.
10. What is network topology
11. Describe four network topologies listing advantages and disadvantages
12. Name the necessary requirement or criteria for a network.
13. Functions of various network devices
14. Distinguish between different network devices example repeater and hub, bridge and
switch etc
15. Name the various classifications of network
16. Compare and contrast different types of network example Packet Switched and Circuit
Switched, LAN and WAN.
17. Give examples of international standards body and their contribution to the
communication industry.
18. Compare and contrast the network architectures: Client/server and Peer-to-Peer
19. Factors to consider when choosing a network topology
20. What is internet? History of its existence and its benefits.
15
CHAPTER TWO: NETWORK MODELS
A protocol model provides a model that closely matches the structure of a particular protocol
suite. The hierarchical set of related protocols in a suite typically represents all the functionality
required to interface the human network with the data network. The TCP/IP model is a
protocol model because it describes the functions that occur at each layer of protocols within
the TCP/IP suite.
A reference model provides a common reference for maintaining consistency within all types of
network protocols and services. A reference model is not intended to be an implementation
specification or to provide a sufficient level of detail to define precisely the services of the
network architecture. The primary purpose of a reference model is to aid in clearer
understanding of the functions and process involved.
The Open Systems Interconnection (OSI) model is the most widely known internetwork
reference model. It is used for data network design, operation specifications, and
troubleshooting.
Although the TCP/IP and OSI models are the primary models used when discussing network
functionality, designers of network protocols, services, or devices can create their own models to
represent their products. Ultimately, designers are required to communicate to the industry by
relating their product or service to either the OSI model or the TCP/IP model, or to both.
There are benefits to using a layered model to describe network protocols and operations. Using
a layered model:
16
o Assists in protocol design, because protocols that operate at a specific layer have
defined information that they act upon and a defined interface to the layers above and
below.
o Fosters competition because products from different vendors can work together.
o Prevents technology or capability changes in one layer from affecting other layers above
and below.
o Provides a common language to describe networking functions and capabilities.
The upper layers of the OSI model represent software that implements network services like
encryption and connection management. The lower layers of the OSI model implement more
primitive, hardware-oriented functions like routing,
addressing, and flow control.
17
The 7 Layer OSI model is an extremely detailed diagram describing organization of data,
addressing schemes to help explain the logistics originally used when creating network protocols
(such as TCP/IP).
It is now used as a standard for network addressing, data analysis, and describing network
hardware capabilities.
The purpose of OSI model is to show how to facilitate communication between different
systems without requiring changes to the logic of the underlying hardware and software. The
OSI is not a protocol; it is a model for understanding and designing a network architecture that
is flexible, robust and interoperable.
This layer conveys the bit stream through the network at the electrical and mechanical level. It
provides the hardware means of sending and receiving data on a carrier. The physical layer, the
lowest layer of the OSI model, is concerned with the transmission and reception of the
unstructured raw bit stream over a physical medium. It describes the electrical/optical,
mechanical, and functional interfaces to the physical medium, and carries the signals for all of
the higher layers.
This is also a layer that uses the most basic addressing scheme, MAC Addresses. Since the
main purpose of a MAC address is to provide a unique identifier for each host this does not
provide any means for routing or organizing the hosts that participate on a network.
18
Network Layer receives segmented data, adds logical addressing information, and creates
packets. This layer handles virtual connections throughout the network and between other
networks.
Routes and relays data between nodes. IP-Internet Protocol is the standard used to connect
networks
Think of a MAC address like a person's diver's license number, it is just a number that is unique
from anyone else's. Now think of an IP address like a person's mailing address. The mailing
address group people into zones by using the zip code, city, state, and street identifiers.
When a network card receives a stream of bits over the network, it receives the data from the
wires (the first layer). then the second layer is responsible for making sense of these random 1s
and 0s.
The second layer first checks the destination MAC address in the packet to make sure the data
was intended for this computer. If the destination MAC address matches the MAC address of
the network card, the packet is then sent to the computer's operating system.
19
Dialogs can be
o simplex (one-way)
o half-duplex (alternate or unidirectional)
o full-duplex (bi-directional)
The presentation layer concerns itself not only with the format and representation of actual user
data, but also with data structure used by programs. Therefore, the presentation layer negotiates
data transfer syntax for the application layer.
Layer seven communicates with layer six which communicates with layer five and so on until
System A's layer one is reached. The information traverses the physical medium and is received
by System B's layer one.
It then ascends through System B's layers in reverse order until it finally reaches System B's
application program.
20
Each of System A's layers has certain tasks it must perform. Each layer communicates directly
with its adjacent layers. However, its primary concern in carrying out its tasks is to communicate
with its peer layer in System B.
For example, the primary concern of layer six in System A is to communicate with layer six in
System B. It does this using its own layer protocol.
21
Transformation of data from one layer to the other on the OSI model
The layers in the TCP/IP protocol suite do not exactly match those in the OSI model. The
original TCP/IP protocol suite was defined as having four layers: host-to-network, internet,
transport, and application. However, when TCP/IP is compared to OSI, we can say that the
TCP/IP protocol suite is made of five layers: physical, data link, network, transport, and
application. However, when TCP/IP is compared to OSI, we can say that the host-to-network
layer is equivalent to the combination of the physical and data link layers. The internet layer is
equivalent to the network, and the application layer is roughly doing the job of the session,
presentation and application layers with the transport layer in TCP/IP taking care of part of the
duties of the session layer.
22
The TCP/IP model describes the functionality of the protocols that make up the TCP/IP
protocol suite. These protocols, which are implemented on both the sending and receiving
hosts, interact to provide end-to-end delivery of applications over a network.
1. Creation of data at the Application layer of the originating source end device
2. Segmentation and encapsulation of data as it passes down the protocol stack in the source
end device
3. Generation of the data onto the media at the Network Access layer of the stack
4. Transportation of the data through the internetwork, which consists of media and any
intermediary devices
5. Reception of the data at the Network Access layer of the destination end device
6. Decapsulation and reassembly of the data as it passes up the stack in the destination device
7. Passing this data to the destination application at the Application layer of the destination end
device
23
2.5 Comparing the OSI Model with the TCP/IP Model
The protocols that make up the TCP/IP protocol suite can be described in terms of the OSI
reference model. In the OSI model, the Network Access layer and the Application layer of the
TCP/IP model are further divided to describe discreet functions that need to occur at these
layers.
At the Network Access Layer, the TCP/IP protocol suite does not specify which protocols to
use when transmitting over a physical medium; it only describes the handoff from the Internet
Layer to the physical network protocols. The OSI Layers 1 and 2 discuss the necessary
procedures to access the media and the physical means to send data over a network.
The key parallels between the two network models occur at the OSI model Layers 3 and 4. OSI
Model Layer 3, the Network layer, almost universally is used to discuss and document the range
of processes that occur in all data networks to address and route messages through an
internetwork. The Internet Protocol (IP) is the TCP/IP suite protocol that includes the
functionality described at Layer 3.
Layer 4, the Transport layer of the OSI model, is often used to describe general services or
functions that manage individual conversations between source and destination hosts. These
functions include acknowledgement, error recovery, and sequencing. At this layer, the TCP/IP
protocols Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) provide the
necessary functionality.
24
The TCP/IP Application layer includes a number of protocols that provide specific functionality
to a variety of end user applications. The OSI model Layers 5, 6 and 7 are used as references
for application software developers and vendors to produce products that need to access
networks for communications.
Internet Layer
At the internet layer, TCP/IP supports interworking protocol. IP in turn, uses four supporting
protocols: ARP, RARP, ICMP and IGMP.
25
The ICMP is a mechanism used by hosts and gateways to send notification of datagram
problems back to the sender. ICMP sends query and error reporting messages.
Transport Layer
Traditionally the transport layer was represented in TCP/IP by two protocols: TCP and UDP. IP
is a host-to host protocol, meaning it can deliver a packet from one physical device to another.
UDP and TCP are transport level protocols responsible for delivery of message from a process
to another process. A new transport layer protocol, SCTP, has been devised to meet the needs
of some newer applications.
At the sending end of each transmission, TCP divides a stream of data into smaller units called
segments. Each segment includes a sequence number for reordering after receipt, together with
an acknowledgement number for segments received.
26
Application Layer
The application layer in TCP/IP is equivalent to the combined session, presentation, and
application layers in the OSI model. Several protocols are defined at this layer. Some of the
protocols are HTTP, FTP, SMTP, DNS, SNMP, TELNET and many more.
The Domain Name System is the system used on the Internet for the mapping of names, such
as www.google.com, to IP Addresses such as 216.239.51.99. It translates queries for domain
names (which are meaning to humans) into IP addresses for the purpose of locating and
computer services and devices worldwide.
27
Simple Network Management Protocol (SNMP)
It is an internet standard protocol for managing devices on IP networks. Devices that support
SNMP include routers, switches, servers, workstations, printers etc. It is mostly used to monitor
network-attached devices for conditions that warrant administrative attention
TELNET
Telnet is a user command and an underlying TCP/IP protocol for accessing remote computers.
Through Telnet, another user can access someone’s computer remotely. Telnet is most likely to
be used by program developers and anyone who has a need to use specific applications or data
located at a particular host computer.
Caution : Note that whereas the TCP/IP model layers are referred to only by name, the seven
OSI model layers are more often referred to by number than by name.
28
2.7 Chapter Questions
1. Identify the seven layers of the Open Systems Interconnection (OSI) network reference
model and briefly describe its functionality.
2. The OSI model consists of a hierarchy of seven layers grouping together the functional
requirements for the communication of connected devices. Discuss and explain the role
of the data link layer and its two sub-layers.
3. Explain HTTP and give examples of its uses
4. Describe the Open Systems Interconnection (OSI) model and compare it with the
Transmission Control Protocol/Internet Protocol (TCP/IP) suite
5. Explain the need for both TCP and User Datagram Protocol (UDP), as opposed to
having just one or the other.
6. Describe the Internet Mail Access Protocol (IMAP) standard for handling mailboxes.
7. Analyse the differences between connectionless and connection-oriented protocols.
8. Explain the meaning of Address Resolution Protocol (ARP) and describe its operation.
9. Describe the functions of application protocols in the internet model.
10. Give examples of network devices that operate at each of the lower 3 layers of the OSI
model and briefly explain their operation.
11. Distinguish between TCP and UDP
12. Explain why networking models are used
13. What are the unique roles of layer2, 3 and 4?
14. Describe the functions of protocols like FTP, RARP, DNS
15. Define the term encapsulation and decapsulation
16. Define the term network model
29
17. Distinguish between the two dominant model in networking
18. Why does TCP guarantee delivery
19. Explain in details how the TCP and UDP operates
20. Which one is best for video conferencing TCP or UDP? Why?
Wired Media is the most common and is further divided into three different types of cabling:
Coaxial, Twisted Pairs, and Fiber Optic Cables
Wireless media, which is, in a sense, no media at all, has gained popularity in today’s
communication system. Wireless transmissions use radio waves or infrared light to transmit data.
30
The most common type of media is the wired media and the most common materials used in
this media is copper. The most common types of copper cabling are twisted-pair and coaxial.
Twisted-pair cabling is the medium used in the connection of telephones. Network coaxial
cabling, on the other hand, is similar to the cable used to connect your television set to the cable
TV outlet.
Another type of connection media that has gained popularity over the years are the fiber-optic
cables. They consist of a number of glass or high-grade plastic optical strands surrounded by a
tough cloth-and-plastic wrap, fiber-optic cables resemble coaxial cables from the outside.
Different types of network media have different features and benefits. Not all network media has
the same characteristics and is appropriate for the same purpose. Criteria for choosing a
network media are:
o Cost
o Installation requirements
o Bandwidth
o Attenuation
31
o Immunity from electromagnetic interference
3.3.1 Bandwidth
The term Bandwidth refers to the measure of the capacity of a medium to transmit data.
Data transmission rates frequently are stated in terms of the bits that can be transmitted per
second. The bandwidth that a cable can accommodate is determined in part by the cable’s
length. A short cable generally can accommodate greater bandwidth than a long cable.
Bandwidth in computer networking refers to the data rate supported by a network connection
or interface. Bandwidth is express in terms of bits per second (bps).
In electronic communication, bandwidth is the width of the range (or band) of frequencies that
an electronic signal uses on a given transmission medium. In this usage, bandwidth is expressed
in terms of the difference between the highest-frequency signal component and the lowest-
frequency signal component. Since the frequency of a signal is measured in hertz (the number of
cycles of change per second), a given bandwidth is the difference in hertz between the highest
frequency the signal uses and the lowest frequency it uses.
Baseband is the most common mode of operation and devotes the entire capacity of the
medium to one communication channel. Baseband signaling can be accomplished with both
analog and digital signals.
Broadband enables two or more communication channels to share the bandwidth of the
communications medium. This technique of dividing bandwidth into frequency bands is called
frequency-division multiplexing (FDM) and works only with analog signals. Another technique,
called time-division multiplexing (TDM), supports digital signals.
32
Difference between Broadband and Baseband
Broadband Baseband
o Uses analog signalling Uses digital signalling
o Unidirectional transmission Bi-directional transmission
o Frequency division multiplexing is possible FDM is not possible
3.3.3 Attenuation
Attenuation is a measure of how much a signal weakens as it travels through a medium.
Attenuation is a general term that refers to any reduction in the strength of a signal. Attenuation
occurs with any type of signal, whether digital or analog. Sometimes called loss, attenuation is a
natural consequence of signal transmission over long distances. The extent of attenuation is
usually expressed in units called decibels (dBs).
It is the loss of energy as the signal propagates outward. The amount of energy depends on the
frequency. If the attenuation is too much, the receiver may not be able to detect the signal at all,
or the signal may fall below the noise level. For reliable communication, the attenuation and
delay over the range of frequencies of transmission should be constant.
If Ps is the signal power at the transmitting end (source) of a communications circuit and Pd is
the signal power at the receiving end (destination), then Ps > Pd.
33
3.4 Guided Transmission Media (Wired Media)
Guided Transmission Media uses a cabling system that guides the data signals along a specific
path. Guided Media is also known as Bounded Media, since the data signals are a bounded
system.
The components of a coaxial cable are as follows: Center conductor, Outer conductor,
Insulation layer and Plastic encasement/jacket.
Coaxial cable (or coax) carries signals of higher frequency ranges than twisted-pair cable. Instead
of having two wires, coax has a central core conductor of solid or standard wire (usually copper)
enclosed in an insulating sheath, which is, in turn, encased in an outer conductor of metal foil,
braid, or a combination of the two (also usually copper).
To connect coaxial cable to devices, we need coaxial connector. The most common type of
connector used today is the Bayone-Neill-Concelman, or BNC connector.
Coaxial cabling has been largely replaced by twisted-pair cabling for local area network (LAN)
installations within buildings, and by fiber-optic cabling for high-speed network backbones.
o Thicknet cabling, this is an older form of cabling used for legacy 10Base5 Ethernet
backbone installations. Thicknet is thicker and does not bend as readily as Thinnet,
Thicknet cable is harder to work with. A thicker center core, however, means that
Thicknet can carry more signals a longer distance than Thinnet.
34
o Thinnet coaxial cabling, which is used in 10 Base2 networks for small Ethernet
installations. Thinnet is a light and flexible cabling medium that is inexpensive and easy
to install.
Installation
Coaxial cable is reasonably easy to install because the cable is strong and difficult to break. In
addition, connectors can be installed with inexpensive tools and a bit of practice. The device-to-
device cabling approach can be difficult to reconfigure, however, when new devices cannot be
installed near an existing cabling path.
Cost
The coaxial cable used for Thinnet falls at the low end of the cost spectrum, whereas Thicknet
is among the more costly options.
Bandwidth
Computers that employ coaxial cable typically have a bandwidth between 2.5 Mbps and 10
Mbps. The upper frequency limit of the coaxial design is about 4 GHz, and the practical
bandwidth of high efficiency coaxial is able to meet most current data needs.
EMICharacteristics
All copper media are sensitive to EMI, although the shield in coax makes the cable fairly
resistant. Coaxial cables, however, do radiate a portion of their signal, and electronic
eavesdropping equipment can detect this radiated signal. Because coax is electrically conductive,
it makes equipment vulnerable to lightning damage.
Twisted pair can be described as: Two insulated copper wires arranged in regular spiral pattern.
A number of pairs are bundled together in a cable.
A twisted pair consists of two conductors (normally copper), each with its own plastic insulation,
twisted together. One of the wire is used to carry signals to the receiver, and the other is used
only a ground reference. Twisted-pair cable is inexpensive to install and offers the lowest cost
per foot of any cable type.
35
Why the cable is twisted
If the two wires are parallel, the wire closest to the source of the noise gets more interference
and ends up with a higher voltage level than the wire farther away, which results in an uneven
load and a damaged signal. If, however, the two wires are twisted around each other at regular
intervals, each wire is closer to the noise source for half the time and farther away for the other
half. The degree of reduction in noise interference is determined specifically by the number of
turns per foot. Increasing the number of turns per foot reduces the noise interference. To
further improve noise rejection, a foil or wire braid shield is woven around the twisted pairs.
Twisted pair cable supports both analog and digital signals. TP cable can be either unshielded
TP (UTP) cable or shielded TP (STP) cable. Cables with a shield are called Shielded Twisted Pair
and commonly abbreviated STP. Cables without a shield are called Unshielded Twisted Pair or
UTP. Shielding means metallic material added to cabling to reduce susceptibility to noise due to
electromagnetic interference (EMI).
TP cable has a metal foil that encases each pair of insulated conductors. Metal casing used in
STP improves the quality of cable by preventing the penetration of noise. It also can eliminate a
phenomenon called crosstalk.
Crosstalk is the undesired effect of one circuit (or channel) on another circuit (or channel). It
occurs when one line picks up some of the signal traveling down another line. Crosstalk effect
can be experienced during telephone conversations when one can hear other conversations in
the background.
Twisted-pair cabling with additional shielding helps to reduce crosstalk and other forms of
electromagnetic interference (EMI). STP cabling is the default type of cabling for IBM Token
Ring networks. STP is more expensive as compared to UTP.
UTP is cheap, flexible, and easy to install. UTP is used in many LAN technologies, including
Ethernet and Token Ring.
36
In computer networking environments that use twisted-pair cabling, one pair of wires is typically
used for transmitting data while another pair receives data. The twists in the cabling reduce the
effects of crosstalk and make the cabling more resistant to electromagnetic interference (EMI),
which helps maintain a high signal-to-noise ratio for reliable network communication. Twisted-
pair cabling used in Ethernet networking is usually unshielded twisted-pair (UTP) cabling, while
shielded twisted-pair (STP) cabling is typically used in Token Ring networks. UTP cabling comes
in different grades for different purposes.
The Electronic Industries Association (EIA) has developed standards to classify UTP cable into
seven categories. Categories are determined by cable quality, with CAT 1 as the lowest and
CAT 7 as the highest.
UTP characteristics
Installation
UTP cable is easy to install. Some specialized equipment might be required, but the equipment
is low in cost. Categories 5, 6, 7 cables have stricter installation requirements than lower
categories of UTP.
Cost
UTP cable is the less costly, although properly installed Category 5 tends to be fairly expensive.
Distance limits for voice cabling are much less severe than for data-grade cabling.
Capacity
37
The data rates possible with UTP have pushed up from 1 Mbps, past 4 and 16 Mbps, to the
point where 100 Mbps data rates are now common.
Attenuation
UTP cable shares similar attenuation characteristics with other copper cables. UTP cable runs
are limited to a few hundred meters, with 100 meters as the most frequent limit.
EMI Characteristics
Because UTP cable lacks a shield, it is more sensitive to EMI than coaxial or STP cables. UTP
might not be suitable for noisy environments such as factories. Crosstalk between nearby
unshielded pairs limits the maximum length of cable runs
STP characteristics
Cost
STP cable costs more than thin coaxial or unshielded twisted-pair cable. STP is less costly,
however, than thick coax or fiber-optic cable.
Attenuation
All varieties of twisted-pair cable have attenuation characteristics that limit the length of cable
runs to a few hundred meters, although a 100-meter limit is most common.
38
Asynchronous Transfer Mode (ATM) or Fiber Distributed Data Interface (FDDI) backbones, long
cable runs, and connections to high-performance workstations. To understand how fiber-optic
works, you must understand how light travels.
When light travels into a denser medium, the angle of incidence is greater than the angle of
refraction; and when light travels into a less dense medium, the angle of incidence is less than
the angle of refraction.
Critical Angle: A beam of light moving from a denser into a less dense medium, as the angle of
incidence increases the angle of refraction also increases.
At some point in this process, the change in the incident angle results in a refracted angle of 90
degrees, with the refracted beam now lying along with horizontal. The incident angle at this
point is known as the critical angle.
Reflection: When the angle of incidence becomes greater than the critical angle, a new
phenomenon called reflection occurs. Light no longer passes into the less dense medium at all.
39
Optical fiber use reflection to guide light through a channel.
A glass or plastic core is surrounded by cladding of less dense glass or plastic. The difference in
density of the two materials must be such that a beam of light moving through the core is
reflected off the cladding instead of being refracted into it.
Information is encoded onto a beam of light as a series of on-off flashes that represents 1 and
0s.
FOC characteristics
Installation
Fiber-optic cable requires greater care because the cables must be treated fairly gently during
installation. Every cable has a minimum bend radius, and fibers are damaged if the cables are
bent too sharply. It also is important not to stretch the cable during installation.
Cost
Fiber-optic cable is the most expensive cable type to install.
Capacity
Fiber-optic cable can support high data rates (as high as 200,000 Mbps) even with long cable
runs. Fiber-optic cables can transmit 100 Mbps signals for several kilometers.
Attenuation
Attenuation in fiber-optic cables is much lower than in copper cables. Fiber-optic cables are
capable of carrying signals for several kilometers.
40
EMI Characteristics
Because fiber-optic cables don’t use electrical signals to transmit data, they are totally immune
to electromagnetic interference. The cables also are immune to a variety of electrical effects that
must be taken into account when designing copper cabling systems.
1 Uses electrical signals for Uses electrical signals for Uses optical signals (ie. Light)
transmission transmission for transmission
2 It uses metallic conductor It uses metallic conductor It uses glass or plastic to carry
to carry signal to carry signal signal
3 Noise immunity is low. Higher noise immunity Highest noise immunity as the
Therefore more distortion. than TP due to presence light rays are unaffected by the
of shielding conductor. electrical noise.
4 Affected due to external Less affected due to Not affected due to external
magnetic field. external magnetic field. magnetic field.
6 Can support low data rates Moderately high data rates Very high data rate
7 Power loss due to Power loss due to Power loss due to absorption,
conduction and radiation conduction scattering and dispersion.
41
referred to as wireless communication. Signals are normally broadcast through free space and
thus are available to anyone who has device capable of receiving them.
o Ground propagation
o Sky propagation
42
Advantages of wireless networks
Mobility - With a laptop computer or mobile device, access can be available throughout
a school, at the mall, on an airplane, etc. More and more businesses are also offering
free WiFi access ("Hot spots").
Fast setup - If your computer has a wireless adapter, locating a wireless network can be
as simple as clicking "Connect to a Network" -- in some cases, you will connect
automatically to networks within range.
Cost - Setting up a wireless network can be much more cost effective than buying and
installing cables.
Expandability - Adding new computers to a wireless network is easy (as long as you do
not exceed the maximum number of devices).
encryption and passwords, and monitor network access traffic to and from your wireless
network.
Interference - Because wireless networks use radio signals and similar techniques for
transmission, they are susceptible to interference from lights and electronic devices.
Inconsistent connections - Because of the interference caused by electrical devices
and/or items blocking the path of transmission, wireless connections are not nearly as
stable as those through a dedicated cable.
Speed - The transmission speed of wireless networks is improving; however, faster
options (such as gigabit Ethernet) are available via cables. If you are only using wireless
for internet access, the actual internet connection for your home or school is generally
slower than the wireless network devices, so that connection is the bottleneck. If you are
also moving large amounts of data around a private network, a cabled connection will
enable that work to proceed much faster.
43
Radio waves
There is no clear-cut demarcation between radio waves and microwaves, electromagnetic waves
ranging in frequencies between 3 kHz and 1GHz are normally called radio wave. Radio waves,
for the most part, are omnidirectional. When an antenna transmits radio waves, they are
propagated in all directions. This means that the sending and receiving antennas do not have to
be aligned.
Naturally occurring radio waves are made by lightning, or by astronomical objects. Artificially
generated radio waves are used for fixed and mobile radio communication, broadcasting, radar
(Radar is an acronym for "radio detection and ranging") and other navigation systems, satellite
communication, computer networks and innumerable other applications.
Radio waves have wavelengths as short as a few millimeters (tenths of inches) and as long as
hundreds of kilometers (hundreds of miles).Radio waves have the longest wavelengths in the
electromagnetic spectrum. Omnidirectional antennas send out signals in all directions. The
omnidirectional characteristics of radio waves make them useful for multicasting in which there
is one sender but many receivers.
Microwaves
Electromagnetic waves having frequencies between 1 and 300 GHz are called microwaves.
Microwaves are unidirectional. When an antenna transmits microwave waves, they can be
narrowly focused. This means sending and receiving antennas need to be aligned. The
unidirectional property has an obvious advantage. A pair of antennas can be aligned without
interfering with another pair of aligned antennas.
o Microwave propagation is line-of-sight. Since the towers with the mounted antennas
need to be in direct sight of each other, towers that are far apart need to be very tall.
The curvature of the earth as well as other blocking obstacles does not allow two short
towers to communicate by using microwaves. Repeaters are often needed for long
distance communication.
44
Microwaves are used for unicast communication such as cellular telephones, satellites
networks, and wireless LANs.
Infrared
Infrared waves, with frequencies from 300 GHz to 400 THz (wavelengths from 1mm to
770nm), can be used for short-range communication. Infrared waves having high frequencies
cannot penetrate walls. This advantageous characteristic prevents interference between one
system and another; a short-range communication system in one room cannot be affected by
another system in the next room. However it is difficult to use infrared waves outside a building
because the sun’s rays contain infrared waves that can interfere with the communication.
45
6. Compare various transmission media used in LANs and WANs in terms of maximum
data rates and other limitations
7. What is the significance of twisting in the twisted-pair
8. Meaning of the Terms 10Base2, 10Base5, 100BaseT, 100BaseFx, 1000Base-X
9. Differentiate LED and ILD light sources for fiber optics
10. Name and describe the two major category of propagation modes for fiber optics
11. What are the factors to consider when choosing a cable for your network?
12. When is coaxial cable, or twisted pair or fiber-optic cable applied?
13. Compare the bandwidth of coaxial cable, twisted pair and fiber-optic cable
14. Write down the Trade-offs between electrical and optical cable
15. Explain terms refraction, reflection and critical in relation to fiber-optics
16. Discuss on the classifications of wireless networks, propagation modes and their
applications.
17. Briefly describe a situation where it would be appropriate to use a wireless LAN
topology, rather than a wired topology
18. What is the key hardware components needed to implement a wireless LAN in a small
office environment?
19. Differentiate between radio waves, microwaves and infrared waves.
20. What is the difference between omnidirectional and unidirectional waves?
46
4.2 Analog and Digital signals
Generally, data usable to a person or application are not in the form that can be transmitted
over the network. To be transmitted, data must be transformed to electromagnetic signals.
Data can be analog or digital. The term analog data refers to information that is continuous;
digital data refers to information that has discrete states. Analog data take on continuous values.
Digital data take on discrete values. Analog signals can have an infinite number of values in a
range; digital signals can have only a limited number of values. Although each value can be any
number, it is often as simple as 1 and 0.
The simplest way to show signals is by plotting them on pair of perpendicular axes. The vertical
axis represents the value or strength of a signal. The horizontal axis represents time.
Sine Wave
47
o Sine wave is the most fundamental form of periodic analog signal.
o Its change over of a cycle is smooth and consistent, a continuous.
o A sine wave can be represented by three parameters ; the peak amplitude , the
frequency and the phase
A sine wave can be represented by three parameters: the peak amplitude, the frequency, and
the phase. These three parameters fully describe a sine wave.
Peak Amplitude
The peak amplitude of a signal is the absolute value of its highest intensity, proportional to the
energy it carries. Peak amplitude is normally measured in volts.
The figure above shows two signals with their peak amplitudes
48
1 1
f and T
T f
Two signals with the same amplitude and phase but different frequencies
Period is formally expressed in seconds. Frequency is formally expressed in hertz, which is cycle
per second.
Phase
PHASE: Phase describes the position of the waveform relative to time 0.Phase is measured in
degrees or radians. A shift of 360° corresponds to a shift of a complete period, a phase shift of
180° corresponds to a shift of one-half of a period, a phase shift of 90° corresponds to a shift of
one-quarter of a period
49
The diagram below shows three sine waves with the same amplitude and frequency, but
different phases
o A sine wave with a phase of 0° starts at time 0 with zero amplitude. The amplitude is
increasing
o A sine wave with a phase of 90° starts at time 0 with a peak amplitude. The amplitude
is decreasing
o A sine wave with a phase of 180° starts at time 0 with zero amplitude. The amplitude is
decreasing
Another way to look at the phase is in terms of shift or offset. We can say that
A several sine waves can have the same phase and frequency but different amplitudes
50
The diagram above shows two signals with same phase and frequency but different amplitudes
Wavelength
Wavelength is another characteristic of a signal travelling through a medium. It refers to the
distance between two points of corresponding phase in two consecutive cycles. Wavelength
binds the period or frequency of a simple sine wave to the propagation speed of the medium.
Wavelength is represented by .
The diagram below establishes the relationship between wavelength and period
While the frequency of a signal is independent of the medium, the wavelength depends on both
the frequency and the medium. Wavelength is a property of any type of signal. In data
communications, we often use wavelength to describe the transmission of light in an optical
fiber. The wavelength is the distance a simple signal can travel in one period.
51
λ= c/f
The diagrams illustrate time-domain and frequency-domain plots of a sine wave respectively.
The advantage of the frequency domain is that you can immediately see the values of the
frequency and peak amplitude. A complete sine wave is represented by one spike. The position
of the spike shows the frequency; its height shows the peak amplitude.
The frequency domain is more compact and useful when dealing with more than one sine wave.
If the composite signal is periodic, the decomposition gives a series of signals with discrete
frequencies; if the composite signal is nonperiodic, the decomposition gives a combination of
sine waves with continuous frequencies.
52
In the above figure the sine wave with the frequency f is the same as the frequency of the
composite signal; it is called the fundamental frequency, or first harmonic. The sine wave with
frequency 3f has a frequency of 3 times the fundamental frequency; it is called the third
harmonic. The third sine wave with frequency 9f has a frequency of 9 times the fundamental
frequency; it is called the ninth harmonic.
Frequency decomposition of the signal is discrete; it has frequencies f, 3f, and 9f. Because f is
an integral number, 3f and 9f are also integral numbers. There are no frequencies like 1.2f or
2.4f. The frequency domain of a periodic composite signal is always made of discrete spikes.
Bandwidth
The range of frequencies contained in a composite signal is its bandwidth. The bandwidth of a
composite signal is the difference between the highest and the lowest frequencies contained in
that signal.
Worked Example
If a periodic signal is decomposed into five sine waves with frequencies of 100, 300, 500, 700,
and 900 Hz, what is its bandwidth? Draw the spectrum, assuming all components have
maximum amplitude of 10 V.
53
Solution
Let fh be the highest frequency, fl the lowest frequency, and B the bandwidth. Then
The spectrum has only five spikes, at 100, 300, 500, 700, and 900 Hz
In the diagram above I bit per level is sent in every 1second, in the case for the diagram below 2
bit per level in every 1second.
54
For example: if a digital signal has eight levels, to calculate the number of bits
Example if a digital signal has nine levels, to calculate for the number of bits per level
Bit Rate
Most digital signals are nonperiodic, and thus period and frequency are not appropriate
characteristics. Another term –bit rate (instead of frequency) is used to describe digital signals.
Bit rate is the number of bits that pass a given point in a network in a given amount of time,
usually a second. Thus bit rate usually measured in some multiple of bits per second (bps). Bit
rate is synonym for data transfer rate.
Bit length
Bit length is similar to the concept of wavelength in analog signals. Bit length is the distance one
bit occupies on the transmission medium.
If a digital signal is periodic (rare in data communications), the decomposed signal has a
frequency-domain representation with an infinite bandwidth and discrete frequencies. If a digital
55
signal is nonperiodic , the decomposed signal still has an infinite bandwidth, but frequencies are
continuous.
Baseband transmission means sending a digital signal over a channel without changing the
digital signal to analog. Baseband transmission requires a low-pass channel with bandwidth that
starts from zero.
By Fourier analysis, baseband transmission of a digital signal that preserves the shape of the
digital signal is possible only if we have a low-pass channel with an infinite or very wide
bandwidth.
56
4.6.1 Attenuation
Attenuation means a loss of energy. When a signal, simple or composite, travels through a
medium, it loses some of its energy in overcoming the resistance of the medium. Some of the
electrical energy in the signal is converted to heat.
Decibel
The decibel (dB) measures the relative strengths of two signals or one signal at two different
points. If decibel is negative is means the signal is attenuated and positive if the signal is
amplified.
Worked example
Suppose a signal travels through a transmission medium and its power is reduced to one-half.
This means that . in this case attenuation can be calculated as
= P2 = = = 10(-0.3) = -3 dB
4.6.2 Distortion
Distortion means that a signal changes its form or shape. Distortion can occur in a composite
signal made of different frequencies. Each signal has its own propagation speed through a
medium and, therefore, its own delay in arriving at the final destination. Differences in delay
may create difference in phase if the delay is not exactly the same as the period duration.
4.6.3 Noise
Several types of noise, such as thermal noise, induced noise, crosstalk and impluse noise ay
corrupt a signal. Thermal noise is the random motion of electrons in a wire which creates an
extra signal not orginally sent by the transmitter. Induced noise comes from the sources such as
57
motors and appliances. Crosstalk is the effect of one wire on the other. Impluse is a spike that
comes from power lines, lightning and so on.
SNR=
SNR is actually the ratio of what is wanted (signal) to what is not wanted (noise). A high SNR
means the signal is less corrupted by noise; low SNR means the signal is more corrupted by
noise. Because SNR is the ratio of two powers, it is often described in decibels units, SNR dB,
defined as
SNRdB=
SNR = =
SNRdB =
Two theoretical formulas are used to calculate the data rate: one by Nyquist for noiseless
channel, another by Shannon for noisy channel.
For noiseless channel, the Nyquist bit rate formula defines the theoretical maximum bit rate
b = 2 B log2 L
58
b : bit rate, B : Bandwidth, L : number of levels
In the above formula, bandwidth is the bandwidth of the channel; L is the number of signal
levels used to represent data, and BitRate is the rate in bits per second.
The formula implies that you can have any bit rate you want by increasing the number of signal
levels. Although the idea is theoretically correct, practically there is a limit. When we increase
the number of signal levels, we impose a burden on the receiver. If the number of level in a
signal is just 2, the receiver can easily distinguish between a 0 and a 1. If the level of signal is
64, the receiver must be very sophisticated to distinguish between 64 different levels. In other
words, increasing the levels of a signal reduces the reliability of the system.
Worked Example
You need to send 320kbps over a noiseless channel with a bandwidth of 40 kHz. How many
signals levels do you need?
C = B log2 (1 + SNR)
In the above formula, there is no indication of the signal level, which means that no matter how
many levels we have, we cannot achieve a data rate higher than the capacity of the channel.
Thus to say you can only increase the bit rate by improving the signal to noise ratio and with
increase in bandwidth.
Worked example
59
Calculate the theoretical highest bit rate of a regular telephone line. The telephone line has a
bandwidth of 3000 Hz. The signal to noise ratio is 3162. What is the capacity?
4.7 Performance
A key issue in networking is performance. The quality of service and overall performance is very
important. Several factors affect the performance of a network and these include:
o Bandwidth
o Throughput
o Latency (Delay)
o Bandwidth – Delay product
o Jitter
Throughput
The throughput is a measure of how fast we can actually send data through a network. At a
glance bandwidth in bits per second and throughput may seem the same, but they are different.
A link may have a bandwidth of B bps, but can only send T bps through this link with T always
less than B. in other words, the bandwidth is a potential measurement of a link; the throughput
is the actual measurement of how fast we can send data.
Latency (Delay)
The latency or delay defines how long it takes for an entire message to completely arrive at the
destination from the time the first bit is sent out from the source. Latency is made up of four
components: propagation time, transmission time, queuing time and processing delay.
Propagation Time
Propagation time measures the time required for a bit to travel from the source to the
destination. The propagation time is calculated by dividing the distance by the propagation
speed.
Propagation time =
Worked Example
60
What is the propagation time if the distance between two points is12,000km? Assume the
propagation speed to be 2.4 x 108m\s in cable.
Propagation time = =
Transmission Time
In data communications we don’t just send 1 bit, we send a message. The first bit may take a
time equal to the propagation time to reach its destination; the last bit also may take same
amount of time. However, there is a time between the first bit leaving the sender and the last bit
arriving at the receiver. The first bit leaves earlier and arrives earlier; the last bit leaves later and
arrives later. The time required for transmission of a message depends on the size of the
message and the bandwidth of the channel.
Transmission time =
Worked Example
What are the propagation time and the transmission time for a 2.5KB email if the bandwidth of
the network is 1 Gbps? Assume that the distance between the sender and the receiver is
12,000km and that light travels 2.4 x 108m/s.
Propagation time = =
Queuing Time
Queuing time is the time needed for each intermediate or end device to hold the message
before it can be processed. The queuing time is not a fixed factor; it changes with the load
imposed on the network. When there is a heavy traffic on the network, the queuing time
increases. An intermediate device, such as router, queues the arrived messages and processes
them one by one. If there are many messages, each message will have to wait.
61
This is simply the product of bandwidth and delay. Bandwidth – Delay product defines the
number of bits that can fill a link.
Jitter
Jitter is an issue related to delay. Jitter is a problem that occurs if different packets of data
encounter different delays and the application using the data at the receiver site is time-sensitive
(audio and video data). It is a deviation from the ideal timing.
62
4.8 Chapter Questions
1. Define the terms frequency, phase, amplitude, period
2. Derive the relationship between frequency and period
3. Define the terms attenuation and distortion
4. How does the type of channel affect the bandwidth?
5. Differentiate between noisy and noiseless channel
6. Differentiate between time-domain plots and frequency-domain plot
7. Differentiate between analogue and digital signals
8. Express a period of 100ms in microseconds.
9. Given the frequencies listed below, calculate the corresponding periods.
a. 20HZ b. 10MHZ c. 150kHZ
10. A signal travels from point A to point B. At point A, the signal power is 200W. At
point B, the power is 170W. What is the attenuation in decibels?
11. A channel has a bandwidth of 1 MHz. The SNR for this channel is 63; what is the
appropriate bit rate and signal level?
12. A periodic composite signal contains frequencies from 20 to 30kHZ, each with an
amplitude of 8V. Draw the frequency spectrum.
13. A signal has wavelength of 2µm in air. How far can the front of the wave travel during
3000 periods
14. What is the bandwidth of a signal that can be decomposed into five sine waves with
frequencies 0, 30, 40, 120 and 300HZ? All peak amplitudes are the same. Draw the
bandwidth.
15. A periodic signal has a bandwidth of 20Hz. The highest frequency is 90Hz. What is the
lowest frequency? Draw the spectrum if the signal contains all frequencies of the same
amplitude.
16. Discuss, and graphically represent, amplitude modulation, frequency modulation and
phase modulation
17. Describe the modulation and the demodulation processes, drawing a diagram to
illustrate the two processes.
18. A nonperiodic composite signal has a bandwidth of 200 kHz, with a middle frequency of
140kHz and a peak amplitude of 20V. The two extreme frequencies have amplitude of
0. Draw the frequency domain of the signal.
19. Describe the factors that affect the performance of a network
20. Differentiate between bandwidth and throughput
63
CHAPTER FIVE: ERROR DETECTION AND CORRECTION
64
5.4 Redundancy
The central concept in detecting or correcting errors is redundancy. To be able to detect or
correct errors, we need to send some extra bits with our data. These redundant bits are added
by the sender and removed by the receiver. Their presence allows the receiver to detect or
correct corrupted bits. The concept of including extra information in the transmission for error
detection is a good one. But instead of repeating the entire data stream, a shorter group of bits
may be appended to the end of each unit. This technique is called redundancy because the extra
bits are redundant to the information: they are discarded as soon as the accuracy of the
transmission has been determined.
Figure below shows the process of using redundant bits to check the accuracy of a data unit.
Once the data stream has been generated, it passes through a device that analyses it and adds
on an appropriately coded redundancy check. The data unit, now enlarged by several bits,
travels over the link to the receiver. The receiver puts the entire stream through a checking
function. If the received hit stream passes the checking criteria, the data portion of the data unit
is accepted and the redundant bits are discarded.
Three types of redundancy checks are common in data communications: parity check, cyclic
redundancy check (CRC) and checksum.
65
5.4.1 Simple Parity Check
In this technique, a redundant bit called a parity bit is added to every data unit so that the total
number of 1’s in the unit (including the parity bit) becomes even (or odd). Figure below shows
this concept when transmit the binary data unit 1100001.
Example:
Suppose the sender wants to send the word world. In ASCII the five characters are coded as
W O R L D
Each of the first four characters has even number of 1s, so the parity bit is 0. The last character
(d), however has three 1s (an odd number), so the parity bit is 1 to make the total number of1s
even. The following shows the actual bits sent (the parity are underlined).
Suppose there was no error in the transmission, the receiver counts the ones in each character
and comes out with even numbers (6,6,4,4,4) and data is accepted.
Performance
Simple parity check can detect all single-bit errors. It can also detect burst errors as long as the
total number of bits changed is odd. This method cannot detect errors where the total number
of bits changed is even. If any two bits change in transmission, the changes cancel each other
66
and the data unit will pass a parity check even though the data unit is damaged. The same holds
true for any even number of errors.
We then attach the 8 parity bits to the original data and send them to the receiver.
67
Performance
Two-dimensional parity check increases the likelihood of detecting burst errors. As we showed
in Example above a redundancy of n bits can easily detect a burst error of n bits, a burst error of
more than n bits is also detected by this method with a very high probability. There is however,
one pattern of errors that remains exclusive. If 2 bits in one data unit are damaged and two bits
in exactly the same positions in another data unit are also damaged, the checker will not detect
an error. Consider for example, two data units: 11110000 and 11000011. If the first and last
bits in each of them are changed, making the units read 01110001 and 01000010 the errors
cannot he detected by this method.
Consider the following example. Suppose we want to transmit the message “This is cool.” In
ASCII, that message would appear in binary as:
TCP and IP actually add these values in binary to create a binary sum. But binary addition of so
many operands is pretty messy. So that we do not have to add all these binary values, let us
convert the binary values to their decimal form. If we add this column of values, we will get the
following:
68
84
104
105
115
32
105
115
32
99
111
108
+ 46
1056
The sum 1056 is then added to the outgoing message and sent to the receiver. The receiver will
take the same characters, add their ASCII values, and if there were no errors during
transmission, should get the same sum of 1056.
The redundancy bits used by CRC are derived by dividing the data unit by a predetermined
divisor; the remainder is the CRC. To be valid, a CRC must have two qualities: It must have
exactly one less bit than the divisor, and appending it to the end of the data string must make
the resulting bit sequence exactly divisible by the divisor. Both the theory and the application of
CRC error detection are straightforward. The only complexity is in deriving the CRC. Figure
below provides an outline of the basic steps in CRC.
69
First, a string of n 0’s is appended to the data unit. The number n is 1 less if-number of bits in
the predetermined divisor which is n + 1 bits.
Second, the newly elongated data unit is divided by the divisor, using a p called binary division.
The remainder resulting from this division is the CRC.
Third, the CRC of n bits derived in step 2 replaces the appended 0’s at the data unit. Note that
the CRC may consist of all 0’s.
The data unit arrives at the receiver data first, followed by the CRC. The receiver treats the
whole siring as a unit and divides it by the same divisor that was used the CRC remainder. If the
string arrives without error, the CRC checker yields a remainder of zero, the data unit passes. If
the string has been changed in transit, the division yields not zero remainder and the data unit
does not pass.
70
How to generate CRC
71
Verification of data at receiver’s side
The divisor in the CRC generator is most often represented not as a string of 1’s and 0’s, but as
an algebraic polynomial. The polynomial format is useful for two reasons: It is short, and it can
be used to prove the concept mathematically. The relationship of a polynomial to its
corresponding binary representation is shown below.
72
Performance of CRC
CRC is a very effective error detection method. If the divisor is chosen according to the
previously mentioned rules,
o CRC can detect all burst errors that affect an odd number of bits.
o CRC can detect all burst errors of length less than or equal to the degree of the
polynomial
o CRC can detect, with a very high probability, burst errors of length greater than the
degree of the polynomial.
To calculate the number of redundancy bits r required to correct a given number of data bits m.
we must find a relationship between m and r. With m bits of data and r bits of redundancy
added to them, the length of the resulting code is m + r. If the total number of bits in a
transmittable unit is m + r, then r must be able to indicate at least m+r+1 different states. Of
these, one state means no error, and m + r states indicate the location of an error in each of the
m + r positions. So m+r+1 states must be discoverable by r bits: and r bits can indicate 2r
different states. Therefore 2r must be equal to or greater than m + r + 1:
2r =>m +r + 1
For example, if the value of m is 7 (as in a 7-bit ASCII code), the smallest r value that can satisfy
this equation is 4:
24 =>7 +4 + 1
73
The following Table shows some possible m values and the corresponding r values.
In the Hamming code, each r bit is the parity bit for one combination of data bits, is shown
below:
r1: bits 1 3 5 7 9 11
r2: bits 2 3 6 7 10 11
r4: bits 4 5 6 7
r8: bits 8 9 10 11
74
Example
Now imagine that by the time the above transmission is received, the number 7 bit has been
changed from 1 to 0. The receiver takes the transmission and recalculates 4 new parity bits,
using the same sets of bits used by the sender plus the relevant parity r bit for each set. Then it
assembles the new parity values into a binary number in order of r position ( r8 r4, r2 , r1 ). In
our example, this step gives us the binary number 0111 (7 in decimal), which is the precise
location of the bit in error.
Once the bit is identified, the receiver can reverse its value and correct the error. The beauty of
the technique is that it can easily be implemented in hardware and the code is corrected before
the receiver knows about it.
75
5.7 Chapter Questions
1. What are some of the causes of errors in a network?
2. Differentiate between parity bits and parity blocks
3. Which of the following polynomials guarantees that a single-bit error can be detected
(a) x+1
(b) x3
(c) 1
4. Determine the parity block to send the following data units
01101101
10101110
01110101
11100011
00010110
5. Calculate the checksum value to send the message in question 4
6. How is the checksum used in the User Datagram Protocol (UDP)?
7. Suppose we want to transmit the information string: 1111101. The receiver and sender
decide to use the (arbitrary) polynomial pattern, 1101. Calculate the CRC value
8. Find the Hamming distance between 10001001 and 10110001
9. What is the difference between even parity and odd parity?
10. What types of errors will simple parity not detect?
11. Given the character 0110101, what bit will be added to support even parity?
12. Given the message “Hello, goodbye”, show the decimal arithmetic checksum that will be
generated.
13. Describe two situations in which error-free transmission is crucial to communications.
14. Differentiate between forward error correction and automatic error correction.
15. How do error detection and correction methods differ?
16. What types of errors exist in networks?
17. Given the characters 0110101 and 10101010what bit will be added to support odd
parity?
76
CHAPTER SIX: ADDRESSING
Four levels of addresses are used in an internet employing the TCP/IP protocols: physical (link)
addresses, logical (IP) addresses, port addresses, and specific addresses
77
6.2.1 Specific Addresses
Some applications have user-friendly addresses that are designed for that specific address.
Examples include the e-mail address (for example, [email protected]) and the Universal
Resource Locator (for example, ww.ieeeghana.org). The first defines the recipient of the e-mail;
the second is used to find a document on the World Wide Web. These addresses, however, get
changed to the corresponding port and logical addresses by the sending computer.
Well Known Ports (Numbers 0 to 1023) - These numbers are reserved for services and
applications. They are commonly used for applications such as HTTP (web server)
POP3/SMTP (e-mail server) and Telnet. By defining these well-known ports for server
applications, client applications can be programmed to request a connection to that specific port
and its associated service.
Registered Ports (Numbers 1024 to 49151) - These port numbers are assigned to user
processes or applications. These processes are primarily individual applications that a user has
chosen to install rather than common applications that would receive a Well Known Port. When
not used for a server resource, these ports may also be used dynamically selected by a client as
its source port.
Dynamic or Private Ports (Numbers 49152 to 65535) - Also known as Ephemeral Ports, these
are usually assigned dynamically to client applications when initiating a connection. It is not very
common for a client to connect to a service using a Dynamic or Private Port (although some
peer-to-peer file sharing programs do).
78
6.2.3 Logical Addresses
Logical addresses are necessary for universal communications that are independent of
underlying physical networks. Physical addresses are not adequate in an internetwork
environment where different networks can have different address formats. A universal
addressing system is needed in which each host can be identified uniquely, regardless of the
underlying physical network.
The logical addresses are designed for this purpose. A logical address in the internet is currently
a 32-bit address that can uniquely define a host connected to the internet. No two hosts on the
internet can have the same IP address.
Note that physical addresses will change from hop to hop, but the logical addresses usually
remain the same.
6.3 IP Addresses
An IP address (Internet Protocol address) is a unique number that devices use in order to identify
and communicate with each other on a computer network utilizing the Internet Protocol
Standard (IP).
An IP Address corresponds to the logical address assigned to a Network device. It could be any
participating network device – including Routers, Printers, Computers, Fax Machines,
Telephones e.t.c.
79
Example: 140.179.220.200
10001100.10110011.11011100.11001000
The need for more addresses, in addition to other concerns about the IP layer, motivated a new
design of the IP layer called the new generation of IPv6. This version uses 128-bit addresses
that give greater flexibility in address allocation.
Versions of IP address
The Internet Protocol has two primary versions in use. Each version has its own definition of an
IP address. Because of its prevalence, "IP address" typically refers to those defined by IPv4.
IP Versions
o IP Version 5 (Experimental)
An IPv4 Address is a set of 4 octets, divided to let determine the Network part & the Host part.
Notations
There are two prevalent notations to show an IPv4 address: binary notation and dotted- decimal
notation.
In binary notation, the IPv4 address is displayed as 32 bits. Each octet is often referred to as a
byte. So we say 32-bit address or 4-byte address. Each byte ranges from 0-255. The following
is an example of an IPv4 address in binary notation:
80
01110101 10010101 00011101 00000010
Dotted-decimal notation makes the IPv4 more compact and easier to read. Internet addresses
are usually written in decimal form with a decimal point separating the bytes. The following is
the dotted-decimal notation of the above address:
117.149.29.2
If the value in the 128-bit position is larger than or equal to 128, you place a 1 in the 128
position and subtract 128 from the number being converted. You then compare the remainder
of this operation to the next smaller value, 64. You continue this process for all the remaining
bit positions.
Broadcast address - A special address used to send data to all hosts in the network
Host addresses - The addresses assigned to the end devices in the network
Network Address
The network address is a standard way to refer to a network. For example, we could refer to
the network shown in the figure as "the 10.0.0.0 network." This is a much more convenient
81
and descriptive way to refer to the network. All hosts in the 10.0.0.0 network will have the
same network bits.
Within the IPv4 address range of a network, the lowest address is reserved for the network
address. This address has a 0 for each host bit in the host portion of the address.
Broadcast Address
The IPv4 broadcast address is a special address for each network that allows communication to
all the hosts in that network. To send data to all hosts in a network, a host can send a single
packet that is addressed to the broadcast address of the network.
The broadcast address uses the highest address in the network range. This is the address in
which the bits in the host portion are all 1s. For the network 10.0.0.0 with 24 network bits, the
broadcast address would be 10.0.0.255.
Every end device requires a unique address to deliver a packet to that host. In IPv4 addresses,
we assign the values between the network address and the broadcast address to the devices in
that network.
Network Address
82
10 0 0 0
Broadcast Address
10 0 0 255
Host Address
10 0 0 1
It is easy to find the class of an address when given the address in binary notation or dotted-
decimal notation. If the address is given in binary notation, the first few bits can immediately tell
us the class of the address. If the address is given in the dotted-decimal notation, the first byte
defines the class
83
Class A addresses were designed for large organization with large number of attached hosts or
routers. A block in class A address is too large for almost any organization. This means most of
the addresses in class A were wasted and were not used.
Class B addresses were designed for medium size organizations with tens thousand of attached
hosts or routers attached. A block in class B is also very large, probably too large for many of
the organizations that received a class B block.
Class C addresses were designed for small organizations with small number of hosts attached. A
block n class C is probably too small for many organizations.
Class D addresses were designed for multicasting. Each address in this class is used to define
one group of hosts on the internet. The internet authorities wrongly predicted a need for
268,435,456 groups. This never happened and many addresses were wasted.
Class E addresses were reserved for future use; only a few were used, resulting in another
waste of addresses.
In conclusion one can say that, in classful addressing large part of the available addresses were
wasted.
In class A, one byte defines the netid and three bytes define the hostid. In class B, two bytes
define the netid and two bytes define the hostid. In class C, three bytes define the netid and one
byte defines the hostid.
Mask
84
Although the length of the netid and hostid is predetermined in classful addressing, one can also
use a mask (also called default mask), a 32 bit number made of contiguous 1s followed by
contiguous 0s. The masks for classes A, B and C are shown below.
The mask can help find the netid and the hostid. For example, the mask for class A address has
eight 1s, which means the first 8 bits of any address in class A define the netid; the next 24 bits
define the hostid.
Today, classful addressing is almost obsolete. It has been replaced with classless addressing.
6.4 Subnetting
Subnetting an IP Network can be done for a variety of reasons, including organization, use of
different physical media (such as Ethernet, FDDI, WAN, etc.), preservation of address space,
and security.
The most common reason is to control network traffic. In an Ethernet network, all nodes on a
segment see all the packets transmitted by all the other nodes on that segment. Performance
can be adversely affected under heavy traffic loads, due to collisions and the resulting
retransmissions. A router is used to connect IP networks to minimize the amount of traffic each
segment must receive.
The most recognizable aspect of subnetting is the subnet mask. Like IP addresses, a subnet
mask contains four bytes (32 bits) and is often written using the same "dotted-decimal" notation.
For example, a very common subnet mask in its binary representation
A subnet mask neither works like an IP address, nor does it exists independently from them.
Instead, subnet masks accompany an IP address and the two values work together. Applying
the subnet mask to an IP address splits the address into two parts, an "extended network
address" and a host address.
85
Subnetting was introduced in the era of classful addressing. If an organization was granted a
large block in class A or B, it could divide the addresses into several contiguous groups and
assign each group to smaller networks (called subnets). Subnetting a network has several
benefits which include:
If your computer uses the subnet mask to determine the members of the subnet, and if your
computer's address and the destination computer's IP addresses are in the same subnet address
range, then they can send packets directly to each other. If they're not in the same range, then
they must send their data through a router for delivery.
Subnetting an IP network allows a single large network to be broken down into what appear
(logically) to be several smaller ones.
Subnet masking
Applying a subnet mask to an IP address allows you to identify the network and node parts of
the address. Performing a bitwise logical AND operation between the IP address and the subnet
mask results in the Network Address or Number.
The logical AND operation compares 2 bits and if they are both "1", then the result is "1",
otherwise, the result is "0".
0 1
0 0 0
1 0 1
86
6.5 CIDR-- Classless InterDomain Routing
CIDR is an alternative to traditional IP subnetting that organizes IP addresses into subnetworks
independent of the value of the addresses themselves.
Under CIDR, the subnet mask notation is reduced to simplified shorthand. Instead of spelling
out the bits of the subnet mask, it is simply listed as the number of 1s bits that start the mask.
Example, the network address would be written simply as: CIDR notation uses the following
format - xxx.xxx.xxx.xxx/n where n is the number of (leftmost) '1' bits in the mask.
192.60.128.0/22
It indicates starting address of the network, and number of 1s bits in the network portion of
the address.
Using CIDR, ISPs are allocated large chunks of address space (usually with a subnet mask of
/19 or even smaller); the ISP's customers are then allocated networks from the ISP's pool. That
way, all the ISP's customers are accessible via 1 network route on the Internet.
Worked example
In this example, you are given two addresses / mask combinations, written with the
prefix/length notation, which have been assigned to two devices. Your task is to determine if
these devices are on the same subnet or different subnets. You can do this by using the address
and mask of each device to determine to which subnet each address belongs.
Device A: 172.16.17.30/20
Device B: 172.16.28.15/20
87
Determining the Subnet for Device A:
172.16.17.30 - 10101100.00010000.00010001.00011110
255.255.240.0 - 11111111.11111111.11110000.00000000
255.255.240.0 - 11111111.11111111.11110000.00000000
From these determinations, Device A and Device B have addresses that are part of the same
subnet.
Worked example
Calculate the network, host range and broadcast addresses for the following IPv4 addresses
a. 172. 16.4.0/24
b.172.16.4.0/27
When we express an IPv4 network address, we add a prefix length to the network address. The
prefix length is the number of bits in the address that gives us the network portion. For
example, in 172.16.4.0 /24, the /24 is the prefix length - it tells us that the first 24 bits are the
network address. This leaves the remaining 8 bits, the last octet, as the host portion.
a. Solution
88
Network Network address Host range Broadcast address
All Host Bits Represents all combination of Host bits All host Bits
except where host bits are all zeros or all
(underlined)=0 (underlined)=1
ones
10101100.00010000.00000100.0000001
1
10101100.00010000.00000100.1111111
0
b. Solution
All Host Bits Represents all combination of Host bits All host Bits
except where host bits are all zeros or all
(underlined)=0 (underlined)=1
ones
89
10101100.00010000.00000100.000000
11
10101100.00010000.00000100.000111
10
Notice that the network address could remain the same, but the host range and the broadcast
address are different for the different prefix lengths.
Unicast - the process of sending a packet from one host to an individual host. In an IPv4
network, the unicast address applied to an end device is referred to as the host address. For
unicast communication, the host addresses assigned to the two end devices are used as the
source and destination IPv4 addresses. During the encapsulation process, the source host places
its IPv4 address in the unicast packet header as the source host address and the IPv4 address of
the destination host in the packet header as the destination address. The communication using a
unicast packet can be forwarded through an internetwork using the same addresses.
Broadcast - the process of sending a packet from one host to all hosts in the network.
Broadcast transmission is used for the location of special services/devices for which the address
is not known or when a host needs to provide information to all the hosts on the network.
When a host needs information, the host sends a request, called a query, to the broadcast
address. All hosts in the network receive and process this query. One or more of the hosts with
the requested information will respond, typically using unicast.
Multicast - the process of sending a packet from one host to a selected group of hosts. Multicast
transmission is designed to conserve the bandwidth of the IPv4 network. It reduces traffic by
allowing a host to send a single packet to a selected set of hosts. To reach multiple destination
hosts using unicast communication, a source host would need to send an individual packet
addressed to each host. With multicast, the source host can send a single packet that can reach
thousands of destination hosts.
90
These three types of communication are used for different purposes in the data networks. In all
three cases, the IPv4 address of the originating host is placed in the packet header as the source
address.
Private Addresses
Private space address blocks are set aside for use in private networks. The use of these
addresses need not be unique among outside networks. Hosts that do not require access to the
Internet at large may make unrestricted use of private addresses. However, the internal
networks still must design network address schemes to ensure that the hosts in the private
networks use IP addresses that are unique within their networking environment.
91
6.8 Chapter Questions
1. Name the four levels of addressing in the TCP/IP protocol suite.
2. Differentiate between host address and broadcast address
3. Convert the following IPv4 address from binary to dotted-decimal notation
a. 10000001 00001011 00001111 11101111
b.11000001 10000011 00011011 11111111
4. Convert the following IPv4 address from dotted-decimal notation to binary
a. 111.56.45.78
b.221.34.7.82
5. Find the error, if any, with explanation in the following IPv4 addresses.
a. 111.56.04.78
b.221.34.7.8.20
c. 75.45.301.14
d.11100010.23.4.67
6. Find the class of each address
a. 00000001 00001011 00001001 11101111
b.11000001 10000011 00011011 11111111
c. 14.23.120.8
d.252.5.15.111
7. Calculate, in decimal, the maximum number of hosts and networks available for each
classification of 32-bit Internet Protocol (IP) addresses.
8. What are the differences between classful addressing and classless addressing in IPv4?
9. List the classes in classful addressing and define the application of each class.
10. Explain why most of the addresses were wasted in classful addressing in IPv4.
11. Define subnetting and supernetting.
12. Write the following masks in slash notation (/n)
a. 255.255.255.0
b.255.0.0.0
92
c. 255.255.224.0
d.255.255.240.0
13. Find the netid and the hostid of the following IP addresses
a. 114.34.2.8
b.132.56.8.6
c. 208.34.54.12
14. Find the network address, host range and the broadcast address for the following
a. 172.16.4.0/24
b.172.16.4.0/27
c. 150.12.3.0/26
15. Determine if the following devices are on the same subnet or different subnets.
a. 192.60.128.1/25
b.192.33.128.1/25
16. Classify the following IPv4 addresses into private and public addresses
a. 172.16.35.2
b.192.168.3.5
c. 192.0.2.15
d.209.165.201.30
e. 10.55.3.168
17. What is the purpose of having specified ranges of IPv4 addresses for public and private
use?
18. Differentiate between static and dynamic IP addressing
19. Which utilities can be used to verify and test network connectivity?
93
CHAPTER SEVEN: NETWORK SECURITY
Making a network secure involves outsmarting often intelligent, dedicated, and sometimes well-
funded adversaries. Consequently, security systems should be designed with this fact in mind.
Despite the fact that network can open avenues to a number of useful applications and provide
options for information sharing, many of the private networks consist of certain information that
should not be shared with outside users on the web, which may sometimes result in application
layer attacks, IP spoofing, DNS cache poisoning, password attacks, and man in the middle
attacks.
94
as email based network security problems, Denial of Service network security attacks, Worms
and Trojans, and wireless network security attacks.
Threats
A threat is anything that can disrupt the operation, functioning, integrity, or availability of a
network or system. There are different categories of threats. There are natural threats,
occurrences such as floods, earthquakes, and storms. There are also unintentional threats that
95
are the result of accidents and stupidity. Finally, there are intentional threats that are the result
of malicious intent. Each type of threat can be deadly to a network.
Networks and systems face many types of threats. There are viruses, worms, Trojan horses,
trap doors, spoofs, masquerades, replays, password cracking, sniffing, social engineering,
denial-of-service attacks, and other protocol-based attacks.
Viruses
A virus, a parasitic program that cannot function independently, is a program or code fragment
that is self-propagating. It is called a virus, because like its biological counterpart, it requires a
"host" to function. In the case of a computer virus the host is some other program to which the
virus attaches itself. A virus is usually spread by executing an infected program or by sending an
infected file to someone else, usually in the form of an e-mail attachment.
Worm
Trojan Horses
A Trojan horse (mobile malicious code) is a program or code fragment that hides inside a
program and performs a disguised function. A Trojan horse program hides within another
program or disguises itself as a legitimate program. This can be accomplished by modifying the
existing program or by simply replacing the existing program with a new one. The Trojan horse
program functions much the same way as the legitimate program, but usually it also performs
some other function, such as recording sensitive information or providing a trap door.
Trap Doors
A trap door or back door is an undocumented way of gaining access to a system that is built
into the system by its designer(s). It can also be a program that has been altered to allow
someone to gain privileged access to a system or process.
96
Spoofs
Spoofs cover a broad category of threats. In general terms, a spoof entails falsifying one's
identity or masquerading as some other individual or entity to gain access to a system or
network or to gain information for some other unauthorized purpose. There are many different
kinds of spoofs, including, among many others, IP address spoofing, session highjacking,
domain name service (DNS) spoofing, and sequence number spoofing.
o IP Address Spoofing
Every device on a TCP/IP network has a unique IP address. The IP address is a unique
identification of the device, and no two devices on the network can have the same IP address.
IP address spoofing takes advantage of systems and networks that rely on the IP address of the
connecting system or device for authentication.
TCP/IP network connections use sequence numbers. The sequence numbers are part of each
transmission and are exchanged with each transaction. The sequence number is based upon
each computer's internal clock, and the number is predictable because it is based on a set
algorithm.
By monitoring a network connection, a hacker can record the exchange of sequence numbers
and predict the next set of sequence numbers. With this information, a hacker can insert himself
or herself into the network connection and, effectively, take over the connection or insert
misinformation.
o Session Highjacking
Session highjacking is similar to sequence number spoofing. In this process, a hacker takes over
a connection session, usually between a client user and a server. This is generally done by
gaining access to a router or some other network device acting as a gateway between the
legitimate user and the server and utilizing IP spoofing. Since session highjacking usually
requires the hacker to gain privileged access to a network device, the best defense to take is to
properly secure all devices on the network.
97
o Man in the Middle Attack (MIM)
In a MIM attack, a hacker inserts himself or herself between a client program and a server on a
network. By doing so the hacker can intercept information entered by the client, such as credit
card numbers, passwords, and account information. Under one execution of this scheme, a
hacker would place himself or herself between a browser and a Web server. The MIM attack,
which is also sometimes called Web spoofing, is usually achieved by DNS or hyperlink spoofing.
Password Cracking
Some of the programs available are Brute, CrackerJack, John The Ripper, and NewHack.
Social Engineering
Social engineering, which refers to the nontechnical methods hackers employ to gain access to
systems, can be amazingly effective. Social engineering usually refers to the process of
convincing a person to reveal information (such as a password) that enables the hacker to gain
access to a system or network.
It is important for every organization to have a policy regarding the disclosure of passwords.
Generally that policy should state that passwords are not to be disclosed to anyone, including IS
personnel. That policy should be communicated to all company employees.
Sniffing
Network sniffing or packet sniffing is the process of monitoring a network in an attempt to
gather information that may be useful in an attack. With the proper tools a hacker can monitor
the network packets to obtain passwords or IP addresses. Many vendors manufacture hardware
and software for legitimate purposes that can be abused by hackers.
98
7.5 Vulnerabilities
Vulnerability is an inherent weakness in the design, configuration, or implementation of a
network or system that renders it susceptible to a threat. Most vulnerabilities can usually be
traced back to one of three sources:
o Poor design: Hardware and software systems that contain design flaws that can be
exploited. In essence, the systems are created with security holes. These flaws were
exploited on numerous occasions.
o Poor implementation: Systems, that are incorrectly configured, and therefore vulnerable
to attack. This type of vulnerability usually results from inexperience, insufficient training,
or sloppy work. An example of this type of vulnerability would be a system that does not
have restricted-access privileges on critical executable files, thereby allowing these files to
be altered by unauthorized users.
7.6 Attacks
An attack is a specific technique used to exploit vulnerability. For example, a threat could be a
denial of service. There are two general categories of attacks, passive and active.
Passive attacks: are very difficult to detect, because there is no overt activity that can be
monitored or detected. Passive attacks include
Active attacks, as the name implies, employ more overt actions on the network or system. As a
result, they can be easier to detect, but at the same time they can be much more devastating to
a network. Active attacks include
99
o modification of data stream to:
– masquerade of one entity as some other
– replay previous messages
– modify messages in transit
– denial of service
Authentication
Authentication serves as proof that you are who you say you are or what you claim to be.
Authentication is critical if there is to be any trust between parties. Authentication is required
when communicating over a network or logging onto a network.
When logging onto a network, three basic schemes are used for authentication. Very often
networks will use a combination of more than one of the schemes-something you know,
something you have, and something you are-which are described as follows.
o Something you know: The most commonly employed scheme is "something you know."
Typically, the something you know that authenticates your identity is a password, code,
or sequence. The security is predicated on the idea that if you know the secret password
or code then you must be who you claim to be and be authorized to access the network.
o Something you have: "Something you have" requires a key, badge, or token card, some
device or "thing" that provides you with access. Security is predicated on the concept
that only authorized individuals or entities will have access to the specific device. The
drawback to this scheme is that the "thing" can be lost or stolen.
o Something you are: "Something you are" authentication relies upon some physical or
behavioural characteristic. It is referred to as biometric authentication. Biometrics can
authenticate one's identity based on fingerprints, a voice print, or an iris scan. These
systems, when designed properly, can be extremely difficult to circumvent or
compromise. The trick is finding one that works correctly.
Access Control (Authorization)
This refers to the ability to control the level of access that individuals or entities have to a
network or system and how much information they can receive. Your level of authorization
basically determines what you're allowed to do once you are authenticated and allowed access
to a network, system, or some other resource such as data or information.
100
Availability
This refers to whether the network, system, hardware, and software are reliable and can recover
quickly and completely in the event of an interruption in service. Ideally, these elements should
not be susceptible to denial of service attacks.
Confidentiality
This can also be called privacy or secrecy and refers to the protection of information from
unauthorized disclosure. Usually achieved either by restricting access to the information or by
encrypting the information so that it is not meaningful to unauthorized individuals or entities.
Integrity
This refers to the ability to protect information, data, or transmissions from unauthorized,
uncontrolled, or accidental alterations. The term integrity can also be used in reference to the
functioning of a network, system, or application.
Accountability
This refers to the ability to track or audit what an individual or entity is doing on a network or
system. It should be possible to identify the entity responsible for any communication event.
Does the system maintain a record of functions performed, files accessed, and information
altered?
Nonrepudiation
The ability to prevent individuals or entities from denying (repudiating) that information, data, or
files were sent or received or that information or files were accessed or altered, when in fact
they were. This capability is crucial to e-commerce. Without it an individual or entity can deny
that he, she, or it is responsible for a transaction and that he, she, or it is, therefore, not
financially liable.
101
7.8 Securing Data on the Network
When users transfer data from one point to another in a computer network, it is often necessary
to ensure that the transmission is secure from anyone who might be eavesdropping on the line.
The term “secure” means two things. First, it should not be possible for someone to intercept
and copy an existing transmission.
Second, it should not be possible for someone to insert false information into an existing
transmission. However, avoiding alteration of message is difficult hence mechanisms are put in
place to check the authenticity of the message.
A mechanism that is designed to detect, prevent, or recover from a security attack. No single
mechanism that will support all functions required, however, there is one particular element that
underlies many of the security mechanisms in use: cryptographic techniques.
For network security two main applications of cryptographic algorithms are of principal interest:
o Encryption of data: transforms plaintext data into cipher text in order to conceal its’
meaning.
o Signing of data: computes a check value or digital signature to a given plain- or cipher
text that can be verified by some or all entities being able to access the signed data.
7.8.1 Cryptography
The art of breaking ciphers, called cryptanalysis, and the art devising them (cryptography) is
collectively known as cryptology.
o Cryptology includes:
o Cryptanalysis that is: the analysis of cryptographic systems, inputs and outputs,
derivation confidential information.
102
Encryption
Encryption is the process of scrambling the contents of a file or message to make it unintelligible
to anyone not in possession of the "key" required to unscramble the file or message. An
encryption algorithm is the computer program that converts plaintext into an enciphered form.
Key
A key is the unique piece of information that is used to create ciphertext and then decrypt the
ciphertext back into plaintext. After the ciphertext is created, it is transmitted to the receiver,
where the ciphertext data is decrypted.
Decryption
Decryption is the activity of making clear or converting from ciphertext into plain text. A secret
key or password is required for decryption. In other words decryption means transforming
ciphertext back into original plaintext using a key.
The strength of the scheme is largely dependent on the size of the key and on keeping it secret.
Generally, the larger the key, the more secure the scheme. In addition, symmetric key
encryption is relatively fast.
The main weakness of the system include: key distribution, key storage and problem of key
sharing. Examples of widely deployed symmetric key cryptosystems include Data Encryption
Standard (DES), IDEA, Blowfish, RC4, CAST, and SKIPJACK.
In the table below some advantages and disadvantages of symmetric cryptosystems are outlined.
The keys' names describe their function. One key is kept private, and the other key is made
public. Knowing the public key does not reveal the private key. A message encrypted by the
private key can only be decrypted by the corresponding public key. Conversely, a message
104
encrypted by the public key can only be decrypted by the private key. This process is illustrated
in Figure below.
With the aid of public key cryptography, it is possible to establish secure communications with
any individual or entity when using a compatible software or hardware device.
While symmetric key cryptosystems are limited to securing the privacy of information,
asymmetric or public key cryptography is much more versatile. Public key cryptosystems can
provide a means of authentication and can support digital certificates. With digital certificates,
public key cryptosystems can provide enforcement of nonrepudiation. Unlike symmetric key
cryptosystems, public key allows for secure spontaneous communication over an open network.
In addition, it is more scalable for very large systems (tens of millions) than symmetric key
cryptosystems. With symmetric key cryptosystems, the key administration for large networks is
very complex. The below table summarizes the advantages and disadvantages of the public key
cryptosystems.
There are three public key algorithms in wide use today—Diffie-Hellman; RSA; and the Digital
Signature Algorithm (DSA).
FHSS: When a signal is transmitted using frequency hopping spread spectrum techniques, the
signal continuously hops from one frequency to another to prevent eavesdropping, disruption of
the transmission, or other malicious intervention.
DSSS: When a signal is transmitted using direct sequence spread spectrum techniques, the 1s
and 0s of the original data are converted to longer bit sequences.
105
In order to secure communications, network administrators and users must be aware of
standard computer attacks and viruses that can damage computer systems. They must also be
aware of software and hardware that can help to protect a system and its users from computer
attacks and viruses. Virus scanners have three basic forms: signature-based scanning, terminate-
and-stay-resident monitoring, and integrity checking.
107