0% found this document useful (0 votes)
9 views7 pages

Sheet 2 Switching

The document discusses different types of switching techniques used in computer networks including circuit switching, message switching, and packet switching. It then provides details on different types of packet delays and formulas to calculate delay times for various switching techniques including circuit switching, message switching, datagram switching, and virtual circuit switching. Examples are also given to calculate end-to-end delays and throughput for different scenarios.

Uploaded by

Basel wesam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views7 pages

Sheet 2 Switching

The document discusses different types of switching techniques used in computer networks including circuit switching, message switching, and packet switching. It then provides details on different types of packet delays and formulas to calculate delay times for various switching techniques including circuit switching, message switching, datagram switching, and virtual circuit switching. Examples are also given to calculate end-to-end delays and throughput for different scenarios.

Uploaded by

Basel wesam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Menoufia University – Faculty of Electronic Engineering

Network Planning Module - 2024

I. Switching
Switching Techniques:
1) Circuit Switching
2) Message Switching
3) Packet Switching
• Datagram
• Virtual Circuit

YouTube Link for Switching Techniques:


https://www.youtube.com/watch?v=f1agcuOb
umI&ab_channel=SimplyCoding

Figure 1 Switching Idea.

II. Packet Delay Types

Figure 2 Packet structure.


Figure 3 Packet Delay Types.

1) Processing Delay

2) Queueing Delay

3) Transmission Delay
𝑳
𝑻𝒕𝒓 =
𝑹

4) Propagation Delay
𝑫
𝑻𝒑𝒓𝒐𝒑 =
𝑺

5) Acknowledgement Delay

1|Pa ge
Menoufia University – Faculty of Electronic Engineering
Network Planning Module - 2024

III. Switching Types


1) Circuit Switching
𝑻𝑫|𝑪𝑺 = 𝑻𝒔𝒆𝒕𝒖𝒑 + 𝑻𝒕𝒓|𝒏𝒐𝒅𝒆 + 𝑻𝒑𝒓𝒐𝒑 + 𝑻𝒑𝒓𝒐𝒄|𝒏𝒐𝒅𝒆
𝐿
𝑇𝑡𝑟|𝑛𝑜𝑑𝑒 =
𝐶
𝐷
𝑇𝑝𝑟𝑜𝑝 = . (𝑁 + 1)
𝑆

2) Message Switching (Store & Forward)


𝑻𝑫|𝑴𝑺 = 𝑻𝒕𝒓 + 𝑻𝒑𝒓𝒐𝒑 + 𝑻𝒑𝒓𝒐𝒄 + 𝑻𝒒𝒖𝒆
𝐿+𝐻
𝑇𝑡𝑟 = . (𝑁 + 1)
𝐶
If 𝐻 is not given, assume 𝐻 = 200
𝐷
𝑇𝑝𝑟𝑜𝑝 = . (𝑁 + 1)
𝑆

𝑇𝑝𝑟𝑜𝑐 + 𝑇𝑞𝑢𝑒 = (𝑇𝑝𝑟𝑜𝑐|𝑛𝑜𝑑𝑒 + 𝑇𝑞𝑢𝑒|𝑛𝑜𝑑𝑒 ). (𝑁 + 1)

3) Datagram (Pipelining)

𝑻𝑫|𝑫𝑮 = 𝑻𝒕𝒓|𝟏𝒔𝒕 + 𝑻𝒕𝒓|𝒓𝒆𝒔𝒕 + 𝑻𝒑𝒓𝒐𝒑 + 𝑻𝒑𝒓𝒐𝒄 + 𝑻𝒒𝒖𝒆

𝑝+ℎ
𝑇𝑡𝑟|1𝑠𝑡 = . (𝑁 + 1)
𝐶

𝐿 + 𝐻 − (𝑝 + ℎ) 𝐿
𝑇𝑡𝑟|𝑟𝑒𝑠𝑡 = , 𝑤ℎ𝑒𝑟𝑒 𝐻 = .ℎ
𝐶 𝑝
𝐷
𝑇𝑝𝑟𝑜𝑝 = . (𝑁 + 1)
𝑆
𝑇𝑝𝑟𝑜𝑐 + 𝑇𝑞𝑢𝑒 = (𝑇𝑝𝑟𝑜𝑐|𝑛𝑜𝑑𝑒 + 𝑇𝑞𝑢𝑒|𝑛𝑜𝑑𝑒 ). (𝑁 + 1)

