You are on page 1of 74

Computer Networks(ECO-1A)

Prepared By: Er. Vikas Goyal


A.P. (ECE department, PIET)
Course Outcomes

CO1: Understand the basic concepts of computer networks and physical


layer.
CO2: Compare OSI model and TCP/IP model.

CO3: Illustrate the process of data link layer and medium access sublayer.

CO4: Analyze the concept and design issue of network , transport and
session layer.
CO5: Evaluate the cryptography and data compression technique .

CO6: Analyze the concept and design issue of application layer.


Syllabus
Unit – I
• Introduction: Introduction to Computer Networks, Protocols and standards, Network
Models: The OSI Model, TCP/IP protocol suite, Introduction to addressing.
• Physical Layer and Media:
• Guided &Unguided media, Circuit Switching and Packet Switching, The Telephone
System, ATM.
Unit -II
• The Data Link Layer: Data Link Layer Design issues, Data link control: Framing, Flow
& Error control, Noiseless channels, Noisy channels, HDLC, Point to Point protocols.
• The Medium Access Sublayer: Aloha Protocols, LAN Protocols: wired LAN’s, Wireless
LAN.
Unit -III
• Network Layer: Forwarding, Flow Control, Error Control, Multicast routing, IPv4
addresses, IPv6 addresses, internetworking, SNMP, ARP
• Transport & Session Layer, Presentation Layer: Flow Control and Congestion Control
at the Transport Layer, Transmission Control Protocol – Basic Features, TCP
Congestion Control, cryptography
Syllabus
Unit-IV
• Application Layer: Design issues, file transfer, access and management,
electronic mail, WWW & HTTP
• Text Books:
• Forouzan B.A, Data Communications and Networking, Tata-Mc-Graw Hill, 4th edition.
• Tanenbaum A.S, Computer Networks, PHI.
• Reference Books:
• Stallings W, Data and Computer Communications, PHI.
• Leon –Garcia, Computer Networks, Mc Graw Hill
Unit 1

Introduction
DATA COMMUNICATIONS
The term telecommunication means communication at a
distance.
The word data refers to information presented in whatever
form is agreed upon by the parties creating and using the
data.
Data communications are the exchange of data between
two devices via some form of transmission medium such
as a wire cable.
Topics discussed in this section:

▪ Components of a data communications system


▪ Data Flow
Components of a data communication system
1. Message. The message is the information (data) to be communicated.
Popular forms of information include text, numbers, pictures,
audio, and video.
2. Sender. The sender is the device that sends the data message.
It can be a computer, telephone handset, video camera, and so on.
3. Receiver. The receiver is the device that receives the message.
It can be a computer, telephone handset, television, and so on.
4. Transmission medium. The transmission medium is the physical path
by which a message travels from sender to receiver.
Some examples of transmission media include twisted-pair wire,
coaxial cable, fiber-optic cable, and radio waves
Protocol
• A protocol is a set of rules that govern data communications.
• It represents an agreement between the communicating devices.
• Without a protocol, two devices may be connected but not
communicating.
• A protocol is a set of rules that govern data communications. It
determines what is communicated, how it is communicated and
when it is communicated. The key elements of a protocol are
syntax, semantics and timing
Data flow (simplex, half-duplex, and full-duplex)
Simplex
In simplex mode, the communication is unidirectional, as on a one-
way street. Only one of the two devices on a link can transmit; the
other can only receive.
Examples:- Keyboards and traditional monitors are
examples of simplex devices. The keyboard can only introduce
input; the monitor can only accept output. The simplex mode can
use the entire capacity of the channel to send data in one direction.
Half-Duplex
In half-duplex mode, each station can both transmit and receive,
but not at the same time. When one device is sending, the other
can only receive, and vice versa.
Examples:-When cars are traveling in one direction, cars
going the other way must wait. In a half-duplex transmission, the
entire capacity of a channel is taken over by whichever of the two
devices is transmitting at the time. Walkie-talkies is half-duplex
systems.
Full-Duplex
In full-duplex both stations can transmit and receive simultaneously.
The full-duplex mode is like a two-way street with traffic flowing in
both directions at the same time. In full-duplex mode, signals going
in one direction share the capacity of the link: with signals going in
the other direction.
Example:- full-duplex communication is the telephone
network. When two people are communicating by a telephone line,
both can talk and listen at the same time. The full-duplex mode is
used when communication in both directions is required all the
time. The capacity of the channel, however, must be divided
between the two directions.
COMPUTER NETWORKS

