Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
27 views41 pages

Intronetworks Exercises

The document provides a series of exercises focused on network parameters, including message length, transmission time, packet size, and network utilization. It covers various scenarios involving circuit-switched and packet-switched networks, analyzing performance metrics and calculating delays for different configurations. The exercises also explore concepts such as fragmentation, encapsulation, and multiplexing in network communications.
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)
27 views41 pages

Intronetworks Exercises

The document provides a series of exercises focused on network parameters, including message length, transmission time, packet size, and network utilization. It covers various scenarios involving circuit-switched and packet-switched networks, analyzing performance metrics and calculating delays for different configurations. The exercises also explore concepts such as fragmentation, encapsulation, and multiplexing in network communications.
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/ 41

ENTEL (UPC)

FXT
Introduction to Networks
Exercises
2
Parameters

ˆ L [bits]. Message length (bits or bytes).

ˆ Ttot [s]. Total time of a message transmission (seconds).

ˆ P [bits]. Packet (or frame) size (bits or bytes).

ˆ H [bits]. Packet (or frame) header size (overhead) (bits or bytes).

ˆ B [bps]. Link transmission rate (bps).

ˆ Tx [s]. Packet (or frame) transmission time (seconds).

ˆ Th [s]. Packet (or frame) header transmission time (seconds).

ˆ Td [s]. Packet (or frame) data transmission time (seconds).

ˆ d [m]. Link distance (meters).

ˆ D [s]. Propagation delay (seconds).

ˆ V [m/s]. Propagation speed (meters per second).

ˆ Tp [s]. Packet (or frame) processing time (seconds).

ˆ Tc [s]. Cadence time. In a periodic transmission, time between packets or frames (seconds).

ˆ RT T [s]. Round Trip Time. Time since the sender leaves the data to be sent and receives the corre-
sponding feedback from the other end (seconds).

ˆ ST [s]. Slot Time (seconds).

ˆ λp [pps]. Cadence in packets per second (pps).

ˆ λb [bps]. Cadence in bits per second (bps).

ˆ S [s]. Virtual or real circuit establishing and releasing time (seconds).

ˆ N [adimensional]. Number of links between origin and destination.

ˆ U [%]. Link or network utilization (%).

ˆ ηe [%]. Link eciency (%).

ˆ ηp [%]. Protocol eciency (%).

3
ˆ cs. Acronym:  circuit switching .

ˆ ps. Acronym:  packet switching .

ˆ dt. Acronym:  datagram .

ˆ vc. Acronym:  virtual circuit .

Note. Unless stated otherwise, we will always assume that nodes do Store and Forward.

4
Introduction to Networks

Circuits and Paquets

Exercise 1
In this exercise, we will study the maximum cadence (frame rate) that a certain network conguration can
handle. Consider the packet-switched network in the following gure:

B1 B2
Tp=1ms
Tp=1ms

Tp=30ms

Consider that nodes do Store&Forward and that frames have a length of 256 bytes. Then, calculate the
maximum sustained frame rate from A to B for the dierent link transmission rates showed below:

1. B1 = B2 = 64 kbps
2. B1 = 56 kbps and B2 = 64 kbps
3. B1 = 64 kbps and B2 = 56 kbps
4. B1 = 128 kbps and B2 = 128 kbps

Exercise 2
In this exercise we will study how to packetize a ow of bits.

A C
Circuit Network Packet Network
B BBC=384Kbps
BAB=64Kbps

In the gure, A is sending a bit ow of 64 kbps to C. For this purpose, B is used as intermediate node.
From A to B, we use a circuit network that provides us with a circuit of 64 kbps. From B to C, we
use a packet network of a single link of 384 kbps. The packet network only uses the data link layer. B
encapsulates the data of the ow into frames (without losing any bit). Frames are generated by adding a
5 Bytes header to the user information (data of the received ow). A frame is generated every 500 µs.

1. Calculate U, ηlink , ηprot , λ[bps] of the BC link.

5
Note. λ is the rate of user data (payload of the frame) in bps.

Exercise 3
In this exercise we will study theoretically the performance of circuit and data switched networks. For
a data switched network we will nd and expression for the frame size that minimizes the total delay to
transmit a certain amount of information. Consider the following parameters:

ˆ N: number of links between two stations A and B.

ˆ (N-1) is the number of intermediate nodes.

ˆ L: total length of the message in bits.

ˆ B: transmission rate of each link in bps.

ˆ P: frame or packet length in bits.

ˆ H: number of bits of the header.

ˆ S: time to establish and release a circuit.

ˆ D: propagation delay for each link in seconds.

Note. Consider that the processing delay (Tp ) in the nodes is negligible and that the end nodes
neither process nor perform SF.

1. Find an expression for total delay to send a message from A to B over a circuit switched network and
over a packet switched network in datagram mode.

2. Make a graph with the expressions of the total delay in terms of the length of the message L for
the circuit switched network and for the packet switched network in datagram mode. Consider that
S > (N − 1)P/B and discuss graph.

3. For a packet switched network, calculate the expression of P that minimizes the value of the total
delay in terms of N, L and H.

Exercise 4
A company has a central server and a client host. The client has to periodically upload its database to
the central central server. The volume of data that has to be transferred in each update is 100 Kbytes. To
implement this network conguration, the company is considering to use:

ˆ Option A. A circuit switched network.

 Circuit establishing time: 2 s.

 Circuit releasing time: 1 s.

 Circuit establishment/release per update.

 Channel transmission rate: 64 kbps.

 Propagation delay: negligible (D ≈ 0).

ˆ Option B. Packet switched network.

6
 Frames of 256 bytes with 20 bytes of header and 236 bytes of user data.

 Link transmission rate: 64 Kbps.

 Propagation delay: negligible (D ≈ 0).


 Processing time: negligible (Tp ≈ 0).

1. Calculate the time required to perform a database update using each option.

Exercise 5
A network made of wireless radio links has 10 links of a transmission rate B=100 Mbps. The average link
distance: d=30 km and the propagation speed at the links is c = 3 × 108 m/s. In this network, we want to
send a le of L=2400000 bits.

30Km 30Km 30Km


100Mbps 100Mbps 100Mbps
...
Source link1 link2 link10 Destination
Node Node Node
(1) (2) (3) (10) (11)

We are considering two possibilities for sending the data from one end of the network to the other end:

(A) Virtual circuit switched network where:

ˆ Frame size: P = 1024 bits.


ˆ Header: H vc
= 24 bits.
ˆ Frame processing time at each intermediate node: Tpvc = 10 µs.
ˆ We consider that the source does not process frames but the destination node has to process the
frames with Tp = 10 µs.
ˆ Establishing + releasing time: S = 4 ms.
(B) Datagram packet switched network where:

ˆ Frame size: P = 1024 bits.


ˆ Header: H dt
= 64 bits.
ˆ Frame processing time at each intermediate node: Tpdt = 20 µs.
ˆ We consider that the source does not process frames but the destination node has to process the
frames with Tp = 20 µs.

1. To decide which technology you should choose, calculate the total delay time to transmit the le for
each case: virtual circuit and datagram. Consider for this calculation that the transmission starts
when the source sends the rst bit of the rst frame and ends when the last frame is processed at the
destination.

Exercise 6
In this exercise we will try to nd the optimal frame size to minimize the total delay in transmitting a
certain amount of information through dierent network congurations. In particular, we want to transmit
data in a datagram switched network with the following characteristics:

ˆ The network consists of N=10 links with individual processing time of Tp = 9 ms, each node.

ˆ The links between nodes transmit at B=64 kbps.

7
ˆ The propagation time on each link is considered negligible.

ˆ The packet headers are H=16 bytes.

Find the optimal frame (packet) size that minimizes the total delay of data transmission, in the following
cases:

1. If the amount of data transmitted is L=2304 bits.

2. If the amount of data transmitted is L=36864 bits.

Exercise 7
A user wants to see a lm of 540 MB and 90 min that is stored on a server.

Frame for video stream


encapsulation:
50B 950B

To send the movie to the client:

ˆ The server generates frames of size 1000 Bytes with 50 Bytes of overhead.

ˆ The server needs 6 ms to encapsulate the video data on each frame.

ˆ The network is formed by a link with B1=800 kbps that connects the server and an intermediate node
and by another link with B2=1 Mbps that connects the intermediate node with the client.

ˆ The intermediate node requires 10 ms of processing.

In the client host, there is a video player that is able to start playing the movie before it has been completely
received. This is called video streaming. Let's consider that the player can set the number of minutes to
wait before starting to play the movie.