4) Virtual Circuit with delivery guaranteed

𝑻𝑫|𝑽𝑪 = 𝑻𝒔𝒆𝒕𝒖𝒑 + 𝑻𝒕𝒓 + 𝑻𝒑𝒓𝒐𝒑 + 𝑻𝒑𝒓𝒐𝒄 + 𝑻𝒒𝒖𝒆 + 𝑻𝑨𝒄𝒌


𝑝+ℎ 𝐿
𝑇𝑡𝑟 = . (𝑁 + 1) .
𝐶 𝑝
𝐷 𝐿
𝑇𝑝𝑟𝑜𝑝 = . (𝑁 + 1) .
𝑆 𝑝
𝐿
𝑇𝐴𝑐𝑘 = (𝑇𝑡𝑟 + 𝑇𝑝𝑟𝑜𝑝 )|𝑚𝑖𝑛 . (𝑁 + 1) .
𝑝

𝑇𝑝𝑟𝑜𝑐 + 𝑇𝑞𝑢𝑒 = (𝑇𝑝𝑟𝑜𝑐|𝑛𝑜𝑑𝑒 + 𝑇𝑞𝑢𝑒|𝑛𝑜𝑑𝑒 ). (𝑁 + 1)

2|Pa ge
Menoufia University – Faculty of Electronic Engineering
Network Planning Module - 2024

Sheet 2
1) A message with length 4500 bits is transferred over a communication network with 100
km link length, and three intermediate nodes. The data rate on all links is 20 kbps, with
speed 250 m / µ sec, and packet size 128 bits, with 52 bits overhead. The set-up time is
0.25 sec., while the processing time and the average queuing delay at each node are
0.25, 0.35 sec. respectively. Compare between the end-to-end delay time for; circuit, and
datagram switching techniques.
Solution 1
𝐿 = 4500 𝑏𝑖𝑡𝑠 𝑝 = 128 𝑏𝑖𝑡𝑠
𝐷 = 100 𝑘𝑚 ℎ = 52 𝑏𝑖𝑡𝑠
𝑁 = 3 𝑇𝑠𝑒𝑡𝑢𝑝 = 0.25 𝑠𝑒𝑐
𝐶 = 20 𝑘𝑏𝑝𝑠 𝑇𝑝𝑟𝑜𝑐|𝑛𝑜𝑑𝑒 = 0.25 𝑠𝑒𝑐
𝑆 = 250 𝑚/𝜇 𝑠𝑒𝑐 = 250 x 103 𝑘𝑚/𝑠𝑒𝑐 𝑇𝑞𝑢𝑒|𝑛𝑜𝑑𝑒 = 0.35 𝑠𝑒𝑐

a) Circuit Switching

𝑻𝑫|𝑪𝑺 = 𝑻𝒔𝒆𝒕𝒖𝒑 + 𝑻𝒕𝒓|𝒏𝒐𝒅𝒆 + 𝑻𝒑𝒓𝒐𝒑 + 𝑻𝒑𝒓𝒐𝒄|𝒏𝒐𝒅𝒆


𝐿 4500
𝑇𝑡𝑟|𝑛𝑜𝑑𝑒 = = = 0.225 𝑠𝑒𝑐
𝐶 20 x 103
𝐷 100
𝑇𝑝𝑟𝑜𝑝 = (𝑁 + 1) = . 4 = 16 x 10−4 𝑠𝑒𝑐
𝑆 250 x 103
𝑇𝐷|𝐶𝑆 = 0.25 + 0.225 + 16 x 10−4 + 0.25 = 0.7266 𝑠𝑒𝑐

b) Datagram (Pipelining)

𝑻𝑫|𝑫𝑮 = 𝑻𝒕𝒓|𝟏𝒔𝒕 + 𝑻𝒕𝒓|𝒓𝒆𝒔𝒕 + 𝑻𝒑𝒓𝒐𝒑 + 𝑻𝒑𝒓𝒐𝒄 + 𝑻𝒒𝒖𝒆

𝑝+ℎ 128 + 52
𝑇𝑡𝑟|1𝑠𝑡 = . (𝑁 + 1) = . 4 = 0.036 𝑠𝑒𝑐
𝐶 20 x 103

