Sei sulla pagina 1di 169

Worktext in Computer Networks

Published / Printed by:


College of Information Technology
DMMMSU –MLUC, City of San Fernando
La Union, Philippines

COPYRIGHT 2015

ISBN:

Cover Designed by:


Sheena I. Sapuay
Faculty, CIT
Preface

This worktext in computer networks was developed for IT – related courses and
programs of DMMMSU – Mid – La Union Campus.
It aims to present a detailed and comprehensive description and information
regarding the basics of computer networks.
The material is used as a guide and allows the reader to reduce time and cost
required to learn computer networks concepts.
It is designed to help faculty and students in learning the concepts and completing the
course.
The worktext is organized from simple to complex and from basic to advance to make
an easy transfer of learning.
The reader is encouraged not only to read this worktext but to analyze and answer
the review questions at the end of each.

iii
Acknowledgement

The author of this worktext greatly acknowledges the following:


The Lord Almighty, for giving the wisdom and insight in the development and
realization of this endeavor;
Atty. Gilbert R. Hufana and Mr. Mark KristianLedda for generously sharing their
instructional materials;
To Mrs. Doreen A. Torres, for her assistance in the development of the work;
To Ms. Sheena I. Sapuay, for the design of the cover page of the worktext;
The BS Information Technology On-the-Job Trainees namely: Jenny M. Andres,
Zarah S. Balaso, Daisy B. Baltazar, and Mea Criselle T. Rivera for their patience in encoding
the manuscript and laying out the content;
The members of the College Evaluation Committee for their expertise in reviewing
and evaluating the work;
And all those who and one way or the other have contributed to the successful
development of this scholarly work.

iv
Table of Contents

Preface iii

Acknowledgement iv

Table of Contents v

Framework vi

Course Objectives vii

Unit 1: Computer Networks 1

Unit2: Network Architecture 19

Unit 3: Data Communication Concept 26

Unit 4: TCP/IP 51

Unit 5: IPV6 61

Unit 6: The 7 Open Systems Interconnection (OSI) Model 69

Unit 7: Collision Free Protocols 74

Unit 8: Wireless 83

Unit 9: Routing 96

Unit 10: DNS, HTTP 103

Unit 11: Application Layer 113

Unit 12: Security 136

References 156

Appendices

Appendix A : Course Syllabus 157

Appendix B : Committee Certification 159

Appendix C : System of Evaluation of Instructional Material 160

Appendix D : Proof of Utilization 162

v
Framework

Figure 1. Framework in the Development of the Worktext

The teacher or facilitator is guided by the framework depicted above in the


development of their worktext. It can be seen that the process Direct Teaching factor
combines skills, competence and attitude to successfully achieve the holistic development of
the learner.

 Competence

In the worktext, the learner will develop competence through activities and quizzes
that are incorporated after every unit. This intends to cultivate the minds of the
learners by capturing understanding on the subject matter. It concludes questions or
activities on knowledge and comprehension domains of learning.

 Skills

In the worktext, the learner will enhance the skills through the activities which can be
done during their laboratory time. This is done to enable the learners to translate their
understanding on the subject matter to codes, programs, or any output which is
computerized in nature.

 Attitude

With the activities incorporated in the worktext, the learner will develop the right
attitude on handling situations regarding problem – solving. These activities will be
done to drive learners to make decision until the desired output is achieved.

With the integration of the right strategy and approach to develop competence, skills,
and attitude, the teacher facilitator can directly apply these factors to teaching or learning
process.

vi
Course Objectives

At the end of the course, the student shall be able to:


 become familiar with layered communication architectures (OSI and TCP/IP);
 understand the client/server model and key application layer protocols;
 learn sockets programming and how to implement client/server programs;
 understand the concepts of reliable data transfer and how TCP implements
these concepts;
 know the principles of congestion control and trade-offs in fairness and
efficiency;
 learn the principles of routing and the semantics and syntax of IP;
 understand the basics of error detection including parity, checksums, and
CRC.
 know the key protocols for multimedia networking for IP; and
 familiarize the student with current topics such as security, network
management, sensor networks, and/or other topics.

vii
Unit 1
Computer Networks

Unit Objectives

At the end of the unit, the student is expected to:


 define computer networks;
 understand the advantages and disadvantages of computer networks;
 learn the goals of computer networks
 categorize different computer networks; and
 classify different network topologies.
Unit 1 Computer Networks

Computer Networks

A computer network refers to the collection of several computing machines,


peripheral devices and storage unit. The computer systems may communicate over a
computer network and share their resources. These networks enable the computer to
communicate with a remote computer which may be located at a distance of a few meters to
several thousands kilometres. The users of a computer system on the network are able to
share the software resources such as programs, database and program utilities. The
computer network has become a basic necessity and has triggered the development of
several applications. The conventional concept of installing a high performance and large
computer system has now been replaced with computer networks where several low cost
and low performance computer systems collectively exhibit high performance at lower cost.

Networking

A group of computers and other devices connected together is called a network. The
interconnected computers can share resources, which called networking. It is linking of two
or more different entities together to form a group of network to perform some specific task.
The networking enhances the capacity of computer to share, exchange, preserve and protect
information. When the computers are connected over a network it is possible to exchange
the information easily and faster.

2
Unit 1 Computer Networks

Advantages of Networking

1. Connectivity and Communication - Networks connect computers and the users of


those computers. Individuals within a building or work group can be connected into
local area networks (LANs); LANs in distant locations can be interconnected into
larger wide area networks (WANs). Once connected, it is possible for network users
to communicate with each other using technologies such as electronic mail. This
makes the transmission of business (or non-business) information easier more
efficient and less expensive than it would be without the network.
2. Data Sharing - One of the most important uses of networking is to allow the sharing
of data. Before networking was common, an accounting employee who wanted to
prepare a report for her manager would have to produce it on his PC, put it on a
floppy disk, and then walk it over to the manager, who would transfer data to her PC’s
hard disk.
3. Hardware Sharing - Networks facilitate the sharing of hardware devices. For
example, instead of giving each of 10 employees in a department an expensive color
printer (or resorting to the “sneaker net ” again), one printer can be placed on the
network for everyone to share.
4. Internet Access - The internet is itself an enormous network, so whenever you
access the Internet you are using a network. The significance of the Internet on
modern society is hard to exaggerate especially for those of us in technical fields.
5. Data Security and Management -In a business environment, a network allows the
administrators too much better manage the company’s critical data. Instead of having
this data spread over dozens or even hundreds of small computers in a haphazard
fashion as their users create it; data can be centralized on shared servers. This
makes it easy for everyone to find the data, makes it possible for the administrators to
ensure that the data is regularly backed up, and allows for the implementation of
security measures to control who can read or change various pieces of critical
information.
6. Entertainment - Networks facilitate many types of games and entertainment. The
internet itself offers many sources of entertainment, of course. In addition, many
multi-player games exist that operate over a local area network. Many home networks
are set up for this reason, and gaming across wide area networks (including the
Internet) has also become quite popular.

3
Unit 1 Computer Networks

Disadvantages of Networking

1. Network Hardware, Software and Setup Cost. Computers don’t just magically
network themselves, of course. Setting up a network requires an investment in
hardware and software, as well as funds for planning, designing and implementing
the network. For a home with a small network of two or three PCs, this is relatively
inexpensive, possibly amounting to less than a hundred dollars with today’s low
prices for network hardware, and operating systems already designed for networks.
For a large company, cost can easily run into tens of thousands of dollars or more.
2. Growing Concerns over Security. As Internet use increased in the 1990s, more
“bad guys” started using the network also. The more machines a company had
directly connected to the Internet, the greater their potential exposure to security
risks.
3. Undesirable Sharing. With the good comes to bad; while networking allows the easy
sharing of useful information, it also allows the sharing of undesirable data. One
significant “sharing problem” in this regard has to do with viruses, which are easily
spread over networks and the Internet. Mitigating these effects costs more time,
money and administrative effort.
4. Illegal or Undesirable Behavior. Similar to the point above, networking facilities
useful connectivity and communication, but also brings difficulties with it. Typical
problems include abuse of company resources distractions that reduce productivity,
downloading of illegal or illicit materials, and even software piracy. In larger
organizations, these issues must be managed through explicit policies and
monitoring, which again, further increases management costs.

Goals of Computer Network

1. Security Goals: Network security issues comprise of prevention from virus attacks
and protecting data from unauthorized access.
a) Viruses: As a network is accessible from many points, it can be susceptible to
computer viruses. A virus is an illicitly introduced code to damage the functionality of
a system. A good network is protected from viruses by software and hardware
designed specifically for that purpose.

4
Unit 1 Computer Networks

b) Unauthorized access: Protection from unauthorized access of sensitive data is


mandatory for any network to be useful. Protection can be accomplished at a number
of levels. At the lowest level are user login codes and passwords. At high level are
encryption techniques.
2. Reliability Goals: Network reliability is measured by failure frequency average down
time of network and the networks robustness in a catastrophe.
a) Failure Frequency: Network failure is always a possibility. A network that fails rarely
is good for a user but a network that fails oftenly is of little value to a user.
b) Average Down Time: How long does it take to restore service is known as downtime
for the network. A network with less average down time is more useful than one that
does not.
c) Catastrophe: Network must be protected from catastrophe events such that
earthquake or theft. One protection against these is a reliable system to backup
network software.
3. Performance Goals: The network performance can be measured by its transit time
and response time. Transit time is the amount of time required for a message to travel
from one device to another device in network. Response time is the time elapsed
between an inquiry and a response. Network performance depends on a number of
factors including, network transmission medium, network hardware, network software
and traffic load.
a) Network Transmission Medium: A network medium may be wired (optical fiber,
copper cables, etc.) or wireless (microwave, satellite etc.). The medium defines the
data rate (speed at which data can travel through a connection). As the uses of
network are increasing, faster and faster transmission media is required for
networks; such as fiber optic cabling. Amount of data that a media can handle
defines its capacity and in turn how powerful media it is. A medium that can carry
200 megabits per second is 20 times more powerful than a medium that can carry
data at only 10 megabits per second.
b) Hardware: The types of hardware included in a network affect both the speed and
capacity of transmission. A higher speed system with greater storage capacity
provides better performance.

5
Unit 1 Computer Networks

c) Software: Moving a message from node to node through a network requires


processing for transformation of raw data into transmittable signals, to route these
signal to the proper destination, to ensure error free delivery and to recast the
signals into a form the receiver can use. The software that provides these services
affects both the speed and the reliability of a network link. Well-designed software
can speed the process and make transmission more effective and efficient.
d) Traffic Load: The design of a network is based on assessment of the average
number of users that will be communicating at any moment of time. Having a large
number of concurrent users can slow response time in network not designed to
coordinate heavy traffic loads. In peak load period however the ‘actual number of
users’ may exceed the ‘average number users’ and thereby detoriate the
performance. How a network responds to peak load is a measure of its
performance.

4. Network Cost: While designing cost of a network is an important factor. The network
cost can be calculated on the basis of fixed cost and runtime cost.
a) Fixed cost: The cost of medium and devices (like switch, router, hub etc.) which are
required to make a network functional plays an important role while designing the
network. For better network design in minimum cost the network design engineer
must understand the function’s to be performed by the network and accordingly
performance parameters of medium and device (capacity and quality of medium,
processing speed, capacity etc.. of device) should be chosen.
b) Runtime cost: To maintain a Network functionally strong, very good maintenance is
required and as much complexity we increase in design chances of failure increases
accordingly which in turn leads to more down time and maintenance cost of network.
So increasing the runtime cost of network. So while designing not only fixed cost but
run-time costs must be taken into account for minimization of total cost.

6
Unit 1 Computer Networks

Topologies

 Topology defines the physical or logical arrangement of links in a network.


 Network topology defines how various computers or nodes are connected to one
another.
 Network topology refers to the connection of different computers and deals with
problem of how best various computers can be interconnected.
 Topology is the geometric arrangement of the computers in a network.
 Network topology defines the manner in which the nodes are geometrically arranged
and connected to one another.
o The meaning of physical topology indicates the way in which a network is
physically laid out.
o Two or more devices connect to a link; two or more links form a topology.
o The topology of a network is the geometric representation of the relationship
of all the links connecting the devices (or nodes).
 In the computer network each computer is known as nodes and how these nodes are
connected with each other’s is called the network topology.
 In the context of a communication network, the term topology refers to the way in
which the end points, or stations, attached to the network are interconnected.

Classification of Network Topology

 Two relationships on the basis are possible as follows:


1. Peer to peer
2. Primary-secondary

7
Unit 1 Computer Networks

 Peer to peer is the relationship where the devices share the link equally. The
examples are ring and mesh topologies.
 In primary-secondary relationship, one device controls and the other devices have to
transmit through it. For example star and tree topology.

1. Mesh Topology
 It is also called as complete topology.
 In mesh topology, every device has a dedicated point to point link to other device
where point to point means that only one terminal/wire directly connects only the two
devices.
 The term dedicated means the link carries traffic only between the two devices it
connects.
 A mesh network has (n(n-1))/2 physical channels to link n devices.
 The accommodate that many links ; every devices on the network work must have (n-
1) input output ports.
 Mesh topology is employed for long-distance transmission of data between nodes.
 Mesh topology is two types:
o True mesh topology
o Hybrid mesh topology

Advantage of Mesh Topology


i. No traffic problem: The use of dedicated links assures that each connection can carry
its own data load, thus eliminating the traffic problems that can occur when links are
shared by more than one devices. That means no bottleneck problem.
ii. Better security: As every message travels on a dedicated line, only the intended
recipient can receives it.
iii. A mesh topology is robust to link failures: if one link fails the data can be transmitted
through alternate path.
iv. Fault identification and fault isolation is easy due to ‘point to point link’. Traffic
can be routed through other paths to avoid links with suspected problems.

Disadvantages of Mesh Topology


1. Amount of cabling and number of input output ports required.
2. Every device must be connected to every other devices.

8
Unit 1 Computer Networks

3. The installation and reconnection are difficult.


4. The sheer bulk of the wiring can be greater than the available space.
5. The hardware required to connect each link (input output ports and cable) can be
expensive.

2. Star Topology
In a star topology, each device has a dedicated point-to-point link only to a central
controller, usually called a hub. The devices are not directly linked to each other. Unlike a
mesh topology, a star topology does not allow direct traffic between devices. The controller
acts as an exchange: If one device wants to send data to another, it sends the data to the
controller which then relays the data to the other device. The star is probably the most
commonly used topology today. It uses twisted pair (10baseT or 100baaseT) cabling and
requires that all devices are connected to a hub.

Advantages of the Star Topology


1. Ease of service. The star topology has a number of concentration points (where
connections are joined). These provide easy access for service or reconfiguration of
the network.
2. One device per connection. Connection points in any network are inherently prone to
failure. In the star topology, failure of a single connection typically involves
disconnecting one node from an otherwise fully functional network.
3. Centralized control problem diagnosis. The fact that the central node is connected
directly to every other node in the network means that faults are easily detected and
isolated. It is a simple matter to disconnect failing nodes from the system.
4. Simple access protocols. Any given connectionin a star network involves only the
central node. In this situation, contention for who has control of the medium for the
transmission purposes is easily solved. Thus in a star network, access protocols are
very simple.
5. Each device needs only one link and one I/O port makes star topology less,
expensive, easy to install and easy to configure.
6. Robust topology.
7. If any links fails, it does not affect entire network.
8. Easy fault identification and fault isolation.

9
Unit 1 Computer Networks

9. It is easy to modify and add new needs to a star network without disturbing the rest of
the network.
10. Star topology is useful when a centralized control is required.

Disadvantages of the Star Topology


1. Long cable length. Because each node is directly connected to the center, the star
topology necessitates a large quantity of cable. Whilst the cost of cable is often small,
congestion in cable ducts and maintenance and installation problems can increase
cost considerably.
2. Default to expand. The addition of a new node to a star network involves a
connection all the way to the central node.
3. Central node dependency. If the central node in a star network fails, the entire
network is rendered inoperable. This introduces heavy reliability and redundancy
constraints on this node.
The star topology has found extensive application in areas where intelligence in the
network is concentrated at the central node.
4. If the central hub fails, the whole network fails to operate.
5. Each device requires its own cable segment.
6. In hierarchical network, installation and configuration is difficult. This is like if you were
to burn down the phone company’s central office, then anyone connected to it
wouldn’t be able to make any phone calls.
7. If one link fails there is no alternate to connect it with rest of networks.

3. Ring Topology
It is also called as circular topology. In a ring topology, each device has a dedicated
point-to-point line configuration only with the two devices on either side of it. A signal
is passed along the ring in one direction, from device to device, until it reaches its
destination. Each device in the ring incorporates a repeater. When a device receives
a signal intended for another device, its repeaters regenerates the bits and passes
them along. The ring topology looks are same as the star; except that it uses special
hubs and Ethernet adapters. The ring topology is used with Token Ring networks.

10
Unit 1 Computer Networks

Advantages of the Ring Topology


1. Short cable length. The amount of cabling involves in a ring topology is comparable to
that of a bus and is small relative to that of a star. This means that less connection
will be needed, which will in turn increase network reliability.
2. No wiring closet space required. Since there is only one cable connecting each node
to its immediate neighbours, it is not necessary to allocate space in the building for
wiring closets.
3. Suitable for optical fibers. Using optical fibers offers the possibility of very high speed
transmission. Because traffic on a ring travels in one direction, it is easy to use optical
fibers as a medium of transmission.
4. A ring is relatively easy to install and reconfigure.
5. Link failure can be easily found as each device is connected to its immediate
neighbours only.
6. Because every node is given equal access to the token no one node can monopolize
the network.

Disadvantages of the Ring Topology


1. Node failures causes network failure. The transmission of a data on a ring goes
through every connected node on the ring before returning to the sender. If one node
fails to pass data through it, the entire network has failed and no traffic can flow until
the defective node has been removed from the ring.
2. Difficult to diagnose faults. The fact that failure of one node will affect all others has
serious implications for fault diagnosis. It may be necessary to examine a series of
adjacent nodes to determine the faulty one. This operation may also require
diagnostic facilities to be built into each node.
3. Network reconfiguration is difficult. It is not possible to shut down a small section of
the ring while keeping the majority of it working normally.
4. Maximum ring length and number of devices is limited.
5. Failure of one node on the ring can affect the entire network.
6. Adding or removing nodes disrupts the network.

11
Unit 1 Computer Networks

4. Bus Topology
 It is also called as linear topology.
 All other topologies (mesh, star, ring) described point-to-point configuration.
 A bus topology is multipoint. One long cable acts as a backbone to link all other