Computer network consists of two or more computers


that are linked in order to share resources, exchange data files or to
allow electronic communication. The computers on a network may
be linked through cables, telephone lines, radio waves, satellites or
infrared light beams.
There are two aspects of computer networks – hardware
and software.
Hardware includes physical connection between two machines
by using adaptors, cables, routers, bridges etc.
software includes a set of protocols. Protocols define a formal
language among various components. It makes hardware usable
by applications.
NETWORKS

A network is a set of devices (often referred to as nodes)


connected by communication links. A node can be a
computer, printer, or any other device capable of sending
and/or receiving data generated by other nodes on the
network. A link can be a cable, air, optical fiber, or any
medium which can transport a signal carrying information.

Topics discussed in this section:

▪ Network Criteria
▪ Physical Structures
▪ Categories of Networks
1.15
Network Criteria
• Performance
• Depends on Network Elements
• Measured in terms of Delay and Throughput
• Reliability
• Failure rate of network components
• Measured in terms of availability/robustness
• Security
• Data protection against corruption/loss of data due to:
• Errors
• Malicious users
Physical Structures

• Type of Connection
• Point to Point - single transmitter and receiver
• Multipoint - multiple recipients of single transmission
• Physical Topology
• Connection of devices
• Type of transmission - unicast, multicast, broadcast

1.17
Types of connections: point-to-point and multipoint
Categories of topology

• The term physical topology refers to the way in which a network is


laid out physically. One or more devices connect to a link; two or
more links form a topology.

• The topology of a network is the geometric representation of the


relationship of all the links and linking devices (usually called
nodes) to one another.

• There are four basic topologies possible: mesh, star, bus, and ring.
A fully connected mesh topology (five devices)
• In mesh topology every device has a dedicated point-to-point link to every other
device.
• The link carries traffic only between the two devices it connects.
• Duplex-mode
• Advantages:
• Guaranteed dedicated links
• Eliminates traffic problems
• Privacy and security
• This makes fault identification easy
• Disadvantages:
• Cabling and number of IO ports required
• wiring is greater than available space
• Hardware is required for each link – expensive
For example: connection between telephone regional offices.
A star topology connecting four stations
• In star topology, each device has a dedicated point-to-point link only to a central
controller called hub.
• The controller acts as an exchange: if one device wants to send data to another , it
sends the data to controller, which then relays the data to the another connected
device.
• Advantages:
• Less expensive
• Robustness – if one link fails, only that link is affected, other links remain
active.
• Disadvantages:
• Dependency of the whole topology on one single point.
• Star requires less cabling than mesh. But each node is linked to the hub, so
more cabling required as compared to other like ring or bus topologies.
A bus topology connecting three stations
• A bus topology is a multipoint .
•One long cable acts as a backbone to link all the devices in the network.
• Nodes are connected by bus cable by drop line and taps.
• A drop line is a connection running between the device and the main cable
• A tap is a connector that either splices or punctures.
• Advantages:
• Easy of installation
• Disadvantages:
• Difficult reconnection
• Addition of new devices require modification or replacement of the
backbone.
• Signal energy getting transformed as heat as signal travel across the
backbone line and taps. That limits the no of taps in a line.
A ring topology connecting six stations
•In ring topology each device has a point-to-point connection with only the two devices
on either side of it.
•A signal is passed along a ring in one direction, from device to device until it reaches
its destination.
•Advantages:
•Easy to install and reconfigure
•To add or delete a device requires changing only two connections. The only
constraints are media and traffic.
•Disadvantages:
•Unidirectional
•A break in a ring can disable the entire network(can be solved by dual ring)
A hybrid topology: a star backbone with three bus networks
Network Models/Hardware
• Local Area Networks
• Metropolitan Area Networks
• Wide Area Networks
Local Area Networks(LANs)
• LANS are privately-owned networks within a single building or
campus of up to few kilometers in size.
• LANS are distinguished based on
– Their size
– Their transmission technology
– Their topology
• LANS are restricted in size
• LANS use a transmission technology consisting of a single cable
to which all machines are attached like telephone company lines
once used in rural areas.
• LANS run at speeds of 10 to 100 Mbps, have low delay and
make very few errors.
Local Area Networks