𝐿 4500
𝐻= .ℎ = . 52 ≈ 1872 𝑏𝑖𝑡
𝑝 128

𝐿 + 𝐻 − (𝑝 + ℎ) 4500 + 1872 − (128 + 52)


𝑇𝑡𝑟|𝑟𝑒𝑠𝑡 = = = 0.3096 𝑠𝑒𝑐
𝐶 20 x 103

𝑇𝐷|𝐷𝐺 = 0.036 + 0.3096 + 16 x 10−4 + (0.25 + 0.35) . 4 = 2.7472 𝑠𝑒𝑐

3|Pa ge
Menoufia University – Faculty of Electronic Engineering
Network Planning Module - 2024

2) It is required to transfer a message with size 8000 bytes from a source to destination
with two nodes between them. The data rate for all links is 56 kbps. The packet size is
200 bits, and the overhead address is 60 bits. The call set-up time is 0.1 sec. The
processing time at each node is 0.15 sec., while the average queueing delay at each
node is 0.2 sec, and the data speed over a link is 200 m/µ sec. and the hop distance is
50 km. Calculate the end-to-end delay time and throughput for the following cases:
a) Circuit Switching network.
b) Message Switching network.
c) Virtual circuit packet switching network with delivery guaranteed using a mini
packet of 70 bits.
d) datagram packet switching network without delivery guaranteed.
Solution 2
𝐿 = 8000 𝑏𝑦𝑡𝑒 = 64000 𝑏𝑖𝑡𝑠 𝑇𝑠𝑒𝑡𝑢𝑝 = 0.1 𝑠𝑒𝑐
𝑁 = 2 𝑇𝑝𝑟𝑜𝑐|𝑛𝑜𝑑𝑒 = 0.15 𝑠𝑒𝑐
𝐶 = 56 𝑥 103 𝑏𝑝𝑠 𝑇𝑞𝑢𝑒|𝑛𝑜𝑑𝑒 = 0.2 𝑠𝑒𝑐
𝑝 = 200 𝑏𝑖𝑡𝑠 𝑆 = 200 𝑚/𝜇 𝑠𝑒𝑐 = 200 𝑥 103 𝑘𝑚/𝑠𝑒𝑐
ℎ = 60 𝑏𝑖𝑡𝑠 𝐷 = 50 𝑘𝑚

a) Circuit Switching

𝑻𝑫|𝑪𝑺 = 𝑻𝒔𝒆𝒕𝒖𝒑 + 𝑻𝒕𝒓|𝒏𝒐𝒅𝒆 + 𝑻𝒑𝒓𝒐𝒑 + 𝑻𝒑𝒓𝒐𝒄|𝒏𝒐𝒅𝒆


𝐿 64000 8
𝑇𝑡𝑟|𝑛𝑜𝑑𝑒 = = = 𝑠𝑒𝑐
𝐶 56 x 103 7
𝐷 50
𝑇𝑝𝑟𝑜𝑝 = (𝑁 + 1) = . 3 = 7.5 x 10−4 𝑠𝑒𝑐
𝑆 200 x 103
8
𝑇𝐷|𝐶𝑆 = 0.1 + + 7.5 x 10−4 + 0.15 = 1.3936 𝑠𝑒𝑐
7
Message size 𝐿 64000
Throughput = =𝑇 = 1.3936 = 45.92 𝑘𝑏𝑝𝑠
End−to−end delay 𝐷|𝐶𝑆

b) Message Switching

𝑻𝑫|𝑴𝑺 = 𝑻𝒕𝒓 + 𝑻𝒑𝒓𝒐𝒑 + 𝑻𝒑𝒓𝒐𝒄 + 𝑻𝒒𝒖𝒆


Let assume 𝐻 = 200,
𝐿+𝐻 64000 + 200 963
𝑇𝑡𝑟 = . (𝑁 + 1) = . 3 = 𝑠𝑒𝑐
𝐶 56 x 103 280
963
𝑇𝐷|𝑀𝑆 = + 7.5 x 10−4 + (0.15 + 0.2) . 3 = 4.49 𝑠𝑒𝑐
280
𝐿 64000
Throughput = = ≈ 14.25 𝑘𝑏𝑝𝑠
𝑇𝐷|𝑀𝑆 4.49