1. Calculate the lm data rate (in Kbps) that the network can provide.

2. Calculate the time that destination node has to wait to start the movie in order to play it without
cuts, (no missing information at any time). This is called playout time.

Note. Consider that frames are transmitted as quick as possible, and links are dedicated exclusively to
our video streaming transmission.

Exercise 8
We want to establish a telephone call between two terminals A and B. The terminal A is connected to a
circuit switched network, while the terminal B is connected to a packet switched network (datagram mode).
To connect the two networks, a special node called voice gateway G is used. The gateway receives the
information generated by a terminal in one network and retransmits this information to the other terminal
through the other network.

8
End­to­end delay < 200 ms
H M audio samples

The telephone communication has the following features:

ˆ The audio data stream is obtained from the sampling process of the voice, taking a sample of 8-bits
every 125µs.

ˆ There are not erroneous or lost frames on any link or node.

The circuit switching network has the following characteristics:

ˆ The circuits that can be set in this network are constructed with TDM multiplexing. This TDM is
structured in time slots of 8 bits and 125µs.
ˆ The circuit between terminal A and the gateway G goes through Nc = 3 links.

ˆ The propagation delay on each link is D = 15ms.


ˆ The time for circuit establishment and circuit release is negligible.

The packet switched network has the following characteristics:

ˆ The packet switched network is fully available for this service.

ˆ The path that connects the terminal B with the voice gateway G has Np = 6 links.

ˆ The propagation delay on each link is D = 15 ms.


ˆ The transmission rate on each link is B = 100 Kbps.
ˆ The processing time at nodes is negligible.

ˆ Frames in this packet network:

 Have a xed size P .


 Use a header H = 320 bits.
 The data eld carries the information generated by the audio encoder during Tcad seconds.
 The payload of the frame contains an integer number of voice samples M (remember
that one sample is one byte).
Finally, for assuring that the voice service works properly, we must guarantee that the frame size is such
that there is no accumulation of audio information in the gateway. This condition allows us to calculate a
minimum frame size (noted as Pmin ). Under this assumption, answer the following questions:

1. Determine:

a) The minimum size of a frame Pmin in bits.


GB
b) Using frames of Pmin bits, calculate the time Tmin that it takes to send a frame from the gateway
G to the terminal B (consider when the frame is completely received at B).

9
AB
c) Using frames of Pmin bits, calculate the time Tmin since a voice sample is produced at the
terminal A until it is delivered to the audio decoder at terminal B.

For this calculation, consider the worst case (maximum delay) in the delivery of the sample.
Also consider that to deliver the sample to the audio decoder, the frame that conveys the sample
must have been fully received.

2. Now, consider a design that allows a maximum delay of 200 ms since voice samples are generated by
the terminal A, until they are received by the terminal B. In practice, values above this threshold are
not considered suitable for the telephonic service. In this case, you have to determine the following:

a) How many bytes of audio Mmax can contain a frame and, which would in this case the maximum
frame size Pmax ?
b) How many seconds of audio can contain a maximum frame?

3. Finally, comment the results.

a) Designing the phone service with Pmin (Section 1) or Pmax (Section 2) we optimize dierent
parameters. Comment which are in each case.

b) For the two sizes of frame found (Pmin and Pmax ), which is the most suitable of them to provide
the best possible phone service from the point of view of the user?

Protocol Stacks: Fragmentation, Encapsulation and Multiplexing

Exercise 9
In this exercise, we will analize a network in which fragmentation performed by a data link layer. In the
topology of the gure, frames have a header of 40 bytes and the rest of bytes of the frame are for the payload
(also called user data or upper layer data). Frames have dierent maximum sizes on dierent parts of the
network.

H user data H' user data H user data


40B 40B 40B

src Max 1500B Max 1000B Max 1500B dst


A B

Desencapsulates user data


& fragments
H user data user data

H' u.data H' u. data H' u.data H' u. data

As shown in the gure, when an intermediate node, like node A, receives a frame with more user data
than can be encapsulated in an outgoing frame, the node fragments the user data of the incoming frame.
In this network conguration, the node decapsulates the user data of the frame and re-encapsulates these
data in two outgoing frames: one of maximum size and another with the remaining part of user data.
The reassembly of the user data takes place at the nal destination (not at intermediate nodes). For this
network conguration, considering that only the source is transmitting data to the destination, and that the
transmission rate of all the links is 10 Mbps, you have to calculate:

1. The maximum sustained bit rate (λmax ) in Mbps that can be transmitted in the network from the
source to the destination.

2. The maximum sustained bit rate (λmax ) in Mbps that can be transmitted in the network from the
source to the destination, considering that node B has a processing time of 0.6 ms per frame.

10
Exercise 10
In this exercise we will study fragmentation using as example a le sharing service given over the datagram
network of the gure.

LAN Intermediate link LAN


H user data H' user data H user data
58B 68B 58B
RA RB
1518B 1518B
B=10Mbps B=64Kbps B=10Mbps

A SA SB B

The source node A wants to sends a le to a destination node B using a le sharing service. To do so, the
source has to send the le to a le server (SA) in its Local Area Network (LAN). The LAN has a transmission
rate of 10 Mbps. SA has to completely receive the le before sending it to the remote le server SB. The
transmission of the le between SA and SB uses an intermediate link of 64 Kbps and two intermediate nodes
RA and RB. SB has to completely receive the le before sending it to the destination B. In addition:

ˆ The size of the le is L = 6000 bytes.

ˆ The size of the frames in the Local Area Networks (LAN) is 1518 bytes, with 58 bytes of header.

ˆ RA and RB use a data link layer header of 64 bytes per frame.

ˆ We assume that all the processing and propagation times are negligible in all network elements.

ˆ We do not use padding if fragmentation is required.

Calculate the minimum time required for B to receive the le from A, in the following cases:

1. The payload of the frames in the intermediate link is bigger than 1460 bytes.

2. The maximum payload of the frames in the intermediate link is 1064 bytes. We distinguish the
following cases:

a) The le servers generate frames using the maximum payload size allowed by the LAN.

b) The le servers generate frames using the maximum payload size allowed by the network to avoid
fragmentation by intermediate nodes.

Exercise 11
In this exercise we will study an example of L2 over L2 (L2oL2) encapsulation. That is to say, a way
of encapsulating a frame over another frame. For this exercise, consider a topology of a datagram network
that consists of three links: two links are used as access networks with a transmission rate of 1 Mbps and
an intermediate link is used as transport network with a transmission rate of 5 Mbps. On the access links,
access frames have a maximum size of 500 bytes with 150 bytes of header, while on the transport link,
transport frames have a size of 625 bytes with 375 bytes of header (see the following gure).

11
L2oL2 encapsulation
Tp=2ms Tp=2ms dst
src Access A Transport B Access
B=1Mbps B=5Mbps B=1Mbps

Encapsulates Reasembles
& fragments the frame
H user data the frame H user data
150B
H' H'
500B
375B 375B

625B 625B

Frames that arrive from access links are encapsulated including their overhead into the payload eld
of transport frames by the edge nodes of the transport network. Notice that fragmentation is also needed
because an access frames does not t into a single transport frame. Therefore, edge transport nodes have to
fragment each access frame to put its content into the payload of several transport frames. In addition, the
other end of the transport link reassembles the original access frame to transmit it through the access link.
Consider that a transport node needs 2 ms to encapsulate and fragment an access frame and that it takes
the same time for a node to reassemble the access frame (after all the fragments have been received). It is
also assumed that neither sender nor receiver need processing time. The propagation delay can be assumed
as zero (D ≈ 0). Finally, if we assume that the network is empty and that we want to transmit a le of
35000 bytes from the source to the destination, calculate the following parameters for the access network
and the transport network:

1. Link utilization.

2. Link eciency.

3. Protocol eciency.

4. Average throughput of user data (user above L2) during transmission.

Note. For your calculation consider as observation time Tobs the total time to transmit the le.

MAC: Media Access Control

Exercise 12
Two stations A and B send frames of 1800 Bytes to a third station C using a shared link of 1 Mbps. The
frames have 50 bytes of L2 overhead. We assume a negligible propagation time (D ≈ 0) and that the ACK
frame is sent through the same link as data. ACK frames have a length of 75 bytes. To manage multiple
access, we use an Aloha algorithm where:

ˆ Using Aloha, we transmit the frames that are waiting in the L2 queue.

ˆ If there is a collision, we will not receive the corresponding ACK.