Two broadcast networks: Client Client


• Bus
• Ring Client Client

Client Client
Wide Area Networks
• WANs spans a large geographical area, often a country
or continent.
• It contains collection of machines for running user
applications, called hosts or end user.
• WAN can be as complex as the backbones that
connect the Internet or as simple as a dial-up line that
connects a home computer to the Internet
• The first called as a switched WAN and to the
second as a point-to-point WAN
• The hosts are connected by communication subnet or
subnet. The subnet carries message from host to host.
WANs: a switched WAN and a point-to-point WAN
Wide Area Networks
• The switched WAN connects the end systems, which usually
comprise a router (internetworking connecting device) that
connects to another LAN or WAN.
• The point-to-point WAN is normally a line leased from a
telephone or cable TV provider that connects a home
computer or a small LAN to an Internet service provider
(ISP).
• This type of WAN is often used to provide Internet
access.
Metropolitan Area Networks(MAN)

• MAN is basically a bigger version of a LAN and normally uses


similar technology.
• A metropolitan area network (MAN) is a network with a size
between a LAN and a WAN.
• It normally covers the area inside a town or a city.
• It is designed for customers who need a high-speed
connectivity, normally to the Internet, and have endpoints
spread over a city or part of city.
• A good example of a MAN is the part of the telephone
company network that can provide a high-speed DSL line to
the customer.
A heterogeneous network made of four WANs and two LANs
Metropolitan Area Network (MAN)
• Wide Area Network
STANDARDS AND PROTOCOLS
2. Communication Protocols
Definition
• Protocol is a set of rules that govern all aspect of data
communication between computers on a network
• These rules include guidelines that regulate the following
characteristics of a network:
access method, allowed physical topologies, types of
cabling, and speed of data transfer
• A protocol defines what, how, when it communicated.
• The key elements of a protocol are syntax, semantics and
timing.
Elements of protocol
i) Syntax
The structure or format of the data.
Eg. A simple protocol;

Sender Receiver
data
address address

8 bits 8 bits 64 bits

ii) Semantics
• Refers to the meaning of each section of bits.
• How is a particular pattern to be interpreted, and what action is to be taken
based on that interpretation.
• Eg. Does an address identify the route to be taken or the final of the message?
iii) Timing
Refers to two characteristics:
a. When data to be sent
b. How fast it can be sent
e.g. If a sender produces data at 100 Mbps but the receiver can process
data at only 1 Mbps, the transmission will overload the receiver and data
will be largely lost.
Standards and Organizations For
Communication Standards
• Standards are essential in creating and maintaining an open and
competitive market for equipment manufacturers and in
guaranteeing national and international interoperability of data and
telecommunications technology and processes.
• Standards are developed by cooperation among standards creation
committees, forums, and government regulatory agencies.
Standards Creation Committees
a) International Standards Organization (ISO)
b) International Telecommunications Union (ITU)
c) American National Standards Institute (ANSI)
d) Institute of Electrical and Electronics Engineers (IEEE)
e) Electronic Industries Association (EIA)
f) Internet Engineering Task Force (IETF)
International Standards Organization (ISO)

• A multinational body whose membership is drawn mainly from


