Unit 1
Unit 1
( BCS-603 )
Computer Network
• A computer network is a set of communicating
devices connected together by
communication links for the purpose of
sharing resources.
➭ Topologies
● Ring, Star, Bus, Tree, Mesh
company
5 network
Components of Computer Network
Benefits of Computer Network
8
Historical Background
⚫ 1970s – Advancement of VLSI technology and
invention of Microprocessors (Mini computers
and PCs)
❖Smaller in size, less expensive, increased processing power
❖Communication technology advanced with deployment of
telephone network for voice communication
❖Development of computer networks for data communications
amongst organization having computers located at
geographically dispersed locations
❖Late 1970s - low bandwidth telephone n/w for data com.
⚫ Commercial
⚫Advertisement,Telemarketing, Teleconferencing,
Worldwide Financial Services
• Consistency
– Consistency is the predictability of response time and accuracy of data.
Criteria for a Data Communication
Network
• Reliability
– Reliability is the measure of how often a network is useable. MTBF (Mean
Time Between Failures) is a measure of the average time a component is
expected to operate between failures. Normally provided by the
manufacturer. A network failure can be: hardware, data carrying medium
and Network Operating System.
• Recovery
– Recovery is the Network's ability to return to a prescribed level of
operation after a network failure. This level is where the amount of lost
data is nonexistent or at a minimum. Recovery is based on having Back-up
Files.
• Security
– Security is the protection of Hardware, Software and Data from
unauthorized access. Restricted physical access to computers, password
protection, limiting user privileges and data encryption are common
security methods. Anti-Virus monitoring programs to defend against
computer viruses are a security measure.
Protocols
• A protocol is a predefined way of communicating
• A set of ``rules'' between processes
• Example: A ``person query'' protocol
– I send you the name of a person
– You send me a ``yes'' or a ``no'' depending upon
whether that person lives in your house
– If I send anything except a name, or you reply with
anything except a ``yes'' or ``no'', the protocol is broken
Types of Networks
Classification based on
Transmission Technology
❖ Broadcast Networks
Example of a broadcast network
❖ Single communication channel based on shared bus
16
Types of Networks
Classification based on scale
17
Classification of networks on scale
18
Classification By Scale
Local Area Networks
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.
Metropolitan Area Networks - Cable TV
22
23
Internetworks
internet – a network of networks
Individual networks are joined into internetworks using internetworking
devices such as routers, switches, bridges, gateways
24
A heterogeneous network made of four WANs and two LANs
25
Some newer types of the networks based on their reach
Half duplex:
❖Communication is bidirectional but not simultaneous
❖Each station can both send & receive, but not at the same time, e.g.
walkie-talkies.
Transmission Modes
• Four types of transmission modes
Full duplex:
❖Communication is bidirectional and simultaneous
❖Both stations can send and receive
simultaneously, e.g. Telephones
❖Signals flowing in either direction share the
capacity of the link
Network Components
• N/w Hardware (to be discussed in subsequent sections)
– Computer Systems & Peripherals
– Transmission Links (Cables)
– Networking and Internetworking Devices
– N/w Adapters (NIC)
– Connectors
• N/w Software
– NOS (Client-Server/Peer-to-Peer)
– Drivers & Utilities
38
Network Operating System
• Network operating systems (NOS) coordinate
the activities of multiple computers across a
network
• The two major types of NOS are:
– Peer-to-peer
• Allow users to share resources and files located on
their computers and to access shared resources
found on other computers.
• Do not have a file server or a centralized
management source.
• Designed primarily for small to medium local area
networks
• E.g. AppleShare and Windows for Workgroups
• Advantages - less initial expense, easy setup
• Disadvantages - decentralized, less secure
39
Network Operating System
• Client/Server
– Allow the network to centralize functions and applications in one or more
dedicated file servers
– File servers are the heart of the system, providing access to resources and
security; individual workstations (clients) access the resources available on the file
servers.
– E.g. Novell Netware, Windows 2000 Server, Unix/Linux, etc
– Advantages-Centralized, Scalability, Flexibility, Interoperability, Accessibility
– Disadvantages – Expense, Maintenance, Dependence
40
Motivation behind layer model
• To reduce the design complexity, most of the networks are
organized as a series of layers or levels, each one build
upon one below it.
• The basic idea of a layered architecture is to divide the
design into small pieces.
• Each layer adds to the services provided by the lower layers
in such a manner that the highest layer is provided a full set
of services to manage communications and run the
applications.
• The benefits of the layered models are modularity and
clear interfaces, i.e. open architecture and comparability
between the different providers' components.
• Let us discuss it in detail -
Advantages of layered architecture in a network
• Layered architecture increases flexibility, maintainability, and scalability. In a Layered
architecture we separate the user interface from the business logic, and the business
logic from the data access logic. Separation of concerns among these logical layers and
components is easily achieved with the help of layered architecture
• Multiple applications can reuse the components. For example if we want a windows
user interface rather than a web browser interface, this can be done in an easy and
fast way by just replacing the UI component. All the other components like business
logic, data access and the database remains the same. Layered architecture allows to
swap and reuse components at will.
• Layered architecture enables teams to work on different parts of the application
parallely with minimal dependencies on other teams.
• Layered architecture enables develop loosely coupled systems.
• Different components of the application can be independently deployed, maintained,
and updated, on different time schedules.
• Layered architecture also makes it possible to configure different levels of security to
different components deployed on different boxes. sO Layered architecture, enables
you to secure portions of the application behind the firewall and make other
components accessible from the Internet.
• Layered architecture also helps you to test the components independently of each
other.
Disadvantages of layered architecture in a network
and more…
Hop-to-hop Delivery
Network Layer
• Main function of Network Layer is to move packets from source to
destination in an efficient manner (called routing), e.g., along the shortest
path, and to provide internetworking of different
• network types (a key service is address resolution across different
networks or network layers).
PROTOCOLS USED
• IPv4
MAIN FUNCTIONS • IPv6
• Logical addressing • ICMP (Internet Control Message Protocol)
(IP Addressing) • IGMP (Internet Group Management Protocol)
• Routing • RIP (Routing Information Protocol)
• ARP (Address Resolution Protocol)
• RARP (Reverse Address Resolution Protocol)
• IPX (Internetwork Packet Exchange)
• BGP(Border Gateway Protocol)
Source-to-destination delivery
Transport layer
• The transport layer is responsible for the delivery of a
message from one process to another.
– Service-point addressing
– Segmentation and reassembly
– Connection control
– Flow control
– Error control
PROTOCOLS USED
• TCP (Transmission Control Protocol)
• UDP (User Datagram Protocol)
• SCTP (Stream Control Transmission Protocol)
Transport layer
Transport layer
Transport layer
Segmentation and Reassembly
Reliable process-to-process delivery
of a message
Session layer
Its function is to maintain a “conversation” across multiple related
message exchanges between two hosts (called session), to keep track of
the progress of their communication.
Advantages
• Works well for small networks
• Relatively inexpensive to implement
• Easy for adding new systems
Disadvantages
• Management costs can be high
• Potential for congestion with network traffic
Ring topology
– Each node is connected to the two nearest nodes so the
entire network forms a circle
– One method for passing data on ring networks is token
passing
Active topology
– Each workstation transmits data
Advantages of Ring Topology
Advantages
• Good option for modern networks
• Low startup costs
• Easy to manage
• Offers opportunities for expansion
• Most popular topology in use; wide variety of equipment
available
Disadvantages
• Hub is a single point of failure
• Requires more cable than the bus
Mesh Topology
Mesh topology is a type of networking
where all nodes cooperate to distribute
data amongst each other.
• Transmission Delay
• Propagation Delay
• Queuing Delay
• Processing Delay
Delay Analysis
❑Transmission Delay : Time taken to put a packet onto link. In other
words, it is simply time required to put data bits on the wire/communication
medium. It depends on length of packet and bandwidth of network.
Transmission Delay = Data size / bandwidth = (L/B) second
❑Propagation delay : Time taken by the first bit to travel from sender
to receiver end of the link. In other words, it is simply the time required for
bits to reach destination from start point. Factors on which Propagation delay
depends are Distance and propagation speed.
Propagation delay = distance/transmission speed = d/s
❑Queuing Delay : Queuing delay is the time a job waits in a queue until
it can be executed. It depends on congestion. It the time difference between
when packet arrived Destination and when the packet data was processed or
executed. It may be caused by mainly three reasons i.e. originating switches,
intermediate switches or call receiver servicing switches.
Average Queuing delay = (N-1)L/(2*R)
where N = no. of packets L=size of packet R=bandwidth
Delay Analysis
❑ Processing Delay :
Processing delay is the time it takes routers to process the packet
header. Processing of packets help in detecting bit-level errors that
occur during transmission of packet to destination. Processing
delays in high-speed routers are typically on the order of
microseconds or less.
Note that in this case, because the message is short and the bandwidth is high,
the dominant factor is the propagation time, not the transmission time. The
transmission time can be ignored.
SE
What are the propagation time and the transmission
time for a 5-Mbyte message (an image) if the
bandwidth of the network is 1 Mbps (1/8 MBps). Assume
that the distance between the sender and the receiver is
12,000 km and that light travels at 2.4 × 108 m/s.
Solution
Note that in this case, because the message is very long and the bandwidth is
not very high, the dominant factor is the transmission time, not the
propagation time. The propagation time can be ignored.
SE
What is the total delay (latency) for a frame of size 5 million
bits that is being sent on a link with 10 routers each having a
queuing time of 2 μs and a processing time of 1 μs. The
length of the link is 2000 Km. The speed of light inside the
link is 2 × 108 m/s. The link has a bandwidth of 5 Mbps.
Which component of the total delay is dominant? Which one
is negligible?
Propagation time 8
= distance / propagation speed = (2000 x 1000 m) / (2 x 10 m/s) = 10 ms
Transmission time 6 6
= Message size / Bandwidth = 5 x 10 bits/ 5 Mbps (i.e. 5 x 10 bps )= 1 s
dB = 10 log10 P2/P1
P1 - input signal
P2 - output signal
Attenuation
Example
Ans –
-10 = 10 log10 (P2 / 5)
→ log10 (P2 / 5) = −1
→ (P2 / 5) = 10−1
→ P2 = 0.5 W
SE
Suppose a signal travels through a transmission medium
and its power is reduced to one-half. This means that P2
is (1/2)P1. In this case, the attenuation (loss of power)
can be calculated as:
SE
A signal travels through an amplifier, and its power is
increased 10 times. This means that P2 = 10P1 . In this
case, the amplification (gain of power) can be calculated
as
SE
Let the energy strength at point 2 is 1/50th with respect
to the point 1. Find out the attenuation in dB.
Ans:
Attenuation in dB is –
SE
Sometimes the decibel is used to measure signal power
in milliwatts. In this case, it is referred to as dBm and is
calculated as dBm = 10 log10 Pm , where Pm is the power
in milliwatts.
Calculate the power of a signal with dBm = −30.
Solution
We can calculate the power in the signal as
SE
The loss in a cable is usually defined in decibels per
kilometer (dB/km). If the signal at the beginning of a
cable with −0.3 dB/km has a power of 2 mW, what is the
power of the signal at 5 km?
Solution
The loss in the cable in decibels is 5 × (−0.3) = −1.5 dB.
We can calculate the power as
SE
Distortion
Example
The bandwidth of a subscriber line is 4 kHz for voice or data. The bandwidth of this line
for data transmission can be up to 56,000 bps using a sophisticated modem to change the
digital signal to analog.
If the telephone company improves the quality of the line and increases the bandwidth to
8 kHz, we can send 112,000 bps by using the same technology
Throughput
A measure of how fast we can actually send data through a network
A link may have a bandwidth of B bps, but we can only send T bps
through this link with T always less than B
Bandwidth is a potential measurement of a link; throughput is an
actual measurement of how fast we can send data
Example
A network with bandwidth of 10 Mbps can pass only an average of 12,000
frames per minute with each frame carrying an average of 10,000 bits. What is
the throughput of this network?
Solution
We can calculate the throughput as
Latency (Delay)
Transmission time: time between the first bit leaving the sender/arriving
at the receiver and the last bit leaving the sender/arriving at the receiver
Time required for transmission of a message depends on the size of the
message and the bandwidth of the channel
Transmission time = Message size / Bandwidth
Latency
Queuing time: the time needed for each intermediate or end device
to hold the message before it can be processed
It changes with the load imposed on the network
Queuing time increases if there is heavy traffic on the network
An intermediate device, such as a router, queues the arrived messages
and processes them one by one
Here, the data rate(bitrate) and signal rate(baud) are There are two data elements transmitter per signal
same and r is one. One data element rides on one element. In other words, the bit rate is higher than the
signal element (analogous to one person per carriage baud rate. (Analogous to two passengers per carriage in
in a train). a train) and here r is two. Hence baud rate is one half of
bit rate.
Baud Rate
▪ Baud rate is the rate at which the number of
signal elements or changes to the signal occurs
per second when it passes through a
transmission medium.
▪ The higher a baud rate is the faster the data is
sent/received.
4.152
Two digital signals: one with two signal levels and
the other with four signal levels
Baud rate is calculated using the below formula.
http://www.circuitstoday.com/wp-content/uploads/2012/09/form.jpg
here, N is the bit rate and r is the number of data elements carried by
each signal element. Here r must be as great as possible for better
efficiency.
Solution
The bit rate can be calculated as
Signaling (Encoding) Techniques
• Unipolar signaling
– Use voltages either vary between 0 and a positive value or between 0
and some negative value
• Bipolar signaling
– Use both positive and negative voltages
– Experiences fewer errors than unipolar signaling
• Signals are more distinct (more difficult (for interference) to
change polarity of a current)
– Return to zero (RZ)
• Signal returns to 0 voltage level after sending a bit
– Non return to zero (NRZ)
• Signals maintains its voltage at the end of a bit
• Manchester encoding (used by Ethernet)
What is Line Coding?
• The process of converting Digital Data to Digital Signal is
termed as Line Coding.
• The simplest is to represent ‘1’ by a square pulse and ‘0’ by
0 volt. But the simplest is not always good enough. Also, a
long sequence of ‘0’ may appear as a loss of transmission.
• In order to take care of these and many other requirements,
the symbols are transformed in to various different wave
shapes, a process named line coding.
Figure Line coding schemes
Digital data to digital signals
A digital signal is sequence of discrete ,
discontinuous voltage pulses. Each pulses a signal
element. Encoding scheme is an important factor in
how successfully the receiver interprets the
incoming signal.
• Encoding Techniques
Following are several ways to map data bits to signal
elements –
– Unipolar signaling
– Bipolar signaling
• Return to zero (RZ)
• Non return to zero (NRZ)
– Manchester encoding (used by Ethernet)
Digital Data to Digital Signal
Manchester and Differential Manchester Encoding
Internet
M
• Amplitude
0o 180o 360o
– Height (loudness) of the wave
– Measured in decibels (dB)
• Frequency: 270o
– Number of waves that pass in a second
– Measured in Hertz (cycles/second)
– Wavelength, the length of the wave from crest to crest, is related to
frequency and velocity
• Phase:
– Refers to the point in each wave cycle at which the wave begins
(measured in degrees)
– (For example, changing a wave’s cycle from crest to trough
corresponds to a 180 degree phase shift).
Wavelength vs. Frequency
speed = frequency * wavelength
v=fλ
v = 3 x108 m/s
= 300,000 km/s
= 186,000 miles/s
Example:
if f = 900 MHz
λ = 3 x108 / 900 x 10 3
= 3/9 = 0.3 meters
λ
Modulation
• Μodification of a carrier wave’s fundamental
characteristics in order to encode information
– Carrier wave: Basic sound wave transmitted through the
circuit (provides a base which we can deviate)
• Βasic ways to modulate a carrier wave:
– Amplitude Modulation (AM)
• Also known as Amplitude Shift Keying (ASK)
– Frequency Modulation (FM)
• Also known as Frequency Shift Keying (FSK)
– Phase Modulation (PM)
• Also known as Phase Shift Keying (PSK)
Amplitude Modulation (AM)
• Changing the height of the wave to encode data
3/7/2025 179
Translating from Analog to Digital
• Must be translated into a series of bits before transmission of
a digital circuit
• Done by a technique called Pulse Amplitude Modulation
(PAM) involving 3 steps:
– Measuring the signal
– Encoding the signal as a binary data sample
– Taking samples of the signal
• Creates a rough (digitized) approximation of original signal
– Quantizing error: difference between the original signal and
approximated signal
Data Encoding
C = 2 B log2m
C= capacity in bps
B = bandwidth in Hz
Example
C = 2 B log2m
C= capacity in bps
B = bandwidth in Hz
Example
Solution
We can use the Nyquist formula as shown:
C = 2 B log2m
C= capacity in bps
B = bandwidth in Hz
Solution
We can use the Nyquist formula as shown:
Solution
We can calculate the throughput as
C = B log2(1 + SNR)
This means that the highest bit rate for a telephone line is 34.860
kbps. If we want to send data faster than this, we can either
increase the bandwidth of the line or improve the signal-to-noise
ratio.
Important Observation
This means that the highest bit rate for a telephone line is 34.860
kbps. If we want to send data faster than this, we can either
increase the bandwidth of the line or improve the signal-to-noise
ratio.
Example
• Digital data
– Produced by computers, in binary form,
represented as a series of ones and zeros
– Can take on only 0 ad 1
Types of Transmission
• Analog transmissions
– Analog data transmitted in analog form (vary continuously)
– Examples of analog data being sent using analog
transmissions are broadcast TV and radio
• Digital transmissions
– Made of square waves with a clear beginning and ending
– Computer networks send digital data using digital
transmissions.
• Data converted between analog and digital formats
– Modem (modulator/demodulator): used when digital data
is sent as an analog transmission
– Codec (coder/decoder): used when analog data is sent as a
digital transmission
Data Type vs. Transmission Type
Analog Digital
Transmission Transmission
216
Synchronous TDM vs. Asynchronous / Statistical TDM
217
Use of TDM frames
Time slots are grouped into frames. A frame consists of a one
complete cycle of time slots, including one or more slots dedicated
to each sending device.
In a TDM, the data rate of the link is n times faster, and the unit
duration is n times shorter.
FDM vs TDM
219
Switched Network
➢Data transferred between the two stations are not packetized (physical
layer transfer of the signal). The data are a continuous flow sent by the
source station and received by the destination station, although there
may be periods of silence.
Delay in a Circuit-Switched Network
Packet Switching
➢As in datagram network, data are packetized and each packet carries an
address in the header. However, address in header has local information (it
defines what should be next switch and channel on which packet is being
carried).
➢As in a circuit-switched network, all packets follow the same path
established during the connection.
Virtual-Circuit Identifier :
The identifier that is actually used for data transfer is called the virtual-circuit identifier (Vel). It is
used by a frame between two switches. When a frame arrives at a switch, it has a VCI; when it
leaves, it has a different VCI.
Note that a VCI does not need to be a large number since each switch can use its own unique set
of VCls.
Source-to-destination data transfer in a virtual-circuit network
8.230
Setup request in a virtual-circuit network
8.231
Setup acknowledgment in a virtual-circuit network
8.232
Delay Analysis in Virtual Circuit
Comparison chart
Message Switching
• With message switching there is no need to establish a dedicated path between two stations.
• When a station sends a message, the destination address is appended to the message.
• The message is then transmitted through the network, in its entirety, from node to node.
• Each node receives the entire message, stores it in its entirety on disk, and then transmits the message
to the next node.
• This type of network is called a store-and-forward network.
• A message-switching node is typically a general-purpose computer. The device needs sufficient
secondary-storage capacity to store the incoming messages, which could be long. A time delay is
introduced using this type of scheme due to store- and-forward time, plus the time required to find the
next node in the transmission path.
Message Switching
Advantages:
• Channel efficiency can be greater compared to circuit-switched
systems, because more devices are sharing the channel.
• Traffic congestion can be reduced, because messages may be
temporarily stored in route.
• Message priorities can be established due to store-and-forward
technique.
• Message broadcasting can be achieved with the use of
broadcast address appended in the message.
Disadvantages
• Message switching is not compatible with interactive
applications.
• Store-and-forward devices are expensive, because they must
have large disks to hold potentially long messages.
Message Switching
Transmission Media-Taxonomy
Design Factors
for Transmission Media
• Bandwidth: All other factors remaining constant, the greater
the band-width of a signal, the higher the data rate that can
be achieved.
• Transmission impairments. Limit the distance a signal can
travel.
• Interference: Competing signals in overlapping frequency
bands can distort or wipe out a signal.
• Number of receivers: Each attachment introduces some
attenuation and distortion, limiting distance and/or data rate.
Factors Used in Media Selection
• Type of network
– LAN, WAN, or Backbone
• Cost
– Always changing; depends on the distance
• Transmission distance
– Short: up to 300 m; medium: up to 500 m
• Security
– Wireless media is less secure
• Error rates
– Wireless media has the highest error rate (interference)
• Transmission speeds
– Constantly improving; Fiber has the highest
Twisted Pair (TP) Wires
• Commonly used for telephones and LANs
• Reduced electromagnetic interference
– Via twisting two wires together
(Usually several twists per inch)
• TP cables have a number of pairs of wires
– Telephone lines: two pairs (4 wires, usually only one pair is used by the
telephone)
– LAN cables: 4 pairs (8 wires)
• Also used in telephone trunk lines (up to several thousand
pairs)
• Shielded twisted pair also exists, but is more expensive
Types-UTP and STP and connectors
UTP Categories
Coaxial Cables
• Used for cable television, LANs, telephony
• Has an inner conductor surrounded by a braided mesh
• Both conductors share a common center axial, hence the
term “co-axial”.
• Advantages-
– Higher bandwidth
• 400 to 600Mhz
• up to 10,800 voice conversations
– Can be tapped easily (pros and cons)
– Much less susceptible to interference than twisted pair
• Disadvantages-
– High attenuation rate makes it expensive over long distance
– Bulky
Coax Layers
outer jacket
(polyethylene)
shield
(braided wire)
insulating material
copper or aluminum
conductor
Coaxial Cable-Categories and
Connectors
Optical Fiber
Relatively new transmission medium used by telephone
companies in place of long-distance trunk lines.
Also used by private companies in implementing local data
communications networks
Require a light source with injection laser diode (ILD) or light-
emitting diodes (LED)
Optical Fiber-Benefits and
applications
• Greater capacity
• Data rates of hundreds of Gbps
• Smaller size & weight
• Lower attenuation
• Electromagnetic isolation
• Greater repeater spacing • Long-haul trunks
• 1500km, 20 – 60k voice channels
• 10s of km at least • Metropolitan trunks
• 12 km, 100k channels
• Rural exchange trunks
• 40 – 160Km, 5k voice channels
• Subscriber loops
• Voice data cables leased by corporate clients
• LANs
• 100Mbps – 1 Ghz
Unguided Media
A Realtime Implementation
Radio Waves
• EM waves ranging in frequencies
between 3 KHz and 1 GHz
– Omni-directional antennas are used
– Propagates in all directions; sending and
receiving antennas need not be aligned
– Use ground and sky propagations
– Susceptible to interference
– Can travel long distances
– Can penetrate walls
– Narrow bands
– Used for multicast communications, e.g. AM
and FM radio, television, cordless phones
and paging Omnidirectional antenna
Microwaves
• EM waves having frequencies between 1 GHz and 300 GHz
– Unidirectional antennas; use line-of-sight propagation
– Narrowly focused; sending & receiving antennas need to be aligned
– No interference if properly aligned
– Repeaters are often needed for long distance communication
– Very high frequency waves cannot penetrate walls
– Wider bands
– Used for unicast communications, e.g. cellular phones, satellite networks
and wireless LANs
265
Infrared waves
• EM waves with frequencies from 300 GHz to 400 THz
– Use line-of-sight propagation
– High frequency waves cannot penetrate walls; prevents interference
– Cannot be used outside a building as sun’s rays can interfere
– Wide bandwidth
– Used for short-range communications in a closed area
– Infrared Data Association (IrDA) has established standards for using
infrared waves for communication between wireless devices
– Devices with IrDA port: wireless keyboard, wireless mouse, wireless
printer, remote controls, etc
– Data rate: 75 Kbps (original); 4 Mbps (recent)
THANKS