ˆ We start a backo if we do not receive the ACK.

ˆ We can consider that the ACK is not going to be received if the sender does not receive any bit of the
ACK during the ACK transmission time.

ˆ The backo consists in waiting for a deterministic time to retransmit the frame.

ˆ Before transmitting a new frame, the transmission of the previous frame must be nished.

12
At station A:

ˆ The L2 user on the sender side of A generates data to ll a frame every 80 ms.

ˆ User data is encapsulated in frames and these frames are queued to be transmitted in order through
the shared link.

ˆ If we do not receive the ACK, the back-o algorithm consists in waiting for a deterministic time of
30 ms.

At station B:

ˆ The L2 user on the sender side of B generates data to ll a frame every 40 ms.

ˆ If we do not receive the ACK, the back-o algorithm consists in waiting for a deterministic time of
50 ms.

Given that fact that the two stations begin their transmissions at time 0 ms:

1. Calculate the throughput λ (in bits of payload per second) that will get each station.

2. Calculate level of occupancy in bytes of the L2 queues in each station after 800 ms.

Exercise 13
A bus link uses CSMA/CD as media access control. The bus transmission rate is 50 Mbps. We have
also 4 repeaters in the bus to regenerate the signal. Each of these repeaters introduce a delay of 12 bits.
Distances between the farther station and a repeater or between repeaters is 150 m, except one link between
the central repeaters that has a distance of 1 km (instead of 150 m). The propagation speed in the media is
2x108 m/s.
1. Calculate the minimum frame size Lmin (in bits) that allows the CSMA/CD algorithm to work prop-
erly (detect collisions in the worst case).

Note. Do not consider the jamming sequence.

Exercise 14
Consider an Ethernet LAN in which there are 10 hosts. The LAN interconnection is done with a bridge
and two hubs of 10 Mbps. Each hub connects half of the hosts. Consider that there is no loss of transmission
capacity due to collisions and that each host sends the same number of bits to each of the other hosts. For
this purpose, we are going to dene:

ˆ λ [kbps] as the total maximum bit rate that a host can generate in the steady state without exceeding
any bus capacity.

1. Calculate λ [kbps].

Exercise 15
Let us consider that we have an Ethernet network with 20 stations (hosts). We want to compute the
goodput (L2 user bit rate) that each of these stations can send in dierent conditions. We are going to
consider using a hub or a full-duplex switch to connect these stations and unicast and broadcast trac. We
will make the assumption that each station sends exactly the same bit rate to the other stations and that
all the stations also send exactly the same bit rate. Under these conditions, we want to nd the maximum
bit rate that a station can send without causing buer overows in the steady state. For this purpose, we
are going to dene:

13
ˆ λ [kbps] as the total maximum bit rate that a port can generate in the steady state without causing
buer overow.

Calculate these parameters for the following cases:

1. The stations are connected with a 10 Mbps Ethernet hub of 20 ports. Consider that there is no loss
of transmission capacity due to collisions.

2. The stations are connected with a 10 Mbps full-duplex Ethernet switch of 20 ports.

3. The stations are connected with a 10 Mbps full-duplex Ethernet switch of 20 ports. For each station,
the 90% of its trac is unicast and a 10% is broadcast.

Exercise 16
We have an Ethernet switched network connected with the topology of the gure. As you can observe,
the data link switched network is made of ve switches of 100 ports each. Switches are full-duplex, operate at
a transmission rate of 10 Mbps and their ports are completely used to either connect hosts or other switches.

S1 S2
1 2 3 100 1 2 3 100
... ...
A B

S3 S4 S5
1 2 100 1 2 100 1 2 100
... ... ...
C D E

1. If the MAC tables of the switches are initially empty, explain in detail what happens if A sends a frame
to B, then E sends a frame to A and nally, C sends a frame to E. In your explanation give details
about the MAC learning process, about the type of transmission used (broadcast/unicast) and about
the state of the MAC tables at each port after the transmission of each frame.

2. If after some time all the MAC addresses present at the network are correctly mapped at all the
switches, comment how many MAC addresses will contain at each port the MAC tables of S1 and S2.

Now, we want to transmit a le of 10 Megabytes from one host to another using the Ethernet network.
For answering the following questions you can use rough calculations: switches do store and forward but
we consider negligible the propagation delays and you can use only the number of frames to transmit the le
max
(k ) and the worst cadence time (Tcad ). Consider also that we use the maximum payload of the Ethernet
frame and that we have an Inter Frame Gap (IFG) of 96 bits. Remember that an Ethernet frame has a size
of 1526 bytes (including the preamble) of which 1500 are for the payload.

3. Calculate the time that C needs to send the le to E, considering that all the MAC addresses are
correctly mapped, that the network is only used for this transmission and that the switches operate at
wire speed.

4. Recalculate the time to transmit the le if S1 has a processing time per frame of 1.5 ms.

5. Recalculate the time to transmit the le if S1 has a processing time per frame of 1.5 ms and if during
the le transmission, 10 hosts connected in S4 are transmitting unicast ows to 10 hosts connected in
S5. Consider that these bit ows have an average payload bit rate of 500 Kbps and that C uses the
rest of the available resources for its transmission.

6. Explain what would happen if we connect the port 99 of S4 (S4.99) with the port 99 of S5 (S5.99).

14
LLC: Logical Link Control

Exercise 17
We want to evaluate the performance of two data link layer protocols, P1 and P2 that are used over a point-
to-point connection between two stations. The protocols use Stop-and-Wait and Go-Back-N, respectively.
Communications between the two stations are build using a bidirectional link and can be characterized by
the following parameters:
P : the frame length is 10000 bits (consider that all is user data).
B : transmission rate for each direction is 1 Mbps.
D: the one-way propagation delay for each link is 250 ms.
RT O: the retransmission time-out is 960 ms.
Assume the following:

ˆ The receiver generates acknowledgements (ACKs) only for data frames correctly received.

ˆ These ACKs never have errors and their transmission time is negligible.

ˆ Data frames may suer errors.

ˆ Erroneous frames are silently discarded at the receiver.

ˆ Erroneous frames are detected using an RTO.

ˆ Frame losses are deterministic: for each 5 frames transmitted, 4 frames are correctly received and 1
frame contains errors.

With the previous considerations, answer the following questions:

1. Calculate the link eciency (time transmitting correct frames over the observation time) of the P1
P1
protocol in the case that there were no errors: ηno−errors .
P1
2. Calculate the link eciency of the P1 protocol in the case of errors: ηerror .

3. Without errors, calculate the minimum size in frames of the sliding window Wmin for protocol P2 for
a 100% link utilization.
P2
4. With errors, calculate the link eciency for the protocol P2 (ηerror ), when a window size of W = 56
frames is used.

Exercise 18
As shown in the gure, a packet switched network has a wired link and a wireless link. The wired link
has a distance of 1 km and a transmission rate of 10 Mbps. The wireless link has a distance of 10 km and a
transmission rate of 2 Mbps. The propagation speed is 0.6 c in the wired link and c in the wireless link (c is
the light speed).

Wired C
1 Km

10 Mbps
2 Mbps

Wireless
A 10 Km
B
The node A is sending frames to the wireless device B using C as intermediate node. Frames have a size
of 1000 bytes. The data link layer of the wireless link forces to send an acknowledgment for each frame that
is received correctly. In addition, there is a special end-to-end behavior:

15
The intermediate node C has to send an acknowledgment (ACK) to A each time that it knows that
4 frames have been correctly received by B and A cannot send more than 4 frames without receiving the
corresponding ACK from C.
Assuming that there are not frame losses and the acknowledgment packet size is negligible, calculate the
following parameters in the steady state of a continuous transmission of frames from A to B:

1. The utilization of the wired link (in %).

2. The utilization of the wireless link (in %).

3. The utilization of the wireless link assuming that the size of the ACK is no longer negligible but it is
100 bytes.

Exercise 19
For this exercise we are going to use the topology, technologies and network parameters described in the
Exercise 5. Additionally, you must take into account that there has been activated a ow control based on
a sliding window for the transmission of the data frames in the rst wireless link. For this ow control you
have to consider that it uses ACKs frames whose size you can approximate by 0 and that an ACK is not
generated until its corresponding frame has been processed.

...
Source link1 link2 link10 Destination
Node Node Node
(1) (2) (3) (10) (11)
Sliding window
W= 12 frames