devices in the network.
 The speed of the bus topology is slow because only one computer can send a
message at a time. A computer must wait until the bus is free before it can transmit.
 The bus topology requires a proper termination at both the ends of the cable.
 Since the bus is passive topology, the electrical signal from a transmitting computer is
free to travel the entire length of the cable.
 Nodes are connected to the bus cable by droplines and taps.
Dropline: A drop line is a connection between the devices and the main cable.
Tap: A tap is a connection that punctures with the metallic core.

Advantages of the Linear Topology


1. Short cable length and simple wiring layout.Because there is a signal common data
path connecting all nodes, the linear topology allows a very short cables length to be
used. This decreases the installation cost, and also leads to a simple, easy to
maintain wiring layout.
2. Resilient Architecture. The LINEAR architecture has an inherent simplicity that makes
it very reliable from a hardware point of view. There is a single cable through which all
the data propagates and to which all nodes are connected.
3. Easy to extend. Additional nodes can be connected to an existing bus network at any
point along its length. More extensive additions can be achieved by adding extra
segments connected by a type of signal amplifier none as repeater.

Disadvantages of the Linear Topology:


1. Fault diagnosis difficult. Although simplicity of the bus topology means that there is
very little to go wrong, fault detection is not a simple matter. Control of the network is
not centralized in any particular node. This means that detection of a fault may have
to be performed from many points in the network.
2. Fault isolation is difficult. In the star topology, a defective node can easily be isolated
from the network by removing its connection at the center. If a node is faulty on the
bus, it must be rectified at the point where the node is connected to the network.

12
Unit 1 Computer Networks

3. Repeater configuration. When BUS type network has its backbone extended using
repeaters, reconfiguration may be necessary.
4. Nodes must be intelligent. Each node on the network is directly connected to the
central bus. This means that some way of deciding who can use the network at any
given time must be performed in each node.

5. Tree Topology
 It is also called as hierarchical topology.
 A tree topology is a variation of a star. As in a star, nodes in a tree are linked to a
central hub that controls the traffic to the network.
 However not every computers plugs into the central hub, majority of them are
connected to a secondary hub which in turn is connected to the central hub.
 The central hub in the tree is an active hub, which contains repeater. The repeater
amplifies the signal and increase the distance a signal can travel.
 The secondary hubs may be active or passive. A passive hub provides a simple
physical connection between the attached devices.
 Tree Topology is somewhat similar to bus topology. We can say that tree topology
is another form of bus topology. But unlike bus topology, the nodes in a tree
extend similar to the branches of a tree with the trunk or we can say bus is a
special case of tree in which there is only one trunk.

Advantages of Tree Topology


1. It allows more devices to be attached to a single hub and can therefore increase the
distance of a signal can travel between devices.
2. It allows the network to isolate and priorities communications from different
computers.

Disadvantages of Tree Topology


1. If the central hub fails the system breaks down.
2. The cabling cost is more.

13
Unit 1 Computer Networks

Categories of Network

A computer network means a group of ‘networked’ computers i.e., computers that are
linked by means of a communication system. A network can mean a small group of linked
computers to a chain of a few hundred computers of different types (e.g., PCs, minis,
mainframes etc.) spread around the world. Thus, networks vary in size, complexity and
geographical spread. Mostly, computers are classified on the basis of geographical spread
and on this basis; there can be three types of networks.
 Local Area Networks (LANs)
 Wide Area Networks (WANs)
 Metropolitan Area Networks (MANs)

1. Local Area Network (LAN)


 A LAN is a data communication system within a building or campus or between near
by buildings.
 The most common LAN topologies are Bus, Ring, and Star.
 LAN is that network which covers the distance from 1m to 1km.
 LAN is the cheap way of interconnecting the systems.
 LAN is capable of transmitting data at very fast rates. Much faster than data can be
transmitted over a telephone line.
 LANs are easy to design and troubleshoot. The personal computers and workstations
in the offices are interconnected via LAN.
 The exchange of information and sharing of resources becomes easy because of
LAN.
 In LAN all the machines are connected to a single cable. Different types of topologies
such as Bus, Ring, Star, Tree etc. are used for LANs.
 LAN uses a layered architecture and they are capable of operating at hundreds of
Mbits/sec.
 LANs are distinguished from other kinds of networks by three characteristics:
1. Their size
2. Their transmission technology and
3. Their topology
 Data Rate: LAN has data rates in the 4 to 16 megabytes per second.

14
Unit 1 Computer Networks

 Use:
1. User can use the LAN to communicate with each other by sending e-mail s,
data or in chat sessions
2. Through LAN, many users can share expensive devices.

Advantages of LAN
1. It allows large number of users to access the data from single memory.
2. The files are stored on single memory.
3. The processing can be done by number of users simultaneously.

Characteristics of LAN
1. Low cost is an important characteristic of LAN.
2. Resource sharing is the greatest advantage of LAN.
3. In LAN, every device can communicate with any other device.
4. The independent devices are interconnected with high degree in LAN.

System of LAN
There are three types of systems used in LAN.
1. Client-server- this LAN does not provide network resources. In this case, the client
computer accesses the main computer through the server.
2. Peer based LAN- this LAN provides interconnection between the computers and
various devices. All computers can be interconnected to each other by networking.
3. Server Based LAN- this is hybrid network, in which Peer connection are made by
joining the connections.

Attributes of LAN
 The LAN transmits data amongst user stations.
 The LAN transmission capacity is more than 1 Mbps.
 The LAN channel is typically privately owned by the organizations using the facility.

2. Wide Area Network (WAN)


 WAN is huge as compared to a LAN or MAN.
 WAN is also known as LONG HAUL network.
 WAN spread over a town, a city or a country or even the whole globe.

15
Unit 1 Computer Networks

 A WAN provides long distance transmission of data, video image and video
information over large areas.
 The data is communicated in the form of small pieces and sent over the network.
 It is cheaper and more efficient to use phone network for the links.

Uses of WAN
1. A WAN uses telephone links, mobile phones, satellite transmission and under sea
cables.
2. The WAN used direct distance dialing, leased links and satellite.
3. The remote computers are connected to each other by use of these lines.
4. A WAN uses various communication facilities to connect the user not located in the
single building.

Types of WAN
WANs can be classified into two types. They are:
1. Discontinuous connection WANs and
2. Continuous connection WANs.

3. Metropolitan Area Network (MAN)


 MAN is a network that is designed to cover an entire city.
 A MAN can support both data and voice.
 A MAN does not contain switching elements (connectivity).
 Its range from 5 to 50 km, high data rate from LAN.
 It may be a single network such as Television network or it may be a means of
connecting a number of LANs into a larger network, so that resources may be shared
LAN-to-LAN as well as device-to-device.
 MAN is designed with two unidirectional buses. Each bus is independent of the other
in the transfer of traffic. The topology can be designed as an open bus or a closed
configuration.
 MANs are based on fiber optic transmission technology and provide high- speed
interconnection between sites. It can support both data and device.
 MANs as a special category is that a standard has been adopted for them and this
standard is now being implemented. It is called IEEE 802.6.
 Uses: It uses high-speed data transfer medium, like fiber optics.

16
Unit 1 Computer Networks

 Purposes: The purpose of a MAN is also the sharing of hardware and software
resources among its users.
 Transfer Rate: MAN provides the transfer rates from 34 to 150 Mbps.

17
Review Questions

1. What do you mean by the term computer networks? Give the list of goals of computer
networks.

2. Explain in detail the various classification of topology.

3. What do you mean by the term topology? Explain any two types of topologies.

4. Explain in detail the various categories of network.

5. What is the difference between the various categories of network?

18
Unit 2
Network Architecture

Unit Objectives

At the end of the unit, the student is expected to:


 define the different network protocols;
 understand the different OSI model;
 learn the aspect of a TCP/IP Reference Model; and
 differentiate between the OSI and the TCP/IP Reference Model.
Unit 2 Network Architecture

Protocols

 A protocol is a set of rules that govern data communication. It defines WHAT is


communicated, HOW it is communicated, and WHEN it is communicated.
 The key elements of a protocol are syntax, semantics, and timing.
Key Elements of a Protocol
 Syntax - It refers to the structure or format of the data.
 Semantics - It refers to the meaning of each section of bits.
 Timing - It refers to two characteristics: when data should be sent and how fast they
can be sent.
Protocol Hierarchies
 Most of all networks are organized as a series of layers, each one built upon the one
below it.
 A layer is a service provider and may consist of several service functions.
 The entities comprising the corresponding layers on different machine are called
peers.
 Between each pair of adjacent layers is called interface.
 A set of layers and protocols is called network architecture.

Five-layer Network

20
Unit 2 Network Architecture

Design Issues for the Layers


 Addressing – every layer needs a mechanism for identifying senders and receivers.
 Direction of Transmission – another set of design decisions concerns the rules for
data transfer.
 Error Control – another important issue because physical communication circuits are
not perfect.
 Avoid Loss of Sequencing – all the communication channels cannot preserve the
order in w/c messages are sent on it.
 Ability of Receiving Long Messages – a mechanism needs to develop to
disassemble, transmit and then reassemble messages.
 To Use Multiplexing And Demultiplexing – it is used to share the same channel by
many sources simultaneously.

Classification of Protocols
1. Connection Oriented Service
2. Connectionless Service

Connection Oriented Service

 In this protocol, a logical connection is being established between the endpoints prior
to the transmission of data.
 It is designed to have a high reliability for data movement across the network.

Characteristics of Connection Oriented


a) Handshake - occurs when two stations establishes a connection before any data are
actually transmitted.
b) Acknowledgement Procedures – it acknowledges that the data are being transmitted.
c) Error Control – whenever the data are found to have errors, the receiving destinations
will send request for retransmission.
d) When a connection is no longer needed, the specific handshake drops down the
connection.

21
Unit 2 Network Architecture

Connectionless Service

• It is where the data are exchanged in an unplanned fashion without prior to


coordination between endpoints.
• Unlike the connection oriented for having for reliability, bit it has the transfer speed as
its advantage.

OSI Model

• The Open Systems Interconnectionmodel was intended to be a blueprint for a set


of worldwide communication standards.
• Also called ISO OSI standard for networks as it is designed by ISO (International
Standards Organization)
• OSI reference model has seven layers

OSI Layer Name Functional Description Examples


 Interface between network and
Application (Layer 7) Telnet, HTTP
application software.
 How data is presented.
JPEG, ASCII,
Presentation (Layer 6)  Special processing, such as
EBCDIC
encryption.
 Establishing and maintaining end- Operating systems
to-end bidirectional flows between and application
Session (Layer 5)
endpoints. Includes managing access scheduling
transaction flows. RPC
 Reliable or unreliable delivery.
Transport (Layer 4) TCP, UDP, SPX
 Multiplexing.
 Logical addressing, which routers
Network (Layer 3) IP, IPX
use for path determination.
 Combination of bits into bytes, and
bytes into frames.
Data Link (Layer 2) 802.3/802.2, HDLC
 Access to the media usingMAC
address.

22
Unit 2 Network Architecture

 Error detection and error recovery.


 Moving of bits between devices.
Physical (Layer 1)  Specification of voltage, wire EIA/TIA-232, V.35
speed, and cable pinouts.

TCP/IP REFERENCE MODEL

• TCP/IP Stands for Transmission Control Protocol/Internet Protocol.


• The TCP/IP reference model is a set of protocols that allow communication across
multiple diverse networks.
TCP/IP Network Stack

Application
Transport
Internet
Network Interface

1. APPLICATION LAYER - includes all process and services that use the transport layer
to deliver data.
2. TRANSPORT LAYER - provides peer entities on the source and destination hosts to
carry on a conversation.
3. INTERNET LAYER - the Internet network layer protocol handle machine to machine
communications.
4. HOST-TOHOST LAYER - this is the lowest layer in TCP/IP reference model. This
layer is also called network interface layer.

23
Unit 2 Network Architecture

COMPARISON OF OSI AND TCP/IP MODELS

OSI Model TCP/IP Network Stack

7 Application

6 Presentation Application
5 Session
4 Transport Transport
3 Network Internet
2 Data Link Network Interface
1 Physical
OSI Model and the TCP/IP Network Stack

DIFFERENCE BETWEEN OSI AND TCP/IP MODEL

Sr. No OSI TCP

1 7 layers 4 layers
Model was first designed before
2 Model defined after, protocol were implemented.
implementation takes place.
OSI model based on three concept: TCP/IP model did not originally clearly distinguish
3
service, interface and protocol. between service, interface and protocol.
OSI model gives guarantee of Transport layer does not always guarantee the
4
reliable delivery of data packet. reliable delivery of packet.
OSI does not support internet
5 TCP/IP support.
working.

6. Strict layering. Loosely Layered.

Support connectionless and


Support only connection-oriented communication in
7. connection-oriented communication
the transport layer.
in the network layer.
8. Horizontal layer. Vertical approach.
No session layer, characteristics are provided by
9. Separate session layer.
transport layer.
No presentation layer, characteristics are provided
10. Separate presentation layer.
by application layer.

24
Review Questions

1. What do you mean by the term protocol? Also explain its key elements?

2. Give the names of the various design issues for the layers?

3. Explain the differences between the connection oriented and connectionless


services?

4. Explain in detail the OSI Model with all its seven layers.

5. Explain in detail the TCP/IP reference model?

25
Unit 3
Data Communication Concept

Unit Objectives

At the end of the unit, the student is expected to:


 understand the different components of Data Communication;
 learn the different system transmission modes;
 familiarize the different transmission media; and
 know the different network switching techniques and multiplexing.
Unit 3 Data Communication Concept

Components of Data Communication

Data communication is the exchange of data (in the form of 0s and 1s) between two
devices via some form of transmission medium (such as a wire cable). Data communication
is considered local if the communicating devices are in the same building or a similarly
restricted geographical area, and is considered remote if the devices are farther apart.

CHARACTERISTIC OF DATA COMMUNICATION


Data communication system depends on three fundamental characteristics:
1. Delivery: The system must deliver data to the correct destination. Data must be
received by the intended device or user and only by that device or user.
2. Accuracy: The system must deliver data accurately. Data have been altered in
transmission and left in corrected are unusable.
3. Timeless: The system must deliver data in a timely manner. Data delivered late are
useless. In the case of video, audio and voice data, timely delivery means delivering
data as they are produced, in the same order that they are produced and without
significant delay. This kind of delivery is called real-time transmission.

COMPONENTS OF DATA COMMUNICATION


A data communication system is made up of five components
1. Message: is the information to be communicated. It can consist of text, numbers,
pictures, sound or video or any combination of these.
2. Sender: is the device that sends the data messages. It can be a computer,
workstation, telephone handset, video camera and so on.
3. Receiver: is the device that receives the message. It can be a computer, workstation,
telephone handset, video camera and so on.

27
Unit 3 Data Communication Concept

4. Medium: is the physical path by which a message travels from sender to receiver. It
can consist of twisted pair, coaxial cable and fiber optic cable, laser or radio waves
(terrestrial or satellite microwave).
5. Protocol: is the set of rule that govern data communication. It represent an
arrangements between the communicating devices. Without a protocol, two devices
may be connected but not communicating.

Block Diagram

The key elements of the model are as follows:


 Source: This device generates the data to be transmitted; example are telephone and
personal computers
 Transmitter: Usually, data generated by a source system are not transmitted directly
in the form in which they were generated. Rather, a transmitter transforms and
decodes the information in such a way as to produce electromagnetic signals that can
be transmitted across some sort of transmission system.
 Transmission System: This can be a single transmission line or a complex network
connecting source and destination.
 Receiver: The receiver accepts the signal from the transmission system and converts
it into a form that that can be handled by destination devices.
 Destination: Takes the incoming data from the receiver.

28
Unit 3 Data Communication Concept

System Transmission Modes

Transmission model consist of three types namely Simplex, Half-duplex and Full-duplex.
1. Simplex: Transmission in one direction. One end will always transmit and the other
end will always receive. Examples are traditional keyboards and printers for simplex
devices.
2. Half-duplex: It permits transmission in both direction but at a time in only one
direction. So it is also known as “Two Way Alternate” (TWA). In other words, in half-
duplex mode, each station can both transmit and receive but not at the same time.
When one device is sending, the other device can only receive or vice versa.
3. Full-duplex: It permits transmission simultaneously in both directions. It is also known
as “Two Way Simultaneous” (TWS). In full-duplex (also called duplex), both stations
can transmit and receives simultaneously. Example of a full-duplex is the telephone
network. When two people are communicating by a telephone, both can talk and
listen at the same time.

Transmission Media

The transmission media can be classified into two types:


1. Bounded or Guided Media
2. Unbounded or Unguided Media
i. Guided Media: is a communication medium which allows the data to get guided along
it. This media have a point-to-point physical connection.
Ex: copper wires, coaxial cables and fiber optic cables
ii. Unguided Media: it is a wireless media or unguided media.
Ex: Lasers through the air

29
Unit 3 Data Communication Concept

TYPES OF WIRED MEDIA


Most commonly used networking media are:
 Twisted pair cable
 Co-axial cable
 Optical fiber cable
1. TWISTED PAIR CABLE – most common form of wiring media in data
communication.
 As a Voice Grade Medium (VGM), it is the
basis for most internal office telephone wiring.
 It consist of two identical wires wrapped
together in double helix.
Uses
 Used to transmit both analog and digital signals. For analog signals, amplifiers
are required about 5 to 6 km. For digital signals, repeaters are required for
about 2 or 3 km.
 Commonly used medium for telephone network.. TP is limited in distance,
bandwidth and data rate when two copper wires conduct electric signal in
close proximity, certain amount of EMI occurs. This type of interference is
called cross talk. Twisting the cable reduces cross talk.
Problems
 Problems can occur due to differences in the electrical characteristics
between the pair (e.g. length, resistance and capacitance). For this reason,
LAN applications will tend to use a higher-quality cable known as data grade
medium (DGM).
Advantage
 The main advantage of twisted pair cable are its simplicity and ease of
installation. It is physically flexible, has a low weight and can be easily
connected.
Disadvantage
 Transmission characteristic is not so good
 Incapable of carrying a signal over a long distance w/o use of repeaters

30
Unit 3 Data Communication Concept

 Low bandwidth capabilities make it unsuitable for broadband applications

Types of Twisted Pair Cables


(a) Unshielded twisted pair (UTP) cable
(b) Twisted pair (TP) cable

a) Unshielded Twisted Pair (UTP) Cable


 UTP is a set of twisted pairs of cable
w/in a plastic sheet. UTP is an ordinary
telephone wire this is the least
expensive of all the transmission
media commonly used for LAN, and is
easily to install.
 It is subject to external electromagnetic interference. Cat. 3 and Cat 5 UTP are