the standards creation committees of various governments
throughout the world
• Dedicated to worldwide agreement on international standards
in a variety field.
• Currently includes 82 memberships industrialized nations.
• Aims to facilitate the international exchange of goods and
services by providing models for compatibility, improved
quality, increased quality, increased productivity and decreased
prices.
International Telecommunications Union (ITU)
• Also known as International Telecommunications
Union-Telecommunication Standards Sector (ITU-T)
• An international standards organization related to the
United Nations that develops standards for
telecommunications.
• Two popular standards developed by ITU-T are:
• i) V series – transmission over phone lines
• ii) X series – transmission over public digital networks,
email and directory services and ISDN.
American National Standards Institute (ANSI)

• A non-profit corporation not affiliated with US


government.
• ANSI members include professional societies, industry
associations, governmental and regulatory bodies, and
consumer groups.
• Discussing the internetwork planning and engineering,
ISDN services, signaling, and architecture and optical
hierarchy.
Institute of Electrical and Electronics Engineers (IEEE)
• The largest national professional group involved in
developing standards for computing, communication,
electrical engineering, and electronics.
• Aims to advance theory, creativity and product quality
in the fields of electrical engineering, electronics and
radio.
• It sponsored an important standard for local area
networks called Project 802 (e.g. 802.3, 802.4 and
802.5 standards.)
Electronic Industries Association (EIA)
• An association of electronics manufacturers in the US.
• Provide activities include public awareness education and lobbying
efforts in addition to standards development.
• Responsible for developing the EIA-232-D and EIA-530 standards.

Internet Engineering Task Force (IETF)


• Concerned with speeding the growth and evolution of Internet
communications.
• The standards body for the Internet itself
• Reviews internet software and hardware.
Network Models

2.45
2-1 LAYERED TASKS

We use the concept of layers in our daily life. As an


example, let us consider two friends who communicate
through postal mail. The process of sending a letter to a
friend would be complex if there were no services
available from the post office.

Topics discussed in this section:


Sender, Receiver, and Carrier
Hierarchy

2.46
Sender, Receiver, and Carrier

At the Sender Site


• Let us first describe, in order, the activities that take place at the
sender site.
✓Higher layer: The sender writes the letter, inserts the letter in an
envelope, writes the sender and receiver addresses, and drops the
letter in a mailbox.
✓Middle layer: The letter is picked up by a letter carrier and delivered
to the post office
✓Lower layer: The letter is sorted at the post office; a carrier
transports the letter.
On the Way
• The letter is then on its way to the recipient. On the way to the
recipient's local post office, the letter may actually go through a
central office. In addition, it may be transported by truck, train,
airplane, boat, or a combination of these.
At the Receiver Site
✓Lower layer: The carrier transports the letter to the post office.
✓Middle layer: The letter is sorted and delivered to the recipient's
mailbox.
✓Higher layer: The receiver picks up the letter, opens the envelope, and
reads it.
Hierarchy
• According to our analysis, there are three different activities at the
sender site and another three activities at the receiver site.
• The task of transporting the letter between the sender and the receiver is done
by the carrier.
• At the sender site, the letter must be written and dropped in the mailbox before
being picked up by the letter carrier and delivered to the post office.
• At the receiver site, the letter must be dropped in the recipient mailbox before
being picked up and read by the recipient
Services
• Each layer at the sending site uses the services of the layer immediately
below it.
• The sender at the higher layer uses the services of the middle layer. The
middle layer uses the services of the lower layer.
• The lower layer uses the services of the carrier.
Tasks involved in sending a letter
We use the concept of layers in our daily life. As
an example, let us consider two friends who
communicate through postal mail.
Reference Models

• The OSI Reference Model