1. Calculate the RTT in the link1 for each case, virtual circuit and datagram.
2. If the window size is W = 12 frames, for each case, virtual circuit and datagram, calculate the total
delay time to transmit the le.
Note. Consider that the transmission of the le ends when the last frame has been
received and processed at destination.

Exercise 20
The node A wants to send a le of size 5.393 MB (1 MB = 220 bytes) to the node B through the packet
switched network shown in the gure.

Satellite

R1 R2 R3

A (sender) B(receiver)

As shown in the gure, the network consists of several links including a satellite link.
For the satellite link we consider the following:
ˆ We consider that the satellite is geostationary, which means that the satellite orbits at 36000 km from
the surface of the Earth.

ˆ The propagation rate of the satellite is considered to be the speed of light (c = 3 × 108 m/s).

16
ˆ The hardware to transmit through the satellite link introduces a delay of 10 ms. That is to say, the
hardware needs 10 ms since the order to send the rst bit is given until this rst bit is nally transmitted
through the satellite antenna.

ˆ The satellite does not understand frames, it is a repeater (also called Bent-pipe) and thus, it does not
perform S&F.

ˆ The satellite introduces a delay of 13.4 ms. In other words, the time elapsed since the satellite receives
a bit from the uplink until this bit is transmitted through the downlink is 13.4 ms.

For the links at the ground we assume the following:


ˆ The propagation delay is 6 ms for each link.

ˆ The intermediate nodes (R1, R2 and R3) require a processing time of 2 ms per frame.

In addition, we assume that:

ˆ The nal destination node does not require processing time.

ˆ All links (including the satellite link) have a transmission rate of 10 Mbps.

ˆ The frames of any link have a size of 1500 bytes of which 50 bytes are header.

For the above considerations.

1. Calculate the transmission time of the le.

2. Taking the previous time as the observation time, calculate the eciency of the satellite link.

For the following sections we consider that:

ˆ The data link layer of the satellite link uses a ow control based on a sliding window (i.e. between A
and R1).

ˆ For this ow control mechanism, the receiver (R1) sends an ACK to A for each frame correctly received.

ˆ It can be assumed that the processing time to generate the ACK is negligible and also that its size is
negligible, but we must consider its propagation delay through the satellite link.

ˆ The sliding window size at the sender (A) is set to 300 frames.

With these considerations calculate:

3. The occupation of the L2 queue of R1 when the rst frame of the last window is received.

4. In this case, also calculate the transmission time of the le.

5. The maximum occupancy of the L2 queue of R1.

6. In a arbitrarily long transmission, which is the maximum window size to keep system stable or put
in another words, which is the maximum window size in the steady state.
Hint. The occupation of the L2 queue of R1 cannot grow indenitely.

17
Test Questions

Exercise 21
Which one of the following statements is true:

a) In circuit switching there is always a phase of establishment and freedom and the resources allocated can
be shared simultaneously by dierent communications.

b) The great improvement of virtual circuit mode of packet switching over circuit switching is that with
virtual circuit the network can be easily adapted to situations of congestion.

c) In datagram mode of packet switching the packet header contains the necessary data that individually
each one of the packets can reach the destination.

d) All are true.

Exercise 22
Regarding switching modes, which statement is correct?

a) The use of message switching improves the protocol eciency compared to packet switching.

b) In case of packet fragmentation, reassembling is easier in datagram mode than in virtual circuit.

c) For variable rate transmission, the most suitable switching is circuit switching.

d) It is advisable to use the virtual circuit mode to transmit data in networks with mobile nodes or congested.

Exercise 23
In a circuit switching network, which statement is false?

a) If you need to establish circuits dynamically, the signaling network is not necessary.

b) You can use a signaling channel for each data channel.

c) The data signaling don't go through the same channels that data user take.

d) It is not advisable that data channels use signaling channels in a shared way.

Exercise 24
Regarding network topologies, which statement is correct?

a) In a bus topology it's necessary a medium acces mechanism control.

b) The star topology is that one that has the highest possible redundancy.

c) In a ring topology there is only one possible path between any two nodes.

d) In a tree topology collisions determine the network eciency.

Exercise 25
Taking into account the loss of a link in the path by which a sender and a receiver are sending data in a
full mesh network, which statement is correct?

a) In virtual circuit mode of packet switching, it is not necessary to establish a new circuit given that there
is an alternative path.

b) In datagram mode of packet switching, it is necessary to establish a new virtual circuit in order to route
packets through an alternative path.

18
c) In these circumstances, in a circuit switching network, there would not be possible establish further
communication between sender and receiver.

d) None of the above is true.

Exercise 26
In relation to ow, error and congestion control mechansims, which statement is correct?

a) The ow control is used to prevent overow in the queue of the receptor node.

b) An error control mechanism can worsen congestion in the network.

c) The ow control with Go-Back-N sliding window can achieve an almost 100% of throughput although
there are many errors.

d) The congestion control is necessary to prevent two machines collide at the same link.

Exercise 27
Regarding error control mechanisms, which statement is correct?

a) In the sliding window mechanisms it's not essential a special control message to notify incorrect frames
(NACK).

b) Go-Back-N sliding window gets much more ow than Stop-&-Wait in networks with high packet loss
probability.

c) Stop-&-Wait gets more ow than sliding window with selective rejection in networks with high packet
loss probability.

d) None of the above is true.

Exercise 28
Regarding the switching table, which statement is correct?

a) Its main function is to complete a circuit previously established.

b) In a circuit switching network such tables can be congured (lled) using associated channel signaling.

c) These tables are needed in a datagram mode packet switching network.

d) Such tables are only used in circuit switching networks.

Exercise 29
As for the layered models, which statement is correct?

a) In the model layered model, if there is a change in the physical level, it will be also needed to modify the
link layer.

b) The layered model allows to achieve a better ow than a monolithic model (not organized in layers).

c) The OSI model and TCP/IP does not have the same number of layers but each layer performs exactly
the same functions.

d) It can not be said that the monolithic model is more suitable for transmission without errors than the
layered model.

19
Solutions 0

Answer of exercise 1

First, we must calculate the frame transmission time at each link for each transmission rate. For a
transmission rate of 64 Kbps:

8 bits 1
Tx = 256 bytes · · = 32 ms
1 byte 64 · 103 bits
sec

For a transmission rate of 56 kbps (Tx = 36.57 ms) and for 128 Kbps (Tx = 16 ms).
Now, to calculate the time that limits the rate of transmission of frames between the two ends A and B,
we must see which is the slower operation among all the calculated transmission times and considering also
the processing time of the nodes:

Tcmax = max{Tp1 , Tx1 , Tp2 , Tx2 , Tp3 }

ˆ For the rst case Tcmax = max{1 ms; 32 ms; 30 ms; 32 ms; 1 ms} = 32 ms
max
Then, the cadence is λmax = 1/Tc = 31, 25 frames/s

ˆ For the second case Tcmax = max{1 ms; 36, 57 ms; 30 ms; 32 ms; 1 ms} = 36, 57 ms
The cadence is λmax = 27, 344 frames/s

ˆ For the third case Tcmax = max{1 ms; 32 ms; 30 ms; 36, 57 ms; 1 ms} = 36, 57 ms
The cadence is λmax = 27, 344 frames/s

ˆ For the last case Tcmax = max{1 ms; 16 ms; 30 ms; 16 ms; 1 ms} = 30 ms
The cadence is λmax = 33, 33 frames/s

Answer of exercise 2

B generates a new frame every 500 µs (Tc = 500 µs). During 500 µs, B receives 64 kbps · 500 µs = 32 bits
of data that will be encapsulated in one frame. In addition, B adds a header of 5 bytes (40 bits). Therefore,
a frame has a size of 32 + 40 = 72 bits. If the transmission rate at the packet switched network is 384 kbps,
the total time needed to transmit a frame is (40 + 32) bits/384 kbps = 104, 2 µs + 83, 33 µs = 187, 5 µs . Thus:

Th = 104.2 µs
Td = 83.33 µs
Tx = 187.5 µs

Where Th , Td i Tx can be seen in the gure

Tc  500 s

H data
Th Td
Tx

20
The solutions for the requested questions are:

Tx
Ulink = = 0.375
Tc
Td
ηlink = = 0.166
Tc
Td
ηprotocol = = 0.444
Tx
32 bits
λ = = 64 kbps
500 µs

Answer of exercise 3

The total delay for a circuit switched network can be expressed as

cs L
Ttot =S+N ·D+
B
We illustrate the previous equation with a delay chart for N=4:

1 2 3 4

Establishment

D
D
D
4∙D
D

L
B

Release

