Computer Networks and The Internet

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 40

Lecture 03

Introduction
to
Computer Networks and the Internet

Introduction 2-1
Chapter 1: roadmap

1.1 what is the Internet?


1.2 network edge
 end systems, access networks, links
1.3 network core
 packet switching, circuit switching, network structure
1.4 delay, loss, throughput in networks
1.5 protocol layers, service models
1.6 networks under attack: security

Introduction 1-2
Switching sends the data along different routes

Methods

Circuit Packet
Switching Switching

Circuit Switching and Packet Switching 


are two of the main models used to facilitate
connections within enterprise networks

Introduction 2-3
Circuit switching
 Circuit switching is when a “Dedicated Channel” needs to be
established before users can speak to each other on a call.
 Circuit switching connections are classified as half
duplex or full duplex.
 Half duplex communications allocate one channel and full
duplex communications allocate two channels.
 Circuit switching is most commonly-used to sustain
TELEPHONE SYSTEMS so that whenever the phone is picked
up the conversation can begin.
 Circuit switching is considered to be distinct from packet
switching because it provides a physical path between the
source and destination. 

Introduction 2-4
Three phases of Circuit
Switching
 As circuit switching is CONNECTION ORIENTED it means
we need to make connection first.

 1- Circuit establishment
 2- Data Transfer
 3- Circuit Disconnection

Introduction 2-5
Pros and Cons of Circuit Switching

PROS CONS
 Decreases the amount of  Isn’t right for any other type of
delay the user connections. 
experiences before and
during a call.   channel is reserved for future
conversations.
 Consistent bandwidth,
channels  Connected oriented.
 Correct sequence.  Link can’t be used to send any
other data even when free.
  If active users exceeds the number
of channels you have available then
calls will fail to take place or will
be dropped in the middle.
 Administrators are under pressure
to make sure that channels keep
up.
 In addition, even setting up calls
results in delay so the connection
needs to be fully established before
Introduction the conversation can take2-6 place.
Circuit Switching
 Network Resource
i.e. Bandwidth

Methods to divide link bandwidth into pieces (to multiple


connection)

2-7

https://www.youtube.com/watch?v=Cug52cpjM_g
Multiplexing
 Generally, a communication channel such as an optical fiber
or coaxial cable can carry only one signal at any moment in
time. This results in wastage of bandwidth.
 However, we can overcome this drawback by using a
technique called MULTIPLEXING.
 By using the multiplexing technique, we can easily send
multiple signals simultaneously over a communication channel
(medium). 

Definition
 Multiplexing is a technique which combines multiple signals
into one signal, suitable for transmission over a
communication channel such as coaxial cable or optical fiber.

Introduction 2-8
 The multiplexing technique divides the communication channel into several
logical sub-channels.
 Each logical sub-channel is dedicated to an individual signal. 
 Thus, the multiple signals are sent simultaneously over a shared
communication channel (medium). 
 Multiplexing has-been used for many years in long-distance telephony.
 Multiplexing is done by using a device called Multiplexer or MUX.

a large amount of bandwidth is wasted.

the bandwidth is effectively used.

Introduction 2-9
Time Division Multiplexing (TDM)
 Time Division Multiplexing processes information of
different transmitters successively in defined time
segments for transmission over one channel.
 In frequency division multiplexing, all signals of
different frequencies are transmitted simultaneously.
 But in time division multiplexing, all signals operate
with the same frequency are transmitted at different
times.

 .

Introduction 2-10
TDM
Example:
4 users

frequency

time

High priority processes?


STDM
TDM
The transmission rate of a circuit is equal to the frame rate MULTIPLIED by
the number of bits in a slot.

If a link transmits 8,000 frames per second and each slot consists of 8 bits, what is the
transmission rate of a circuit?

8000 frames per sec.


Each slot has 8 bits.
8000 * 8 = 64000
= 64 kbps
Introduction 1-12
Asynchronous TDM or Statistical TDM

 In Asynchronous time division multiplexing, the time


slots are not fixed (I.e. time slots are flexible).
 In synchronous TDM, the number of time slots is equal