commonly used in computer networks. UTP can transfer data at 1 to 100 Mbps over a
distance of 100 meters.

 Category 5: Use in local transmission speed of 100 Mbps data transmission speed.
 Category 4: It support transmission speed up to 16 Mbps and three twist per foot.
 Category 3: It support data transmission speed up to 10 Mbps. At least three twist
per feet and used in telephone system.
 Category 2:It support data transmission speed up to 4 Mbps and suitable for voice
data transmission.
 Category 1: Mostly used in telephone system. Cat1 is suitable for voice and low
speed data communication

Characteristics of UTP
1. Transmission rate of 10-100 Mbps.
2. Less expensive than FOC and co-axial cable.
3. Maximum cable segment is 100 meters.
4. Very flexible and easy to work.
5. Uses RJ-45 connector.
6. Most susceptible to electrical interference or cross talk.

31
Unit 3 Data Communication Concept

Advantages of UTP
1. Easy to terminate.
2. Cost of installation is less.
3. High installed base.

Disadvantages of UTP
1. It is very noisy.
2. It covers less distance
3. Suffers from interference

b) SHIELDED TWISTED PAIR (STP) CABLE


 offers a protective sheathing around the
copper wire. It provides better
performance at lower data rates. They are
not commonly used in networks.
 Installation is easy. Cost is moderately
expensive. Distance is limited to 100
meters for 500 meters. It suffers from
outside interference but not as much UTP.

2. CO-AXIAL CABLE
 It consists of two concentric conductors separated by dielectric material.
 External conductor is metallic braid and
used for the purpose of shielding. Co-
axial cable may contain one or more
co-axial pairs.
 The wire mesh protects the wire from
EMI. It is often called shield.
 A tough plastic jacket forms the cover
of the cover providing insulation and
protection.
 This cable was initially developed as the backbone of analog telephone networks
where a single telephone cable would be used to carry more than 10,000 voice
channels at a time.

32
Unit 3 Data Communication Concept

 Digital transmission systems using co-axial cable were developed in 1970’s and the
range is 8.5 Mb/s to 565 Mb/s.
 Popularly used in cable TV system. The existing co-axial cable system has a range
from 54 MHz to 500 MHz.
 Other important application is cable modem, with the cable modem termination
system (CMTS).
 One more application is Ethernet LAN using co-axial cable. The co-axial cable is
used for its large bandwidth and high noise immunity.

Characteristics of Co-axial Cable


 Types are 75* and 50* impedance are available.
 Excellent in noise immunity.
 Large bandwidth and low losses.
 10 Mbps is the transmission rate.
 Max. cable length = 185 meters and for thick = 500 meters.
 Flexible and easy to work with thin net.
 Ethernet designation to 10 base 2 (thin net) or 10 base 5 (thick net).
 Less expensive than FOC but more expensive than twisted pair.
 Good resistance to electrical interference.

Advantages of Co-axial Cable


 Used both transmission i.e. analog and digital transmission.
 Higher bandwidth
 Easy to handle and relatively inexpensive compared to FOC
 Uses for longer distance at high rate.
 Excellent noise immunity.

Disadvantages of Co-axial Cable


 Distance is limited.
 Number of node connection is limited.
 Proper connection and termination is must.
Co-axial cable Standards
The co-axial cable are categorized by their RG ratings (Radio Government).

33
Unit 3 Data Communication Concept

Category Impedance Application

RG – 11 50* Thick
RG – 58 50* Ethernet
RG – 59 75* Thin Ethernet
Cable TV

Applications of Co-axial Cables


1. Analog and telephone network.
2. Digital telephone network.
3. Cable TV.
4. Traditional Ethernet LAN’s
5. Digital transmission.
6. Thick and thin Ethernet.

3. Optical Fiber Cable


 Consist of inner glass core surrounded by glass cladding, which has a lower refractive
index.
 Digital signals are transmitted in the form of intensity-modulated light signal, which
trapped in the glass core.
 Light is launched into the fiber using a
light source such as a LED or laser.
 It is detected on the other side using a
photo detector such as a phototransistor.
 It costlier than the two other types but
they have many advantages over the
other two.
Problems
The major problems with optical fibers are associated with installation. They quite fragile and
may need special care to make them sufficiently robust for an office environment.

34
Unit 3 Data Communication Concept

Characteristics of Fiber Optic Cable


1. Transmission rate of 100 Mbps.
2. Not affected by the electrical interference.
3. Most expensive cable.
4. FOC support cable length of 2 km or more.
5. It supports voice, video and data.
6. It provides most secured data.
7. Commonly used as backbones between building and token ring networks.
8. Not very flexible, difficult to work.

Advantages of Optical Fibers


1. Small size and light weight – The size (diameter) of the optical fibers is very small.
Therefore, a large number of optical fibers can fit into a cable of small diameter.
2. Easy availability and low cost – material used in manufacturing FOC is silica glass.
3. No electrical or EMI – transmission takes place in the form of light rays, the signal is
not affected to any interference.
4. Large Bandwidth – light rays have very high frequency in GHz range. This allows
transmission of more number of channels. Therefore the information carrying capacity
of an FOC is much higher than co-axial.

Disadvantages of Fiber Systems


1. High Initial Cost – Initial installation or setting up cost is very high compared to all
other systems.
2. Maintenance and repairing cost – Maintenance and repairing of FOC system is not
only difficult but expensive also.

35
Unit 3 Data Communication Concept

Wireless Media

 It does not use electrical or optical conductor. In most cases the earth’s atmosphere
is the physical path for the data.
 Wireless media is used when distance or obstruction make cable media difficult.

Types
 Radio waves
 Microwave
 Infrared

1. Radio Transmission
 Have frequencies between 10 kilohertz (kHz) and 1 giga hertz (GHz). It includes the
following types:
i. Short Wave
ii. Very high Frequency (VHF) television and FM radio
iii. Ultra High Frequency (UHF) radio and television

Very Low Frequency


 Very low frequency (VLF) waves are propagated as surface waves, usually through
air but sometimes through seawater. It does not suffer from much attenuation in
transmission but are susceptible to the high levels of atmospheric noise (heat and
electricity) active at low altitudes. VLF is mostly used in long-range radio navigation
and for submarine communications.
 Long-range navigation = 3 KHz to 30 KHz

Low Frequency
 Low Frequency (LF) also propagated as surface waves. It is also used for long-range
radio navigation locators. Attenuation is greater during daytime, when absorption of
waves by natural obstacle increases.
 Long-range navigation = 30 KHz to 300 KHz

36
Unit 3 Data Communication Concept

Middle Frequency
 Middle Frequency (MF) signals are propagated in the troposphere. These frequencies
are absorbed by the ionosphere. Absorption increases during daytime, but most MF
transmission rely on-line of – sight antennas to increase control to avoid absorption
problem altogether.
 Uses: AM radio, radio direction finding (RDF) and emergency frequencies

High Frequency
 High Frequency (HF) signals use iono-spheric propagation.
 Uses for HF signals includes amateur radio (ham radio), citizens band (CB) radio,
international broadcasting, military communication, long distance aircraft and ship
communication, telephone, telegraph and facsimile.

Very High Frequency


 Very High Frequency (VHF) wave use line of sight propagation.
 Uses include VHF television; FM radio, aircraft, and aircraft navigational aid.

Ultra High Frequency


 Ultra High Frequency (UHF) waves always use line of sight propagation.
 Uses include UHF television, Mobile Telephone, Cellular Radio, Paging and
Microwave links.
 Note that microwave communications begins at 1 GHz in the UHF band and
continues into the SHF and EHF bands.

Super High Frequency


 Super High Frequency (SHF) waves are transmitted using mostly line of sight and
some propagation.
 Uses include terrestrial and satellite microwave and radar communication.

Extremely High Frequency


 Extremely High Frequency (EHF) waves use space propagation.
 Uses are predominantly scientific and include radar; satellite and experimental
communication

37
Unit 3 Data Communication Concept

Some uses of the important applications of radio transmission systems are:


 Cellular communication
 Wireless LAN
 Point to point and Point to multipoint radio systems
 Satellite Communication

Microwaves
1. Basically electromagnetic waves having frequencies between 1 and 300 GHz.
2. Unidirectional
3. Propagation is line of sight propagation.
4. Microwave band is wide (299 GHz) so it’s possible to allot wider sub-bands.
Therefore it can support high data rates.

Microwave Transmission System


2 Types
 Terrestrial
 Satellite

Terrestrial Microwave
 Does not follow the curvature of the earth therefore it requires line of sight
transmission and reception equipment. Height allows the signal to travel farther
without being stopped by the curvature of the planet and raises the signal above
many surface obstacles such as, low hills and tall buildings that would block the
transmission.
 Microwave signals propagate in one direction a time, which means that two
frequencies are necessary for two-way communication such as telephone
conversation. Each frequency requires its own transmitter and receiver. Today, both
pieces of equipment usually combined in a single piece equipment called transceiver.
 Repeater. To increase the distance served by terrestrial microwave, a system
repeaters can be installed with each antenna. A repeater may broadcast the
regenerated signal either at the original frequency or at a new frequency, depending
on the system.

38
Unit 3 Data Communication Concept

Satellite Communication
 Satellite transmission is much like line-of-sight microwave transmission in which one
of the stations is a satellite orbiting the earth. Satellite microwave can provide
transmission capability to and from any location on earth, no matter how remote.

Advantages
i. Installation of towers and associated equipment’s is cheaper than laying down a
cable of 100 km length.
ii. Less maintenance as compared to cable
iii. Repeaters can be used. So effect of noise is reduced.
iv. No adverse effects such as cable breakage etc.
v. Due to the use of highly directional antenna, links do not make any interference with
other communication systems.
vi. Size of transmitter and receiver reduces due to the use of high frequency.

Disadvantage
i. Signal strength at the receiving antenna reduces to multipath reception.
ii. Transmission will be affected by the thunderstorms, and other atmospheric
phenomenon.

Applications of Microwave Communication


i. Mobile telephone network uses microwave communication.
ii. Wireless LAN.
iii. Point to point communication between stations.
iv. Line-of-sight communications.

INFRARED TRANSMISSION
a) Electromagnetic waves having frequencies from 300 GHz to 400 THz (wave length
from 1mm to 770nm ).
b) Uses line-of-sight propagation.
c) It cannot penetrate walls.
d) Can be used with a much reduced interference and possibility of reuse of the same
frequency band in different rooms.

39
Unit 3 Data Communication Concept

e) Wavelength is from 850 nm and 900nm, where the receivers with god sensitivity are
available.
f) Advantage of infrared communication is the very large bandwidth which is available
for use but has not been exploited to its full extent.
g) Major disadvantage is that sun generates radiation on the infrared band that can
cause a lot of interference with the IR communication.
h) The infrared can be used in the development of the very high speed wireless LAN’s in
the future.

Applications of Infrared Transmission


1. Control of Home Appliances e.g. TV, VCR, VCD and DVD players.
2. Indoor wireless LAN
3. Communication between electronic gadgets in the house such keyboards, mouse,
printer, scanners

Application of Infrared
1. Very High data rates can be supported due to very high bandwidth (approximately
400 THz)
2. For communication of electronic gadget in the house.

40
Unit 3 Data Communication Concept

Introduction to Switching

Is an important technique that can determine how connections are made and how data
movement is handled in wide area network (WAN).

Three switching technique


1. Circuit switching
2. Message switching
3. Packet switching

Circuit Switching

Complete physical connection between two computers is established and then data are
transmitted from the source computer to the destination computer. The important property of
this switching technique is to set up and end-to-end path (connection) between computers
before any data can be sent.

Advantages
1. Dedicated transmission channel the computer establish a guaranteed data rate.
2. No delay of data flow.
3. Low variance end to end delay.

Disadvantages
1. Since the connection dedicated, it cannot be used to transmit any other data even if
the channel is free.
2. Dedicated channel require more bandwidth.
3. Its takes long time to establish connection.
4. Connection setup and tear down introduces extra overhead.
5. Other users cannot use circuit even if free of traffic.

41
Unit 3 Data Communication Concept

Message Switching

The source computer sends data for the message to the switching office first, which stores
the data in its buffer. It then looks for a free link to another switching office and then sends
the data to this office. This process is continued until the data are delivered to the destination
complete. Also known as “store and forward”.

Advantages
1. Provides efficient traffic management by assigning priorities to the message to be
switched.
2. Reduces network traffic congestion.
3. Network devices share the data channels.
4. Provides asynchronous communication across time zone.

Disadvantages
1. Storing and forwarding introduces delay hence cannot be used for real time
applications like voice and video.
2. Require a large storing capacity since it has to store message unless a free path is
available.

Packet Switching

 A fixed size of packet which can be transmitted across the network is specified.
 In message switching, data packets are stored in on the disk while in packet
switching, all packets are stored in main memory.
 This improves the performance as the cross time (time taken to access data packet)
is reduced, thus, throughput (measure of performance of the network) is improved.

Advantages
1. Increases the bandwidth of the network by allowing many devices to communicate
through the same network channel.
2. A switching node can route the packet as and when required.
3. Transmission delay is reduced.

42
Unit 3 Data Communication Concept

Disadvantages
1. Require large amount of RAM to handle quantities of packets.
2. Switching node requires processing power because the packet switching protocols
are more complex.
3. Packets are more easily lost on their routes; hence sequence numbers are required
to identify the missing packets.

Multiplexing

 A multiplexer is a device that allows single communication channel to carry


simultaneously data transmitted from many terminals.
 Multiplexer (MUX), combines them into a single stream (many to one).
 Demultiplexer (DEMUX) which separates the back into its component transmission
(one to many) directs them to their intended receiving devices.

Benefits in Multiplexing
 Combines the transmission and facilitates the transmission via single line thus saving
the money.
 Less number of physical lines and less number of modems are required.
 Combines many low speed transmissions into high speed transmission.

Methods in Multiplexing
a) Frequency Division Multiplexing (FDM)
b) Time Division Multiplexing (TDM)

Frequency Division Multiplexing (FDM)


 Divides available transmission band into separate frequencies to establish multiple
channels w/in transmission medium. Each frequency belongs to a separate terminal
that is used to transmit data of that terminal.
 It is also used in cable TV system, where single cable carries multiple video signals.

Time Division Multiplexing (TDM)


 Time Division Multiplexing (TDM) – digital process that can be applied when the
data of the transmission medium is greater than the data rate required by sending

43
Unit 3 Data Communication Concept

and receiving devices. In such case, multiple transmission can occupy a single link by
sub dividing them and inter-leaving the portions.
 TDM divides the channel into short time slots of fixed intervals. The various terminals
time share the channel.

Concepts of Modem (Modulator/Demodulator)

 A modem is a device used as an interface between a computer and a


communication channel or line. It modulates digital signals from input/output devices
into analog signals for transmission. At the receiving terminal another modem
demodulates the transmitted signal back to digital. Thus modem can act both as
modulator and demodulator. Modems produced by AT&T are trade named Data
sets.
 A 25 pin connector or RS – 232 C interface is a common standard that is used to
connect a computer to a modem.

Working of Modems
 Modem converts digital signal to A/F (Audio Frequency) tones which are in the
frequency range that the telephone lines can transmit and also it can convert
transmitted tones back to digital information. After the power is turned on in DTE
(Data Terminal Equipment) and DCE (Data Communication Equipment), the terminal
runs for self check, it asserts the data terminal ready (DTR) signal to tell the modem
that it is ready. When modem is powered up and ready to transmit data, the modem
will assert the data set ready (DSR) signal to the terminal. Under the manual or
terminal control the modem dials up the computer on the other end. If the computer
is available it will send back a specified tone.

 Now when the terminal has a character ready to sent, it will assert request to send
(RTS) signal to the modem. The modem then assert its carrier detect (CD) signal to
the terminal to indicate that it has established contact with the computer. When the
modem is fully ready to transmit data it asserts clear-to-send (CTS) signal back to
the terminal. The terminal then sends serial data characters to the modem. When
the terminal has sent all the characters it needs to make its RTS signal high. This
causes the MODEM to un asserts its CTS signal and stop transmitting.

44
Unit 3 Data Communication Concept

Modulation Technique
 Amplitude Shift Keying (ASK)
 Frequency Shift Keying (FSK)
 Phase Shift Keying (PSK)

1. Amplitude Shift Keying (ASK) – or amplitude modulation, we do not alter the


frequency or phase of the carrier signal. However, we specify different amplitudes, i.e.
shift the amplitude values, to represent a binary 1 and a binary 0 illustrates this. It is
clearly a coding scheme.

2. Frequency Shift Keying (FSK) – a frequency modulation technique, we keep the


amplitude and the phase of the carrier signals unaltered. We assign a certain
frequency f1 to denote 1 and f2 to denote 0. The frequency of the carrier signal is
varied to represent binary 1 (using f1) and binary 0 (using f2). Both f1 and f2 must be in
the bandwidth of the channel i.e. between 0 and 400 Hz which can be easily carried
by the telephone wires.

3. Phase Shift Keying (PSK) – we keep the amplitude and the frequency of the carrier
signal unchanged and only changes the phase to denote 0s and 1s. In PSK, we
change the timing of the carrier wave abruptly to encode data. After a phase shift
happens, the carrier wave still continues to oscillate, but it immediately jumps to a
new point in a cycle. The phase of the signal during each bit duration is constant and
its value depends on whether it is 0 or 1.

Circuit Switching

When a terminal wants to communicate with another terminal, this technique creates
a fixed-bandwidth channel, called a circuit, between the source and the destination. There’s
a need of pre-specified route from which data will travel and no other data will permitted.
When two nodes communicate with each other over a dedicated communication path, it
is called circuit switching. In simple words, in circuit switching, to transfer data circuit must
established so that the data transfer can take place.
 Source first establishes a connection (circuit) to the destination.

45
Unit 3 Data Communication Concept

 Source sends the data over the circuit.


o e connection is torn down.
 Example: telephone network
o Early versions: Human-mediated switches.
o Early versions: End-to-end electrical connection!
o Today: Virtual circuits or lambda switching
 What about many connections?
o Many wires (e.g., those big 200-pair cables you sometimes see)
 A more practical approach is to multiplex multiple circuits over a single “fast” wire.
o Can benefit from improvements in technology
o Fewer wires
 Circuits have some very attractive properties.
o Fast and simple data transfer, once the circuit has been established
o Predictable performance since the circuit provides isolation from other users
o E.g. guaranteed bandwidth
 But it also has some shortcomings.
o How about bursty traffic
 circuit will be idle for