1 2 3 4 5

For a packet switched network, the delay chart (with N=4) is the following:

1 2 3 4
D
1 Tx
2 Tp
D
1 Tx
2 Tp
4∙D+3∙(Tx+Tp)
k D
1 Tx
2 Tp
k D
1
2
k
k∙Tx
k

1 2 3 4 5

21
From the previous sample delay chart, we can obtain a general equation for the total delay in a packet
switched network (datagram mode):

ps
Ttot = N · D + (N − 1) · (Tx + Tp ) + k · Tc
| {z } | {z }
first bit reaches destination Rest of frames reach destination

Where k is the number of transmitted frames and Tx is the transmission time of one frame. k can be set
L
in terms of the message length and the frame size, k = P −H . On the other hand, T x = P/B . Finally, we
P
consider Tp = 0 and we replace k and Tc (Tc = Tx = B ):

ps P L P
Ttot = N · D + (N − 1) · + ·
B P −H B
If we graph the transmission delays of both network types in terms of the message length (L), we obtain
two straight lines that intersect at a point Lo . This point represents the message length for which the total
delay is equal in both types of networks.

m=P/(P­H)*1/B
Ttot
m=1/B

(D*P/B)N­P/B
N*D+S
cs
N*D+(N­1)P/B ps

Lo L

This means that, given the parameters of the network (N , P , H , B , S , D), and the average message
length to transmit, we can decide whether it is better (less delay) to use a circuit switched network or a
packet switched one.
Another relationship between these parameters can be proved answering the question: nd out the value
of P in terms of N, L and H that minimizes the value of the total delay for a packet switching network.
In this case we assume that the given values of packet switching system is N , H, B and D, and we want
to know which is the value of P that yields a minimal delay. The delay for these systems has been calculated
before and we have obtained:

ps P L P
Ttot = N · D + (N − 1) · + ·
B P −H B
ps
Now, we want to see which is the minimum value of Ttot when P varies. Notice that this is only a mathematical
problem of nding a minimum, so we must solve the equation:

ps
dTtot
=0
dP
The solution to the previous equation is:
r
LH
P = +H
N −1

Answer of exercise 4

The total delay in a circuit switched network is:

cs L
Ttot =S+N ·D+
B

22
In this case, N = 1, D = 0 i Tp = 0, so

cs
Ttot = (2 + 1) + 100 · 210 · 8 bits/64 kbps = 3 + 12, 8 = 15, 8 s

For the packet switched network, the total delay is:

ps P L P
Ttot = N · D + (N − 1) · + ·
B P −H B
Therefore,
ps
Ttot = (100 · 210 bytes/236 bytes) · (256 · 8 bits/64 kbps) = 13, 88 s

Answer of exercise 5

First, we need to calculate the time required to transmit a frame through a link so we can compare this
time with the frame processing time:

Tx = P/B = 1024 bits/100 Mbps = 10.24 µs

On the other hand, the propagation delay at each wireless link is:

D = 30 km/3 · 105 km/s = 100 µs

ˆ Virtual switched network.

In this case, the frame transmission time is greater than the processing time. Therefore, the delay chart in
this case is as follows:

1 2 3 4
D
1 Tx
2 Tp
D
1 Tx
2 Tp
4∙D+3∙(Tx+Tp)
k D
1 Tx
2 Tp
k D
1
2
k
k∙Tx
k
Tp
1 2 3 4 5

Generalizing to N links, the total delay can be expressed as:

vc
Ttot = S + N · D + (N − 1) · (Tx + Tp ) + k · Tx + Tp
Notice that we must add a processing time Tp because the last node processes the last frame.
The number of frames to be transmitted k is:

L 2400000
k= = = 2400
P −H 1024 − 24
Finally, we can replace all the values in the formula:

vc
Ttot = 4000 + 10 ∗ 100 + 9 ∗ (10.24 + 10) + 2400 ∗ 10.24 + 10 = 29768 µs

23
ˆ Datagram switched network.
In this case, the processing time is larger than the transmission time. This means that when a node is
processing a frame, another frame will arrive at this node for sure. This eect can be seen in the gure
below, with only 5 nodes. We assume that the rst node doesn't process the frames (it's the computer that
transmits the data). Therefore, frames go out of the origin with out any delay between them. From the
second node onwards, there is a processing time that is larger than the frame transmission time, thus, the
frames are transmitted with some delay between them (frames are separated exactly a processing time).

1 2 3 4
D
1 Tx
2
Tp
D
1 Tx
k 2 Tp
4∙D+3∙(Tx+Tp)
3 D
1 Tx
2 Tp
k
3 D
1 Tx
2
k
3
Tx + k∙Tp
k

1 2 3 4 5

Generalizing to N links, the total delay can be expressed as:

dt
Ttot = N · D + (N − 1) · (Tx + Tp ) + (Tx + k · Tp )
| {z } | {z }
First bit reaches destination frames reach and are processed at destination

The number of frames to be transmitted k is:


L 2400000
k= = = 2500
P −H 1024 − 64
Finally, we can replace all the values in the formula:

dt
Ttot = 10 ∗ 100 + 9 ∗ (10.24 + 20) + 10.24 + 2500 ∗ 20 = 51282 µs

Answer of exercise 6

In this case, we can not know a priori if the processing time is greater than the packet time or vice versa.
So, we don't know neither which is the formula of total transmission delay to be used. To address this
situation, we'll make the assumption that Tx ≥ Tp , we will make the calculations and we will verify if the
hypothesis is true. The expression of the frame (packet) size that minimizes the delay is (see exercise 3):
r
LH
P = +H
N −1
Replacing, we obtain the two requested values:

P (2304) = 309 bits


P (36864) = 852 bits

24
We verify if the hypothesis is true in both cases:

309 bits
Tx (2304) = = 4, 83 ms
64 Kbps
852 bits
Tx (36864) = = 13, 314 ms
64 Kbps

As we can observe, for the largest frame size, the hypothesis is true and the delay is 1.8786 s. But for the
smaller size, the frame transmission time is smaller than the processing time, and therefore, the applied
formula does not work. In this case, we use the formula:

P P L
Ttot = N · D + (N − 1) · ( + Tp ) + + · Tp
B B P −H
To nd the size of P that minimizes Td , we solve:

dTtot N −L
= + · Tp = 0
dP B (P − H)2

and it yields:
r
LTp B
P = +H
N
And we can now replace the values of the statement and P (2304) = 492 bits and we nd out that the delay
is 214.84 ms

Answer of exercise 7

To play the movie we need a rate of:


540 × 8 × 220 /(90 × 60) = 838, 86 kpbs.
Let's see what the network gives to us:
The server takes 6 ms to generate a packet.
The link takes (1000 × 8)/800 kbps = 10 ms to transmit a frame.
The network node takes 10 ms to process a frame.
The network gives us a cadence of 1 frame/10 ms, i.e, 950 ∗ 8/0.01 = 760 kbps.
The accumulated bytes must cover the decit of network rate during playback.
Taccum ∗ 760 kpbs = (838, 86 kbps − 760 kbps) ∗ (90 ∗ 60)
So, Taccum = 9.3387 min.

Answer of exercise 8

1. To avoid information accumulation in the voice gateway:

min Pmin H+Mmin


a) Tx ≤ Tcad , Tx =
B = B ,
min Mmin ·8
Tcad = 64Kbps , Mmin > 71.1 ,

→ Pmin = 896bits (112 bytes)


GB Pmin
b) Tmin = Np · (D + B ) = 143.76 ms
AB min GB
c) Tmin = Nc · D + Tcad + Tmin = 197.76 ms

2. For an end-to-end delay limited to 200 ms:

25
AB max GB
a) Tmax = Nc · D + Tcad + Tmax = 200 ms,

max Mmax ·8
Tcad = 64 Kbps ,

GB H+Mmax
Tmax = Np · (D + B ),

→ Mmax = 75 bytes, Pmax = 40 + 75 = 115 bytes .

max Mmax ·8
b) Tcad = 64 Kbps = 9.375 ms

3. Results discussion:

a) Pmin minimum end-to-end delay.

Pmax better protocol eciency.

b) From the point of view of the user, the best parameter to optimize is the minimum end-to-end delay,
i.e. use P = Pmin = 896 bits.

Answer of exercise 9