to the number of devices (transmitters).
 But in Asynchronous TDM, the number of time slots is
not equal to the number of devices (transmitters).
 The time slots in asynchronous TDM are always less
than the number of devices (transmitter).
 For example, if we have X devices and Y time slots. Y
should always be less than X (I.e. Y < X).

Introduction 2-13
Introduction 2-14
Frequency Division Multiplexing

 Frequency division multiplexing is an analog technique.


 Use this technique extensively in TV and radio transmission.
 This technique combines multiple signals into one signal
and transmitted over the communication channel.
 The frequency division multiplexing divides the bandwidth
of a channel into several logical sub-channels. 
 Each logical sub-channel is allotted for a different signal
frequency.
 In this technique, each logical sub-channel (individual signal
frequency) is allotted to each user. In other words, each
user owns a sub-channel.

Introduction 2-15
GUARD BAND
Each logical sub-channel is separated by an unused
bandwidth called Guard Band to prevent overlapping of
signals.
 In other words, there exists a frequency gap between two
adjacent signals to prevent signal overlapping.
A guard band is a narrow frequency range that separates
two signal frequencies.

2-16
Circuit switching: FDM versus TDM
 FDM (Frequency Division Multiplexing) 

Example:
FDM 4 users
Deals with analog signals

frequency

time
Packet Switching

 mesh of interconnected routers


 packet-switching: hosts break
application-layer messages into
packets
 forward packets from one router to
the next, across links on path from
source to destination

Packet switching is a method of transferring the


data to a network in form of packets. In order to
transfer the file fast and efficient manner over
the network and minimize the transmission
latency, the data is broken into small pieces of
variable length, called Packet.
At the destination, all these small-parts
(packets) has to be reassembled, belonging to
the same file.
Pros and Cons of Packet Switching

PROS CONS
  paths to their destination  unsuitable for applications
without the need for a that require minimal latency.
dedicated channel.
 If there is too much traffic
 With packet switching then packets will be dropped
packets can be resent if in transit.
they don’t reach their
destination. 
 relies on a range of complex
protocols

Introduction 2-19
Store and Forward technique
 Packet Switching uses Store and Forward technique while switching the
packets
 while forwarding the packet each hop first store that packet then
forward.
 This technique is very beneficial because packets may get discarded at
any hop due to some reason (congestion)
 More than one path is possible between a pair of source and destination.
 Packets belonging to the same file may or may not travel through the
same path. If there is congestion at some path, packets are allowed to
choose different path possible over existing network.
 Packet-Switched networks were designed to overcome the weaknesses of
Circuit-Switched networks since circuit-switched networks were not very
effective for small messages.

Introduction 2-20
For your information

Introduction 2-21
https://www.youtube.com/wat
Introduction 1-22
ch?v=B1tElYnFqL8
Activity -01
 Consider an application that transmits data at a
steady rate (for example, the sender generates
an N-bit unit of data every k time units, where k is
small and fixed).
 Also, when such an application starts, it will
continue running for a relatively long period of
time.
 a. Would a packet-switched network or a circuit-
switched network be more appropriate for this
application? Why

Introduction 2-23
SOLUTION

 A circuit-switched network would be well suited


to the application described, because the
application involves long sessions with predictable
smooth bandwidth requirements.
 Since the transmission rate is known, bandwidth
can be reserved for each application session
circuit with no significant waste.

Introduction 2-24
Numerical Problems

Introduction 2-25
Bandwidth and Transmission
rate
 Bandwidth is the measure of HOW MUCH DATA a cable / network can carry at once.
 Link capacity, aka link bandwidth

 Transmission Rate is the number of bits of data that have been transferred per minute.

Introduction 2-26
Host: sends packets of data
host sending function:
takes application message
breaks into smaller two packets,
L bits each
chunks, known as packets,
of length L bits
transmits packet into 2 1
access network at
transmission rate R R: link transmission rate
host
 link transmission rate, aka

time needed to L (bits)