4|Pa ge
Menoufia University – Faculty of Electronic Engineering
Network Planning Module - 2024

c) Virtual Circuit with delivery guaranteed using 𝑷𝒌𝒕𝒎𝒊𝒏 = 𝟕𝟎 𝒃𝒊𝒕𝒔

𝑻𝑫|𝑽𝑪 = 𝑻𝒔𝒆𝒕𝒖𝒑 + 𝑻𝒕𝒓 + 𝑻𝒑𝒓𝒐𝒑 + 𝑻𝒑𝒓𝒐𝒄 + 𝑻𝒒𝒖𝒆 + 𝑻𝑨𝒄𝒌

𝑝+ℎ 𝐿 200 + 60 64000 156


𝑇𝑡𝑟 = . (𝑁 + 1). = 3
𝑥3𝑥 = 𝑠𝑒𝑐
𝐶 𝑝 56 x 10 200 35

𝐷 𝐿
𝑇𝑝𝑟𝑜𝑝 = . (𝑁 + 1). = 7.5 x 10−4 𝑥 320 = 0.24 𝑠𝑒𝑐
𝑆 𝑝

𝐿 70 50
𝑇𝐴𝑐𝑘 = (𝑇𝑡𝑟 + 𝑇𝑝𝑟𝑜𝑝 )|𝑚𝑖𝑛 . (𝑁 + 1). =( 3
+ ) 𝑥 3 𝑥 320 = 1.44 𝑠𝑒𝑐
𝑃 56𝑥10 200𝑥103

156
𝑇𝐷|𝑉𝐶 = 0.1 + + 0.24 + (0.15 + 0.2) . 3 + 1.44 = 7.287 𝑠𝑒𝑐
35
𝐿 64000
Throughput = = ≈ 8.78 𝑘𝑏𝑝𝑠
𝑇𝐷|𝑉𝐶 7.287

d) Datagram (Pipelining)

𝑻𝑫|𝑫𝑮 = 𝑻𝒕𝒓|𝟏𝒔𝒕 + 𝑻𝒕𝒓|𝒓𝒆𝒔𝒕 + 𝑻𝒑𝒓𝒐𝒑 + 𝑻𝒑𝒓𝒐𝒄 + 𝑻𝒒𝒖𝒆

𝑝+ℎ 200 + 60 39
𝑇𝑡𝑟|1𝑠𝑡 = . (𝑁 + 1) = . 3 = 𝑠𝑒𝑐
𝐶 56 x 103 2800

𝐿 64000
𝐻= .ℎ = . 60 = 19200 𝑏𝑖𝑡
𝑝 200

𝐿 + 𝐻 − (𝑝 + ℎ) 64000 + 19200 − (200 + 60)


𝑇𝑡𝑟|𝑟𝑒𝑠𝑡 = = = 1.481 𝑠𝑒𝑐
𝐶 56 x 103

39
𝑇𝐷|𝐷𝐺 = + 1.481 + 7.5 x 10−4 + (0.15 + 0.2) . 3 = 2.54575 𝑠𝑒𝑐
2800
𝐿 64000
Throughput = = = 25.14 𝑘𝑏𝑝𝑠
𝑇𝐷|𝐷𝐺 2.545

5|Pa ge
Menoufia University – Faculty of Electronic Engineering
Network Planning Module - 2024

3) Consider transferring a file of 2 M bits from a source to a destination with three nodes
between them. The data rate of all inks is 9600 bps. The packet size is 48 bytes, and the
overhead address is 5 bytes. The call set up time is 0.02 sec. The processing time at
each node is 0.006 sec while the average queuing delay is 0.03 sec. The propagation
speed on the link is 200m /µsec, while the hop distance is 30 km. Calculate the end-to-
end delay and throughput for the following cases:

a) Circuit switching network.


b) Message switching network.
c) Virtual circuit packet switching network with delivery guaranteed with a mini packet
of 60 bits.
Solution 3
𝐿 = 2 𝑥 106 𝑏𝑖𝑡𝑠 𝑇𝑠𝑒𝑡𝑢𝑝 = 0.02 𝑠𝑒𝑐
𝑁 = 3 𝑇𝑝𝑟𝑜𝑐|𝑛𝑜𝑑𝑒 = 0.006 𝑠𝑒𝑐
𝐶 = 9600 𝑏𝑝𝑠 𝑇𝑞𝑢𝑒|𝑛𝑜𝑑𝑒 = 0.03 𝑠𝑒𝑐
𝑝 = 48 𝑥 8 = 384 𝑏𝑖𝑡𝑠 𝑆 = 200 𝑚/𝜇 𝑠𝑒𝑐 = 200 𝑥 103 𝑘𝑚/𝑠𝑒𝑐
ℎ = 5 𝑥 8 = 40 𝑏𝑖𝑡𝑠 𝐷 = 30 𝑘𝑚