significant periods of
time
 How about users with
different bandwidth
needs
 do they have to use multiple circuits
 Alternative: packet switching.

Packet Switching

 It is a technique that uses to send data from one terminal to another. The bits and
bytes that make up the data are assembled in individual packets. Protocol information
is sent along with the packets to alert the receiving hardware that data is coming and
how the data packets are to be assembled.

46
Unit 3 Data Communication Concept

 Break information in small chunks:


packets
 Each packet forwarded independently
o Must add metadata to each
packet
 Allows statistical multiplexing
o High utilization
o Very flexible
o Fairness not automatic
o Highly variable queuing delays
o Different paths for each packet
 Source sends information as self-contained packets that have an address.
o Source may have to break up single message in multiple
 Each packet travels independently to the destination host.
o Routers and switches use the address in the packet to determine how to
forward the packets
 Analogy: a letter in surface mail.

Multiplexing

It is a technique by which different analog and digital streams of transmission can be


simultaneously processed over a shared link. It divides the high capacity medium into low
capacity logical medium which is then shared by different streams.

Types of multiplexing
 Frequency Division Multiplexing
 Wavelength-division Multiplexing

47
Unit 3 Data Communication Concept

 Time Division Multiplexing


 Code Division Multiplexing

Frequency Division Multiplexing

It is an analog multiplexing technique that combines analog signals. It is applied


when the bandwidth of a link is greater than the combined bandwidths of the signals to be
transmitted. Signals generated by each sending device modulate different carrier
frequencies. These modulated signals are then combined into a single composite signal that
can be transported by the link.

Wavelength Division Multiplexing

It is conceptually the same as Frequency Division Multiplexing but with Wavelength-


division Multiplexing it is designed to use high data rate capability of fiber-optic cable. The
frequencies are very high.

48
Unit 3 Data Communication Concept

STDM

 Synchronous time-division multiplexing


o Divide time into equal-sized quanta, round robin
o Illusion of direct link for switched circuit net
o But wastes capacity if not enough flows
o Also doesn’t degrade gracefully when more flows than slots

Time Division Multiplexing

It is a digital multiplexing technique for combining several low rate channels into one
high rate one. It is a digital process that allows several connections to share the high
bandwidth of a link. Each connection occupies a portion of time in the link. Digital data from
different sources are combined into one timeshared link.

Code Division Multiplexing

Multiple data signals can be transmitted over a single frequency. It allows its users to
full bandwidth and transmits signals all the time using a unique Code.

49
Review Questions

1. What are the different characteristics of data communication?

2. Explain the main components of data communication.

3. What is transmission media?

4. What are two types of transmission media?

5. Compare between wired and wireless media.

50
Unit 4
TCP/IP

Unit Objectives

At the end of the unit, the student is expected to:


 know the different applications of TCP/IP;
 understand the concepts of a Five-layer TCP/IP Model; and
 differentiate the characteristics of a TCP/IP Model.
Unit 4 TCP/IP

History of TCP/IP

 The TCP/IP protocol was deployed to the ARPANET network with some persuasions.
Not all sites were preparing to convert over their protocols, so Cerf, Jon Postel, and
the TCP/IP team turned off the NCP network channel on the ARPANET IMP’s for a
full day in mid1982, so that only sites using TCP/IP could still operate. To emphasize
the point, they disabled NCP again for two days later that fall. The full switchover to
TCP/IP was performed on January 1, 1983, without too many problems although a
few recalcitrant sites were done as long as three months while they retrofitted their
system.
 In 1984, the US department of Defense made TCP/IP the standard for all military
computers networking, which gave it a high profile and stable funding.
 In 1985, Dan Lynch and the Internet Architecture Board held a three-day workshop
on TCP/IP for the computer industry, which was attended by about 50 researchers
and 250 vendor representatives.
 In September 1988, Lynch organized an Internet convention that later became the
Interop trade show. Fifty companies were invited to the first show to demonstrated
interoperation of their TCP/IP packages, and five thousand engineers attended. The
interoperability demonstration was successful, validating TCP/IP’s open design and
showing that the network standard could became a multi-vendor product.
 Internet protocols were first developed in the mid-1970’s, when the Defense
Advanced Research Projects Agency (DARPA) became interested in establishing a
packet-switched network that would facilitate communication between dissimilar
computer systems at research institutions. With the goal of heterogeneous
connectivity in mined, DARPA funded research by Stanford University and Bolt,
Beranek, and Newman (BBN). The result of this development effort was the internet
protocol suite, completed in the late 1970’s.
 TCP/IP later was included with Berkeley Software Distribution(BSD) UNIX and has
since become the foundation on which the Internet and the World Wide Web (WWW)
are Based.
 Is the basic communication language or protocol of the Internet.
 Can be used as a communications protocol in a private network (either an intranet or
an extranet)

52
Unit 4 TCP/IP

 When you are set up with direct access to the Internet, your computer is provided with
a copy of the TCP/IP program just as every other computer that you may send
messages to or get information from also has a copy of TCP/IP.

Application Layers for TCP/IP

Higher Layer
 is the TCP
 Endures the safe delivery at the destination & the assembling of all the packets to get
the complete lot of data at the destination computers.

Lower Layer
 is the IP
 Each gateway computer on the network checks this address to see where to forward
messages. Even though some packets from the same message are routed differently
than others, they’ll be reassembled at the destination.

THE FIVE-LAYER TCP/IP MODEL

 Application Layer
 Transport Layer
 Network Layer
 Data Link Layer
 Physical Layer

53
Unit 4 TCP/IP

APPLICATION LAYER
 There are many applications in the TCP/IP suite of protocols. Some of the most
useful ones are for sending mail (SMTP), transferring files (FTP), and displaying web
pages (HTTP).
 Another important application layer protocol is the Domain Name System (DNS).
Domain names are significant because they guide users to where they want to go on
the Internet.
A. Domain Name System

 Name servers contain information on some segment of the DNS and make that
information available to clients who are called RESOLVERS.
 Every TCP/IP implementation has a software routine called NAME RESOLVERS
(NR) to request a DNS lookup from a name server (NS).

TWO TYPES OF A NAME RESOLUTION:

 Recursive resolution- NR asks NS to resolve names for which it does not have an
authoritative answer by querying other name servers.
 Iterative resolution- NR asks NS to provide the IP address of a NS that can provide
an authoritative solution.

THE TRANSPORT LAYER

 There are two primary transport layer protocols:


 Transmission Control Protocol (TCP) and User Datagram Protocol (UDP). They
provide end-end communication services for applications.

54
Unit 4 TCP/IP

A. User Datagram Protocol (UDP)


This is the minimal service over IP, adding only optional check summing of data and
multiplexing by port numbers. UDP is often used by application that needs multicast or
broadcast delivery, services not offered by TCP.
Examples of applications
 Network Time Protocol (NTP)
 Sun/s Network File System (NFS)
 Simple Network Management Protocol (SNMP)
 Each UDP message is called a user datagram.

 Source port address: is the address of the application program that has created the
message.
 Destination port address: is the address of the application program that will receive
the message.
 Total Length: defines the total length of the user datagram in bytes.
 Checksum: is a 16-bit field used in error detection.

B. Transmission Control Protocol (TCP)


 Is connection-oriented transport service
 Provides end-to-end reliability, re-sequencing streams of data w/c are treated in
bytes. The delivery of data in the proper order is guaranteed.
 Can detect errors or lost data and trigger retransmission until the data is received,
complete and w/out errors.
 TCP Connection Socket
 A TCP connection socket is done with a 3-way handshake between a client and a
server. The following is a simplified explanation of this process.

55
Unit 4 TCP/IP

o The client asks for a connection by sending a TCP segment with a SYN
control bit set.
o The server responds with its own SYN segment that includes identifying
information that was sent by the client in the initial SYN segment.
o The client acknowledges the server’s SYN segment.
TCP Header
 Every TCP segment has a header. The header comprises all necessary information
or reliable, complete delivery of data. Among other things, such as IP addresses, the
header contains the following fields:
o Sequence Number. This 32-bit number contains either the sequence number
of the first byte of data in this particular segment or the Initial Sequence
Number (ISN) that identifies the first byte of data that will be sent for this
particular connection. The sequence number s used to ensure the data is
reassembled in the proper order before being passed to an application
protocol.
o Acknowledgement Number.This 32-bit number is the other host sequence
number +1 of the last successfully received byte of data. It is the sequence
number of the next expected byte of data.

THE NETWORK LAYER


A. Address Resolution Protocol (ARP)
 Is used to translate virtual addresses to physical ones. The network hardware
does not understand the software maintained IP addresses.

3 ADDRESSING STRATEGIES
1. Table lookup
2. Translation performed by a mathematical function.

 ARP employs the third strategy, message exchange. ARP defines a request and a
response. Only the computer whose IP address matches the request send a
response.
3. Message exchange

56
Unit 4 TCP/IP

DATA LINK
 The main task of the data link layer is to take a raw transmission facility and transform
it into a line that appears free of transmission errors in the network layer. The data
link layer should provide error control between adjacent nodes.
 Network Frames
o The basic unit of a physical network is a frame.

THE PHYSICAL NETWORK


 Is a collection of computers, communication devices, wiring, etc. that communicate
directly with one another.
IP Addresses
a) Unique, 32-bit addresses.
b) IP Addresses are referenced by humans via dotted decimal (or dotted quad) notation,
one number per 8 bits (1 octet or byte), ex. 128.456.7.4
c) NETMASK
i. Determines which proportion od IP address is the network address and which
is the host address.
d) An IP address bit is a network address bit if the corresponding net mask bit is 1.
e) An IP address bit is a host address bit if the corresponding net mask bit is 0.
Netmask example is shown below:

57
Unit 4 TCP/IP

CHARACTERISTICS OF TCP/IP
1. Connectionless. Signal transport path’s aren’t required to be continuously available.
2. Adaptive Routing Diversity. Transport paths and other network characteristics are
not fixed but learned and capable of being altered at any time.
3. Arbitrary Host Support. Any up to 4 billion connected host computers can arbitrarily
communicate with any others.
4. Arbitrary Service Support. Any service up to nearly 64 thousand can be
concurrently supported and delivered between or among any connected computer
hosts.
 Another aspect of TCP/IP is a SLOW START, which takes place whenever a
connection is established. Slow-start is an artificial limit on the number of data
segments that can be sent before acknowledgement of those segments is received.
Slow-start is designed to limit network congestion. When a connection over Ethernet
is established, regardless of the receiver’s window size, a 4KB transmission can take
up to 3-4 RTT due to slow-start.
 A TCP/IP optimization called the Nagle Algorithm can also limit data transfer speed
on a connection. The Nagle Algorithm is designed to reduce protocol overhead for
applications that send small amounts of data, such as Telnet, which sends a single
character at a time. Rather than immediately send a packet with lots of header and
little data, the stack waits for more data from the application, or an acknowledgement,
before proceeding.
 When a TCP connection is closed, connection resources at the node that initiated the
close are put into a wait state, called TIME-WAIT. To guard data corruption if
duplicate packets linger in the network. These ensure both ends are finished with the
connection. This can cause duplication of resources required per-connection, such as
RAM and ports, when application open and close connections frequently.

INTERNET PROTOCOL (IP)


 The Internet Protocol is an:
o Unreliable (delivery not guaranteed)
o Connectionless (packets independent of one another)
o Best-Effort (attempt to deliver packets) packet delivery mechanism.

58
Unit 4 TCP/IP

DATAGRAM
 Basic unit (up to 65, 535 bytes)
 Packets in IP Layer
 Variable length packets with two parts namely the header and the data

IP Provides …
 Addressing: IP headers contain 32 bit addresses, which identify the ending and
receiving hosts. These addresses are used by intermediate routers to select a path
though the network for the packet.
 Fragmentation: IP packets maybe split, or fragmented into smaller packets. This
permits a large packet to travel across a network which can only handle smaller
packets. IP fragments and reassembles packets transparently.
 Packet Time Out: Each IP packets contain a time to live (TTL) field, which is
decremented every time a routers handle a packet. If TTL reaches zero, the packet is
discarded, preventing packets from running in circles forever and flooding a network.

Type of Service: IP supports traffic prioritization by allowing packets to be labeled with an


abstract type of service.

59
Review Questions

1. What do you understand by TCP/IP?

2. Explain the TCP/IP model with its layer.

3. Explain the application layers for TCP/IP.

4. Describe the characteristics of TCP/IP.

5. What do you mean by the term internet protocol?

60
Unit 5
IPV6

Unit Objectives

At the end of the unit, the student is expected to:


 define what is IPv6;
 differentiate characteristics between IPv6 and IPv4;
 understand the principles of Network Address Translation; and
 know the layout of an IPv6.
Unit 5 IPV6

IP Address Shortage

 Classful IPv4 address structure is very wasteful


Solutions:
 Dynamic IP allocation using DHCP (IP leasing)
o DHCP means (Dynamic host configuration protocol)
 Classless IP addresses (CIDR)
o CIDR(Classless Inter-Domain Routing) is a method for allocating IP
addresses and routing Internet Protocol packets.
 IP address translation (sharing IP address)
 Final solution however, lies in a new protocol

Network Address Translation- The network address translation (NAT) is the process of
modifying IP address information in IPv4 headers while in transit across a traffic routing
device.

 NAT Types: Basic NAT


o Basic NAT or one-to-one NAT is the simplest type of NAT provides a one-to-
one translation of IP addresses.
o Basic NAT - Once an internal address (iAddr:iPort) is mapped to an external
address (eAddr:ePort), any packets from iAddr:iPort will be sent through
eAddr:ePort.

62
Unit 5 IPV6

Explanation:
The NAT firewall shares 192.168.0 to host A, host B and host C While 192.168.1 shares to
host D, host E, host F, and host G.

 NAT Types: Many to One NAT


o Many local IP addresses are mapped to a single external IP. So to the outside
nodes, the whole network looks like a single host.
o To deliver the reply packets to their correct destinations, port numbers are
also translated.
 NAT Types: Restricted-Cone NAT
o Once an internal address (iAddr:iPort) is mapped to an external address
(eAddr:ePort), any packets from iAddr:iPort will be sent through eAddr:ePort.
o An external host (hAddr:hPort) can send packets to iAddr:iPort by sending
packets to eAddr:ePort only if iAddr:iPort has previously sent a packet to
hAddr:hPort.
 NAT Types: Symmetric NAT - Each request from the same internal IP address and
port to a specific destination IP address and port is mapped to a unique external
source IP address and port.

63
Unit 5 IPV6

o If the same internal host sends a packet even with the same source address
and port but to a different destination, a different mapping is used.
o Only an external host that receives a packet from an internal host can send a
packet back.

Explanation:
Each request from the same internal IP address and port to a specific destination IP address
and port is mapped to a unique external source IP address and port; if the same internal host
sends a packet even with the same source address and port but to a different destination, a
different mapping is used.

Only an external host that receives a packet from an internal host can send a packet back.

64
Unit 5 IPV6

IPv6 (Internet Protocol version 6)


 Motivation in comparison with IPv4
o Larger address space
o Network-layer security
o Simplified processing by routers
o Options extensibility

IPv6 Addresses
 IPv6 addresses are 16 byte integers (128 bits) used for uniquely identifying a host
on a network, and thus permitting the routing of IP packets between hosts.
 An IPv6 address is represented as eight groups of four hexadecimal digits, each
group representing 16 bits (two octets).
 The groups are separated by colons (:)
 Example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
 Leading zeroes in a group may be omitted.

 For example the following address 2001:0db8:85a3:0000:0000:8a2e:0370:7334


 May be written as:2001:db8:85a3:0:0:8a2e:370:7334
 One or more consecutive groups of zero value may be replaced with a single empty
group using two consecutive colons (::).
 Example:2001:0db8:85a3:0000:0000:8a2e:0370:7334 is written as
2001:db8:85a3::8a2e:370:7334

 IPv6 uses Classless Inter-Domain Routing (CIDR) to separate network ID from Host
ID in an IP address
 A network is denoted by the first address in the block (ending in all zeroes), a slash
(/), and a decimal value equal to the size in bits of the prefix.
 For example, the network written as 2001:db8:1234::/48 has 48 bits in network ID

65
Unit 5 IPV6

IPv6 Frame Layout

An IPv6 packet has two parts: a header and payload.


 Version(4 bits)
 Traffic Class (8 bits)
 Flow label(16 bits)
 Next Header(8 bits)
 Payload Length(16 bits)
 Hop Limit(8 bits)
 Source Address(128 bits)
 Destination Address(128 bits)
IPv6 Options

66
Unit 5 IPV6

 Extension headers carry optional Internet layer information, and are placed between
the fixed header and the upper-layer protocol header. The headers form a chain,
using the Next Header fields. The Next Header field in the fixed header indicates the
type of the first extension header; the Next Header field of the last extension header
indicates the type of the upper-layer protocol header in the payload of the packet.
 All extension headers are a multiple of 8 octets in size; some extension headers
require internal padding to meet this requirement.
 Hop-by-hop options and destination options- The Hop-by-Hop Options extension
header needs to be examined by all nodes on the packet's path, including sending
and receiving nodes. The Destination Options extension header need to be examined
by the destination node(s) only. The extension headers are both at least 8 octets in
size; if more options are present than will fit in that space, blocks of 8 octets are
added to the header repeatedly—containing options and padding—until all options
are represented.

 Next Header (8 bits) -Specifies the type of the next header


 Hdr Ext Len (8 bits) -Length of this header in 8-octet units, not including the first 8
octets

 Options (variable) -Contains one or more options, and optional padding fields to
align options and to make the total header length a multiple of 8 octets. Options are
TLV-coded

67
Review Questions

1. What is an IPv6?

2. What is different characteristics of an IPv6 and IPv4?

3. What are the principles of Network Address Translation?

4. What is the layout of an IPv6?

68
Unit 6
The 7 OSI Model

Unit Objectives

At the end of the unit, the student is expected to:


 know the seven different OSI Model;
 familiarize the seven different OSI Model; and
 differentiate the seven different OSI Model.
Unit 6 The 7 OSI Model

Open Systems Interconnection model (OSI)

 This model, published in 1984, was developed by the International Organization for
Standardization (ISO) in an effort to standardize the diverse network systems.
 Defines a networking framework to implement protocols in seven layers.

Layer 1: Physical Layer


 The lowest layer of the OSI model that specifies how data is processed into bits and
physically transferred over medium, such as cables. It's responsible for activating and
maintaining the physical link between systems.
Example of a Physical Layer
o Repeater - A repeater is used to regenerate signals when you need to exceed
the cable length allowed by the Physical Layer standard or when you need to
redistribute a signal from one cable onto two or more cables.

