CH - site.iugaza.edu.pssite.iugaza.edu.ps/wp-content/uploads/Networks Discussion2_CH 1.pdf ·...
Transcript of CH - site.iugaza.edu.pssite.iugaza.edu.ps/wp-content/uploads/Networks Discussion2_CH 1.pdf ·...
Lecture # 2
CH.1
Computer Networks and the Internet
Islamic University of Gaza
Faculty of Engineering
Computer Engineering Department
Networks Discussion ECOM 4021
By
Eng. Wafaa Audah
Feb. 2013
Networks Discussion Eng. Wafaa Audah
(Theoretical material: page 2-7, Review questions and problems :8-end)
1.1 What is the Internet
End systems (hosts): computing devices that are interconnected by
the network like PC, server, cell phones, laptops.
End Systems are connected together by communication links and
packet switches.
Packet switches come in many shapes, but the two most famous types
in today's Internet are routers and link-layer switches.
Bandwidth mean transmission rate of data, measured by bit/sec.
End systems access the Internet through Internet Service Providers
(ISPs).
End systems and packet switches run protocols that control the
sending and receiving of information within the Internet. The Transmission Control Protocol (TCP) and the Internet Protocol (IP) are
two of the most important protocols in the Internet.
Protocol:
Computer network protocol
1.2 Network Edge
Network edges mean the applications and hosts.
Access network is the physical links that connect an end system to
the first router (also known as the "edge router") on a path from the
end system to any other distant end system.
A protocol defines the format and the order for
messages exchanged
between two or more
communicating entities, as well as the actions
taken on the transmission
and/or receipt of the
message.
2
Networks Discussion Eng. Wafaa Audah
Network core includes interconnected routers and network of
networks.
Information about the lasting of this section which include:
Internet access networks and physical media, are available at Dr.
slides :lecture 1 _slides 13-28 and textbook
1.3 Network Core
There are two fundamental approaches for moving data through a
network of links and switches: circuit switching and packet switching.
Circuit Switching:
- Dedicated link that represents end-end resources reserved for
"call" and dedicated resources which mean "no share".
- Network resources (e.g., bandwidth) divided into "pieces" *****
- Every user has a bandwidth as the following equation show:
Bandwidth one user = Total bandwidth / Number of users
- Represent guaranteed transmission (ensure: data arrival, correct
arrival and ordered data).
- Call setup required
- Resource piece idle if not used by owning call ……. Disadvantage.
3
Networks Discussion Eng. Wafaa Audah
***** Dividing link bandwidth into "pieces":
- Frequency division: Time is taken completely and frequency is
divided between users ( Every user take a part of frequency all the
time).
- Time division: Frequency is taken completely and time is divided into
slots that every user take a slot that is repeated periodically ( Every
user take the total frequency periodically)
Packet Switching:
- Data stream is divided into packets.
- No dedicated link that represents No end-end resources reserved.
- No dedicated resources which means "sharing" (resources used as needed).
- Network resources (bandwidth) are not divided into "pieces", each packet uses full link bandwidth.
- No guarantee of transmission (No ensuring for : data arrival, correct
arrival and ordered data).
4
Networks Discussion Eng. Wafaa Audah
1.4 Delay Loss and Throughput in Packet-Switched Networks
Dealing with packet switching means: probability of many types of delays
which are:
- Nodal processing: Time taken by the node itself in order to (e.g.) check bit errors or determine output link.
- Queuing delay: When packets arrival rate to the link exceeds
output link capacity, packets queue in router buffers period of
time, wait for their transmission chance.
- Transmission delay: The time needed to load all the packet into
the link, which is L/R (R=link bandwidth (bps), L=packet length
(bits).
- Propagation delay: The time needed for a packet to across the
link, which is d/s (d = length of physical link, s = propagation speed in medium.
- Store and forward delay: The time needed for the node (router)
to receive complete packet before forwarding it to another node.
Nodal Delay (End-to-End Delay)
Note:
When packets arrival rate to the link exceeds output link capacity: queuing
happenes, but if the queuing buffer is full, then packet loss will happen.
5
Networks Discussion Eng. Wafaa Audah
Throughput
Rate (bits/time) at which bits transferred between sender/receiver and it
measured by getting the Minimum **** of links rates between sender and
receiver.
Note: Minimum link rate will get the control of all transmission links
because it can allow transmission just at its rate even if there are higher
rated links, that means getting the throughput as its rate.
- The following figure describe the meaning of how minimum link rate
describe the throughput, suppose that every shape is a link and its area
describe its rate……… as a figure shows, smaller shape control whole system
because data are passed through it just according to its area which
represent rate.
1.5 Protocol layers, service models
- Internet protocol stack model provides reliable byte-stream
service between client and service processes.
link 1 link 2 link 3
Data
Data
Data
6
Networks Discussion Eng. Wafaa Audah
- ISO/OSI reference model
Note:
According to Internet protocol stack model
- Switch works at link and physical layers.
- Router works at network, link and physical layers.
For sections: 1.6, 1.7 see Dr. slides (Lecture 3_11-25) and textbook
7
Networks Discussion Eng. Wafaa Audah
Review Questions and Problems
Review Questions
R.11 What advantage does a circuit-switched network have over a
packet-switched network? What advantages does TDM have over FDM in a
circuit-switched network?
- A circuit-switched network can guarantee a certain amount of end-to-
end bandwidth for the duration of a call, but packet-switched
networks cannot make any end-to-end guarantees for bandwidth.
- In TDM each signal uses all of the bandwidth some of the time, TDM
provides greater flexibility and efficiency, by dynamically allocating
more time periods to the signals that need more of the bandwidth,
while reducing the time periods to those signals that do not need it.
FDM lacks this type of flexibility, as it cannot dynamically change the
width of the allocated frequency.
R.12 Why is it said that packet switching employs statistical
multiplexing? Contrast statistical multiplexing with the multiplexing that
takes place in TDM.
In a packet switched network, the packets from different sources flowing on
a link do not follow any fixed, pre-defined pattern. In TDM circuit switching,
each host gets the same slot in a revolving TDM frame.
R.15 Suppose users share a 2 Mbps link. Also suppose each user
transmits continuously at I Mbps when transmitting, but each user
transmits only 20 percent of the time.
a. When circuit switching is used, how many users can be supported?
b. For the remainder of this problem, suppose packet switching is used.
Why will there be essentially no queuing delay before the link if two or
fewer users transmit at the same time? Why will there be a queuing delay
if three users transmit at the same time?
c. Find the probability that a given user is transmitting.
8
Networks Discussion Eng. Wafaa Audah
R.19 Suppose Host A wants to send a large file to Host B. The path from
Host A to Host B has three links, of rates RI =500 kbps, R2 =2 Mbps, and
R) = I Mbps.
a. Assuming no other traffic in the network, what is the throughput for
the file transfer.
b. Suppose the file is 4 million bytes. Dividing the file size by the through
put, roughly how long will it take to transfer the file to Host B?
c. Repeat (a) and (b), but now with R2 reduced to 100 kbps.
processing delay, transmission delay, propagation delay and queuing delay.
All of these delays are fixed, except for the queuing delays, which are
variable according to the pressure of the packets on link.
R.16 Consider sending a packet from a source host to a destination host
over a fixed route. List the delay components in the end-to-end delay.
Which of these delays are constant and which are variable?
a) according to equation:
Bandwidth one user = Total bandwidth / Number of users
I M= 2 M/N N = 2 users can be supported.
b) Each user requires 1Mbps when transmitting, if two or fewer users
transmit simultaneously, a maximum of 2Mbps will be required. Since the
available bandwidth of the shared link is 2Mbps, there will be no queuing
delay before the link. Whereas, if three users transmit simultaneously, the
bandwidth required will be 3Mbps which is more than the available
bandwidth of the shared link. In this case, there will be queuing delay before
the link.
c) Probability that a given user is transmitting = 0.2 (each user transmits
only 20 percent of the time)
9
Networks Discussion Eng. Wafaa Audah
Problems
P.3 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?
b. Suppose that all connections are between the switch in the upper-
left-hand corner and the switch in the lower-right-hand corner. What is
the maximum number of simultaneous connections that can be in
progress?
a) throughput according to the previous information above_ page 6:
min (500k,2M,1M) bit/sec =500k bit/sec.
b) 500*10^3 sec
8*4*10^6 ? : 64 second
c) a-100k bit/sec (the same "min" approach), b- 100*10^3 sec
8*4*10^6 ? : 320 second
10
Networks Discussion Eng. Wafaa Audah
P.4 Review the car-caravan analogy in Section l.4. Assume a
propagation speed of 100 km/hour.
a. Suppose the caravan travels 150 km, beginning in front of one
tollbooth, passing through a second tollbooth, and finishing just after a
third tollbooth. What is the end-to-end delay?
a) We can have n connections between each of the four pairs of adjacent
switches. This gives a maximum of 4n connections.
b) We can n connections passing through the switch in the upper-right-hand
corner and another n connections passing through the switch in the lower-
left-hand corner, giving a total of 2n connections.
.
. .
.
.
. .
.
n
n
n n
n
n
n
n
2 n
2 n
11
Networks Discussion Eng. Wafaa Audah
Tollbooths are 75 km apart, and the cars propagate at 100km/hr. A tollbooth
services a car at a rate of one car every 12 seconds.
a) There are ten cars. It takes 120 seconds, or 2 minutes, for the first
tollbooth to service the 10 cars. Each of these cars has a propagation
delay of 45 minutes (travel 75 km) before arriving at the second
tollbooth. Thus, all the cars are lined up before the second tollbooth
after 47 minutes. The whole process repeats itself for traveling
between the second and third tollbooths. It also takes 2 minutes for
the third tollbooth to service the 10 cars. Thus the total delay is 96
minutes.
Explanation:
- Time _ start -stage1:
tr_10 cars loaded to link 1 (10*12sec=120sec=2min)+ tp
(75k/100k/hr=45min)= 47min.
- Time _ stage1-stage 2 (10 cars loaded to link 2): the same of the
previous work =47min
- Time_ stage2-end tr_10 cars passed tollbooth and loaded out of
it: 10*12sec=120sec=2min
- Total end to end delay = 47+47+2 (min) = 96 min
The following figure explain the work
Example
at
section
1.4
12
Networks Discussion Eng. Wafaa Audah
.
•1
75 •2
.
•3
P.6 In this problem we consider sending real-time voice from Host A to
Host B over a packet-switched network (VoIP). Host A converts analog
voice to a digital 64 kbps bit stream on the fl y. Host A then groups the
bits into 56-byte packets. There is one link between Host A and B; its
transmission rate is 2 Mbps and its propagation delay is 10 msec. As soon
as Host A gathers a packet, it sends it to Host B. As soon as Host B
receives an entire packet, it converts the packet's bits to an analog
signal. How much time elapses from the time a bit is created (from the
original analog signal at Host A) until the bit is decoded (as part of the
analog signal at Host B)?
Link 1 Link 2
start stage 1 stage 2 end
tp tp
tr _10cars tr _10cars
tr _10cars
caravan
End-to-end delay
Networks Discussion Eng. Wafaa Audah
The arriving packet must first wait for the link to transmit 6,750 bytes or
54,000 bits. Since these bits are transmitted at 2 Mbps, the queuing delay is
27 msec. Generally, the queuing delay is
- Waiting link to be free : (L-x)/R.
- Waiting n-queue packets: nL/R
- Total delay = (nL + (L - x))/R
P.11 A packet switch receives a packet and determines the outbound
link to which the packet should be forwarded . When the packet arrives,
one other packet is halfway done being transmitted on this outbound
link and four other packets are waiting to be transmitted. Packets are
transmitted in order of arrival. Suppose all packets are 1,500 bytes and
the link rate is 2 Mbps. What is the queuing delay for the packet? More
generally, what is the queuing delay when all packets have length L, the
transmission rate is R, x bits of the currently-being-transmitted packet
have been transmitted, and n packets are already in the queue?
Consider the first bit in a packet. Before this bit can be transmitted, all of
the bits in the packet must be generated. This requires
1. The time required to make analog- to digital conversion
56*8/(64*10^3)sec=7msec.
2. The time required to transmit the packet is
56*8/(2*10^6)sec=224μsec.
3. Propagation delay = 10 msec.
The delay until decoding is
7msec +μ224sec + 10msec = 17.224msec
A similar analysis shows that all bits experience a delay of 17.224 msec.
L n packets in
queue
Queu
packet X L-x
A B
New packet
Link
Networks Discussion Eng. Wafaa Audah
P.24 Suppose two hosts, A and B, are separated by 20,000 kilometers
and are connected by a direct link of R = 2 Mbps. Suppose the
propagation speed over the link is 2.5 . 10H meters/sec.
a. Calculate the bandwidth-delay product, R . d prop '
b. Consider sending a file of 800,000 bits from Host A to Host B. Suppose
the file is sent continuously as one large message. What is the maximum
number of bits that will be in the link at any given time?
c. Provide an interpretation of the bandwidth-delay product.
d. What is the width (in meters) of a bit in the link? Is it longer than a
football field?
e. Derive a general expression for the width of a bit in terms of the
propagation speed s, the transmission rate R, and the length of the link
m.
The queuing delay is 0 for the first transmitted packet, L/R for the second
transmitted packet, and generally, (n-1)L/R for the nth transmitted packet.
Thus, the average delay for the N packets is
(L/R + 2L/R + ....... + (N-1)L/R)/N
= L/(RN) * (1 + 2 + ..... + (N-1))
= L/(RN) * N(N-1)/2
= LN(N-1)/(2RN)
= (N-1)L/(2R)
Note that here we used the well-known fact that
1 + 2 + ....... + N = N(N+1)/2
P.12 Suppose N packets arrive simultaneously to a link at which no
packets are currently being transmitted or queued. Each packet is of
length L and the link has transmission rate R. What is the average
queuing delay for the N packets?
Networks Discussion Eng. Wafaa Audah
a) 80,000,000 bits
b) 800,000 bits, this is because that the maximum number of bits that will
be in the link at any given time = min(bandwidth delay product, packet size)
= 800,000 bits. (the same concept of throughput measurement)
c) .25 meters
P.26 Consider problem P24 but now with a link of R =1 Gbps.
a. Calculate the bandwidth-delay product, R . d prop
b. Consider sending a file of 800,000 bits from Host A to Host B. Suppose
the file is sent continuously as one big message. What is the maximum
number of bits that will be in the link at any given time?
c. What is the width (in meters) of a bit in the link?
a) R* (D/V) = 2M *20,000 k / 2.5*10^8 = 160,000 bits
b) 160,000 bits because the link can only has a number of bits equals
bandwidth delay product.
c) The bandwidth-delay product of a link is the maximum number of bits
that can be in the link.
d) the width of a bit = length of link / bandwidth-delay product, so 1 bit is
125 meters long.
e) s/R
Networks Discussion Eng. Wafaa Audah
P.30 In modern packet-switched networks, the source host segments
long, application-layer messages (for example, an image or a music file)
into smaller packets and sends the packets into the network. The
receiver then reassembles the packets back into the original message.
We refer to this process as message segmentation. Figure 1.28
illustrates the end-to-end transport of a message with and without
message segmentation. Consider a message that is 8 * 106 bits long that
is to be sent from source to destination in Figure 1.28. Suppose each link
in the figure is 2 Mbps. Ignore propagation, queuing, and processing
delays .
a. Consider sending the message from source to destination without
message segmentation. How long does it take to move the message from the source host to the first packet switch? Keeping in mind that each
switch uses store-and-forward packet switching, what is the total time to
move the message from source host to destination host?
b. Now suppose that the message is segmented into 4,000 packets, with
each packet being 2,000 bits long. How long does it take to move the
first packet from source host to the first switch? When the first packet is being sent from the first switch to the second switch, the second packet
is being sent from the source host to the first switch. At what time will
the second packet be fully received at the first switch?
c. How long does it take to move the file from source host to destination
host when message segmentation is used? Compare this result with your answer in part (a) and comment.
d. Discuss the drawbacks of message segmentation.
Networks Discussion Eng. Wafaa Audah
See You at lecture 3
Best Wishes
a) Time to send message from source host to first packet switch =
(8*10^6)/(2*10^6)=4sec . With store-and-forward switching, the total time
to move message from source host to destination host = 3*4 sec=12 sec.
(three links has the same rate so the same time will be needed)
b) Time to send 1st packet from source host to first packet switch =
(2*10^3)/(2*10^6) =1msec
- Time at which 2nd packet is received at the first switch = time at which
1st packet is received at the second switch: 2*1msec=2msec
c) Time at which 1st packet is received at the destination host = 1msec*3=3
msec. After this, every 1msec one packet will be received; thus time at
which last (4000th) packet is received = 3msec+3999*1msec=4.002sec. It can
be seen that delay in using message segmentation is significantly less
(almost 1/3rd).
Detailed explanation ****
d) Drawbacks: i. Packets have to be put in sequence at the destination.
ii. Message segmentation results in many smaller packets. Since header size
is usually the same for all packets regardless of their size, with message
segmentation the total amount of header bytes is more.
**** Assume that we have 3-packets (small number instead of 4000)
As it clear, 2nd packet need just 1msec after the arrival of 1st packet
(4msec-3msec), third packet has the same thing. Meaning for 4000 packets:
1st packet needs 3msec to reach destination and all other packets need just
1msec because every packet needs 1msec after its previous packet reach
1msec
2msec
3msec
4msec
5msec
1st packet
2nd packet
3rd packet
S sw1 sw2 d