Module-1 - CN - Notes-5 SEM
Module-1 - CN - Notes-5 SEM
Module 1
Introduction to Computer Networks:
• Network Hardware
-Personal Area Network
-Local Area Networks
- Metropolitan Area Networks
- Wide Area networks
- Internetworks
• Network Software
- Protocol Hierarchies
- Design Issues for the Layers
- Connection-Oriented Versus Connectionless Service
- Service Primitives
- The Relationship of Services to Protocols
• Reference models
- The OSI Reference Model, 41
- The TCP/IP Reference Model, 45
Physical layer:
• Guided Transmission Media
• Wireless Transmission
3 Mobile Users
• Text messaging or texting
• Smart phones,
• GPS (Global Positioning System)
• m-commerce
• NFC (Near Field Communication)
4 Social Issues
With the good comes the bad, as this new-found freedom brings with it many unsolved
social, political, and ethical issues.
Social networks, message boards, content sharing sites, and a host of other applications
allow people to share their views with like-minded individuals. As long as the subjects
are restricted to technical topics or hobbies like gardening, not too many problems will
arise.
The trouble comes with topics that people actually care about, like politics, religion,
or sex. Views that are publicly posted may be deeply offensive to some people. Worse
yet, they may not be politically correct. Furthermore, opinions need not be limited to
text; high-resolution color photographs and video clips are easily shared over computer
networks. Some people take a live-and-let-live view, but others feel that posting certain
material (e.g., verbal attacks on particular countries or religions, pornography, etc.) is
simply unacceptable and that such content must be censored. Different countries have
different and conflicting laws in this area. Thus, the debate rages.
Computer networks make it very easy to communicate. They also make it easy for the
people who run the network to snoop on the traffic. This sets up conflicts over issues
such as employee rights versus employer rights. Many people read and write email
at work. Many employers have claimed the right to read and possibly censor employee
messages, including messages sent from a home computer outside working hours. Not
all employees agree with this, especially the latter part.
Another conflict is centered around government versus citizen’s rights.
A new twist with mobile devices is location privacy. As part of the process of providing
service to your mobile device the network operators learn where you are at different
times of day. This allows them to track your movements. They may know which
nightclub you frequent and which medical center you visit.
are produced, in the same order that they are produced, and without significant delay.
This kind of delivery is called real-time transmission.
4. Jitter. Jitter refers to the variation in the packet arrival time. It is the uneven
delay in the delivery of audio or video packets. For example, let us assume that video
packets are sent every 30 ms. If some of the packets arrive with 30-ms delay and others
with 40-ms delay, an uneven quality in the video is the result.
Data Flow
Communication between two devices can be simplex, half-duplex, or full-duplex as
shown in Figure.
Network Criteria
A network must be able to meet a certain number of criteria. The most important of these
are performance, reliability, and security.
Performance
Performance can be measured in many ways, including transit time and response time.
Transit time is the amount of time required for a message to travel from one device to
another. Response time is the elapsed time between an inquiry and a response. The
performance of a network depends on a number of factors, including the number of
users, the type of transmission medium, the capabilities of the connected hardware, and
the efficiency of the software. Performance is often evaluated by two networking
metrics: throughput and delay. We often need more throughput and less delay.
However, these two criteria are often contradictory. If we try to send more data to the
network, we may increase throughput but we increase the delay because of traffic
congestion in the network.
Reliability: In addition to accuracy of delivery, network reliability is measured by the
frequency of failure, the time it takes a link to recover from a failure, and the network's
robustness in a catastrophe.
Security: Network security issues include protecting data from unauthorized access,
protecting data from damage and development, and implementing policies and
procedures for recovery from breaches and data losses.
Physical Structures
Before discussing networks, we need to define some network attributes.
Type of Connection
A network is two or more devices connected through links. A link is a communications
pathway that transfers data from one device to another. There are two possible types of
connections: point-to-point and multipoint. Point-to-Point A point-to-point connection
provides a dedicated link between two devices. The entire capacity of the link is reserved
for transmission between those two devices. Most point-to-point connections use an
actual length of wire or cable to connect the two ends, but other options, such as
microwave or satellite links, are also possible
When you change television channels by infrared remote control, you are establishing a
point-to-point connection between the remote control and the television's control
system.
Multipoint A multipoint (also called multi-drop) connection is one in which more than
two specific devices share a single link
In a multipoint environment, the capacity of the channel is shared, either spatially or
temporally. If several devices can use the link simultaneously, it is a spatially shared
connection. If users must take turns, it is a timeshared connection.
Physical Topology
The term physical 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:
A mesh topology is the one where every node is connected to every other node in the
network.
A star network, star topology is one of the most common network setups. In this
configuration, every node connects to a central network device, like a hub, switch, or
computer. The central network device acts as a server and the peripheral devices act as
clients. Depending on the type of network card used in each computer of the star
topology, a coaxial cable or a RJ-45 network cable is used to connect computers
together.
a line topology, a bus topology is a network setup in which each computer and network
device are connected to a single cable or backbone.
Advantages of bus topology
• It works well when you have a small network.
• It's the easiest network topology for connecting computers or peripherals in a linear
fashion.
• It requires less cable length than a star topology.
Disadvantages of bus topology
• It can be difficult to identify the problems if the whole network goes down.
• It can be hard to troubleshoot individual device issues.
• Bus topology is not great for large networks.
• Terminators are required for both ends of the main cable.
• Additional devices slow the network down.
• If a main cable is damaged, the network fails or splits into two.
RING:
Ring topologies may be used in either local area networks (LANs) or wide area networks
(WANs).
Advantages of ring topology
• All data flows in one direction, reducing the chance of packet collisions.
• A network server is not needed to control network connectivity between each
workstation.
• Data can transfer between workstations at high speeds.
• Additional workstations can be added without impacting performance of the network.
Disadvantages of ring topology
• All data being transferred over the network must pass through each workstation on the
network, which can make it slower than a star topology.
• The entire network will be impacted if one workstation shuts down.
• The hardware needed to connect each workstation to the network is more expensive than
Ethernet cards and hubs/switches.
Hybrid Topology A network can be hybrid. For example, we can have a main star
topology with each branch connecting several stations in a bus topology as shown in
Figure.
Network Hardware
Advantages:
Disadvantages:
The next step up is the LAN (Local Area Network). A LAN is a privately owned
network that operates within and nearby a single building like a home, office or factory.
LANs are widely used to connect personal computers and consumer electronics to let
them share resources (e.g., printers) and exchange information. When LANs are used
by companies, they are called enterprise networks.
Wireless LANs are very popular these days, especially in homes, older office buildings,
cafeterias, and other places where it is too much trouble to install cables. In these
systems, every computer has a radio modem and an antenna that it uses to communicate
with other computers. In most cases, each computer talks to a device in the ceiling as
shown in Fig. 1-8(a). This device, called an AP (Access Point), wireless router, or base
station, relays packets between the wireless computers and also between them and the
Internet. Being the AP is like being the popular kid as school because everyone wants
to talk to you. However, if other computers are close enough, they can communicate
directly with one another in a peer-to-peer configuration. There is a standard for wireless
LANs called IEEE 802.11, popularly known as WiFi, which has become very
widespread. It runs at speeds anywhere from 11
MAN or Metropolitan area Network covers a larger area than that covered by a LAN
and a smaller area as compared to WAN. MAN has a range of 5-50km. It connects two
or more computers that are apart but reside in the same or different cities. It covers a
large geographical area and may serve as an ISP (Internet Service Provider). MAN is
designed for customers who need high-speed connectivity. Speeds of MAN range in
terms of Mbps. It’s hard to design and maintain a Metropolitan Area Network.
The fault tolerance of a MAN is less and also there is more congestion in the network.
It is costly and may or may not be owned by a single organization. The data transfer rate
and the propagation delay of MAN are moderate. Devices used for transmission of data
through MAN are Modem and Wire/Cable. Examples of a MAN are part of the
telephone company network that can provide a high-speed DSL line to the customer or
the cable TV network in a city.
Advantages:
Disadvantages:
WAN or Wide Area Network is a computer network that extends over a large
geographical area, although it might be confined within the bounds of a state or country.
WAN has a range of above 50 km. A WAN could be a connection of LAN connecting
to other LANs via telephone lines and radio waves and may be limited to an enterprise
(a corporation or an organization) or accessible to the public. The technology is high-
speed and relatively expensive.
There are two types of WAN: Switched WAN and Point-to-Point WAN. WAN is
difficult to design and maintain. Similar to a MAN, the fault tolerance of a WAN is less
and there is more congestion in the network. A Communication medium used for WAN
is PSTN or Satellite Link. Due to long-distance transmission, the noise and error tend to
be more in WAN.
WAN’s data rate is slow about a 10th LAN’s speed since it involves increased distance
and increased number of servers and terminals etc. The speed of WAN ranges from a
few kilobits per second (Kbps) to megabits per second (Mbps). Propagation delay is one
of the biggest problems faced here. Devices used for the transmission of data through
WAN are Optic wires, Microwaves, and Satellites. An example of a Switched WAN is
the asynchronous transfer mode (ATM) network and Point-to-Point WAN is a dial-up
line that connects a home computer to the Internet.
Advantages:
Disadvantages:
Network Software
Protocol Hierarchies
Example :
Advantages :
Now consider a more technical example: how to provide communication to the top layer
of the five-layer network in Fig. 1. A message, M, is produced by an application process
running in layer 5 and given to layer 4 for transmission. Layer 4 puts a header in front
of the message to identify the message and passes the result to layer 3. The header
includes control information, such as addresses, to allow layer 4 on the destination
machine to deliver the message. Other examples of control information used in some
layers are sequence numbers (in case the lower layer does not preserve message order),
sizes, and times.
In many networks, no limit is placed on the size of messages transmitted in the layer 4
protocol but there is nearly always a limit imposed by the layer 3 protocol.
Consequently, layer 3 must break up the incoming messages into smaller units, packets,
prepending a layer 3 header to each packet. In this example, M is split into two parts,
M1 and M2, that will be transmitted separately.
Layer 3 decides which of the outgoing lines to use and passes the packets to layer 2.
Layer 2 adds to each piece not only a header but also a trailer, and gives the resulting
unit to layer 1 for physical transmission. At the receiving machine the message moves
upward, from layer to layer, with headers being stripped off as it progresses. None of
the headers for layers below n are passed up to layer n.
The important thing to understand about Fig. 1 is the relation between the virtual and
actual communication and the difference between protocols and interfaces. The peer
processes in layer 4, for example, conceptually think of their communication as being
‘‘horizontal,’’ using the layer 4 protocol. Each one is likely to have procedures called
something like SendToOtherSide and GetFrom-OtherSide, even though these
procedures actually communicate with lower layers across the 3/4 interface, and not
with the other side.
A number of design issues exist for the layer to layer approach of computer networks.
Some of the main design issues are as follows −
Reliability
Network channels and components may be unreliable, resulting in loss of bits while data
transfer. So, an important design issue is to make sure that the information transferred
is not distorted.
Scalability
Networks are continuously evolving. The sizes are continually increasing leading to
congestion. Also, when new technologies are applied to the added components, it may
lead to incompatibility issues. Hence, the design should be done so that the networks are
scalable and can accommodate such additions and alterations.
Addressing
At a particular time, innumerable messages are being transferred between large numbers
of computers. So, a naming or addressing system should exist so that each layer can
identify the sender and receivers of each message.
Error Control
Unreliable channels introduce a number of errors in the data streams that are
communicated. So, the layers need to agree upon common error detection and error
correction methods so as to protect data packets while they are transferred.
Flow Control
If the rate at which data is produced by the sender is higher than the rate at which data
is received by the receiver, there are chances of overflowing the receiver. So, a proper
flow control mechanism needs to be implemented.
Resource Allocation
Computer networks provide services in the form of network resources to the end users.
The main design issue is to allocate and deallocate resources to processes. The
allocation/deallocation should occur so that minimal interference among the hosts
occurs and there is optimal usage of the resources.
Statistical Multiplexing
It is not feasible to allocate a dedicated path for each message while it is being
transferred from the source to the destination. So, the data channel needs to be
multiplexed, so as to allocate a fraction of the bandwidth or time to each host.
Routing
There may be multiple paths from the source to the destination. Routing involves
choosing an optimal path among all possible paths, in terms of cost and time. There are
several routing algorithms that are used in network systems.
Security
Connection-less service is related to the postal system. It does not include any
connection establishment and connection termination. Connection-less Service does not
give a guarantee of reliability. In this, Packets do not follow the same path to reach their
destination.
Primitive Meaning
When server is ready to accept request of incoming connection, it
Listen simply put this primitive into action. Listen primitive simply waiting
for incoming connection request.
This primitive is used to connect the server simply by creating or
Connect
establishing connection with waiting peer.
Accept This primitive simply accepts incoming connection from the peer.
These primitive afterwards block the server. Receive primitive
Receive
simply waits for incoming message.
This primitive is put into action by the client to transmit its request
that is followed by putting receive primitive into action to get the
Send
reply. Send primitive simply sends or transfer the message to the
peer.
This primitive is simply used to terminate or end the connection
Disconnect
after which no one will be able to send any of the message.
Primitive Meaning
Unit data primitive is simply required to send packet of data or
Unit data
information.
Facility, This primitive is required for getting details about the performance
Report and working of the network such as delivery statistics or report.
machine unblocks the server so it can handle the request. After it has done the work, the
server uses SEND to return the answer to the client (4). The arrival of
this packet unblocks the client, which can now inspect the answer. If the client has
additional requests, it can make them now. When the client is done, it executes
DISCONNECT to terminate the connection (5). Usually, an initial DISCONNECT is a
blocking call, suspending the client and sending a packet to the server saying that the
connection is no longer needed. When the server gets the packet, it also issues a
DISCONNECT of its own, acknowledging the client and releasing the connection (6).
When the server’s packet gets back to the client machine, the client process is released
and the connection is broken. In a nutshell, this is how connection-oriented
communication works.
Services and protocols are distinct concepts. This distinction is so important that we
emphasize it again here. A service is a set of primitives (operations) that a layer provides
to the layer above it. The service defines what operations the layer is prepared to perform
on behalf of its users, but it says nothing at all about how these operations are
implemented. A service relates to an interface between two layers, with the lower layer
being the service provider and the upper layer being the service user.
A protocol, in contrast, is a set of rules governing the format and meaning of the
packets, or messages that are exchanged by the peer entities within a layer. Entities use
protocols to implement their service definitions. They are free to change their protocols
at will, provided they do not change the service visible to their users. In this way, the
service and the protocol are completely decoupled.
This is a key concept that any network designer should understand well. To repeat this
crucial point, services relate to the interfaces between layers, as illustrated in Fig.4. In
contrast, protocols relate to the packets sent between peer entities on different machines.
It is very important not to confuse the two concepts.
Many older protocols did not distinguish the service from the protocol. In effect, a
typical layer might have had a service primitive SEND PACKET with the user providing
a pointer to a fully assembled packet. This arrangement meant that all changes to the
protocol were immediately visible to the users. Most network designers now regard such
a design as a serious blunder.
REFERENCE MODELS
The Open Systems Interconnection (OSI) model describes seven layers that computer
systems use to communicate over a network. It was the first standard model for
network communications, adopted by all major computer and telecommunication
companies in the early 1980s
The modern Internet is not based on OSI, but on the simpler TCP/IP model. However,
the OSI 7-layer model is still widely used, as it helps visualize and communicate how
networks operate, and helps isolate and troubleshoot networking problems.
OSI was introduced in 1983 by representatives of the major computer and telecom
companies, and was adopted by ISO as an international standard in 1984.
7. Application Layer
The application layer is used by end-user software such as web browsers and email
clients. It provides protocols that allow software to send and receive information and
present meaningful data to users. A few examples of application layer protocols are
the Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP), Post Office
Protocol (POP), Simple Mail Transfer Protocol (SMTP), and Domain Name System
(DNS).
6. Presentation Layer
The presentation layer prepares data for the application layer. It defines how two devices
should encode, encrypt, and compress data so it is received correctly on the other end.
The presentation layer takes any data transmitted by the application layer and prepares
it for transmission over the session layer.
5. Session Layer
The session layer creates communication channels, called sessions, between devices. It
is responsible for opening sessions, ensuring they remain open and functional while
data is being transferred, and closing them when communication ends. The session
layer can also set checkpoints during a data transfer—if the session is interrupted,
devices can resume data transfer from the last checkpoint.
4. Transport Layer
The transport layer takes data transferred in the session layer and breaks it into
“segments” on the transmitting end. It is responsible for reassembling the segments on
the receiving end, turning it back into data that can be used by the session layer. The
transport layer carries out flow control, sending data at a rate that matches the connection
speed of the receiving device, and error control, checking if data was received
incorrectly and if not, requesting it again.
3. Network Layer
The network layer has two main functions. One is breaking up segments into network
packets, and reassembling the packets on the receiving end. The other is routing packets
by discovering the best path across a physical network. The network layer uses network
addresses (typically Internet Protocol addresses) to route packets to a destination node.
The data link layer establishes and terminates a connection between two physically-
connected nodes on a network. It breaks up packets into frames and sends them from
source to destination. This layer is composed of two parts—Logical Link Control (LLC),
which identifies network protocols, performs error checking and synchronizes frames,
and Media Access Control (MAC) which uses MAC addresses to connect devices and
define permissions to transmit and receive data.
1. Physical Layer
The physical layer is responsible for the physical cable or wireless connection between
network nodes. It defines the connector, the electrical cable or wireless technology
connecting the devices, and is responsible for transmission of the raw data, which is
simply a series of 0s and 1s, while taking care of bit rate control.
The OSI model helps network device manufacturers and networking software
vendors:
• Create devices and software that can communicate with products from any
other vendor, allowing open interoperability
• Define which parts of the network their products should work with.
• Communicate to users at which network layers their product operates – for
example, only at the application layer, or across the stack.
The Transfer Control Protocol/Internet Protocol (TCP/IP) is older than the OSI model
and was created by the US Department of Defense (DoD). A key difference between
the models is that TCP/IP is simpler, collapsing several OSI layers into one:
Physical Layer
Guided Media
It is defined as the physical medium through which the signals are transmitted. It is also
known as Bounded media.
Twisted pair:
Twisted pair is a physical media made up of a pair of cables twisted with each other. A
twisted pair cable is cheap as compared to other transmission media. Installation of the
twisted pair cable is easy, and it is a lightweight cable. The frequency range for twisted
pair cable is from 0 to 3.5KHz.
A twisted pair consists of two insulated copper wires arranged in a regular spiral pattern.
The degree of reduction in noise interference is determined by the number of turns per
foot. Increasing the number of turns per foot decreases noise interference.
o Category 1: Category 1 is used for telephone lines that have low-speed data.
o Category 2: It can support upto 4Mbps.
o Category 3: It can support upto 16Mbps.
o Category 4: It can gsupport upto 20Mbps. Therefore, it can be used for long-
distance communication.
o Category 5: It can support upto 200Mbps.
o It is cheap.
o Installation of the unshielded twisted pair is easy.
o It can be used for high-speed LAN.
Disadvantage:
o This cable can only be used for shorter distances because of attenuation.
A shielded twisted pair is a cable that contains the mesh surrounding the wire that allows
the higher transmission rate.
o The cost of the shielded twisted pair cable is not very high and not very low.
o An installation of STP is easy.
o It has higher capacity as compared to unshielded twisted pair cable.
o It has a higher attenuation.
o It is shielded that provides the higher data transmission rate.
Disadvantages
Coaxial Cable
o Coaxial cable is very commonly used transmission media, for example, TV wire
is usually a coaxial cable.
o The name of the cable is coaxial as it contains two conductors parallel to each
other.
o It has a higher frequency as compared to Twisted pair cable.
o The inner conductor of the coaxial cable is made up of copper, and the outer
conductor is made up of copper mesh. The middle core is made up of non-
conductive cover that separates the inner conductor from the outer conductor.
o The middle core is responsible for the data transferring whereas the copper mesh
prevents from the EMI(Electromagnetic interference).
Fibre Optic
o Fibre optic cable is a cable that uses electrical signals for communication.
o Fibre optic is a cable that holds the optical fibres coated in plastic that are used
to send the data by pulses of light.
o The plastic coating protects the optical fibres from heat, cold, electromagnetic
interference from other types of wiring.
o Fibre optics provide faster data transmission than copper wires.
o Core: The optical fibre consists of a narrow strand of glass or plastic known as a
core. A core is a light transmission area of the fibre. The more the area of the
core, the more light will be transmitted into the fibre.
o Cladding: The concentric layer of glass is known as cladding. The main
functionality of the cladding is to provide the lower refractive index at the core
interface as to cause the reflection within the core so that the light waves are
transmitted through the fibre.
o Jacket: The protective coating consisting of plastic is known as a jacket. The
main purpose of a jacket is to preserve the fibre strength, absorb shock and extra
fibre protection.
Un-Guided Transmission
Radio waves
o Radio waves are the electromagnetic waves that are transmitted in all the
directions of free space.
o Radio waves are omnidirectional, i.e., the signals are propagated in all the
directions.
o The range in frequencies of radio waves is from 3Khz to 1 khz.
o In the case of radio waves, the sending and receiving antenna are not aligned, i.e.,
the wave sent by the sending antenna can be received by any receiving antenna.
o An example of the radio wave is FM radio.
o A Radio wave is useful for multicasting when there is one sender and many
receivers.
o An FM radio, television, cordless phones are examples of a radio wave.
o Radio transmission is mainly used for wide area networks and mobile cellular
phones.
o Radio waves cover a large area, and they can penetrate the walls.
o Radio transmission provides a higher transmission rate.
Microwaves
o Terrestrial microwave
o Satellite microwave communication.
Advantages Of Microwave:
o It is free from land acquisition as it does not require any land for the installation
of cables.
o Microwave transmission provides an easy communication in terrains as the
installation of cable in terrain is quite a difficult task.
o Communication over oceans can be achieved by using microwave transmission.
The satellite accepts the signal that is transmitted from the earth station, and it amplifies
the signal. The amplified signal is retransmitted to another earth station.
o The coverage area of a satellite microwave is more than the terrestrial microwave.
o The transmission cost of the satellite is independent of the distance from the
centre of the coverage area.
o Satellite communication is used in mobile and wireless communication
applications.
o It is easy to install.
o Satellite designing and development requires more time and higher cost.
o The Satellite needs to be monitored and controlled on regular periods so that it
remains in orbit.
o The life of the satellite is about 12-15 years. Due to this reason, another launch
of the satellite has to be planned before it becomes non-functional.
Infrared
Characteristics Of Infrared:
o It supports high bandwidth, and hence the data rate will be very high.
o Infrared waves cannot penetrate the walls. Therefore, the infrared communication
in one room cannot be interrupted by the nearby rooms.
o An infrared communication provides better security with minimum interference.
o Infrared communication is unreliable outside the building because the sun rays
will interfere with the infrared waves.