Layer 2: Data LinkLayer


 Provides the link for how data, packaged into frames is communicated through
hardware to be transported across a medium.
 It communicates with network cards, manages physical layer communications
between connecting systems and handles error notification.
 Divided into two sub layers:

70
Unit 6 The 7 OSI Model

a. Media Access Control (MAC) layer- responsible for controlling how


computers in the network gain access to data and permission to transmit it.
b. Logical Link Control (LLC) layer - control error checking and packet
synchronization.
 Example: Point-to-point Protocol (PPP) is a data link protocol used to establish a
direct connection between two nodes.

Layer 3: Network Layer


 Responsible for determining addressing on the network, determining the routes that
information will take on its journey, and managing network traffic congestion. Data at
this level is packaged into packets.
Functions:
1. Logical Addressing - Logical addresses are created and used by Network Layer
protocols, such as IP (Internet Protocol) or IPX. The Network Layer protocol
translates logical addresses to MAC addresses.
2. Routing - finding an appropriate path through the network. Routing comes into
play when a computer on one network needs to send a packet to a computer on
another network.
 EXAMPLES: AppleTalk DDP, IP, IPX.

Layer 4: Transport Layer


 Responsible for breaking the data into segments, establishing an end-to-end logical
connection between machines, and providing for error handling.
 The main purpose of this layer is to ensure that packets move over the network
reliably and without errors by establishing connections between network devices,
acknowledging the receipt of packets, and resending packets that aren't received or
are corrupted when they arrive.
 EXAMPLE: Transmission Control Protocol (TCP)

Layer 5: Session Layer


 Determines how two devices establish, maintain and manage a connection - how
they talk to each other. These connections are called sessions.

71
Unit 6 The 7 OSI Model

 Sessions are instances of communication and data exchange. A session must be


established before data can be transmitted over the network.
 EXAMPLES:NFS, NetBios names, RPC, SQL

Layer 6: Presentation Layer


 Concerned with how data is converted and formatted for data transfer. Examples of
format conversions include ASCII text for documents and .gif and JPG for images.
 This layer performs code conversion, data translation, compression and encryption.
 It is sometimes called the Syntax Layer.
 EXAMPLES: encryption, ASCII, EBCDIC, TIFF, GIF, PICT, JPEG, MPEG, MIDI.

Layer 7: Application Layer


 This layer supports application and end-user processes, such as an e-mail program,
and other services running on a network, such as a print server or another computers'
application.
 EXAMPLES: WWW browsers, NFS, SNMP, Telnet, HTTP, FTP

72
Review Questions

1. What are the seven OSI Model?

2. Give the functions of each of the seven OSI Model.

3. What are the difference between each of the seven different OSI Model?

73
Unit 7
Collision Free Protocols

Unit Objectives

At the end of the unit, the student is expected to:


 define what is a collision free protocol;
 familiarize the different IEEE LAN Standards; and
 understand the features of the different IEEE LAN Standards.
Unit 7 Collision Free Protocol

Collision Free Protocols

Collisions in any system adversely affect the overall system performance. This can be
observed especially when the distance between stations is large and the packet length is
short.
Two Collision free protocols

1. A bit-map protocol– let there N stations each having unique address 0 to N-1 and
contention period is equally divided into N slots. The station that wants to transmit is
broadcast on the channel, before the actual transmission, also called as reservation
protocol.

2. Binary count down– used to overcome the overhead 1 bit per station.

 Contention Systems - multiple users share a common channel in a way that can
lead to conflicts.
 Limited Contention Protocols – combines the best properties of the contention and
collision-free protocols.

75
Unit 7 Collision Free Protocol

WDMA (Wavelength Division Multiple Access)


Protocols are used in fiber optic LANS, where diff. conversations at diff. wavelength
takes place simultaneously.

Two Channels:
 Narrow Channel – provided as a control channel to signal the station.
 Wide Channel – the station can output data frames.

WDMA protocol supports three different classes of traffic:


 Constant data rate connection oriented traffic
 Variable data rate connection oriented traffic
 Data gram traffic

76
Unit 7 Collision Free Protocol

MACA (Multiple Access with Collision Avoidance)


 Protocol is based on IEEE 802.11 wireless standards. The basic idea behind it is, the
sender to stimulate the receiver into outputting a short frame. So stations nearby can
detect this transmission & avoid transmitting themselves for duration of upcoming
data frames.

GSM (Global System for Mobile)


 Which is one of the leading digital cellular systems.
 GSM uses narrowband TDMA (Time Division Multiple Access) which allows eight
simultaneous calls on the same radio frequency.
 GSM is also the basis for Integrated Digital Enhanced Network (IDEN), a popular
system introduced by Motorola & used by Nextel.

SIM Card (SIM-Subscriber Identity Module)


 A chip card, the size of a first-class postage stamp.
 Is actually a tiny computer chip that gives a cellular device its unique phone number.
 It has memory (for data & applications), a processor & the ability to interact with the
user.

CDPD (Cellular Digital Packet Data)


o consists of three kinds of stations:
o Mobile Hosts - are the users’ portable computers.
o Base Stations - are the transmitters that talk to the mobile hosts.
o Base Interface Station - are special nodes that interface all the base stations
in a CDPD provider’s area to a standard (fixed) router for further transmission
through the internet or other WAN.

77
Unit 7 Collision Free Protocol

Three Kinds of Interface in CDPD:


a) E-INTERFACE (External to the CDPD Provider)
 connects a CDPD area to a fixed network.
 to allow CDPD to connect to a variety of network.
b) I-INTERFACE (Internal to the CDPD Provider)
 connects two CDPD areas together.
 to allow users to roam between areas.
c) A-INTERFACE (Air Interface)
 between the base station and mobile hosts.

CDMA (Code Division Multiple Access)


 Is a multiplexing technique used with spread spectrum.

78
Unit 7 Collision Free Protocol

IEEE LAN Standards

The Institute of Electrical and Electronics Engineers (IEEE) publish several widely
accepted LAN-recommended standards. These standards are very important because they
encourage the use of common approaches for LAN protocols and interfaces.

Ethernet and IEEE 802.3 LAN Standards


The Ethernet LAN protocol was developed in the early 1970s by Robert Metcalfe
and his colleagues working at Xerox as a means of connecting workstations. In the early
1980s DEC, Inlet, and Xerox completed the “DIX” Ethernet standard for a 10Mbps LAN
based on a coaxial cable transmission. This standard formed the basis for the IEEE 802.3
LAN standard that was first issued in 1985 for “thick” coaxial cable. The Ethernet and IEEE
802.3 standards differ primarily in the definition of one header field. The IEEE 802.3 standard
has been revised and expanded every few years. Specifications have been issued for
operation using “thin” coaxial cable, twisted pair wires, and single-mode and multimode
optical fiber. Higher-speed versions are approved in 1995 (100Mbps Fast Ethernet) and in
1999(1Gbps Gigabit Ethernet), and in 2002 (10Gbps Ethernet).

Fast Ethernet
The IEEE 802.3u standard was approved in 1995 to provide Ethernet LANs operating
at 100Mbps. The systems that operate under this standard are known as Fast Ethernet. To
maintain compatibility with existing standards, the frame format, interfaces, and procedures
have been kept the same.

Gigabit Ethernet
The IEEE 802.3z Gigabit Ethernet standard was completed in 1998 and established
an Ethernet LAN that increased the transmission speed over that of Fast Ethernet by a factor
of 10. The goal was to define new physical layers but to again retain the frame structure and
procedures of the 10 Mbps IEEE 802.3 standard.

10 Gigabit Ethernet
Is defined only for full-duplex mode providing a point-to-point Ethernet connectivity
service with the CSMA/CD algorithm disabled.

79
Unit 7 Collision Free Protocol

Two Types of Physical Layer:


 LAN PHY - primarily intended to support existing Ethernet LAN applications
 WAN PHY - allows 10 Gigabit Ethernet terminals to be connected through
SONET OC-192c equipment.

TOKEN BUS (IEEE 802.4)


A linear or the tree shaped cable through which different stations are interconnected.

Features of IEEE 802.4


 It uses highly reliable cable television equipment.
 It is more deterministic than 802.3.
 It can handle short minimum frame.
 It also supports priorities.
 Token bus has excellent throughput and efficiency at high load.
 Token bus supports good bandwidth to high priority traffic.

TOKEN RING (IEEE 802.5)


 A special bit pattern, called the token, circulates around the ring whenever all stations
are idle.
 Each station is connected to the ring through a Ring Interface Unit (RIU).

Features of IEEE 802.5


 It uses point-to-point connection.
 Throughput and efficiency at high load are excellent.
 Token ring support short frames.

80
Unit 7 Collision Free Protocol

FDDI (Fiber Distributed Data Interface)


 Is a LAN protocol using optical fiber as a medium, with 100 mbps data rate.
 Consist of a primary ring for data transmission and a secondary ring that assists
failure situations.

DQDB (Distributed Queue Dual Bus)


 Uses two unidirectional buses. The buses travel in opposite direction.
 Operates in the physical layer and the MAC sub layer.
 Can also be implemented as a ring topology.
 Is also used by the SMDs for media access.

DBQB provides for two of access:


 Once access pre-arbitrated service – guarantees a certain amount of “bandwidth”.
This access is useful for isochronous services such as voice & video.
 Second access queued arbitrated service – provide access based on demand. It
designed to accommodate burst services such as data transmission.

81
Review Questions

1. Define WDMA. Also mention its classes.

2. Explain MACA with neat diagram.

3. What is GSM? Explain in brief with its uses.

4. What do you understand by SIM card?

5. Explain the three interfaces in CDPD.

82
Unit 8
Wireless

Unit Objectives

At the end of the unit, the student is expected to:


 define what is wireless networking;
 understand the concept of a wireless modulation and encoding; and
 familiarize what is RTS/CTS and its benefits and drawbacks.
Unit 8 Wireless

Wireless

Today: wireless networking truly ubiquitous


 802.11, 3G, (4G), WiMAX, Bluetooth, RFID,
 Sensor networks, Internet of things
 Some new computers have no wired networking
 4B cellphone subscribers vs. 1B computers

What’s behind the scenes?


Wireless is different
 Signals sent by the sender don’t always reach the receiver intact
o Varies with space: attenuation, multipath
o Varies with time: conditions change, interference, mobility
 Distributed: sender doesn’t know what happens at receiver
 Wireless medium is inherently shared
o No easy way out with switches

Implications
 Different mechanisms needed
o Physical layer
 Different knobs: antennas, transmission power, encodings
o Link Layer
 Distributed medium access protocols
 Topology awareness
o Network, Transport Layers
 Routing, forwarding
o Most advances do not abstract away the physical and link layers

Physical Layer
 Specifies physical medium
o Ethernet: Category 5 cable, 8 wires, twisted pair, R45 jack
o WiFi wireless: 2.4GHz
 Specifies the signal
o 100BASE-TX: NRZI + MLT-3 encoding

84
Unit 8 Wireless

o 802.11b: binary and quadrature phase shi keying (BPSK/QPSK)


 Specifies the bits
o 100BASE-TX: 4B5B encoding
o 802.11b @ 1-2Mbps: Barker code (1bit -> 11chips)

What can happen to signals?


 Attenuation
o Signal power attenuates by ~r2 factor for omni-directional antennas in free
space
o Exponent depends on type and placement of antennas
 < 2 for directional antennas
 2 if antennas are close to the ground

Interference
 External sources
o E.g., 2.4GHz unlicensed ISM band
o 802.11
o 802.15.4 (ZigBee), 802.15.1 (Bluetooth)
o 2.4GHz phones
o Microwave ovens
 Internal sources
o Nodes in the same network/protocol can (and do) interfere

85
Unit 8 Wireless

 Multipath
o Self-interference (destructive)
Multipath

 May cause attenuation, destructive interference

Signal (+ Interference) to Noise Ratio

Remember Shannon?
C–Capacity
 Shannon-Hartley B–maximum frequency of signal
M–number of discrete “levels” per symbol
C = 2B log2(M) bits/sec (1)
 But noise ruins your party
C = B log2(1 + S/N) bits/sec (2)
(1) ≤ (2) => M ≤ √1 + S/N
 Noise limits your ability to distinguish levels
o For a $xed modulation, increases Bit Error Rate (BER)
 Could make signal stronger
o Uses more energy
o Increases interference to other nodes

Wireless Modulation/Encoding
 More complex than wired
 Modulation, Encoding, Frequency
o Frequency: number of symbols per second
o Modulation: number of chips per symbol

86
Unit 8 Wireless

 E.g., different phase, frequency, amplitude


o Encoding: number of chips per bit (to counter errors)

 Example
o 802.11b, 1Msps: 11Mcps, DBPSK, Barker Code
 1 chip per symbol, 11 chips/bit
o 802.11b, 2Msps: 11Mcps, DQPSK, Barker Code
 2 chips per symbol, 11 chips/bit
Link Layer
 Medium Access Control
o Should give 100% if one user
o Should be efficient and fair if more users
 Ethernet uses CSMA/CD
o Can we use CD here?
 No Collision happens at the receiver
 Protocols try to avoid collision in the first place

Hidden Terminals
 A can hear B and C
 B and C can’t hear each other
 They both interfere at A
 B is a hidden terminal to C, and
vice-versa
 Carrier sense at sender is
useless
Exposed Terminals
 A transmits to B
 C hears the transmission, backs off,
even though D would hear C
 C is an exposed terminal to A’s
transmission
 Why is it still useful for C to do CS?

87
Unit 8 Wireless

Key points
 No global view of collision
o Different receivers hear different senders
o Different senders reach different receivers
 Collisions happen at the receiver
 Goals of a MAC protocol
o Detect if receiver can hear sender
o Tell senders who might interfere with receiver to shut up

Simple MAC: CSMA/CA


 Maintain a waiting counter c
 For each time channel is free, c—
 Transmit when c = 0
 When a collision is inferred, retransmit with exponential backoff
o Use lack of ACK from receiver to infer collision
o Collisions are expensive: only full packet transmissions
 How would we get ACKs if we didn’t do carrier sense?

RTS/CTS
 Idea: transmitter can check availability of channel at receiver
 Before every transmission
o Sender sends an RTS (Request-to-Send)
o Contains length of data (in time units)
o Receiver sends a CTS (Clear-to-Send)
o Sender sends data
o Receiver sends ACK after transmission
 If you don’t hear a CTS, assume collision
 If you hear a CTS for someone else, shut up

88
Unit 8 Wireless

Benefits of RTS/CTS
 Solves hidden terminal problem
 Does it?
o Control frames can still collide
o E.g., can cause CTS to be lost
o In practice: reduces hidden terminal problem on data packets

Drawbacks of RTS/CTS
 Overhead is too large for small packets
o 3 packets per packet: RTS/CTS/Data (4-22% for 802.11b)
 RTS still goes through CSMA: can be lost
 CTS loss causes lengthy retries
 33% of IP packets are TCP ACKs
 In practice, WiFi doesn’t use RTS/CTS

Other MAC Strategies


 Time Division Multiplexing (TDMA)
o Central controller allocates a time slot for each sender
o May be inefficient when not everyone sending
 Frequency Division
o Multiplexing two networks on same space
o Nodes with two radios (think graph coloring)
o Different frequency for upload and download

89
Unit 8 Wireless

ISM Band Channels

Network Layer
 What about the network topology?
 Almost everything you use is single hop!
o 802.11 in infrastructure mode
o Bluetooth
o Cellular networks
o WiMax (Some 4G networks)
 Why?
o Really hard to make multihop wireless efficient

WiFi Distribution System


 802.11 typically works in infrastructure mode
o Access points – $xed nodes on wired network
 Distribution system connects Aps
o Typically connect to the same Ethernet, use learning bridge to route to nodes’
MAC addresses
 Association
o Node negotiates with AP to get access
o Security negotiated as well (WEP, WPA, etc)
o Passive or active

90
Unit 8 Wireless

Wireless Multi-Hop Networks


 Some networks are multihop, though!
o Ad-hoc networks for emergency areas
o Vehicular Networks
o Sensor Networks
 E.g., infrastructure monitoring
o Multihop networking to share Internet access
 E.g. Meraki
Many Challenges
 Routing
o Link estimation
 Multihop throughput dropoff

The Routing Problem

 Find a route from S to D


 Topology can be very dynamic

Routing
 Routing in ad-hoc networks has had a lot of research
o General problem: any-to-any routing
o Simplified versions: any-to-one (base station), one-to any (dissemination)
 DV too brittle: inconsistencies can cause loops

91
Unit 8 Wireless

DSDV
 Destination Sequenced Distance Vector
 Charles Perkins (1994)
 Avoid loops by using sequence numbers
 Each destination increments own sequence number

o Only use EVEN numbers


o A node selects a new parent if
 Newer sequence number or
 Same sequence number and better route
 If disconnected, a node increments destination sequence number to next ODD
number!
o No loops (only transient loops)
o Slow: on some changes, need to wait for root

Many Others
 DSR, AODV: on-demand
 Geographic routing: use nodes’ physical location and do greedy routing
 Virtual coordinates: derive coordinates from topology, use greedy routing
 Tree-based routing with on-demand shortcuts

Routing Metrics
 How to choose between routes?
 Hopcount is a poor metric!
o Paths with few hops may use long, marginal links
o Must find a balance
 All links do local retransmissions
 Idea: use expected transmissions over a link as its cost!
o ETX = 1/(PRR) (Packet Reception Rate)
o Variation: ETT, takes data rate into account

92
Unit 8 Wireless

Multihop Throughput
 Only every third node can transmit!
o Assuming a node can talk to its immediate neighbors
(1) Nodes can’t send and receive at the same time
(2) Third hop transmission prevents second hop from receiving
(3) Worse if you are doing link-local ACKs
 In TCP, problem is worse as data and ACK packets contend for the channel!
 Not to mention multiple crossing & flows!
 Sometimes you can’t (or shouldn’t) hide that you are on wireless!
 Three examples of relaxing the layering abstraction

Examples of Breaking Abstractions


 TCP over wireless
o Packet losses have a strong impact on TCP performance
o Snoop TCP: hide retransmissions from TCP end-points
o Distinguish congestion from wireless losses

4B Link Estimator

 Uses information from Physical, Routing, and


 Forwarding layers to help estimate link quality

93
Unit 8 Wireless

Stanford’s Full Duplex Wireless


 Status quo: nodes can’t transmit and receive at the same time
o Why? TX energy much stronger than RX energy
 Key insight:

 With other tricks, 92% of optimal bandwidth

Summary
 Wireless presents many challenges
 Across all layers
 Encoding/Modulation (we’re doing pretty well here)