A frame going from source to A has a total length of 1500 bytes: 40 of header plus 1460 of user data.
When the frame arrives to A, this node has to decapsulate the user data (1460 bytes) and encapsulate these
data in frames of 1000 bytes. Therefore, the rst frame of 1000 bytes carries the rst 960 bytes of user data
and the second frame carries the remaining user data: 1460-960 = 500 bytes. In the link AB, in order to carry
1460 bytes of user data, we needed two frames with their headers, and therefore the maximum transmission
rate is:

1460
λmax = · 10 M bps = 9, 480 Mbps
40 + 960 + 40 + 500

To answer the second question we'll use the following gure as a reference:

26
1 2
0 ms

1 Tx1=0,8 ms
1000 bytes
0,8 ms
2
Tx2=0,432 ms Tp=0,6 ms
540 bytes
1,2432 ms
1,4 ms
1
1000 bytes
2,2 ms
2
540 bytes
2,632 ms
1
1000 bytes

2
540 bytes

A B Dst

When the frame 1 (Tx1 = 0.8 ms) arrives to B, it will be processed and transmitted after the processing
time Tp = 0.6 ms. While frame 1 is being processed, arrives frame 2 and it is stored in the incoming queue,
waiting to be processed. When frame 1 is already processed (t = 1.4 ms), frame 2 starts its processing.
This processing nishes at t = 2 ms. However, frame 2 must wait until frame 1 is completely transmitted,
which happens at t = 2.2 ms. Then, as shown in the gure, the maximum transmission rate is equal to that
obtained in the previous section.

Answer of exercise 10

(a) LANs. 4 frames of 1518 B (1.2144 ms) and 1 frame of 218 B (0.1744 ms).

Intermediate Link. 4 frames of 1524 B (190.5 ms) and 1 frame of 224 B (28 ms).

T = (1.2144 · 4 + 0.1744) + 1.2144 + 4 · 190.5 + 28 + 0.1744 + (1.2144 · 4 + 0.1744) = 1801.4528 ms

27
(b) There is a fragmentation problem because the payload of the LAN is bigger than the payload of the
intermediate link. Thus, frames have to be fragmented.

(b.1) LAN-A. 4 frames of 1518 B ( 1.2144 ms) and 1 frame of 218 B ( 0.1744 ms)

Intermediate link. RA fragments the frames: 1064 B ( 133 ms) 524 B ( 65.5 ms) 224 B ( 28 ms)

LAN-B. 4 frames of 1518 B ( 1.2144 ms) and 1 frame of 218 B ( 0.1744 ms)

T = (1.2144 · 4 + 0.1744) + 1.2144 + 4 · (133 + 65.5) + 28 + 0.1744 + (1.2144 · 4 + 0.1744) = 833.45 ms

28
(b.2) LAN-A. 4 frames of 1518 B ( 1.2144 ms) and 1 frame of 218 B ( 0.1744 ms)

SA generates optimal sized frames: 6 frames of 1058 B ( 0.8464 ms)

Intermediate link. 6 frames of 1064 B ( 133 ms)

T = (1.2144 · 4 + 0.1744) + 0.8464 + 6 · 133 + 0.8464 + (1.2144 · 4 + 0.1744) = 809.76 ms

29
Answer of exercise 11
500 Bytes 625 Bytes
1 Mbps = 4 ms and 5 Mbps = 1 ms
Ttot = Tobs = 4 + 2 + 1 + 1 + 2 + 4 + 4 × 100 = 414 ms
Access link:

ACC 4 ms×100
1. Ulink = 414 ms = 96, 618%
ACC 350
2. ηlink = U 500 = 67, 961%
ACC 350
3. ηprotocol = 500 = 70%
350 bytes×100
4. λACC = 414 ms = 676, 33 kbps

Transport link:

T RAN S 1 ms×2×100
1. Ulink = 414 ms = 48, 309%

30
T RAN S T RAN S 175
2. ηlink = Ulink × 625 = 13, 592%
T RAN S 175
3. ηprotocol = 625 = 28%
350 bytes×100
4. λT RAN S = 414 ms = 676, 33 kbps

Answer of exercise 12

Txf rame = 14.4 ms and Txack = 0.6 ms


A and B can transmit a frame per 80 ms. B is accumulating frames in its L2 queue.

a) λA = λB = 1750 × 8 bits/80 ms = 175 Kbps

b) OccupancyA = 0 ; OccupancyB = 10 × 1800 = 18000 bytes

Answer of exercise 13

To work properly, CSMA/CD has to detect collisions. For this purpose, the transmission time of a frame
must be greater than the Slot Time (ST). Where ST = RT T + Jamming . Since we do not consider the
Jamming sequence, we just have to calculate the RT T .
The propagation delay is D = (150 + 150 + 1000 + 150 + 150)m/(2 × 108 m/s) = 8 µs.
To calculate the round trip time, we have to add the delay introduced by repeaters. Finally, RT T :
RT T = 2 × (D + 4 × 12 bits/(50 × 106 bps)) = 2 × 8.96 µs.
The equation to detect collisions is: Tx ≥ RT T .
Taking Tx ' RT T .
6
Transmission time frame is Tx = L/(50 × 10 ).
Lmin = 896 bits

Answer of exercise 14

1. We have 4 hosts in our segment and 5 hosts in the other segment. If λ is the rate at which a host
sends trac, the trac at each segment is:

Local= λ/9 × 4
|{z} × 5
|{z}
|{z}
Unicast traffic Other local hosts Local segment hosts
Outgoing= λ/9 × 5 × 5
|{z}
| {z }
From a local host to remote hosts Number of hosts of the local segment
Incoming= λ/9 × 5 × 5
|{z}
| {z }
From remote hosts to a local host Number of hosts of the remote segment

Local+Outgoing+Incoming=10 Mbps

4λ/9 × 5 + 5λ/9 × 5 + 5λ/9 × 5 = 10 Mbps


λ = 1, 2857 Mbps ; λ/9 = 142, 86 kbps

Answer of exercise 15

31
a) All the trac is shared in the 10 Mbps bus. Then,

λ/19 19 × |{z}
× |{z} 20 = 10 Mbps
| {z }
Unicast X→Y Ports 6=X # Ports

λ = 500 kbps ; λ/19 = 26, 316 kbps

b) The incoming trac to a certain port Y has to be 10 Mbps. Then:

λ/19 × 19
|{z} = 10 Mbps
| {z }
Unicast X→Y Ports X6=Y

λ = 10 Mbps; λ/19 = 526.32 Kbps

c) Broadcast is a limiting factor because it generates trac in the reception of all the ports of the switch.
The equation is that all the incoming trac into a certain port Y has to be 10 Mbps. Therefore:

0.9λ/19 × 19
|{z} + 0.1λ
|{z} × 19
|{z} = 10 Mbps
| {z }
Unicast X→Y Ports X6=Y Broadcast X Ports X6=Y

λ = 3.5714 Mbps ; λ/19 = 187.97 Kbps

Answer of exercise 16

1. A → B
Since the MAC tables are empty, the frame is broadcast through all the ports of S1, S2, S3, S4 and S5.
The MAC learning process uses the source address of the frame to map the MAC address of A in S1.3, S2.1,
S3.100, S4.1, S5.1.
E→A
The frame follows the unicast path S5.2 → S5.1 → S2.2 → S2.1 → S1.100 → S1.3. The MAC learning
process uses the source address of the frame to map the MAC address of E in S2.2 and S1.100.
C→E
Since S3 has not mapped the MAC address of E, it broadcasts the frame through all its ports. However,
when the frame reaches S1, it is not broadcast anymore because the reverse path to E from this switch
has been already mapped with the transmission of the previous frame. The MAC learning process uses the
source address of the frame to map the MAC address of C in S1.1, S2.1 and S5.1.
2. In S1: Ports 1 and 2 have 99 MAC addresses, port 100 has 99 + 98 = 197 and the rest of ports have 1
MAC.
In S2: Port 1 99 + 99 + 97 = 295 MAC addresses, port 2 99 MAC addresses and the rest of ports have 1
MAC.
3. The number of frames to transmit the le is:

k = (10 ∗ 220 /1500) = 6990.5 frames

Since the switches operate at wire speed the cadence time is the transmission time plus the IFG:

max
Tcad = (1526 ∗ 8 + 96)/107 = 1.23 ms
Thus, making the rough calculation:

Ttot = 1.23 ms · 6990.5 frames = 8.598 seconds


4. Now S1 generates a slower cadence time (Tcad
max
= TpS1 ):

Ttot = 1.5 ms · 6990.5 frames = 10.486 seconds

32
5. The frame cadence time in S1 is 1.5 ms, in other words, S1 can switch a frame each 1.5 ms or 1500 bytes
of payload each 1.5 ms. This gives a bit rate for the payload of:

1500 bytes/1.5 ms = 8 Mbps

The 10 hosts transmitting the unicast ows are using 10 · 500 Kbps = 5 Mbps of this capacity. So, we
have 3 Mbps of available capacity for transmitting the le from C to E:

Ttot = 10 ∗ 220 ∗ 8/(3 ∗ 106 ) = 27.962 seconds

6. The topology has cycles and we generate a loop unless we use the spanning tree protocol.

Answer of exercise 17

P
Tx = B = 10 ms
RT T = Tx + 2 · D = 510 ms

P1 Tx
1. ηno−errors = RT T = 1.96%

P1 4·Tx
2. ηerror = 4·RT T +RT O = 1.33%

RT T
3. Wmin = Tx = 51

P2 4·Tx
4. ηerror = 4·Tx +RT O = 4%

Answer of exercise 18

In the wired link, the transmission time of a frame is Tx1 = 1000 ∗ 8/107 = 800 µs, and the propagation
delay isD1 = 1 km/0.6c = 5.5 µs. In the wireless link, the transmission time of a frame is Tx2 = 1000 ∗ 8/2 ·
106 = 4000 µs, and the propagation delay is D2 = 10 km/c = 33.3 µs. The gure shows a transmission cycle
and help us to make the calculations.

33
1 2
D1
1
2 Tx1
3
4 D2
1
Tx2

D2

D2
2
Tx2

D2

D2
3
Tx2

D2

D2
4
Tx2

D2
D1

A C B

The total time since the rst frame starts to be transmitted until the acknowledgment of the last frame
is received is:
Ttot = D1 + Tx1 + 4 · (D2 + Tx2 + D2 ) + D1 = 17, 07 ms

1. Thus, the utilization of the wired link is: 4Tx1 /Ttot (18.739%).

2. The utilization of the wireless link is: 4Tx2 /Ttot (93.693%).

3. For this question we need to add the transmission times of ACKs. In the wired link, the transmission
time of an ACK is TxACK1 = 80 µs, while in the wireless link it is TxACK2 = 400 µs.
Therefore, the time required to transmit four frames end-to-end is:

0
Ttot = D1 + Tx1 + 4 · (D2 + Tx2 + D2 + TxACK2 ) + D1 + TxACK1 = 18, 757 ms
0
Then, the utilization of the wired link is: 4Tx1 /Tall (17.06%).

Answer of exercise 19

1. To calculate the RTT we will use the following gure:

34
D
Frame
Tx
Tp RTT=2D+Tx+Tp
ACK D

1 2

Therefore:

RT T vc = 2D + Tx + Tpvc = 2 ∗ 100 + 10.24 + 10 = 220.24 µs

RT T dt = 2D + Tx + Tpdt = 2 ∗ 100 + 10.24 + 20 = 230.24 µs

2. For the virtual circuit technology, the total time to transmit the le has to be recalculated as
follows. The sliding window with W = 12 allows us to send 12 frames each 220.24 µs. Without the
control ow we could send 220.24 µs/10.24 µs = 21.508 frames during a window. Thus, the control
ow is reducing the frames per second that will be received at destination and it is increasing the
total time to transmit the le. To send the 2400 frames, we need J = 200 windows. Therefore,

vc
Ttot = S + N · D + (N − 1) · (Tx + Tp ) + (J − 1)RT T vc + W · Tx + Tp

vc
Ttot = 4000 + 10 ∗ 100 + 9 ∗ (10.24 + 10) + 199 ∗ 220.24 + 12 ∗ 10.24 + 10 = 49143 µs

Notice that the le transmission ends when the last frame of the last window is received and processed
at destination.

For the datagram technology, the total time to transmit the le is the same because the sliding
window provides 12 frames each 230.24 µs but a node needs 12 × 20 µs = 240 µs to transmit 12 frames,
thus, in this case, the ow control is not reducing the cadence of frames that will be received at
destination and the time to transmit the le is not increased.

Answer of exercise 20

The calculation of the total transmission time of the le can be seen in the following gure.

35
D1
Dsat/2
1 D1+D2+Dsat
D2
2
Dsat/2
1 Tx
2
Tp
k
D
1 Tx
k 2 Tp 3∙(Tx+Tp+D)
3 D
1 Tx
2 Tp
k D
3
1
Tp
2
Tp
k
3
Tp
(k­1)∙Tp+Tx
k-1
Tp
k Tx

A Sat R1 R2 R3 B

First, we calculate the propagation delays in the satellite link. These delays are Dsat /2 for the uplink
(ground to satellite) andDsat /2 for the downlink (satellite to ground).
Dsat /2 = 36000 km/3 × 105 km/s = 120 ms.
As you can see, the propagation delay in this type of link is considerably high. Now, we calculate the
delay since the sender A leaves the frame in its L2 transmission queue until the rst bit of this rst frame
arrives at R1.
This time is the sum of the previous propagation delay, the delay introduced by the hardware of the
transmitter to begin transmitting the rst bit (D1 ) and the delay introduced by the satellite
1 (D ).
2

Dsat Dsat
D1 + + D2 +
2 2
where, D1 = 10 ms, D2 = 13.4 ms.
The frame transmission time is the same in each link because all operate at 10 Mbps. So,

Tx = 1500 · 8/10 Mbps = 1.2 ms


The processing time (per frame) in each intermediate node is Tp = 2 ms. Since Tp > Tx , the cadence
time in the wired links is Tp . In the wired links, the delay due to the store and forward is: Tx + Tp + D (see
the gure). Then, for the three wired links, this delay is 3(Tx + Tp + D).
Finally, the destination receives the rest of the k frames at a cadence of Tp . For the last frame, given
that the destination does not process the frame, we should only count one transmission time (Tx ).
The number of frames is:
5.393 · 220
k= = 3900 f rames
(1500 − 50)
Therefore, the transmission time for the le is:

Dsat Dsat
(D1 + + D2 + ) + 3(Tx + Tp + D) + (k − 1)Tp + Tx =
2 2
(10 + 120 + 13.4 + 120) + 3 · (1.2 + 2 + 6) + 3899 · 2 + 1, 2 = 8.0902 s
1 As explained, the satellite does not perform Store & Forward, i.e. the satellite does not process frames, it only retransmits
them. This is like this in practice, satellites carry the essential hardware given that each gram in space is very expensive.

36
The eciency of the satellite link within the observation time (time to transmit the le) is:

1450
Tdata 3900 · 1, 2 1500
η= = = 0.5592 ⇒ 55.92%
Tobs 8.0902 s
To answer the following questions, given that we have a sliding window mechanism, we need to calculate
the RTT of the satellite link.
As stated in the exercise, we can assume that the ACK has not size and that it does not require a
processing time. However, we must consider and calculate its the propagation delay. The following gure
helps us to make this calculation:

D1
Dsat/2
1
D2
Dsat/2
1 Tx RTT=2 (D1+Dsat+D2) + Tx
D1
Dsat/2
D2
Dsat/2

A Sat R1

RT T = 2 · (D1 + Dsat + D2 ) + Tx = 528 ms


R1 receives 300 frames per RTT. But R1 can only transmit a frame each 2 ms. Therefore, for every RTT,
R1 can only transmit 528 ms/2 ms = 264 frames. In other words, R1 accumulates 36 frames in its L2 queue
every RTT. To transmit 3900 frames, we need:

3900 frames/300 frames per RTT = 13 RTT

The occupation of the L2 queue of R1 when it receives the rst frame of the last window, can be roughly
calculated by summing the frame accumulation per RTT (36) during the rst 12 RTT's:

12 RTT · 36 frames/RTT = 432 frames


Actually, if we want an accurate calculation, we should take into account that when R1 receives the rst
frame, it has to wait 2 ms because of the S&F in order to transmit it. During this initial oset, we accumulate
2 ms/1.2 ms/frame = 1.666 frames. Therefore, the exact occupancy of the L2 queue of R1 when it receives the
rst frame of the last window is:

12 RTT · 36 frames/RTT + 1.66 = 433.66 frames

The le transmission time, in this case, is the same as calculated above, since the sliding window with
a window size of 300 frames does not limit the transmission rate compared to the previous case. In other
words, R1 is continuously transmitting frames as in the previous case.
The maximum occupancy of the L2 queue of R1 occurs when R1 receives the last frame of the last
window. Taking as reference the begining of the window, this frame will arrive after 1.2 × 300 = 360 ms.
During this time (360 ms), R1 can only transmit 360 ms/2 ms = 180 frames. In other words, the occupancy
of the L2 queue of R1 is increased by 120 frames. Therefore, the maximum occupancy is:

(433.66 + 120) frames = 553.66 frames

37
Finally, the maximum window size that A can set in a arbitrarily long transmission is given by the fact
that the occupation of the L2 queue of R1 cannot grow indenitely. Therefore, the sliding window has to
provide R1 with the same amount of frames it can transmit:
528 ms/2 ms = 264 frames.
More details:
During one RTT, the sender could send up to RT T /Tx = 440 frames. As the window is 300 frames
sized, the sender will remain idle after it transmits the frame 300 and until it receives an ACK. On the
other hand, R1 sends frames to R2 at a cadence of 1 frame/2 ms, i.e., 6 Mbps. Notice that this is a system
that receives bursts of frames at a rate of 10 Mbps and extract them at rate of 6 Mbps (see gure below)
During the reception of the rst 300 frames (300 · Tx = 360 ms), R1 is able of transmitting only 360/Tp = 180
frames. So at this point we have 300 − 180 = 120 frames in the L2 queue of R1. Now, R1 stops receiving
frames for a certain time given that A has sent all the frames in window and it has not yet received any
ACK. From this moment, until the end of the RTT (RT T − 360 = 168 ms), R1 extracts frames at a rate of
6 =M bps500 frames/s, that is, R1 extracts 500 ∗ 0.168 = 84 frames from the queue. At the end of the RTT
the number of frames stored in the L2 queue os R1 is 120 − 84 = 36 frames/RTT.

Q [frames]
156
120

72
36

1 0 1 2 t/RTT
RTT

RTT

300

301

600

A R1 10 Mbps 6 Mbps

In this analysis, we have not considered the transmission beginning, when the rst frame is received by
R1 at the rst RTT. At this time, R1 starts processing the frame 1 during 2 ms. During 2 ms, R1 receives
2 ms/1.2 ms/frame = 1.666 frames. This oset should be taken into account as mentioned previously. So,
after two RTT's, the queue occupancy is 1.666 + 72 frames. etc..
On the other hand, if we do not want that the queue of R1 grows indenitely, we have to consider that
R1 can extract frames at a rate of 500 frames/s. In one RTT, R1 extracts RT T · 500 frames/s = 264 frames. This
is exactly the size of the window we were looking for. Analyzing this with a little more detail, we see that
A will send 264 frames to R1 in 264 ∗ 1500 ∗ 8/10 Mbps = 316.8 ms. During the reception of these frames,
R1 transmits 316.8/2 = 158.40 f rames, and the queue occupancy is 264 − 158.4 = 105.6 frames. From that
moment and until the end of the RTT, R1 transmits these (528 − 316.8)/2 = 105.6 frames and leaves its
queue empty
2 on the right moment to receive again a burst of 264 frames.

Answer of exercise 21

a) In circuit switching there is always a phase of establishment and freedom and the resources allocated
can be shared simultaneously by dierent communications. False response. They could be semi-
2 For
the sake of simplicity, this analysis has not considered the initial oset due to the S&F of the rst frame. In this case,
you have to add 1.33 frames.

38
permanent circuits. In addition, the capacity of each circuit is reserved for a particular
communication within the circuits network.
b) The great improvement of virtual circuit mode of packet switching over circuit switching is that with vir-
tual circuit the network can be easily adapted to situations of congestion. False response. In general,
datagram is best suited to datagram congestion: if a route is congested the datagrams can
choose another route without having to re-establish a virtual circuit.
c) In datagram mode of packet switching the packet header contains the necessary data that individually
each one of the packets can reach the destination. Correct answer. This information is required
for each datagram reaches its destination.
d) All are true. False response.

Answer of exercise 22

Correct
a) The use of message switching improves the protocol eciency compared to packet switching.
answer. Regarding the dat, the message switching is less overheaded than packet switching.
False
b) In case of packet fragmentation, reassembling is easier in datagram mode than in virtual circuit.
response. Actually, reassembling is an easiest task in a virtual circuit given that packets
arrive always sorted.
False response. Due
c) For variable rate transmission, the most suitable switching is circuit switching.
to the variable rate, it is better to use the packet switching network to make better use of
the capacity of the link.
d) It is advisable to use the virtual circuit mode to transmit data in networks with mobile nodes or congested.
False response. The virtual circuit has problems when the path is changed, which happens
more often if the nodes are mobile or they are congested.

Answer of exercise 23

a) If you need to establish circuits dynamically, the signaling network is not necessary. Correct answer.
Semi-permanent connections can be established without signaling.
b) You can use a signaling channel for each data channel. Correct answer. This is called
c) The data signaling don't go through the same channels that data user take. Correct answer. The
data and signaling channels are dierent.
Wrong answer. It is
d) It is not advisable that data channels use signaling channels in a shared way.
recommended. And, actually, the signaling used nowadays is this type

Answer of exercise 24

Correct answer. Access control


a) In a bus topology it's necessary a medium acces mechanism control.
is necessary if we have a bus (although there were only two machines).

39
False response. It's false if
b) The star topology is that one that has the highest possible redundancy.
the center of the star fails, because then we run out of network.
c) In a ring topology there is only one possible path between any two nodes. False response. If the ring
is bidirectional, there are two paths.
False response. A tree topology
d) In a tree topology collisions determine the network eciency.
doesn't necessarily have collisions because all connections are point to point.

Answer of exercise 25

a) In virtual circuit mode of packet switching, it is not necessary to establish a new circuit given that there is
False response. In this case, We'd need to establish a new virtual circuit
an alternative path.
to route the new path.
b) In datagram mode of packet switching, it is necessary to establish a new virtual circuit in order to route
packets through an alternative path. False response. In packet switching is not necessary to set
a virtual circuit.
c) In these circumstances, in a circuit switching network, there would not be possible establish further com-
munication between sender and receiver. False response. We could establish new communications
through available lin channels.
d) None of the above is true. Correct answer.

Answer of exercise 26

a) The ow control is used to prevent overow in the queue of the receptor node. Correct answer. This
is the denition of ow control.
False response. Mechanisms
b) An error control mechanism can worsen congestion in the network.
based on relay and timers can worsen congestion as they generally introduce additional
trac.
c) The ow control with Go-Back-N sliding window can achieve an almost 100% of throughput although
False response. We can not achieve a maximum throughput with errors
there are many errors.
because of the time lost in retransmissions and in going back N.
d) The congestion control is necessary to prevent two machines collide at the same link. False response.
For this function we have the mechanisms of medium access.

Answer of exercise 27

a) In the sliding window mechanisms it's not essential a special control message to notify incorrect frames
(NACK). Correct answer. These mechanisms can operate only with positive ACKs.
b) Go-Back-N sliding window gets much more ow than Stop-&-Wait in networks with high packet loss
probability. False response. If there are many errors, Go-Back-N acts as a Stop-&-Wait.

40
c) Stop-&-Wait gets more ow than sliding window with selective rejection in networks with high packet
False response. Stop-&-Wait can not get more ow than sliding window with
loss probability.
selective rejection in any case.
d) None of the above is true. False response.

Answer of exercise 28

False response. These tables are


a) Its main function is to complete a circuit previously established.
used to make the switch. They must be modied if a circuit is completed but, in fact, in a
semi-permanent circuit these tables are not modied.
b) In a circuit switching network such tables can be congured (lled) using associated channel signaling.
Correct answer. Associated channel is one way of signaling and the signaling is used to set
(ll) switching tables.
False response. In a datagram
c) These tables are needed in a datagram mode packet switching network.
mode packet switching network, only routing tables are mandatory.
d) Such tables are only used in circuit switching networks. False response. They are also used in
virtual circuit mode packet switching networks.

Answer of exercise 29

a) In the model layered model, if there is a change in the physical level, it will be also needed to modify
False response. Not always a change at one level involves a change at another
the link layer.
level. And this is the main advantages of the layered model.
b) The layered model allows to achieve a better ow than a monolithic model (not organized in layers).
False response. This sentence can not be stated. The layered model usually simplies the
creation and organization of the networks, but we can not say that the layered model allows
to build networks with larger ow.
c) The OSI model and TCP/IP does not have the same number of layers but each layer performs exactly
the same functions. False response. The layers of these models do not perform exactly the
same functions.
d) It can not be said that the monolithic model is more suitable for transmission without errors than the
layered model. Correct answer. We can not say such a thing.

41

You might also like