a) Circuit Switching

𝑻𝑫|𝑪𝑺 = 𝑻𝒔𝒆𝒕𝒖𝒑 + 𝑻𝒕𝒓|𝒏𝒐𝒅𝒆 + 𝑻𝒑𝒓𝒐𝒑 + 𝑻𝒑𝒓𝒐𝒄|𝒏𝒐𝒅𝒆


𝐿 2 x 106
𝑇𝑡𝑟|𝑛𝑜𝑑𝑒 = = = 208.33 𝑠𝑒𝑐
𝐶 9600
𝐷 30
𝑇𝑝𝑟𝑜𝑝 = (𝑁 + 1) = . 4 = 6 x 10−4 𝑠𝑒𝑐
𝑆 200 x 103
𝑇𝐷|𝐶𝑆 = 0.02 + 208.33 + 6 x 10−4 + 0.006 = 208.35 𝑠𝑒𝑐
𝐿 2 x 106
Throughput = = ≈ 9.6 𝑘𝑏𝑝𝑠
𝑇𝐷|𝐶𝑆 208.35

b) Message Switching

𝑻𝑫|𝑴𝑺 = 𝑻𝒕𝒓 + 𝑻𝒑𝒓𝒐𝒑 + 𝑻𝒑𝒓𝒐𝒄 + 𝑻𝒒𝒖𝒆


Let assume 𝐻 = 200,
𝐿+𝐻 2 x 106 + 200
𝑇𝑡𝑟 = . (𝑁 + 1) = . 4 = 833.416 𝑠𝑒𝑐
𝐶 9600
𝑇𝐷|𝑀𝑆 = 833.416 + 6 x 10−4 + (0.006 + 0.03) . 4 = 833.56 𝑠𝑒𝑐
𝐿 2 x 106
Throughput = = ≈ 2.4 𝑘𝑏𝑝𝑠
𝑇𝐷|𝑀𝑆 833.56

6|Pa ge
Menoufia University – Faculty of Electronic Engineering
Network Planning Module - 2024

c) Virtual Circuit with delivery guaranteed using 𝑷𝒌𝒕𝒎𝒊𝒏 = 𝟔𝟎 𝒃𝒊𝒕𝒔

𝑻𝑫|𝑽𝑪 = 𝑻𝒔𝒆𝒕𝒖𝒑 + 𝑻𝒕𝒓 + 𝑻𝒑𝒓𝒐𝒑 + 𝑻𝒑𝒓𝒐𝒄 + 𝑻𝒒𝒖𝒆 + 𝑻𝑨𝒄𝒌

𝑝+ℎ 𝐿 384 + 40 2𝑥106


𝑇𝑡𝑟 = . (𝑁 + 1). = .4 . = 920.25 𝑠𝑒𝑐
𝐶 𝑝 9600 384

𝐷 𝐿
𝑇𝑝𝑟𝑜𝑝 = . (𝑁 + 1). = 6 x 10−4 . 5209 = 3.125 𝑠𝑒𝑐
𝑆 𝑃

𝐿 60 30
𝑇𝐴𝑐𝑘 = (𝑇𝑡𝑟 + 𝑇𝑝𝑟𝑜𝑝 )|𝑚𝑖𝑛 . (𝑁 + 1). =( + ) . 4 . 5209 = 133.35 𝑠𝑒𝑐
𝑃 9600 200𝑥103

𝑇𝐷|𝑉𝐶 = 0.02 + 920.256 + 3.125 + (0.006 + 0.03) . 4 + 133.35 = 1056.9 𝑠𝑒𝑐

𝐿 2 x 106
Throughput = = ≈ 1.892 𝑘𝑏𝑝𝑠
𝑇𝐷|𝑉𝐶 1056.9

Best Wishes of Success

7|Pa ge

You might also like