o Distributed multiple access problem
o Multihop
 Most current protocols sufficient, given over provisioning (good enough syndrome)
 Other challenges
o Smooth handoff between technologies (3G, Wifi, 4G…)
o Low-cost, long range wireless for developing regions
o Energy usage

94
Review Questions

1. What is wireless networking?

2. What are the different concepts of wireless modulation and encoding?

3. What are the benefits and drawbacks of an RTS/CTS?

95
Unit 9
Routing

Unit Objectives

At the end of the unit, the student is expected to:


 define what is routing in computer networks;
 differentiate distance vector and link state routing;
 understand the concept of routing of mobile hosts; and
 explain the shortest path routing.
Unit 9 Routing

Routing

 The process of moving packets across a network from one host to a another
 The process of selecting best pathsin a network
 Confused with bridging, which performs a similar function
 Enable data to pass from one computer to another
 Performed many kinds of networks, including the telephone network (circuit
switching), electronic data networks (such as the Internet), and transportation
networks

WHAT IS FLOODING?
 Simple routing technique in computer network
 A Denial of Service (DOS)is designed to bring a network or service down by flooding
it with large amounts of traffic
 Distribute routing information updates quickly to every node in a large network

DISTANCE VECTOR ROUTING


 Is a simple routing protocol used in packet-switched networks that utilizes distance to
decide the bestpacket forwarding path
 Distance: Identifies how far it is to the destination network and is based on a metric
such as the hop count, cost, bandwidth, delay, and more
 Vector: Specifies the direction of the next-hop router or exit interface to reach the
destination

EXAMPLE:
*RIP (routing information protocol)
*IGRP (interior gateway routing
protocol) and
*EIGRP (enhanced IGRP).

97
Unit 9 Routing

LINK-STATE ROUTING
 Used in packet switching networks for computer communications

Open Shortest Path First (OSPF) is a routing protocol for Internet Protocol (IP)
networks. It uses a link state routing algorithm and falls into the group of interior
routing protocols, operating within a single autonomous system (AS).

Intermediate System to Intermediate System (IS-IS) designed to move information


efficiently within a computer network, a group of physically connected computers or
similar devices. It accomplishes this by determining the best route.
 Each router keeps track of its incident links
o Whether the link is up or down
o The cost on the link
 Each router broadcasts the link state
o To give every router a
complete view of the graph
 Each router runs Dijkstra’s algorithm
o To compute the shortest paths
o and construct the forwarding
table
 Example protocols
o Open Shortest Path First
(OSPF)
o Intermediate System –
Intermediate System (IS-IS)

HIERARCHICAL ROUTING
 Reduce memory requirements of simulations over very large topologies
o topology is broken down into several layers of hierarchy
o If A wants to send packets to any router in region 2 (D, E, F or G), it sends
them to B, and so on. As you can see, in this type of routing, the tables can be

98
Unit 9 Routing

summarized, so network efficiency improves. The above example shows two-level


hierarchical routing.

Routing For Mobile Hosts

 To connect to different networks at different points of time

99
Unit 9 Routing

Broadcast Routing
 Refers to a method of transferring a message to all recipients simultaneously
 Perform high level operation
 Avoid flooding duplicates
 Sending updates to all receivers

Multicast Routing
 One-to-many or many-to-many distribution
 Used to distribute data (for example, audio/video streaming broadcasts)
 Send a single copy of data to a single multicast address

100
Unit 9 Routing

Flow Based Routing


 Consider the amount of traffic in the network before deciding on which outgoing line
to place the packet
 Increase routing efficiency
 Internal BGP (Border Gateway Protocol)
 External BGP
(Border Gateway Protocol)

Shortest Path Routing


 Shortest-path routing algorithms have been widely used in today's computer
networks.
 In such algorithms, each node attempts to route packets to their destinations over
paths of minimum distance and updates the distances periodically to adapt
topological and traffic changes.

There are two main classes:


 Distance-vector algorithm and
 Link-state algorithm
In a distance-vector algorithm, each node maintains a routing table containing the
distance of the shortest path to every destination in the network.

101
Review Questions

1. What do you mean by the term routing?

2. Contrast and compare distance vector routing with link state routing?

3. Illustrate the concept of routing for mobile hosts?

4. Explain flow-based routing.

5. Explain shortest path routing.

102
Unit 10
DNS, HTTP

Unit Objectives

At the end of the unit, the student is expected to:


 familiarize sample network applications in the application layer;
 define and understand what is DNS; and
 define and understand what is http.
Unit 10 DNS, HTTP

Application Layer

 In computer network, the application layer is used to name the protocols and methods
designed for process-to-process communications across an Internet Protocol (IP)
computer network.
 Application layer protocols use the underlying transport layer protocols to establish
host-to-host connections.

Sample Network Applications


 Remote login: Telnet
 File transfer: FTP
 Electronic mail:
o SMTP
o IMAP
o POP
 Support services:
o DNS
o RARP
o BOOTP
o SNMP

Domain Name Service


 Domain names are used in various networking contexts and application-specific
naming and addressing purposes.
 In general, a domain name represents an Internet Protocol (IP) resource, such as a
personal computer used to access the Internet, a server computer hosting a web site,
or the web site itself or any other service communicated via the Internet.
 Most prominently, it translates easily memorized domain names to the numerical IP
addresses needed for the purpose of locating computer services and devices
worldwide.

104
Unit 10 DNS, HTTP

Uniform Resource Locator (URL)


 Abbreviation of Uniform Resource Locator (URL) it is the global address of
documents and other resources on the World Wide Web.
 URL strings consist of three parts (substrings):
1. network protocol
2. host name or address
3. file or resource location

Domain name syntax


 A domain name consists of one or more parts, technically called labels, that are
conventionally concatenated, and delimited by dots.
 The right-most label conveys the top-level domain; for example, the domain name
www.example.com belongs to the top-level domain com
 The hierarchy of domains descends from the right to the left label in the name; each
label to the left specifies a subdivision, or sub-domain of the domain to the right.
 A hostname is a domain name that has at least one associated IP address.

Top-level domains
 The country code top-level domains (ccTLD) based on the two-character territory
codes of country abbreviations.
 In addition, a group of seven generic top-level domains (gTLD) was implemented
which represented a set of categories of names and multi-organizations.
 These were the domains gov, edu, com, mil, org, net, and int.

105
Unit 10 DNS, HTTP

Domain Names Hierarchy

Resource Records
 When a resolver gives a domain name to DNS, what it gets back are the resource
records associated with that name.
 A resource record is a five-tuple.
o Domain_name
o Time_to_live
o Class (For Internet information, it is always IN)
o Type
o Value

Resource Record Types

106
Unit 10 DNS, HTTP

Example Resource Records

DNS Queries

 When a resolver has a query about a domain name, it passes the query to one of the
local name servers.
 If the domain being sought falls under the same branch, it returns an authoritative
resource records.
 An authoritative record is one that comes from the authority that manages the record
and is thus always correct.
 Authoritative records are in contrast to cached records, which may be out of date.
(Non-authoritative)

Recursive and Non-Recursive Queries


 If the local name server has no information about the domain name it may ask other
name servers.
 To do so, it sends a UDP packet to the other server given in its database
 This method is known as a recursive query.
 The second possibility is when a query fails, the name of the next server along the
line is returned.
 Some servers do not implement recursive queries and always return the name of the
next server to try. (Non-recursive method)

107
Unit 10 DNS, HTTP

World Wide Web


 The World Wide Web is an architectural framework for accessing linked documents
spread out over millions of machines all over the Internet.
 The Web (also known as WWW) began in 1989 at CERN, the European center for
nuclear research.

Architectural Overview
 The Web consists of a vast, worldwide collection of documents or web pages.
 Users can follow a link by clicking on it
 The idea of having one page point to another is called hypertext

Client-Server Model of WWW

Client Side
 The browser determines the URL (by seeing what was selected).
 The browser asks DNS for the IP address of www.itu.org.
 DNS replies with the corresponding IP ( 156.106.192.32)
 The browser makes a TCP connection to port 80 on 156.106.192.32.
 It then sends over a request asking for file /home/index.html.
 The www.itu.org server sends the file /home/index.html.
 The TCP connection is released.

108
Unit 10 DNS, HTTP

 The browser displays all the text in /home/index.html.


 The browser fetches and displays all images in this file.

Server Side
 Accept a TCP connection from a client (a browser).
 Get the name of the file requested.
 Get the file (from disk).
 Return the file to the client.
 Release the TCP connection.

109
Unit 10 DNS, HTTP

HyperText Transfer Protocol (HTTP)

 The Hypertext Transfer Protocol (HTTP) is an application protocol for distributed


information systems.
 HTTP is the foundation of data communication for the World Wide Web.
 HTTP functions as a request-response protocol in the client-server computing model.

HTTP Commands
 Http Request Message

Example HTTP
Command

GET /somedir/page.html
HTTP/1.1
Connection: close
User-agent: Mozilla/4.0
Accept: text/html,
image/gif, image/jpeg
Accept-language:en

HTTP Response Message


Example Response
HTTP/1.1 200 OK
Connection: close
Date: Thu, 06 Aug 1998
12:00:15 GMT
Server: Apache/1.3.0
(Unix)
Last-Modified: Mon, 22 Jun
1998 09:23:24 GMT
Content-Length: 6821
Content-Type: text/html
Data

110
Unit 10 DNS, HTTP

Status Codes

 200 OK: Request succeeded and the information is returned in the response.
 301 Moved Permanently: Requested object has been permanently moved; new URL
is specified in Location: header of the response message. The client software will
automatically retrieve the new URL.
 400 Bad Request: A generic error code indicating that the request could not be
understood by the server.
 404 Not Found: The requested document does not exist on this server
 505 HTTP Version Not Supported: The request HTTP protocol version is not
supported by the server.

Conditional GET
GET /fruit/kiwi.gif HTTP/1.0
User-agent: Mozilla/4.0
Accept: text/html, image/gif, image/jpeg
If-modified-since: Mon, 22 Jun 2010 09:23:24
========================================
HTTP/1.0 304 Not Modified
Date: Wed, 19 Aug 2010 15:39:29
Server: Apache/1.3.0 (Unix)
(empty entity body)

111
Review Questions

1. What are the network applications used in the application layer?

2. What is DNS and its applications?

3. What is http and its applications?

112
Unit 11
Application Layer

Unit Objectives

At the end of the unit, the student is expected to:


 define what is network security;
 differentiate the terms authentication and non-repudiation;
 understand the concept of SNMP; and
 know what is cryptography and its dimension.
Unit 11 Application Layer

Network Security

Security is a broad topic and covers a multitude of sins. In its simplest form, it is
concerned with making sure that nosy people cannot read, or worse yet modify messages
intended for other recipients. It is concerned with people trying to access remote services
that they are not authorized to use. It also deals with how to tell whether that message
purportedly from IRS saying: “Pay by Friday or else” is really from the IRS or from the Mafia.
Security also deals with the problems of legitimate messages being captured and replayed
and with people trying to deny that they sent certain messages.
Most security problems are intentionally caused by malicious people trying to gain
some benefit or harm someone. A few of the most common perpetrators are listed. It should
be clear from this list that making a network secure involves a lot more than just keeping it
free of programming errors. It involves outsmarting often intelligent, dedicated and
sometimes well-funded adversaries. It should also be clear that measures that will stop
casual adversaries will have little impact on the serious ones.

Adversary Goal
Student To have fun snooping on people’s email
Hacker To test out someone’s security system; steal data
Sales rep To claim to represent all of Europe, not just Andorra
Businessman To discover a competitor’s strategic marketing plan
Ex-employee To get revenge for being fired
Accountant To embezzle money from a company
Stockbroker To deny a promise made to a customer by e-mail
Conman To steal credit card numbers for sale
Spy To learn an enemy’s military strength
Terrorist To steal germ warfare secrets.

Network security problems can be divided roughly into four intertwined areas:
secrecy, authentication, non repudiation, and in integrity control. Secrecy has to dowith
keeping information out of the hands of unauthorized users. This is what usually comes to
mind when people think about network security. Authentication deals with determining

114
Unit 11 Application Layer

whom you are talking to before revealing sensitive information or entering into a business
deal. Non repudiation deals with signatures: How do you prove that your customer really
placed an electronic order for ten million left-handed doohickeys at 89 cents each when he
later claims the price was 69 cents? Finally, how you can be sure that message you received
was really the sent and not something that malicious adversary modified in transit or
concocted?
In the data link layer, packets on a point-to-point line can be encoded as they leave
one machine and decoded as they enter another. All details can be handled in the data link
layer, with higher layers oblivious to what is going on. This solution breaks down when
packets have to transverse multiple routers, however, because packets have to be decrypted
at each router, leaving them vulnerable to attacks from within the router. Also, it does not
allow some sessions to be protected (e.g., those involving on-line purchases by credit card)
and others not. Nevertheless, link encryption, as this method is called, can be added to any
network easily and is often useful.
In the network layer, firewalls can be installed to packets in or keep packets out. In
the transport layer, entire connections can be encrypted, end to end, that is process to
process. Although these solutions help with secrecy issues and many people are working
hard to improve them, none of them solve the authentication or non repudiation problem in a
sufficiently general way. To tackle these problems, the solutions must be in the application
layer.

Security Attacks
“Security attack is any action that comprises the security of “information” owned by an
organization.”
ATTACK: An attempted cryptanalysis is termed as an attack.

Classification of Security Attacks


The security attacks are classified into two categories:
 Active Attacks
 Passive Attacks

115
Unit 11 Application Layer

1. Active Attacks
 An active attack attempts to alter the system resources or affect their operation.
 Active attack involves some modification of the data stream or the creation of a false
stream.

Active Attacks are subdivided into four categories:


 Masquerade. A masquerade attack takes place when one entity pretends to be a
different entity. It usually includes one of the other forms of active attacks.
 Replay.It involves the passive capture of the data unit and its subsequent
retransmission to produce an unauthorized effect.
 Modification of messages. It simply means that some portion of the original message
is altered, or that messages are delayed or reordered to produce an unauthorized
effect.
 Denial of Services. This prevents or inhibits the normal use or management of
communication facilities. This attack may have a specific target: an entity may
suppress all messages directed to a particular destination.

2. Passive Attacks
 “A passive attack attempts to learn or make use of information from the system but
does not affect system resources.”

Passive attacks are subdivided into two categories.


 Release of message contents. The release of message contents is easily understood.
A telephone conversation, an e-mail message and a transferred file may contain
sensitive or confidential information.
 Traffic analysis. Supposed we had a way masking the contents of a message or other
information traffic so that opponents, even if they captured the message, could not
extract the information from the message. The common technique for masking
contents is encryption.

Note: Passive attacks are very difficult to detect because they do not involve any alteration
of the data, these can be prevented by means of encryption. Active attacks are quite difficult
to prevent absolutely because to do so requires physical protection of all communication
facilities and paths at all times.

116
Unit 11 Application Layer

Security Services
“Security services are the services that enhance the security of the data processing
system and the information transfers of an organization”.
The services are intended to counter the security attacks and they make use of one
or more security mechanisms to provide the service.

Classification of Security Services


1. Authentication. If the message sent by the sender is accurately received by the receiver
than it is termed as authentication. Authentication is managed on the network by differ
ways:
a) By sending their PIN number,
b) By using their ATM card, electronic key etc.
c) By sending finger prints, DNA patterns etc.

Two specific authentication services are defined in the standard:


a) Peer entity authentication. Used in association with a logical connection to provide
confidence in the identity of the entities connected.
b) Data-origin authentication. In a connectionless transfer, provides assurance that the
source of received data is as acclaimed.

2. Data Integrity. If a received communication is exactly what the sender party has send
(i.e., Contain no modification, insertion, deletion or replay etc.) then it is said to have
integrity. Therefore, the parties must be able to assure themselves that the message they
received is exactly what the other party has sent.

3. Non-Repudiation. It prevents either sender or receiver from denying a transmitted


message. Thus when a message is sent, the receiver can prove that the message was in
fact sent by the alleged sender. Similarly when a message is received, the sender can prove
that the message was in fact received by the alleged receiver.
a) Non-repudiation, origin. Proof that the message was sent by the specified party.
b) Non-repudiation, destination. Proof that the message was received by the specified
party.

117
Unit 11 Application Layer

4. Access Control.The prevention of unauthorized use of a resource i.e., this service controls
who can have access to a resource, under what conditions access can occur and what those
accessing the resources are allowed to do.
Access Control is the ability to limit to limit and control the access to host systems and
applications via communication links.

5. Data Confidentiality. Data confidentiality is a service which provides protection of data


from unauthorized disclosure. Confidentiality is the protection of transmitted data from
passive attacks.

Four categories of data confidentiality are:


a) Connection confidentiality. The protection of all user data on a connection.
b) Connection confidentiality. The protectionof all user data in a single data block.
c) Selective-Field confidentiality. The confidentiality of selected fields within the user
data on a connection or in a single data block.
d) Traffic Flow confidentiality. The protection of the information that might be derived
from observation of traffic flows, i.e., the attacker should not be able to observe the
source and destination frequency, length or other characteristics of the traffic.

Security Mechanisms
Security mechanisms are that which are designed to detect, prevent or recover from a
security attack.
Mechanisms are divided into those that are implemented in a specific protocol layer
and to those that are not specific to any particular protocol layer or security service.

a) Specific Security Mechanisms


May be incorporated into the appropriate protocol layer in order to provide some of the
OSI security services.
i. Encipherment. The use of mathematical algorithms to transform data into a form
that is not readily intelligible. The transformation and subsequent recovery of the
data depend on an algorithm and zero or more encryption keys.
ii. Digital Signature. Data appended to, or a cryptography transformation of, a data
unit that allows a recipient of the data unit to prove the source and integrity of the
data unit and protect against forgery. (for example, by the recipient).

118
Unit 11 Application Layer

iii. Access Control. A variety of mechanisms that enforce access rights to resources.
iv. Data Integrity. A variety of mechanisms used to assure the integrity of a data unit
or stream of data units.
v. Authentication Exchange. A mechanism intended to ensure the identity of an
entity by means of information exchange.
vi. Traffic Padding. The insertion of bits into gaps in a data stream to frustrate traffic
analysis attempts.
vii. Routing Control. Enables selection of particular physically secure routes for
certain data and allows routing changes, especially when a breach of security is
suspected.
viii. Notarization. The use of a trusted third party to assure certain properties of a data
exchange.

b) Pervasive Security Mechanisms


Mechanisms that are not specific to any particular OSI security service or protocol layer.

