CN UNIT I
CN UNIT I
Introduction:
Computer Network means the interconnection of a set of autonomous computers. The term
autonomous means that the function of computers is independent of others. However, 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.
Components:
The five components that make up a data communication are the message, sender, receiver, medium,
and protocol.
Figure 1.1 Five components of data communication
1. Message: The message is the information (data) to be communicated. The 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,
workstation, telephone handset, video camera, and so on.
3. Receiver: The receiver is the device that receives the message. It can be a computer,
workstation, telephone handset, television, and so on.
4. Transmission medium. The transmission medium is the physical path by which a message
travels from sender to receiver. Some examples of transmission media include twisted-pair
wire, coaxial cable, fiber-optic cable, and radio waves.
5. Protocol. A protocol is a set of rules that maintain data communications. It represents an
agreement between the communicating devices. Without a protocol, two devices may be
connected but not communicating, just like a person speaking French cannot be understood
by a person who speaks only Japanese.
Data Flow:
Communication between two devices can be simplex, half-duplex, or full-duplex as shown in
following figure.
Simplex :
In simplex mode, the communication is unidirectional, as on a one-way road. Only one of the two
devices on a link can transmit; the other can only receive (see Figure a).
Keyboards and traditional monitors are examples of simplex devices. The keyboard can
only give input; the monitor can only accept output. The simplex mode can use the entire capacity
of the communication channel to send data in one direction only
Half-Duplex :
In half-duplex mode, each system can both transmit and receive, but not at the same time. When one
device is sending, the other can only receive, and vice versa (see Figure b).
The half-duplex mode is like a one-lane street with traffic allowed in both directions. When cars are
traveling in one direction, cars going the other way must wait. Walkie-talkies are half-duplex
system.
The half-duplex mode is used in cases where there is no need for communication in both directions
at the same time.
Full-Duplex :
In full-duplex mode (also called duplex), both systems can transmit and receive simultaneously (see
Figure c). 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. This sharing can occur in two ways: Either the link must contain
two physically separate transmission paths, one for sending and the other for receiving; or the
capacity of the channel is divided between signals traveling in both directions.One common example
of 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 Following Figure shows the layers involved when a message is sent from device A to device B.
As the message travels from A to B, it may pass through many intermediate nodes. These
intermediate nodes usually involve only the first three layers of the OSI model.
The seven layers of the OSI model are divided into three subgroups.
Layers 1, 2, and 3-physical, data link, and network layers are known as network support layers;
Because they deal with the physical aspects of moving data from one device to another (such as
electrical specifications, physical connections, physical addressing, and transport timing and
reliability).
Layers 5, 6, and 7-session, presentation, and application layers are known as the user support
layers; they allow interoperability among unrelated software systems.
Layer 4, the transport layer, links the two subgroups and ensures that what the lower layers
have transmitted is in a form that the upper layers can use. The upper OSI layers are almost
always implemented in software; lower layers are a combination of hardware and software,
except for the physical layer, which is mostly hardware.
Physical Layer :
The physical layer is used for transmitting the raw bits over a communication channel. Here if the
system at one side sends 1bit, it is received by the other side also as a 1bit, not as a 0 bit. The
functions required to carry a bit stream over a physical medium. It deals with the mechanical and
electrical specifications of the interface and transmission medium.
Following figure shows the position of the physical layer with respect to the transmission medium
and the data link layer.
Line configuration: The physical layer is concerned with the connection of devices to the
media. In a point-to- point configuration, two devices are connected through a dedicated
link. In a multipoint configuration, a link is shared among several devices.
Physical topology: The physical topology defines how devices are connected to make a
network. Ex: mesh topology, a star topology, a ring topology, a bus topology, a hybrid
topology.
Transmission mode: The physical layer also defines the
direction of transmission between the two devices as Simplex,
Half-duplex, and Full-duplex.
Data Link Layer
The data link layer transforms the physical layer, a raw transmission facility, to a reliable
link. It makes the physical layer appear as an error-free to the upper layer (network layer).
Following Figure shows the relationship of the data link layer to the network and physical layers.
Framing: The data link layer divides the stream of bits received from the network layer
into 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. If the frame is intended for a system outside the sender's network, the receiver
address is the address of the device that connects the network to the next one.
Flow control: If the rate at which the data is absorbed by the receiver is less than the rate at
which data is transferred by thesender, the data link layer uses a flow control protocols to
maintain same data transfer rate between sender and the receiver
Error control: The data link layer adds reliability to the physical layer by adding
mechanisms to detect and correct the damaged or lost frames. It also uses a mechanism to
recognize duplicate frames. Error control is normally achieved through a trailer added to
the end of the frame.
Access control: When two or more devices are connected to the same link, data link
layer protocols are necessary to determine which device has to send the data at any given
time. Otherwise there is a chance of collision. For this purpose a special sub layer in the
data link layer known as medium access sub layer will deal this one.
Network Layer:
The network layer is responsible for the delivery of a packet from source to destination, possibly
across multiple networks. 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 no need for a network
layer. However, if the two systems are attached to different networks with connecting devices
between the networks, there is often a need for the network layer to maintain source-to- destination
delivery.
Following Figure shows the relationship of the network layer to the data link and transport layers.
Figure: Network layer
layers.
Transport layer
Other responsibilities of the transport layer include the following:
Service-point addressing: Computers often run several programs at the same time. For
this reason, 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.
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: The transport layer can be either connectionless or connection
oriented. A connectionless transport layer treats each segment as an independent packet
and delivers it to the transport layer at the destination machine. A connection oriented
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 control: Like the data link layer, the transport layer is responsible for flow control.
However, flow control at this layer is performed end to end rather than across a single link.
Error control: Like the data link layer, the transport layer is responsible for error control.
However, error control at this layer is performed process-to process rather than across a
single link. The sending transport layer makes sure that the entire message arrives at the
receiving transport layer without error (damage, loss, or duplication). Error correction is
usually achieved through retransmission.
Session Layer:
Session layer allows users on different machines to establish the Sessions , maintain the
sessions and synchronize the sessions.
The session layer is responsible for dialog control.
Specific responsibilities of the session layer include the following:
Dialog control: one of the services of the session layer is to manage dialogue control.
Sessions allow traffic in one direction or both the directions at the same time. In a network
we are having many numbers of systems. If more than one system want to perform the
operation, on that case which system will have the priority is the service provided by
session layer, it is known as token management
Synchronization: The session layer allows a concept of checkpoints, that if we are
transferring a file which may take 2hours between two machines. After the completion of 1
hour if the system crashes, automatically already transferred data will be lost. For that
purpose such a huge data will be divided into checkpoints.
Following Figure illustrates the relationship of the session layer to the transport and
presentation layers.
Session layer
Presentation Layer:
The presentation layer is concerned with the syntax and semantics of the information
exchanged between two systems.
Following Figure shows the relationship between the presentation layer and the application
and session layers.
Let us now turn from the OSI reference model to the reference model used in the grandparent of all
wide area computer networks,
The ARPANET, and its successor, the world wide Internet. It is useful to mention a few key
aspects of it now. The ARPANET was a research network sponsored by the DoD (U.S. Department
of Defense). It eventually connected hundreds of universities and government installations, using
leased telephone lines. When satellite and radio networks were added later, the existing protocols
had trouble interworking with them, so a new reference architecture was needed. This architecture
later became known as the TCP/IP Reference Model, after its two primary protocols.
The TCP/IP reference model
All these requirements led to the choice of a packet-switching network based on a connectionless
internetwork layer. This layer, called the internet layer, Its job is to permit hosts to inject packets
into any network and have them travel independently to the destination They may even arrive in a
different order than they were sent, in which case it is the job of higher layers to rearrange them, if
in-order delivery is desired. Note that ''internet'' is used here in a generic sense, even though this
layer is present in the Internet.
The internet layer defines an official packet format and protocol called IP (Internet Protocol). The
job of the internet layer is to deliver IP packets where they are supposed to go. Packet routing is
clearly the major issue here, as is avoiding congestion. For these reasons, it is reasonable to say that
the TCP/IP internet layer is similar in functionality to the OSI network layer.
The Transport Layer:
The layer above the internet layer in the TCP/IP model is now usually called the transport layer. It
is designed to allow peer entities on the source and destination hosts to carry on a conversation, just
as in the OSI transport layer. Two end-to- end transport protocols have been defined here. The first
one, TCP (Transmission Control Protocol), is a reliable connection-oriented protocol that allows
a byte stream originating on one machine to be delivered without error on any other machine in the
internet. It fragments the incoming byte stream into discrete messages and passes each one on to the
internet layer. At the destination, the receiving TCP process reassembles the received messages into
the output stream. TCP also handles flow control to make sure a fast sender cannot transfer data
accurately to a slow receiver with more messages than it can handle.
The second protocol in this layer, UDP (User Datagram Protocol), is an unreliable,
connectionless protocol for applications that do not want TCP's sequencing or flow control and
wish to provide their own. It is also widely used for client-server-type request-reply queries and
applications in which prompt delivery is more important than accurate delivery, such as
transmitting speech or video.
Stream Control Transmission Protocol (SCTP): The Stream Control Transmission Protocol
(SCTP) provides support for newer applications such as voice over the Internet. It is a transport
layer protocol that combines the best features of UDP and TCP.
TCP/IP PROTOCOL SUITE:
The TCP/IP protocol suite was developed prior to the OSI model.
The layers in the TCP/IP protocol suite do not exactly match those in the OSI model.
The original TCP/IP protocol suite was defined as having four layers: host-to-network,
internet, transport, and application
However, when TCP/IP is compared to OSI, we can say that the host-to-network
layer is equivalent to the combination of the physical and data link layers.
The internet layer is equivalent to the network layer
The application layer is roughly doing the job of the session, presentation, and
application layers with the transport layer in TCP/IP taking care of part of the duties of
the session layer.
we assume that the TCP/IP protocol suite is made of five layers: physical, data link,
network, transport, and application. The first four layers provide physical standards,
network interfaces, internetworking, and transport
functions that correspond to the first four layers of the OSI model. The three topmost layers
in the OSI model, however, are represented in TCP/IP by a single layer called the
application layer
TCP/IP is a hierarchical protocol made up of interactive modules, each of which provides a
specific functionality. At the transport layer, TCP/IP defines three protocols:
Transmission Control Protocol (TCP), User
Datagram Protocol (UDP), and Stream Control Transmission Protocol (SCTP). At the
network layer, the main protocol defined by TCP/IP is the Internetworking Protocol (IP);
there are also some other protocols that support data movement in this layer.
Topology:
The term topology refers to the way in which a network is laid out physically: two or more
devices connect to a link; two or more links form a topology. The topology of a network is the
geometric representation of the relationship of all the links and linking devices (usually called
nodes) to one another.
There are four basic topologies possible: mesh, star, bus, and ring
Mesh topology : In a mesh topology, every device has a dedicated point-to-point link to every
other device. The term
dedicated means that the link carries data only between the two devices it connects.
One practical example of a mesh topology is the connection of telephone regional offices
in which each regional office needs to be connected to every other regional office.
To find the number of physical links in a fully connected mesh network with n nodes, we
first consider that each node must be connected to every other node. Node 1 must be connected to n
- 1 nodes, node 2 must be connected to n – 1 nodes, and finally node n must be connected to n-1
nodes. However each physical link allows communication in both directions (duplex mode).
Figure: A fully connected mesh topology (five devices)
A bus topology is multipoint. One long cable acts as a backbone to link all the devices in a network
Nodes are connected to the bus cable by drop lines and taps. A drop line is a connection running
between the device and the main cable. A tap is a connector that either splices into the main
cable or punctures the sheathing of a cable to create a contact with the metallic core. As a
signal travels along the backbone, some of its energy is transformed into heat. Therefore, it
becomes weaker and weaker as it travels farther and farther. For this reason there is a limit on the
number of taps a bus can support and on the distance between those taps.
Bus topology was the one of the first topologies used in the design of early local area
networks. Ethernet LANs can use a bus topology, but they are less popular now
Advantages of bus topology
ease of installation
In a bus, this redundancy is eliminated.
Disadvantages of bus topology
difficult reconnection and fault isolation
A bus is usually designed to be optimally efficient at installation. It can therefore be difficult
to add new devices.
A fault or break in the bus cable stops all transmission. The damaged area reflects signals
back in the direction of origin, creating noise in both directions.
Ring Topology: In a ring topology, each device has a dedicated point-to-point connection with
only 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 repeater regenerates the bits and
passes them along.
Network Types:
There are several different types of computer networks. Computer networks can be classified by their
size as well as their purpose.
The size of a network can be expressed by the geographic area they occupy and the number of
computers that are part of the network. Networks can cover anything from a handful of devices within
a single room to millions of devices spread across the entire globe.
Some of the different networks based on size are:
Personal area network, or PAN
Local area network, or LAN
Metropolitan area network, or MAN
Wide area network, or WAN
In terms of purpose, many networks can be considered general purpose, which means they are used
for everything from sending files to a printer to accessing the Internet. Some types of networks,
however, serve a very particular purpose. Some of the different networks based on their main purpose
are:
A personal area network, or PAN, is a computer network organized around an individual person
within a single building. This could be inside a small office or residence. A typical PAN would
include one or more computers, telephones, peripheral devices, video game consoles and other
personal entertainment devices.
If multiple individuals use the same network within a residence, the network is sometimes referred to
as a home area network, or HAN. In a very typical setup, a residence will have a single wired Internet
connection connected to a modem. This modem then provides both wired and wireless connections
for multiple devices. The network is typically managed from a single computer but can be accessed
from any device.
This type of network provides great flexibility. For example, it allows you to:
Send a document to the printer in the office upstairs while you are sitting on the couch with
your laptop.
Upload a photo from your cell phone to your desktop computer.
Watch movies from an online streaming service to your TV.
If this sounds familiar to you, you likely have a PAN in your house without
having called it by its name.
Local Area Network:
A local area network, or LAN, consists of a computer network at a single site, typically an
individual office building. A LAN is very useful for sharing resources, such as data storage and
printers. LANs can be built with relatively inexpensive hardware, such as hubs, network adapters
and Ethernet cables.
The smallest LAN may only use two computers, while larger LANs can accommodate thousands
of computers. A LAN typically relies mostly on wired connections for increased speed and
security, but wireless connections can also be part of a LAN. High speed and relatively low cost
are the defining characteristics of LANs.
LANs are typically used for single sites where people need to share resources among themselves
but not with the rest of the outside world. Think of an office building where everybody should be
able to access files on a central server or be able to print a document to one or more central
printers. Those tasks should be easy for everybody working in the same office, but you would not
want somebody just walking outside to be able to send a document to the printer from their cell
phone! If a local area network, or LAN, is entirely wireless, it is referred to as a wireless local area
network, or WLAN.
Private Networks:
One of the benefits of networks like PAN and LAN is that they can be kept entirely private by
restricting some communications to the connections within the network. This means that those
communications never go over the Internet.
For example, using a LAN, an employee is able to establish a fast and secure connection to a
company database without encryption since none of the communications between the employee's
computer and the database on the server leave the LAN. But, what happens if the same employee
wants to use the database from a remote location? What you need is a private network.
One approach to a private network is to build an enterprise private network, or EPN. An EPN is
a computer network that is entirely controlled by one organization, and it is used to connect
multiple locations. Historically, telecommunications companies, like AT&T, operated their own
network, separate from the public Internet. EPNs are still fairly common in certain sectors where
security is of the highest concern. For example, a number of health facilities may establish their
own network between multiple sites to have full control over the confidentiality of patient records.
Storage Area Networks:
This term is fairly new within the past two decades. It is used to explain a relatively
local network that is designed to provide high-speed connection in server-to-server
applications (cluster environments), storage area networks (called “SANs” as well)
and processor-to-processor applications. The computers connected on a SAN operate
as a single system at very high speeds.
These types of networks are built and owned by businesses that want to securely
connect its various locations to share computer resources.
Virtual Private Network (VPN)
By extending a private network across the Internet, a VPN lets its users send and
receive data as if their devices were connected to the private network – even if
they’re not. Through a virtual point-to- point connection, users can access a private
network remotely.
Switching:
Establish a circuit
Transfer the data
Disconnect the circuit
Circuit switching was designed for voice applications. Telephone is the best suitable example of
circuit switching. Before a user can make a call, a virtual path between caller and callee is established
over the network.
Message Switching:
This technique was somewhere in middle of circuit switching and packet switching. In message
switching, the whole message is treated as a data unit and is switching / transferred in its entirety.
A switch working on message switching, first receives the whole message and buffers it until there are
resources available to transfer it to the next hop. If the next hop is not having enough resource to
accommodate large size message, the message is stored and switch waits.
This technique was considered substitute to circuit switching. As in circuit switching the whole path is
blocked for two entities only. Message switching is replaced by packet switching. Message switching
has the following drawbacks:
Message switching was not a solution for streaming media and real-time
applications.
Packet Switching:
Shortcomings of message switching gave birth to an idea of packet switching. The entire message
is broken down into smaller chunks called packets. The switching information is added in the
header of each packet and transmitted independently.
It is easier for intermediate networking devices to store small size packets and they do not take
much resources either on carrier path or in the internal memory of switches.
Packet switching enhances line efficiency as packets from multiple applications can be multiplexed
over the carrier. The internet uses packet switching technique. Packet switching enables the user to
differentiate data streams based on priorities. Packets are stored and forwarded according to their
priority to provide quality of service.
Internetworking :
Internetworking is a term used by Cisco. Any interconnection among or between public, private,
commercial, industrial, or governmental computer networks may also be defined as an internetwork
or Internetworking.
In modern practice, the interconnected computer networks or Internetworking use the Internet
Protocol. Two architectural models are commonly used to describe the protocols and methods used
in internetworking. The standard reference model for internetworking is Open Systems
Interconnection (OSI).
Internetworking is implemented in Layer 3 (Network Layer) of this model The most notable example
of internetworking is the Internet (capitalized). There are three variants of internetwork or
Internetworking, depending on who administers and who participates in them :
Extranet
Intranet
Internet
Intranets and extranets may or may not have connections to the Internet. If connected to the
Internet, the intranet or extranet is normally protected from being accessed from the Internet
without proper authorization. The Internet is not considered to be a part of the intranet or extranet,
although it may serve as a portal for access to portions of an extranet.
Extranet : An extranet is a network of internetwork or Internetworking that is limited in scope to a
single organisation or entity but which also has limited connections to the networks of one or more
other usually, but not necessarily, trusted organizations or entities .Technically, an extranet may
also be categorized as a MAN, WAN, or other type of network, although, by definition, an extranet
cannot consist of a single LAN; it must have at least one connection with an external network.