• The TCP/IP Reference Model
The OSI Reference Model
• In 1947, the international standards organization(ISO) is
a multinational body dedicated to worldwide agreement
on international standards.
• An ISO standard that covers all aspects of network
communications is the open systems interconnection
model.
• In late 1970s an open system is a set of protocols that
allow any two different systems to communicate
• It divides the communications processes into seven
layers.
Topics discussed in this section:
Layered Architecture
Peer-to-Peer Processes
Encapsulation
• The main concept of OSI is that the process of
communication between two endpoints in a
telecommunication network can be divided into seven distinct
groups of related functions, or layers.
• Each communicating user or program is at a computer that can
provide those seven layers of function.
• The seven layers of function are provided by a combination of
applications, operating systems, network card device drivers
and networking hardware that enable a system to put a signal
on a network cable or out over Wi-Fi or other wireless
protocol).
The OSI model has seven layers. The principles
that were applied to arrive at the seven layers
are:
• A layer should be created where a different level of
abstraction is needed.
• Each layer should perform a well defined function.
• The function of each layer should be chosen with an
eye toward defining internationally standardized
protocols.
• The layers boundaries should be chosen to minimize
the information flow across the interfaces.
• The number of layers large enough that distinct
functions need not be thrown together in the same
layer out of necessity, and small enough that the
architecture does not become unwieldy.
Seven layers of the OSI model
7 Layers
7. Application Layer
All
6. Presentation Layer People
5. Session Layer Seem
4. Transport Layer To
3. Network Layer Need
2. Data Link Layer
Data
1. Physical Layer
Processing
The OSI reference model.
Physical layer

• Converts bits into electronic signals for outgoing messages


• Converts electronic signals into bits for incoming messages
• The physical layer is concerned with transmitting raw bits over a communication
channel. The design issues have to do with making sure that when one side sends a 1
bit, it is received by the other side as a 1 bit, not as a 0 bit.
• The bottom layer of the OSI model
The physical layer is also concerned with the following:
•Transmission medium: The physical layer defines the characteristics of
the interface between the devices and the transmission medium. It also
defines the type of transmission medium.
•Synchronization of bits: The sender and receiver not only must use the
same bit rate but also must be synchronized at the bit level. In other
words, the sender and the receiver clocks must be synchronized.
•Physical topology: The physical topology defines how devices are
connected to make a network. E.g. Star, Mesh, Bus etc.
•Transmission mode: The physical layer also defines the direction of
transmission between two devices: simplex, half-duplex, or full-duplex.
• Data Rate: The transmission rate-the number of bits sent each second-
is also defined by the physical layer. In other words, the physical layer
defines the duration of a bit, which is how long it lasts.
Data link layer

• The main task of the data link layer is to transform a raw


transmission facility into a line that appears free of undetected
transmission errors to the network layer.
• It accomplishes this task by having the sender break up the input
data into data frames (typically a few hundred or a few
thousand bytes) and transmits the frames sequentially.
Design issues are:

• Framing: The data link layer divides the stream of bits received from the
network layer into manageable data units called frames.
• Physical addressing: If frames are to be distributed to different systems on
the network, the data link layer adds a header to the frame to define the
sender and/or receiver of the frame.
• Error control: The data link layer adds reliability to the physical layer by
adding mechanisms to detect and retransmit damaged or lost frames. Error
control is normally achieved through a trailer added to the end of the frame.
• Flow control: If the rate at which the data are absorbed by the receiver is less
than the rate at which data are produced in the sender, the data link layer
imposes a flow control mechanism to avoid overwhelming the receiver.
• Access Control: When two or more devices are connected to the same link,
data link layer protocols are necessary to determine which device has control
over the link at any given time.
At the receiving end, this layer packages raw data from the physical layer
into data frames for delivery to the Network layer
At the sending end this layer handles conversion of data into raw formats
that can be handled by the Physical Layer
If the service is reliable, the receiver confirms correct receipt of each
frame by sending back an acknowledgement frame
The physical layer accepts and transmits stream of bits, the data link
layer should create and recognize frame boundaries. This can be
accomplished by attaching special bit patterns to the beginning and
ending of frame.
A duplicate frame could be sent if the acknowledgement frame from
receiver back to the sender were lost.
Network layer

• The network layer is responsible for the source-to-destination delivery of a


packet, possibly across multiple networks (links). Whereas the data link layer
oversees the delivery of the packet between two systems on the same network
(links), the network layer ensures that each packet gets from its point of origin to
its final destination.
• If two systems are connected to the same link, there is usually no need for a net-
work layer.
Other responsibilities of the network layer include the following:
• Logical addressing: The physical addressing implemented by the data link
layer handles the addressing problem locally. If a packet passes the network
boundary, we need another addressing system to help distinguish the
source and destination systems. The network layer adds a header to the
packet corning from the upper layer that, among other things, includes the
logical addresses of the sender and receiver.