i. Trusted Functionality. That which is perceived to be correct with respect to some


criteria (for example, as established by a security policy).
ii. Security Label. The marking bound to a resource (which may be a data unit) that
names of designates the security attributes of that resource.
iii. Event Detection. Detection of security-relevant events.
iv. Security Audit Trail. Data collected and potentially used to facilitate a security
audit, which is an independent review and examination of system records and
activities.
v. Security Recovery. Deal with requests from mechanisms, such as event handling
and management functions, and takes recovery actions.

Authentication

Authentication plays a very important role in PPP because PPP is designed for use
over dial-up links where verification of user identity is necessary. Authentication means
validating the identity of a user who needs to access a set of resources. PPP has created
two protocols for authentication: Password Authentication Protocol (PAP) and Challenge
Handshake Authentication Protocol (CHAP).

119
Unit 11 Application Layer

PAP
The Password Authentication Protocol (PAP) is a simple authentication with a two-step
process:
 The user who wants to access a system sends authentication identification (usually
the user name) and a password.
 The system checks the validity of the identification and password and either accepts
or denies connection.

PAP Packets
PAP packets are encapsulated in a PPP frame. What distinguishes a PAP packet
from other packets is the value of the protocol field, C02316. There are three PAP packets:
authenticate-request, authenticate-ack, and authenticate-nak. The first packet is used by the
user to send the user name and password. The second is used by the system to allow
access. The third is used by the system to deny access.

CHAP
The Challenge Handshake Authentication Protocol (CHAP) is a three way
handshaking authentication protocol that provides more security than PAP. In this method,
the password is kept secret: it is never sent on line.
 The system sends to the user a challenge packet containing a challenge value,
usually a few bytes.
 The user applies a predefined function that takes the challenge value and the user’s
own password and creates a result. The user sends the result in the response packet
to the system.
 The system does the same. It applies the same function to the password of the user
(known to the system) and the challenge value to create a result. If the result created
is the same as the result sent in the response packet, access is granted; otherwise, it
is denied.
CHAP is more secure than PAP, especially if the system continuously changes the
challenge value. Even if the intruder learns the challenge value and the result, the password
is still secret.

120
Unit 11 Application Layer

CHAP PACKETS
CHAP packets are encapsulated in the PPP frame. What distinguishes a CHAP
packet from other packets is the value of the protocol field, C22316. There are four CHAP
packets: challenge, response, success, and failure. The first packet is used by the system to
send the challenge value. The second is used by the user to return the result of the
calculation. The third is used by the system to allow access to the system. The fourth is used
by the system to deny access to the system.

Simple Network Management Protocol (SNMP)

The Simple Network Management Protocol (SNMP) is framework for managing


devices in an internet using the TCP/IP protocol suite. It provides a set of fundamental
operations for monitoring and maintaining an internet.

Concept of SNMP
SNMP uses the concept of manager and agent. That is, a manager, usually a host,
controls and monitors a set of agents, usually routers.
SNMP is an application-level protocol in which a few manager stations control a set of
agents. The protocol is designed at the application level so that it can monitor devices made
by different manufacturers and installed on different physical networks. In other words,
SNMP frees management tasks from both the physical characteristics of the managed
devices and the underlying networking technology. It can be used in a heterogeneous
internet made of different LANs and WANs connected by routers or gateways made by
different manufacturers.

Managers and Agents


A management station, called a manager, is a host that runs the SNMP client
program. A managed station, called an agent, is a router (or a host) that runs SNMP server
program. Management is achieved through simple interaction between a manager and an
agent.
The agent keeps performance information in a database. The manager has access to
the values in the database. For example, a router can store in appropriate variables the

121
Unit 11 Application Layer

number of packets received and forwarded. The manager can fetch and compare the values
of these two variables to see if the router is congested or not.
The manager can also make the router perform certain actions. For example, a router
periodically checks the value of a reboot counter to see when it should reboot itself. It
reboots itself, for example, if the value of the counter is 0. The manager can use this feature
to reboot the agent remotely at any time. It simply sends a packet to force a 0 value in the
counter.
Agents can also contribute to the management process. The server program running
on the agent can check the environment and, if it notices something unusual, it can send a
warning message (called a trap) to the manager.
In other words, management with SNMP is based on three basic ideas:

1. A manager checks an agent by requesting information that reflects behaviour of the


agent.
2. A manager forces an agent to perform a task by resetting values in the agent
database.
3. An agent contributes to the management process by warning the manager of an
unusual situation.

Components of SNMP
Management in the Internet is achieved not only through the SNMP protocol but also
by using other protocols that cooperate with SNMP. At top level, management is
accomplished with two other protocols: structure of management information (SMI) and
management information base (MIB). SNMP uses the services provided by these two
protocols to do its job. In other words, management is a team effort by SMI, MIB, and SNMP.
All three use other protocols such as abstract syntax notation 1 (ASN .1) and basic encoding
rules (BER).

122
Unit 11 Application Layer

SMI
The Structure of Management Information (SMI) is a component used in network
management. Its functions are to name objects; to define the type of data that can be stored
in an object, and to show how to encode data for transmission over the network.

MIB
The Management Information Base (MIB) is the second component used in network
management. Each agent has its own MIB, which is a collection of all the objects that the
manager can manage. The objects in the MIB are categorized under eight different groups:
system, interface, address translation, IP, ICMP, TCP, UDP, and EGP.

SNMP
Simple Network Management Protocol (SNMP) defines five messages: Get
Request, GetNextRequest, SetRequest, GetResponse, and Trap.

GetRequest
The GetRequest message is sent from the manager (client) to the agent (server) to
retrieve the value of a variable.

123
Unit 11 Application Layer

GetNextRequest
The GetNextRequest message is sent from the manager to the agent to retrieve the
value of a variable. The retrieve value is the value of the object following the defined object in
the message. It is mostly used to retrieve the values of the entries in a table. If the manager
does not know the indexes of the entries, it cannot retrieve the values. However, it can use
GetNextRequest and define the object.

GetResponse
The GetResponse message is sent from an agent to a manager in response to
GetRequest and GetNextRequest. It contains the value of the variable(s) requested by the
manager.

SetRequest
The SetRequest message is sent from the manager to the agent to set (store) a value
in a variable.

Trap
The trap message is sent from the agent to the manager to report an event. For
example, if the agent is rebooted, it informs the manager and reports the time of rebooting.

The SNMP Model


The SNMP model of a managed network consists of four components:
1. Managed nodes
2. Management stations
3. Management information
4. A management protocol

1. Managed Nodes
The manage nodes can be hosts, routers, bridges, printers, or any other devices
capable of communicating status information to the outside world. To be managed directly by
SNMP, a node must be capable of running as SNMP management process, called an SNMP
agent. All computers meet this requirement, as do increasingly many bridges, routers, and

124
Unit 11 Application Layer

peripheral devices designed for network use. Each agent maintains a local database of
variables that describe its state and history and affect its operation.

2. Management Stations
Network management is done from management stations, which are, in fact, general
purpose computers running special management software. The management stations
contain one or more process that communicate with the agents over the network, issuing
commands and getting responses. In this design, all the intelligence is in the management
stations, in order to keep the agents as simple as possible and minimize their impact on the
devices they are running on. Many management stations have a graphical user interface to
allow the network manager to inspect the status of the network and take action when
required.
Most real networks are multivendor, with hosts from one or more manufacturers,
bridges and routers from other companies, and printers from still other ones.
In order to allow a management station (potentially from yet another supplier) to talk
all these diverse components, the nature of the information maintained by all the devices
must be rigidly specified. Having the management station ask a router what its packet loss
rate is of no use if the router does not keep track of its loss rate. Therefore, SNMP describes
the extract information in each kind of agent has to maintain and the format it has to supply in
it. The largest portion of the SNMP model is the definition of who has to keep track of what
and how this information is communicated.

3. Management Information
Very briefly, each device maintains one or more variables that describe its state. In the
SNMP literature, these variables are called objects, but the term is misleading because they
are not objects in the sense of an object-oriented system because they have just state and
no methods. Nevertheless, the term is so ingrained that we will use it there. The collection of
all possible objects in a network is given in a data structure called MIB (Management
Information Base).

4. A Management Protocol
The management station interacts with the agents using the SNMP protocol. This
protocol allows the management station to query the state of an agent’s local objects, and

125
Unit 11 Application Layer

change them if necessary. Most of SNMP consists of this query response type
communication.
However, sometimes events happen that are not planned. Managed nodes can crash
and reboot, lines can go down and come back up, congestion can occur, and so on. Each
significant event is defined in a MIB module. When an agentnotices that a significant event
has occurred, it immediately reports the vent to all management stations in its configuration
list. This report is called an SNMP trap. The report usually just states that some event has
occurred. The model of polling at long intervals with acceleration on receipt of a trap is called
trap directed polling.
This model assumes that each managed node is capable of running an SNMP agent
internally. Older devices or devices not originally intended for use on a network may not have
this capability. To handle them, SNMP defines what is called proxy agent, namely an agent
that watches over one or more non SNMP devices and communicates with the management
station on their behalf, possibly communicating with the devices themselves using some
nonstandard protocol.
Finally, security and authentication play a major role in SNMP. A management station
has the capability of learning a great deal about every node under its control and also has
the capability of shutting them all down. Hence it is of great importance that agents can be
convinced that queries allegedly coming from the management station, in fact, come from the
management station.

Cryptography

 The word cryptography comes from the two Greek Words KpuTM7- means hidden or
secret β Kripto.
 3>Kå 5- means writing β Graph
 “Cryptography is the art of secret writing”
 “Cryptography is the art and science of keeping messages secure”
 “Cryptography is a technique of encoding and decoding the message so they are not
understood by anybody except sender and receiver.”
 Cryptography plays a very important role in Internet that is payment details, money
transfer contract documents and Business plans etc.
 The method consisted of replacing the letters of alphabet in the original text by letters
that are of a fixed number of places away.

126
Unit 11 Application Layer

Plain- A B C D E F G H I J K L M N O P Q R S T U V

Code- C D E F G H I J K L M N O P Q R S T U V W X

Examples: THANK YOU

Using this system a plain message THANKYOU is coded as VJCPMAQW

Dimensions of Cryptography
Cryptography systems are characterized along three independent dimensions:
1. The type of operations used for transforming plain text to cipher text.
Encryption algorithm are based on two general principles:
a. Substitution
b. Transposition
2. The number of keys used
If both sender and receiver use the same keys the system is referred to as symmetric,
single- key secret key or conventional encryption. If the sender and receiver use the
different keys, the system is referred to as asymmetric, two- key or public key
encryption.
3. The way in which the plain text is processed.
There are two ways in which the plain text is processed:
a. Block Cipher
This processes the input one block off elements at a time, producing output block for
each input element.
b. Stream Cipher
This processes the input elements continuously producing output one element at
a time, as it goes along.

Some Terminologies
1. Cryptographers: who invent clever secret codes i.e., who practiced cryptography.
2. Cryptanalysts: Practitioners of cryptanalysis i.e., who attempt to break the codes.
3. Cryptology: The branch of mathematics encompassing both cryptography and
cryptanalysis.
4. Cryptologists: Practitioners of cryptology
 Success of the cryptographers rests on the Fundamental Tenet of Cryptography

127
Unit 11 Application Layer

 “If lots of smart people have failed to solve a problem, them it probably won’t be
solved (soon).”

Conventional Encryption Model/ Symmetric Cipher Model

A simplified model of conventional encryption is shown

A conventional encryption scheme has five ingredients


1. Plaintext
Plaintext is the original intelligence message intelligible message or data that is fed
into the algorithm as input. It is denoted by M, for message or P, for plaintext. It can
be a stream of bits, a text file, a bitmap, a digital video image etc.
2. Encryption Algorithm
The encryption algorithm performs various substitutions and transformations on the
plaintext Encryption/ Enciphering. The process of converting from plaintext to cipher
text is known as encryption.
Mathematically,
Ek (M) = C
3. Secret Key
The secret key is also input to the encryption algorithm. The key is a value
independent of the plain text. The algorithm will produce a different output depending
on the specific key being used at a time. It is denote by K. The range of possible
values of the key is termed as key space.
4. Cipher text
It is the scrambled message produced as output. It depends on the plain text and the
secret key. For a given message two different keys will produce two different cipher

128
Unit 11 Application Layer

texts. It is denoted by C. It is also a binary data: sometimes the same as M,


sometimes larger.
“Palin text is encrypted; it is called as Cipher text.”

Types of Cipher Text


a) Transposition Systems. A transposition involves rearrangement or changes in the
sequence of letters of plain text message without any change in their identity.
b) Substitution System. In access entire words, long phrases, long paragraph or even
sentences of the plain text are replaced by other words, groups of letters, group of
figures, etc.
5. Decryption Algorithm
It is the encryption algorithm run in reverse. It takes the cipher text and the secret key
and produces the original plain text.
Decryption.Restoring the plain text from the cipher text is known as decryption
Mathematically,
Dk(C) = M
To recover plain text, the following identity must hold true:
D(E)(M)) = M

Modes of Operation
A cryptographic mode usually combines the basic cipher, some sort of feedback and
some simple operations. The operations are simple because the security is the function of
the cipher and not the mode. There are five modes of operation which are discussed one by
one:
1. Electronic Code Book Mode (ECB)

129
Unit 11 Application Layer

 It is the simplest mode of operation.


 The incoming plain text message is divide into blocks of 64 bits each
 The same key is used in each step of encryption.
 At the receiving and the incoming data is divided into 64 bits block and using the
same key each block is decrypted to produce the corresponding plain text.
Application. Secure transmission of secure values (e.g., an encryption),

2. Cipher Block Chaining Mode (CBC)


 In the case of EBC, plain text block always produces the same cipher text block. If a
block of plain text occurs more than once in the output, overcome this problem the
CBC made ensure that even if a block of plain text repeats in the input it will produce
totally different cipher text block.
 Chaining adds the feedback mechanism to the block cipher.
 In a CBC the results of the encryption of the previous block are feed- back into the
encrypts of the current block. Each block is used to modify the encryption of the next
block.
 First step receives two inputs, the first block of plain text and a random block of text
called initialization vector (IV). IV has no special meaning, it is simply used to make
the message unique and is created by the user.

Decryption Process
 The cipher text block is passed through the decryption alga using the same key which
was used during the encryption process for all plain text block. The output of this step
is XOR’ed with the IV to produce the plain text.
 Application.Authentication General Purpose block oriented transmission.

3. Cipher Feedback Model (CFB)


 This mode is concerned with the stream cipher.
Step 1. A 64 bit IV is used and encrypted by using an algorithm to produce an
encrypted IV.
Step2. The leftmost j bits (defined by sender or receiver) of the encrypted IV are
XOR’ed with the first j bits of the plain text. This produce first portion of cipher text
which is transmitted to the receiver.

130
Unit 11 Application Layer

Step 3. Now the bits of IV are shifted left by j position. The rightmost j bit position of
the IV contains unpredictable data or vacant bits which are filled by the cipher text
created in the previous step.
Step 4. Repeat steps 1, 2, and 3 until the plain text fully encrypted.
 Application.Authentication, General purpose stream oriented transmission.

4. Output Feedback Mode (OFB)


 OFB is extremely similar to the CFB, the only difference is that in the case of CFB,
the cipher text is fed into the next stage of encryption process but in the case of OFB
the output of the encrypted IV is fed into the next stage of produce the new IV.
 Disadvantage.More vulnerable to a message stream modification attack than in CFB.
 Application. Stream oriented transmission over noisy channel (e.g., Satellite
communication)
 Advantage. Bit errors in transmission do not propagate, For example if bit error
occurs in C1 only the recovered value of P1 is affected, subsequent plain text units are
not corrupted.

5. Counter Mode (CTR)


 The counter mode has applications to ATM (Asynchronous Transfer Mode) network,
Network security and IPSec (IP security).
 In this mode, a counter is equal to the PT block size is used. The counter value must
be different for each. The counter value must be block that is encrypted. In this the
counter is initialized to some value and then incremented by 1 for each subsequent
block for encryption.
 The counter is encrypted and then XORed with the plain text block to produce cipher
text block, there is no chaining.
 For decryption. The same sequence of counter values is used, with each encrypted
counter XOR’ed with the cipher text block to option the corresponding plain text block.
 Applications. General purpose block oriented transmission, useful for high
requirements.

131
Unit 11 Application Layer

 Advantages:
1. Hardware efficiency 4. Random access
2. Software efficiency 5. Provable security
3. Preprocessing 6. Simplicity

Types of Cryptography
There are two types of cryptography: Secret key encryption/ cryptography and Public key
encryption/ cryptography.

1. Secret Key Encryption


 It is known as symmetric key encryption or symmetric cryptographic system.
 In this type of cryptography one key is used for encryption and same key for
decryption of message i.e., the sender uses the key to encrypt the message and the
receives will also use the same key to decrypt the message.
 If the both sender and receiver of the cipher text use the same secret key to encrypt
and decrypt the message, the system is called a secret cryptographic system.
 The system is well situated for communicating between parties who agreed to share
the secret keys.

Problems
Secret key encryption has number of problems:
1. One problem is that of key agreements and distributions
 In the first place, how do two parties agree on a key one way is for somebody from
the sender. Say A to physically visit the receiver say B, handover the key.
 Another way is to courier a paper on which the key is written.
 A third way is to send the key over the network to be and ask for the confirmation but
then if an intruder gets the message he can interpret the subsequent message.
2. Second problem is that the same key is used for encryption and decryption, one
key per communicating parties is required.

Solution:

 DES (Data Encryption Standard) specifies a method for encrypting. A way is simple to
use DES -3, where key 1 is used to encrypt first, key 2 is used to re encrypt the
encrypted lock and key is used once again to re encrypt doubly encrypted block.

132
Unit 11 Application Layer

 DES -3 is quite popular and is in wide use.


 Other popular algorithm are IDEA to RC 5, RC 2, and AES etc.

Advantages of Secret Key Encryption


1. The major advantages of symmetric key algorithm is that it is more efficient than the
public key algorithms. It takes less to encrypt a message using the symmetric key
algorithm. This is because this key is of smaller size (lengths).
2. Hence symmetric key algorithms are used for encryption and decryption of long
message.

Disadvantages of Secret Key Encryption


1. The first disadvantages are that the sender and receiver both should have assume
symmetric key. So a large number of keys are required when the numbers of user
increases.
2. The distribution of keys between two users can be difficult.

2. Public Key Encryption


It is also called asymmetric key encryption. In this type of cryptography, two
different keys are used namely public key and private key. One key is used for encryption
and the other key must be used for decryption.
 When A wants to send a message to B. A encrypt the message using B’s public key,
