UNIT-I
Computer Networks
Introduction
1. Define Computer Network? Need of computer Network?
A Group of computers which are communicated to each other for the purpose of
sharing their resources is Called computer network. These computers can exchange
information with each other through the Communication channels like copper wire,
fiber optics, microwaves, infrared, and communication satellites can also be used.
Need of computer Networking
To shared a files and folders from one computer to another computer in network
To shared a hardware equipment like printers, CD-Rom and so on
To shared the software applications over network and this allows implementing
Client server applications to improve the communication between to computers
To improved speed and accuracy
To reduce the cost of data transfer
High reliability
Types of Networks
Local Area Network (LAN)
A local area network is generally called as LANs; these are privately-owned networks
within a single Building or campus of up to a few kilometers in size.
LANs are widely used to connect personal computers and work stations in company
Offices and factories to share resources like printers, and to exchange information.
LANs are different from other networks by three characteristics (1).With their size,
(2).With their transmission technology. (3).their topology.
LANs run at a speed of 10 to 100 Mbps (mega bits/sec)
LANs use a transmission Technology consisting of a single cable to which all the
systems are attached, Like a telephone lines.
Here it uses IEEE 802.3 popularly known as Ethernet, and IEEE 802.5 IBM Token ring
Various Topologies are used for broadcasting the LANs. The most common LAN
topologies are bus, ring, and star.
Metropolitan Area Network (MAN)
A metropolitan area network (MAN) is a network with a size between a LAN and a WAN.
Both the buses contain Head-End which initiates the tran*smission. The traffic of right
Side of the sender uses upper bus. And to send left side uses lower one.
It is designed for customers who need a high-speed connectivity.
The range of MAN is 100M to 10KM
These are private and public owned networks
Wide Area Network (WAN)
WAN spans large geographical area
The range of WAN is different countries
WAN provides long-distance transmission of data, voice, image and information over
Large geographical areas that may comprise a country, continent or even the
whole world. In WANs systems are connected by a communication subnet or
subnet.
The job of the subnet is to carry messages from system to the system, just like a
Telephone which carries Words from speaker to speaker in most wide area networks
the subnet consists of two distinct components transmission lines and switching
elements. Transmission lines are also called as circuits, channels or trunks move bits
between machines. The switching elements are specialized computers used to connect
two or more transmission lines connecting multiple networks known as routers.
Network Topologies
Topology: The Physical arrangement of computers which are connected to each other
through via communication channel is called topology.
Bus Topology:
Bus topology is a network type in which every computer and network device is
connected to single cable. When it has exactly two endpoints, then it is
called Linear Bus topology.
Features of Bus Topology
It transmits data only in one direction.
Every device is connected to a single cable
Advantages of Bus Topology
It is cost effective.
All nodes are easily add or remove
Used in small network
It is easy to understand.
Easy to expand joining two cables together.
Disadvantages of Bus Topology
Cables fails then whole network fails.
If network traffic is heavy or nodes are more the performance of the network
decreases.
Cable has a limited length.
2. RING Topology
It is called ring topology because it forms a ring as each computer is connected to
another computer, with the last one connected to the first. Exactly two neighbors for
each device.
Features of Ring Topology
Numbers of repeaters are used for Ring topology with large number of nodes,
because if someone wants to send some data to the last node in the ring topology
with 100 nodes, then the data will have to pass through 99 nodes to reach the
100th node. Hence to prevent data loss repeaters are used in the network.
The transmission is unidirectional
Data is transferred in a sequential manner that is bit by bit
Advantages of Ring Topology
Transmitting network is not affected by high traffic or by adding more nodes, as
only the nodes having tokens can transmit data.
Cheap to install and expand
Disadvantages of Ring Topology
Troubleshooting is difficult in ring topology.
Adding or deleting the computers disturbs the network activity.
Failure of one computer disturbs the whole network.
3. STAR Topology
In this type of topology all the computers are connected to a single hub through a
cable.
This hub is the central node and all others nodes are connected to the central
node.
Features of Star Topology
Every node has its own dedicated connection to the hub.
Hub acts as a repeater for data flow.
Can be used with twisted pair, Optical Fiber or coaxial cable.
Advantages of Star Topology
Hub can be upgraded easily.
Easy to troubleshoot.
Easy to setup and modify.
Only that node is affected which has failed, rest of the nodes can work smoothly.
Disadvantages of Star Topology
Cost of installation is high.
Expensive to use.
If the hub fails then the whole network is stopped because all the nodes depend
on the hub.
4. MESH Topology
It is point–to-point connection to other nodes traffic is carried only between two
devices to which it is connected. Mesh has n(n-2)/2 physical channels.
Figure: A fully connected mesh topology (five devices)
Feature of Mesh Topology
Fully connected
Robust
Not flexible
Advantages of mesh topology:
Each connection can carry its own data load
It is robust
Provides security and privacy
Disadvantages of mesh topology:
Cable cost is more
Installation and configuration is difficult
Bulk wiring is required
HYBRID Topology
It is two different types of topologies which is a mixture of two or more topologies.
It is combination of two or more topologies
Inherits the advantages and disadvantages of the topologies included
Advantages of Hybrid Topology Feature of Hybrid Topology
Reliable as error detecting and trouble shooting is easy
Effective
Flexible
Disadvantages of Hybrid Topology
Complex in design
costly
Reference model
It describes how information from a software application in one computer moves
through a physical medium to the software application in other computer.
Reference models are two types 1. OSI 2.TCP/IP
OSI Reference Model
It stands for open system inter connection. It was developed by International standard
organization in 1984.It consist of 7 layers.
1. Application Layer 2.Presentation Layer 3.Session Layer 4.Transport Layer 5.Network
Layer 6.Data Link Layer 7.Physical Layer
Layers 1, 2, and 3-physical, data link, and network layers are known as
Networksupport layers
Layers 5, 6, and 7-session, presentation, and application layers are known as the
Usersupport layers
1. Physical Layer
The main functionality of the physical layer is to transmit the individual bits from
one node to another node.
It is the lowest layer of the OSI model.
It establishes, maintains and deactivates the physical connection.
It transmit the raw bits over a communication channel
If system at one side sends one bit and other side receive one bit
Functions of a Physical layer:
Representation of bit: This layer data consist of a bits with no interpretation.
Data Rate: It represents how many number of bits can be transfer in each
second also defined by physical layer
Synchronization: The sender and receiver both side must have to use the same
bit rate.
Line configuration: It is concerned with connection of devices to the media in
point to point or multi configuration.
Topology: It defines how devices are connected to make a network
Transmission media: It defines the direction of transmission between the
devices as simplex, half duplex and full duplex.
2. Data Link Layer:
Functions of a Data Link layer:
Framing: It divides the stream of bits received from network layer into data units
called Frame. It contains header, Data and trailer.
Physical addressing: The data link layer adds a header to the frame that
consists of a destination address.
Flow control: It is the main function of the data link layer. The constant data
rate is maintained on both sender and receiver so no data get corrupted.
Error Control: It is achieved by adding calculated value CRC (Cycle Redundancy
Check) it is placed to data link layer. The trailer which is added to message to
frame before it is sending to physical layer. if any error seems to occur the
receiver sends acknowledgement to retransmit of the corrupted frame.
Access Control: When two or more devices are connected to the same
communication channel then the data link layer protocols are used to determine
which device control over the link at has given time.
3. Network Layer:
It is the third layer of the OSI model
The Data link layer is responsible for routing and forwarding the packets.
This layer of data is transfer from source to destination through packet
Functions of a Network layer:
Internetworking: An internet working is the main responsibility of the network
layer. It provides a logical connection between different devices.
Addressing: A Network layer adds the source and destination address to the
header of the frame. Addressing is used to identify the device on the internet.
Routing: Routing is the major component of the network layer, and it determines
the best optimal path out of the multiple paths from source to the destination
Packetizing: A Network Layer receives the packets from the upper layer and
converts them into packets. This process is known as Packetizing. It is achieved
by internet protocol (IP)
4. Transport Layer:
The Transport layer is a fourth layer of OSI reference model.
The main responsibility of the transport layer is to transfer the data completely.
It receives the data from the upper layer and converts them into smaller units
known as segments.
This layer can be termed as an end-to-end layer as it provides a point-to-point
connection between source and destination to deliver the data reliably. This
layer used two protocols are TCP and UDP
Functions of a Transport Layer:
Segmentation: When the transport layer receives the message from the upper
layer, it divides the message into multiple segments, and each segment is
assigned with a sequence number that uniquely identifies each segment. When
the message has arrived at the destination, then the transport layer reassembles
the message based on their sequence numbers.
Connection control: Transport layer provides two services Connection-oriented
service and connectionless service. A connectionless service treats each segment
as an individual packet, and they all travel in different routes to reach the
destination. A connection-oriented service makes a connection with the transport
layer at the destination machine before delivering the packets. In connection-
oriented service, all the packets travel in the single route.
Flow control: The transport layer also responsible for flow control but it is
performed end-to-end rather than across a single link.
Error control: The transport layer is also responsible for Error control. The
sender transport layer ensures that message reach at the destination without
any error.
5. Session Layer:
It is a layer 5 in the OSI model.
The Session layer is used to establish, maintain and synchronizes the interaction
between communicating devices.
Functions of Session layer:
Dialog control: Session layer acts as a dialog controller that creates a dialog
between two processes or we can say that it allows the communication between
two processes which can be either half-duplex or full-duplex.
Synchronization: Session layer adds some checkpoints when transmitting the
data in a sequence. If some error occurs in the middle of the transmission of
data, then the transmission will take place again from the checkpoint. This
process is known as Synchronization and recovery.
6. Presentation Layer:
A Presentation layer is mainly concerned with the syntax and semantics of the
information exchanged between the two systems.
It acts as a data translator for a network.
This layer is a part of the operating system that converts the data from one
presentation format to another format.
The Presentation layer is also known as the syntax layer.
Functions of Presentation layer:
Encryption: Encryption is needed to maintain privacy. Encryption is a process of
converting the sender-transmitted information into another form and sends the
resulting message over the network.
Compression: Data compression is a process of compressing the data, i.e., it reduces
the number of bits to be transmitted. Data compression is very important in multimedia
such as text, audio, video
7. Application Layer
It is the 7th and top most layer of OSI reference model
It handles issues such as network transparency, resource allocation, etc.
This layer provides the network services to the end-users.
Functions of Application layer:
File transfer, access, and management: An application layer allows a user to
access the files in a remote computer, to retrieve the files from a computer and to
manage the files in a remote computer.
Mail services: An application layer provides the facility for email forwarding and
storage
Directory services. This application provides distributed database sources and
access for global information about various objects and services.
Eg: HTTP, FTP, TELNET, SMTP etc...
Lack of OSI Models Success
Advantages
It is a truly generic model
The OSI model works as a standard model in data communication
OSI model is helpful if you want to buy the required software or hardware to
build your own network
Layers in the OSI model architectures can be distinguished and every layer has
its own importance according to their interfaces, services, and protocols.
The OSI divides the all process of data communication into simpler and smaller
The protocols are hidden in the OSI model, so any protocols can be implemented
in the OSI model. OSI model is a standard model, so it can adapt all features of
other protocols.
The OSI model can facilitate the followings;
Component development
Concept of Modularity
Design of the network
Troubleshooting of the network
The OSI model increases the learn ability of the network.
Disadvantages
The OSI model is a theoretical model. Sometimes it can be a difficulty if the
appropriate technology is not available.
The OSI restricts its practical implementation.
The OSI model is a very complex model.
The initial implementation of the OSI model is slow.
The initial implementation of the OSI model is costly.
There is inter dependence among the OSI layers. OSI layers cannot work in
parallel. Each upcoming layer needs to wait to receive the data from its
predecessor layer. For an example the application layer receives the data from
the presentation layer and the presentation layer needs to wait to receive the
data from the session layer and so on.
The duplication of services in various layers is a problem in the OSI model. Some
Services are offered by multiple layers. Some of these services are mentioned
below;
Flow control
Error control
Addressing etc.
TCP/IP Reference Model
TCP/IP stands for transmission control protocol and internet protocol .It was developed
Department of defense .It has 4 layers.
These Layers are
Application Layer
Transport Layer
Internet Layer
Host- to –Network Layer
1. Host-to-Network Layer:
This is the Lowest Layer
Protocol is used to connect the host, so that the packets can besent over it.
Varies host to host and network to network
2. Internet Layer:
Selection of a packet switching network which is based on a connection less
Internetwork layer is called internet layer.
It helps the packets to travel independently to the destination
It allows the host to insert the packets
Internet protocol is used in this layer
This layer holds the whole architecture
3. Transport Layer:
It decides if data transmission should be on parallel path or single path
It breaks the message into small units called segments. So that they are handled
more efficiently by the network layer.
Functions of transport layer are same as the OSI model
It also arranges the packets sent in sequence.
This is a third layer of TCP/IP model
4. Application Layer:
Protocols used in this layer are high level protocols such as TELNET, FTP, SMTP, DNS
etc..
TELNET is a two-way communication protocol, which allows connecting to a
remote machine and run applications on it.
FTP (File Transfer Protocol) is a protocol that allows File transfer amongst
computer users connected over a network. It is reliable, simple and efficient.
SMTP (Simple Mail Transport Protocol) is a protocol, which is used to transport
electronic mail between a source and destination, directed via a route.
DNS (Domain Name Server) resolves an IP address into a textual address for
Hosts connected over a network. It allows peer entities to carry conversation.
It defines two end-to-end protocols: TCP and UDP
TCP (Transmission Control Protocol): It is a reliable connection-oriented protocol
which handles byte-stream from source to destination without error and flow
control.
UDP (User-Datagram Protocol): It is an unreliable connection-less protocol that
do not wants TCPs, sequencing and flow control.
TCP/IP PROTOCOL SUITE
Compare OSI Reference model and TCP /IP
OSI TCP/IP
OSI represents Open System TCP/IP model represents the
Interconnection. Transmission Control Protocol /
Internet Protocol.
OSI is a generic, protocol independent TCP/IP model depends on standard
standard. protocols about which the computer
network has created.
The OSI model was developed first, and The protocols were created first and
then protocols were created to fit the then built the TCP/IP model.
network architecture’s needs.
It provides quality services. It does not provide quality services.
The OSI model represents defines It does not mention the services,
administration, interfaces and interfaces, and protocols.
conventions. It describes clearly which
layer provides services.
It provides both connection and It provides connectionless
connectionless oriented transmission in transmission in the network layer
the network layer
It uses a horizontal approach. It uses a vertical approach.
The smallest size of the OSI header is 5 The smallest size of the TCP/IP header
bytes. is 20 bytes.
It contains 7 layers It contain 4 Layers
INTERNET HISTORY
ARPANET: Advanced Research Projects Agency
It was started and developed by the United states
It was wide area network linking many universities
It was first to use packet switching which was suggested by Paul Baran and was
the beginning of what we consider the internet today
It was created to make it easier for people to access computers ,improved computer
equipment
It is used to have more effective communication method of military
It was started when two nodes are established between UCLA(University of
California and Loss Angles) and Stanford Research Institute in 1969 .
ARPANET completed its transits to TCP/IP on January 2,1983
It consist of subnet host computers
The subnet would consist of minicomputers called IMPs (Interface Message
Processors) connected by 56-kbps transmission lines.
Each IMP would be connected to at least two other IMPs. The subnet was to be a
datagram subnet, so if some lines and IMPs were destroyed, messages could be
automatically rerouted along alternative paths.
The software was split into two parts: subnet and host. The subnet software consisted
of the IMP end to the host IMP connection, the IMP-IMP protocol, and a source IMP to
destination IMP protocol designed to improve reliability.
NSFNET (National Science Foundation)
NSF (the U.S. National Science Foundation) saw the enormous impact that the
ARPANET was having on university research, allowing scientists across the country to
share data and collaborate on research projects. This lack of universal access
prompted NSF to set up a virtual network.
NSF decided to build a backbone network to connect its six supercomputer centers;
each supercomputer was given a little brother, consisting of an LSI-11 microcomputer
called a fuzz ball. The fuzzballs were connected with 56-kbps leased lines and formed
the subnet, the same hardware technology as the ARPANET used. The software
technology was different however: the fuzzballs spoke TCP/IP right from the start,
making it as a first TCP/IP WAN.
NSF also funded some 20 regional networks that connected to the backbone to allow
users at thousands of universities, research labs, libraries, and museums to access
any of the supercomputers and to communicate with one another. The complete
network, including the backbone and the regional networks, was called NSFNET. It
connected to the ARPANET through a link between an IMP and a fuzz ball.
Consequently, NSF encouraged MERIT, MCI, and IBM to form a nonprofit corporation.
ANS (Advanced Networks and Services). In 1990, ANS took over NSFNET and
upgraded the 1.5-Mbps links to 45 Mbps to form ANSNET.
INTERNET:
The number of networks, machines, and users connected to the ARPANET grew rapidly
after TCP/IP became the only official protocol on January 1, 1983. When NSFNET and
the ARPANET were interconnected, the growth became exponential.
Traditionally the Internet and its predecessors had four main applications:
1. E-mail. The ability to compose, send, and receive electronic mail has been around
since the early days of the ARPANET and is enormously popular. Many people get
dozens of messages a day and consider it their primary way of interacting with the
outside world, far outdistancing the telephone and snail mail. E-mail programs are
available on virtually every kind of computer these days.
2. News. Newsgroups are specialized forums in which users with a common interest
can exchange messages. Thousands of newsgroups exist, devoted to technical and
nontechnical topics, including computers, science, recreation, and politics. Each
newsgroup has its own etiquette, style, and customs, and woe betide anyone violating
them.
3. Remote login. Using the telnet, rlogin, users anywhere on the Internet can log on to
any other machine on which they have an account.
4. File transfer. Using the FTP program, users can copy files from one machine on the
Internet to another. Vast numbers of articles, databases, and other information are
available this way.