• Routing: When independent networks or links are connected to create


internetworks (network of networks) or a large network, the connecting
devices (called routers or switches) route or switch the packets to their final
destination. One of the functions of the network layer is to provide this
mechanism.

• Congestion: If too many packets are present in the subnet at the same time,
they will get in one another's way, forming bottlenecks. The control of such
congestion also belongs to the network layer.
Transport layer
• The Transport layer is responsible for process-to-process delivery of
the entire message. A process is an application program running on a
host
• It ensures that the whole message arrives intact and in order,
overseeing both error control and flow control at the source-to-
destination level
• Whereas the network layer oversees source-to-destination delivery
of individual packets, it does not recognize any relationship between
those packets.
Other responsibilities of the transport layer
• Service-point addressing: The source-to-destination delivery means
delivery not only from one computer to the next but also from a specific
process (running program) on one computer to a specific process (running
program) on the other. The transport layer header must therefore include a
type of address called a service-point address (or port address).
• Segmentation and reassembly. A message is divided into transmittable
segments, with each segment containing a sequence number. These
numbers enable the transport layer to reassemble the message correctly
upon arriving at the destination and to identify and replace packets that
were lost in transmission.
• Connection control: A connection oriented/ connectionless transport layer
makes a connection with the transport layer at the destination machine
first before delivering the packets. After all the data are transferred, the
connection is terminated.
• Flow & Error control: Like the data link layer, the transport layer is
responsible for flow & Error control. However, flow control at this layer is
performed end to end rather than across a single link.
Transport layer

• Manages the transmission of data across a network


• Manages the flow of data between parties by segmenting long data streams into
smaller data chunks (based on allowed “packet” size for a given transmission
medium)
• Reassembles chunks into their original sequence at the receiving end
• Provides acknowledgements of successful transmissions and requests
resends for packets which arrive with errors
Session layer

• The session layer is the network dialog controller. It establishes,


maintains, and synchronizes the interaction among communicating
systems.
• Specific responsibilities of the session layer include the following:
• Dialog control: The session layer allows two systems to enter into a
dialog. It allows the communication between two processes to take
place in either half duplex (one way at a time) or full-duplex (two ways
at a time) mode.
• Synchronization: The session layer allows a process to add
checkpoints, or synchronization points, to a stream of data.
Presentation layer

• The presentation layer is concerned with the syntax and semantics of


the information transmitted.
• Translation : The different computers use different encoding systems,
the presentation layer is responsible for interoperability between these
different encoding methods. The presentation layer at the sender
changes the information from its sender-dependent format into a
common format. The presentation layer at the receiving machine
changes the common format into its receiver-dependent format.
Specific responsibilities of the presentation layer include the
following:

• Encryption: Encryption means that the sender transforms the


original information to another form and sends the resulting
message out over the network. Decryption reverses the
original process to transform the message back to its original
form.
• Compression: Data compression reduces the number of bits
contained in the information. Data compression becomes
particularly important in the transmission of multimedia such
as text, audio, and video.
Application layer

• The application layer is responsible for providing services to the user.


• The application layer contains a variety of protocols that are
commonly needed by users. One widely-used application protocol is
HTTP (Hypertext Transfer Protocol), which is the basis for the World
Wide Web.
• It provides user interfaces and support for services such as electronic
mail, remote file access and transfer, shared database management, and
other types of distributed information services.
Services provides are:

• Mail service: This application provides the basis for e-mail


forwarding and Storage.
• Directory services: This application provides distributed database
sources and access for global information about various objects
and services.
• File transfer, access and Management: This application allows a
user to access files in a remote host (to make changes or read
data), to retrieve files from a remote computer for use in the local
computer, and to manage or control files in a remote computer
locally.
An exchange using the OSI model
THE SEVEN OSI REFERENCE MODEL
LAYERS

You might also like