this is possible because A knows B’s public key.
 A sends this message to B.
 B decrypt A’s message by using his private key. Note that only B knows about his
private key.
 When B wants to send a message to A, exactly reverse steps take place. (B encrypt
the message using A’s public key)
 Therefore only A can decrypt the message back to its original form using his private
key.

Advantages Public Key Encryption


1. There is no compulsion of using (sharing) the symmetric key by the sender and
receiver.
2. The number of key required reduces tremendously.

133
Unit 11 Application Layer

Disadvantages Public Key Encryption


1. The algorithm used are highly complex.
2. It takes a long time to calculate cipher text from plaintext.
3. It is necessary to verify the association between a sender and this public key.

Comparison of Secret Key and Public Key Cryptosystems

Sr. No. Secret key system Public key system


It is also called a symmetrical It is also called as symmetrical key
1.
key system. system.
Each sender and receiver pair The sender uses the public key while
2.
has to used a unique key. receiver uses its own private key
3. It is more efficient. It is less efficient.
It is useful for encryption and It is used for encryption and decryption
4.
decryption of long message. of short messages.
A large number of keys are
5. The number of keys is less.
required.

134
Review Questions

1. Write a short note on network security?

2. What do you mean by the terms authentication and non-repudiation?

3. Explain in detail the concept of Simple Network Management Protocol (SNMP)?

4. What do you mean by cryptography?

5. Give the various dimensions of the term cryptography?

135
Unit 12
Security

Unit Objectives

At the end of the unit, the student is expected to:


 know the basic requirements of a secure communication;
 understand what is cryptography;
 learn the different concepts of digital signatures; and
 differentiate the use of PKIs and HTTPs.
Unit 12 Security

Basic Requirements for Secure Communication

 Availability: Will the network deliver data?


o Infrastructure compromise, DDoS
 Authentication: Who is this actor?
o Spoofing, phishing
 Integrity: Do messages arrive in original form?
 Confidentiality: Can adversary read the data?
o Sniffing, man-in-the-middle
 Provenance: Who is responsible for this data?
o Forging responses, denying responsibility
o Not who sent the data, but who created it

Other Desirable Security Properties


 Authorization: is actor allowed to do this action?
o Access controls
 Accountability/Attribution: who did this activity?
 Audit/Forensics: what occurred in the past?
o A broader notion of accountability/attribution
 Appropriate use: is action consistent with policy?
o E.g., no spam; no games during business hours; etc.
 Freedom from traffic analysis: can someone tell when I am sending and to whom?
 Anonymity: can someone tell I sent this packet?

Internet’s Design: Insecure


 Designed for simplicity in a naïve era
 “On by default” design
 Readily available zombie machines
 Attacks look like normal traffic
 Internet’s federated operation obstructs cooperation for diagnosis/mitigation

137
Unit 12 Security

Eavesdropping - Message Interception (Attack on Confidentiality)


 Unauthorized access to information
 Packet sniffers and wire tappers
 Illicit copying of files and programs

Eavesdropping Attack: Example


 tcpdump with promiscuous network interface
o On a switched network, what can you see?
 What might the following traffic types reveal about communications?
o DNS lookups (and replies)
o IP packets without payloads (headers only)
o Payloads

Integrity Attack – Tampering


 Stop the flow of the message
 Delay and optionally modify the message
 Release the message again

Authenticity Attack – Fabrication


 Unauthorized assumption of other’s identity

138
Unit 12 Security

 Generate and distribute objects under this identity

Attack on Availability
 Destroy hardware (cutting fiber) or software
 Modify software in a subtle way
 Corrupt packets in transit

 Blatant denial of service (DoS):


o Crashing the server
o Overwhelm the server (use up its resource)

Basic Requirements for Secure Communication

Confidentiality through Cryptography


 Cryptography: communication over insecure channel in the presence of adversaries
 Studied for thousands of years
 Central goal: how to encode information so that an adversary can’t extract it …but a
friend can
 General premise: a keyis required for decoding
o Give it to friends, keep it away from attackers

139
Unit 12 Security

 Two different categories of encryption


o Symmetric: efficient, requires key distribution
o Asymmetric (Public Key): computationally expensive, but no key distribution
problem

Symmetric Key Encryption


 Same key for encryption and decryption
o Both sender and receiver know key
o But adversary does not know key
 For communication, problem is key distribution
o How do the parties (secretly) agree on the key?
 What can you do with a huge key? One-time pad
o Huge key of random bits
 To encrypt/decrypt: just XOR with the key!
o Provably secure! …. provided:
 You never reuse the key … and it really is random/unpredictable
o Spies actually use these

Using Symmetric Keys


 Both the sender and the receiver use the same secret keys

Asymmetric Encryption (Public Key)


 Idea: use two different keys, one to encrypt (e) and one to decrypt (d)
o A key pair

140
Unit 12 Security

 Crucial property: knowing e does not give away d


 Therefore e can be public: everyone knows it!
 If Alice wants to send to Bob, she fetches Bob’s public key (say from Bob’s home
page) and encrypts with it
o Alice can’t decrypt what she’s sending to Bob …
o … but then, neither can anyone else (except Bob)

Public Key / Asymmetric Encryption


 Sender uses receiver’s public key
o Advertised to everyone
 Receiver uses complementary private key
o Must be kept secret

Works in Reverse Direction Too


 Sender uses his own private key
 Receiver uses complementary public key
 Allows sender to prove he knows private key

141
Unit 12 Security

Realizing Public Key Cryptography


 Invented in the 1970s
o Revolutionized cryptography
o (Was actually invented earlier by British intelligence)
 How can we construct an encryption/decryption algorithm with public/private
properties?
o Answer: Number theory
 Most fully developed approach: RSA
o Rivest / Shamir / Adleman, 1977; RFC 3447
o Based on modular multiplication of very large integers
o Very widely used (e.g., SSL/TLS for https)

Cryptographic Toolkit
 Confidentiality: Encryption
 Integrity: ?
 Authentication: ?
 Provenance: ?

Integrity: Cryptographic Hashes


 Sender computes a digest of message m, i.e., H(m)
o H() is a publicly known hash function
 Send min any manner
 Send digest d = H(m) to receiver in a secure way:

142
Unit 12 Security

o Using another physical channel


o Using encryption (why does this help?)
 Upon receiving m and d, receiver re-computes H(m) to see whether result agrees with
d

Operation of Hashing for Integrity

Cryptographically Strong Hashes


 Hard to find collisions
o Adversary can’t find two inputs that produce same hash
o Someone cannot alter message without modifying digest
o Can succinctly refer to large objects
 Hard to invert
o Given hash, adversary can’t find input that produces it
o Can refer obliquely to private objects (e.g., passwords)
 Send hash of object rather than object itself

143
Unit 12 Security

Effects of Cryptographic Hashing

Cryptographic Toolkit
 Confidentiality: Encryption
 Integrity: Cryptographic Hash
 Authentication: ?
 Provenance: ?

Public Key Authentication


 Each side need only to know the other side’s public key
o No secret key need be shared
 A encrypts a nonce (random number) x using B’s public key
o B proves it can recover x
o A can authenticate itself to B in the same way

144
Unit 12 Security

Cryptographic Toolkit
 Confidentiality: Encryption
 Integrity: Cryptographic Hash
 Authentication: Decrypting nonce
 Provenance: ?

Digital Signatures
 Suppose Alice has published public key KE
 If she wishes to prove who she is, she can send a message x encrypted with her
private key KD
o Therefore: anyone w/ public key KE can recover x, verify that Alice must have
sent the message
o It provides a digital signature
o Alice can’t deny later deny it non-repudiation

145
Unit 12 Security

Summary of Our Crypto Toolkit


 If we can securely distribute a key, then
o Symmetric ciphers (e.g., AES) offer fast, presumably strong confidentiality
 Public key cryptography does away with problem of secure key distribution
o But not as computationally efficient
o Often addressed by using public key crypto to exchange a session key
o And not guaranteed secure
 but major result if not
 Cryptographically strong hash functions provide major building block for integrity
(e.g., SHA-1)
o As well as providing concise digests
o And providing a way to prove you know something (e.g., passwords) without
revealing it (non-invertibility)
o But: worrisome recent results regarding their strength

 Public key also gives us signatures


o Including sender non-repudiation
 Turns out there’s a crypto trick based on similar algorithms that allows two parties
who don’t knoweach other’s public key to securely negotiate a secret key even in the
presence of eavesdroppers

146
Unit 12 Security

PKIs and HTTPS


Public Key Infrastructure (PKI)
 Public key crypto is very powerful …
 … but the realities of tying public keys to real world identities turn out to be quite hard
 PKI: Trust distribution mechanism
o Authentication via Digital Certificates
 Trust doesn’t mean someone is honest, just that they are who they say they are…

Managing Trust
 The most solid level of trust is rooted in our direct personal experience
o E.g., Alice’s trust that Bob is who they say they are
o Clearly doesn’t scale to a global network!
 In its absence, we rely on delegation
o Alice trusts Bob’s identity because Charlie attests to it ….
o …. and Alice trusts Charlie
 Trust is not particularly transitive
o Should Alice trust Bob because she trusts Charlie …
o … and Charlie vouches for Donna …
o … and Donna says Eve is trustworthy …
o … and Eve vouches for Bob’s identity?

 Two models of delegating trust


o Rely on your set of friends and their friends
 “Web of trust” -- e.g., PGP
o Rely on trusted, well-known authorities (and their minions)
 “Trusted root” -- e.g., HTTPS

PKI Conceptual Framework


 Trusted-Root PKI:
o Basis: well-known public key serves as root of a hierarchy
o Managed by a Certificate Authority (CA)

147
Unit 12 Security

 To publish a public key, ask the CA to digitally sign a statement indicating that
they agree (“certify”) that it is indeed your key
o This is a certificate for your key (certificate = bunch of bits)
 Includes both your public key and the signed statement
o Anyone can verify the signature
 Delegation of trust to the CA
o They’d better not screw up (duped into signing bogus key)
o They’d better have procedures for dealing with stolen keys
o Note: can build up a hierarchy of signing

Components of a PKI

Digital Certificate
 Signed data structure that binds an entity with its corresponding public key
o Signed by a recognized and trusted authority, i.e.,

Certification Authority (CA)


o Provide assurance that a particular public key belongs to a specific entity
 Example: certificate of entity Y
Cert = E({nameY3, KYpublic}, KCAprivate)
 KCAprivate: private key of Certificate Authority
 nameY: name of entity Y

148
Unit 12 Security

 KYpublic: public key of entity Y


o In fact, they may sign whatever glob of bits you give them
 Your browser has a bunch of CAs wired into it

Certification Authority
 People, processes responsible for creation, delivery and management of digital
certificates
 Organized in an hierarchy
o To verify signature chain, follow hierarchy up to root

Registration Authority
 People & processes responsible for:
o Authenticating the identity of new entities (users or computing devices), e.g.,
 By phone, or physical presence + ID
o Issuing requests to CA for certificates
 The CA must trust the Registration Authority
o This trust can be misplaced

Certificate Repository
 A database accessible to all users of a PKI
 Contains:
o Digital certificates
o Policy information associated with certs
o Certificate revocation information

149
Unit 12 Security

 Vital to be able to identify certs that have been compromised


 Usually done via a revocation list

Putting It All Together: HTTPS


 Steps after clicking on https://www.amazon.com
 https = “Use HTTP over SSL/TLS”
o SSL = Secure Socket Layer
o TLS = Transport Layer Security
 Successor to SSL, and compatible with it
o RFC 4346
 Provides security layer (authentication, encryption) on top of TCP
o Fairly transparent to the app
 Browser (client) connects via TCP to
Amazon’s HTTPS server
 Client sends over list of crypto protocols it
supports
 Server picks protocols to use for this
session
 Server sends over its certificate

Inside the Server’s Certificate


 Name associated with cert (e.g., Amazon)
 Amazon’s public key
 A bunch of auxiliary info (physical
address, type of cert, expiration time)
 URL to revocation center to check for
revoked keys
 Name of certificate’s signatory (who signed it)
 A public-key signature of a hash (MD5) of all this
o Constructed using the signatory’s private RSA key

Validating Amazon’s Identity


 Browser retrieves cert belonging to the signatory

150
Unit 12 Security

o These are hardwired into the browser


 If it can’t find the cert, then warns the user that site has not been verified
o And may ask whether to continue
o Note, can still proceed, just without authentication
 Browser uses public key in signatory’s cert to decrypt signature
o Compares with its own MD5 hash of Amazon’s cert
 Assuming signature matches, now have high confidence it’s indeed Amazon …
o … assuming signatory is trustworthy

HTTPS Connection (SSL/TLS)


 Browser constructs a random
session key K
 Browser encrypts K using
Amazon’s public key
 Browser sends E(K, KApublic) to
server
 Browser displays
 All subsequent communication
encrypted w/ symmetric cipher
using key K
o E.g., client can authenticate
using a password

151
Unit 12 Security

DNS Security

Root level DNS attacks


Feb. 6, 2007:
 Botnet attack on the 13 Internet DNS root servers
 Lasted 2.5 hours
 None crashed, but two performed badly:
o g-root (DoD), l-root (ICANN)
o Most other root servers use anycast

Do you trust the TLD operators?


 Wildcard DNS record for all .com and .net domain names not yet registered by others
o September 15 – October 4, 2003
February 2004: Verisign sues ICANN

 Redirection for these domain names to Verisign web portal: “to help you search”
o and serve you ads…and get “sponsored” search

152
Unit 12 Security

Defense: Replication and Caching

DNS Amplification Attack


 DNS Amplification attack: (x 40 amplification)

 580,000 open resolvers on Internet (Kaminsky--‐Shiffman’06)

Solutions

153
Unit 12 Security

But should we believe it?


Enter DNSSEC
 DNSSEC protects against data spoofing and corruption
 DNSSEC also provides mechanisms to authenticate servers and requests
 DNSSEC provides mechanisms to establish authenticity and integrity

PK-DNSSEC (Public Key)


 The DNS servers sign the hash of resource record set with its private (signature) keys
 Public keys can be used to verify the SIGs
 Leverages hierarchy:
o Authenticity of nameserver’s public keys is established by a signature over the
keys by the parent’s private key
o In ideal case, only roots’ public keys need to be distributed out-of-band

Verifying the tree

154
Review Questions

1. What are the basic requirements of a secure communication?

2. What is cryptography and its implementation?

3. What are the different concepts of digital signatures?

4. What are the different uses of PKIs and HTTPs?

155
References

Books:

Peterson, Larry, et.al. (2012). Computer Networks: A System Approach 5th Edition. Elseview,
Inc. 850p.

Tittel, Ed. (2002). Schaum’s Outline of Theory and Problems of Computer Networking.
McGraw-Hill Companies, Inc. 318p.

Online Reference:

156
Appendix A
Course Syllabus
COMPUTER NETWORKS

Course Description

An introduction to the design and analysis of computer communication networks.


Topics include application layer protocols, Internet protocols, network interfaces, local and
wide area networks, wireless networks, bridging and routing, and current topics.

Course Objectives

At the end of the course, the student shall be able to:


 Become familiar with layered communication architectures (OSI and TCP/IP);
 Understand the client/server model and key application layer protocols;
 Learn sockets programming and how to implement client/server programs;
 Understand the concepts of reliable data transfer and how TCP implements
these concepts;
 Know the principles of congestion control and trade-offs in fairness and
efficiency;
 Learn the principles of routing and the semantics and syntax of IP;
 Understand the basics of error detection including parity, checksums, and
CRC;
 Know the key protocols for multimedia networking for IP; and
 Familiarize the student with current topics such as security, network
management, sensor networks, and/or other topics.

157
Appendix A
Course Outline
I. Computer Networks
II. Network Architecture
III. Data Communication Concept
IV. TCP/IP
V. IPV6
VI. The 7 Open Systems Interconnection (OSI) Model
VII. Collision Free Protocols
VIII. Wireless
IX. Routing
X. DNS, HTTP
XI. Application Layer
XII. Security

158
Appendix B
Committee Certification

This is to certify that Mr. Jose Mari N. Cabading, a faculty member of the
College of Information Technology, had developed an instructional material for the
course Computer Networks.

This certifies further that the said worktext was reviewed, evaluated and
approved by the members of the Instructional Materials Evaluation Committee of the
College of Information Technology and deemed useful for the said course.

Approved for use at the College of Information Technology,Don Mariano


Marcos Memorial State University, Mid La Union Campus, City of San Fernando, la
Union.

College Instructional Materials Evaluation Committee

DANNILYN U. MACATO
Technical Writer

ZHELLA ANNE V. NISPEROS


Subject Specialist

EDUARDO C. CORPUZ
Dean

___________________________
Date Approved

159
Appendix C
Systemof Evaluation of Instructional Materials

COLLEGE LEVEL:

 The faculty develops an instructional material based from the syllabus and submits it
for evaluation.
 The instructional material shall be evaluated by the College Instructional Material
Evaluation Committee (IMEC) composed of the Department Chairperson as
Chairman and two (2) members from the College Pool of Faculty, one (1) subject
specialist and one (1) technical writer.

CAMPUS LEVEL:

 After the instructional material has been evaluated by the college IMEC, it will be
forwarded to the Office of Instruction.
 The Head for Instruction will convene the members of the Campus IMEC. The
Campus IMEC is composed of the Head of Instruction as chairman and two
members, 1 subject specialist and 1 technical writer.
 The instructional material will be forwarded to the University Instructional Material
Evaluation Committee (U-IMEC).

UNIVERSITY LEVEL:

 After the process of evaluation, the instructional material will be returned back to the
College with a certification that it went through a series of evaluation.
 The instructional material shall be evaluated based from its functionality and validity.

Flowchart of Evaluation of Instructional Material

College Instructional
Office of Instruction
Faculty Material Evaluation
Committee

University Campus Instructional


Instructional Material Material Evaluation
Faculty Evaluation Committee
Committee

160
Appendix C

College Instructional Material Evaluation Committee

DEPARTMENT
CHAIRPERSON

SUBJECT
TECHNICAL WRITER
SPECIALIST

161
Appendix D

Proof of Utilization

This is to certify that the Instructional Materialdeveloped by Jose Mari N. Cabading of the
College of Information Technology, is utilized as a Worktext in the course Computer Networks
for the 2ndSemester of School Year 2015 - 2016.

This certifies further that a copy of the material is available at the


CIT Learning Resource Center.

This certification is issued for any purposes it may serve.

RUBYLYN C. NARRA
Campus Librarian

_______________
Date Signed

162

Potrebbero piacerti anche