transmit L-bit =
packet into link R (bits/sec)
Numerical – 01
Circuit Switching
 How long does it take to send a file of 640,000
bits from Host A to Host B over a circuit switched
network? If

 All links are of 1.536 Mbps


 Each kink uses TDM with 24 slots/sec
 500 msec to establish end to end circuit

Introduction 2-28
SOLUTION

 For a TDM link, time is divided into frames of fixed


duration and each frame is divided into a fixed number
of time slots.
 When the network establishes a connection across a
link, the network dedicates one time slot in every frame
to the connection.
 These slots are dedicated for the sole use of that
connection, with a time slot available for use (in every
frame) to transmit the connection's data.

Introduction 2-29
 GIVEN:
Solution Data Size = 640,000 bits
= 0.64 Mb
link capacity = R = 1.536 Mbps
Slots = 24 ( it means 24 users)
Transmission rate = 1.536 /24 = 64Kbps
Time Taken by TDM to transmit a file = L /R
= ( 640, 000bits /64Kbps)
= 10 sec
Total Time: Establishment time + transmission time

Establishment time = 500msec = 0.5 sec


Total Time = 10 sec + 0.5

= 10.5 secs

2-30
Numerical No. 2

 Consider the circuit-switched


network in Figure 1.12. Recall
that there are n circuits on
each link.

A- What is the maximum number


of simultaneous connections
that can be in progress at any
one time in this network?
Solution
 We can have n connections between each
of the four pairs of adjacent switches.
 This gives a maximum of 4n connections.

Introduction 2-32
Numerical 03
 Suppose users share a 3 Mbps link.
 Also suppose each user requires 150 Kbps when transmitting,
 a. When circuit switching is used, how many users can be
supported?

 Recall: Bandwidth has to be reserved in circuit switching. ( i.e


2 people on call)

Introduction 2-33
SOLUTION
Total speed that users share = 3Mbps
Requirement of each user = 150Kbps

In circuit switching, total no. of users that


can be supported will be = 20

1Mbps = 1000 Kbps
Introduction 2-34
3Mbps = 3000 Kbps
Packet-switching: store-and-forward

L bits
per packet

3 2 1
source destination
R bps R bps

 takes L/R seconds to transmit (push


out) L-bit packet into link at R bps
 store and forward: entire packet must
arrive at router before it can be
transmitted on next link

 end-end delay = 2L/R


So,

If a packet is sent over a series of N links, then formula to


calculate end to end delay will be

 end-end delay = N (L/R)

Where N = number of connections

Introduction 1-36
Packet Switching: queueing delay, loss

R = 100 Mb/s Finite buffer space C


A
D
R = 1.5 Mb/s
B
queue of packets E
waiting for output link

queuing and loss:


 If arrival rate (in bits) to link exceeds transmission rate of link
for a period of time:
 packets will queue, wait to be transmitted on link
 packets can be dropped (lost) if memory (buffer) fills up
R = 100 Mb/s Finite buffer space C
A
D
R = 1.5 Mb/s
B
queue of packets E
waiting for output link

Scenario 1: Suppose Hosts A and B are sending packets to Host E.


Host A and B first send their packets along 10 Mbps Ethernet links to the
first router. The router then directs these packets to the 1.5 Mbps link. If,
during a short interval of time, the arrival rate of packets to the router
exceeds 1.5 Mbps, congestion will occur at the router as packets queue in
the link’s output buffer before being transmitted onto the link.

Scenario 2: if Host A and B each send a burst of five packets back-to-back


at the same time, then most of these packets will spend some time waiting in
the queue.
Activity
Using store and forward switching ,

L = 7.5 Mbits
R = 1.5 Mbps
Hint: two-hop transmission delay = 5
sec
How much delay till destination?

Introduction 2-39
Solution
 L = 7.5 Mbits
 R = 1.5 Mbps
 Two-hop transmission delay = 5 sec

L/R L/R L/R

L/R = 7.5 / 1.5


= 5sec

We have 3 connections so
Total Delay = L/R * 3
Introduction = 5*3 2-40

= 15sec

You might also like