Sunteți pe pagina 1din 32

Tutorial #1 Solution

Andrew Fry
E-mail: andrew.fry@rmit.edu.au
Introduction to Data Communications

1. Match the following to one of the five internet layers.


a. Route determination
b. Flow control
c. Interface to Physical world
d. Provides access to the network for the end user
e. Packet switching
a. network layer
b. transport
c. physical layer
d. application layer
e. network layer
2. Match the following to one of the five internet layers.
a. Communicates directly with the users application program
b. Error correction and retransmission
c. Mechanical, electrical, and functional interface
d. Responsibility for delivery between adjacent nodes
e. Reassembly of data packets
Note to the class that internet implementations use
underlying layers those layers may provide greater levels
of service than required to be provided. Specifically, the
internet transport layer (TCP) performs error correction and
retransmission but Ethernet (widely used as the link layer)
redundantly performs the same tasks.
a. application layer
b. link, transport layers
c. physical layer
d. link layer
e. transport layer

3. Suppose an application layer entity wants to send an L-byte message to its peer
process, using an existing TCP connection. The TCP segment consists of the
message plus 20 bytes of header. The segment is encapsulated into an IP packet
that has an additional 20 bytes of header. The IP packet in turn goes inside an
Ethernet frame that has 18 bytes of header and trailer. What percentage of the
transmitted bits in the physical layer correspond to message information, if L =
100 bytes, 500 bytes, 1000 bytes?
(hints: slide #45 of Lecture notes #1. Each TCP/IP layer adds header information
to create new data unit before passing to lower layer.)

TCP/IP over Ethernet allows data frames with a payload size


up to 1460 bytes. Therefore, L = 100, 500 and 1000 bytes are
within this limit. The message overhead includes:
TCP: 20 bytes of header
IP: 20 bytes of header
Ethernet: total 18 bytes of header and trailer.
Therefore,
L = 100 bytes, 100/158 = 63% efficiency.
L = 500 bytes, 500/558 = 90% efficiency.
L = 1000 bytes, 1000/1058 = 95% efficiency
4. Give two features that the data link layer and transport layer have in common.
Give two features in which they differ.
(hints: slide #35,37 of Lecture notes #1, also read other slides on protocol layers
and the textbook)

This is a general discussion question. Mention that the internet


model and OSI model don't align neatly.
Features the layers have in common:
Both layers can provide recovery from transmission errors - TCP
and link (Ethernet).
Both layers can provide flow control (TCP and Ethernet).
Both layers can support multiplexing (TCP ports and Ethernet
CSMA/CD).
Features in which they differ:
The data link layer is concerned with framing a stream of bytes,
and the transport layer is not concerned solely with packets.
The data link layer may be concerned with medium access
control. The transport layer does not have this concern, relying on
the data link layer to manage medium access.

Tutorial #2 Solution
Andrew Fry
E-mail: andrew.fry@rmit.edu.au
Introduction to Data Communications
(Ack: solution prepared by HT Chetan Mehta)

1. A host in an organization has an IP address 150.32.64.34 and a subnet Mask


255.255.240.0. What is the address of this subnet? What is the range of IP
addresses that a host can have on this subnet?
IP = 150.32.64.34 = 10010110.00100000.01000000.00100010
This is a class B address
Subnet

AND

= 255.255.240.0
= 11111111.11111111.11110000.00000000
10010110
11111111
10010110

00100000
11111111
00100000

01000000 00100010
11110000 00000000
01000000 00000000

Address of subnet is 150.32.64.0


Range of IP
FROM
TO

10010110 00100000
10010110 00100000

0100
0100

Hence from 150.32.64.1 to 150.32.79.254

0000
1111

00000001
11111110

2. A small organization has a Class C address for seven networks each with 24
hosts. What is an appropriate subnet mask?
Class C uses 24 bits for the Network and 8 bits for the Host.
11111111.11111111.11111111.XXXXXXXX
Number of Networks = 7
22=4, too few, 23 = 8, so select 23
Therefore, 3 bits are required to represent the network
Number of Hosts = 24
24=16, too few, and 25=32
So 5 bits are required for the host
Hence, 3 bits are required to represent the 7 networks and 5 bits
are required to represent the 24 host
Since subnet masks the host part only, the subnet would be
255.255.255.XXXXXXXX
111
Network

00000 = XXX XXXXX


Host

Hence the subnet would be


11111111.11111111.11111111.11100000
= 255.255.255.224

3. We currently use IPv4. What are the reasons we may need IPv6?
What strategies have been devised for the transition of IPv4 to Ipv6?
Expanded address space
128 bit addresses. 128 bits can support up to 3.4 x 1038 hosts
Improved option mechanism
Separate optional headers between IPv6 header and transport layer
header
Improved speed and simplified router processing
Easier to extend options
Address auto configuration
Dynamic assignment of addresses
Increased addressing flexibility
Any cast - delivered to one of a set of nodes
Improved scalability of multicast addresses
Supports unicast, multicast and anycast
Support for resource allocation
Replaces type of service
Labeling of packets to particular traffic flow
Security using IPSec
Transition Mechnism are:
Dual Stacks (RFC 1933)

Ipv6 in Ipv4 Tunnel (RFC 2473, RFC 2529)


Encapsulate user packet insider IPv4 packet
Tunnel endpoint at source host, intermediate router, or destination
host
Tunneling can be recursive

http://people.cs.uchicago.edu/~iraicu/research/conference
/IPv4_IPv6_tunneling_sec.pdf

4. Source S multicasts live video streaming (rate 1 Mbps) data to destinations of


group G1. Using multicasting, when router 1 receives a packet from the source, it
copies the packet to router 2 and 5 simultaneously. Upon receipt of these packets,
router 2 forwards the packet to its local network, and router 5 copies the packet to
routers 7 and 8. The packet will eventually be received by each intended
destination.
Calculate the bandwidth consumption in links 12 (i.e router 1
router 2), 15, 57 and 58. Also calculate the bandwidth
consumption for the same links, if the routers only use Unicasting.
MULTICASTING
For multicasting, the bandwidth consumption remains the same,
irrespective of the number of destination groups.
Hence the bandwidth consumption is same for 12 = 15 = 57
= 58 = 1 Mbps
UNICASTING
For unicasting, if there are multiple groups at any destination node,
then the packets would be sent multiple times, each packet for one
group only. Hence,
12 = 1 Mbps
57 = 1 Mbps
58 = 2 Mbps
15 = 3 Mbps (2 for 58 and 1 for 57)

Tutorial #3 Solution
Andrew Fry
E-mail: andrew.fry@rmit.edu.au
Introduction to Data Communications
1. A signal has a bandwidth of 20 Hz. The highest frequency is 60 Hz. What is
the lowest frequency? Draw the spectrum if the signal contains all integral
frequencies of the same amplitude.
B = fh - fl
20 = 60 - fl
fl = 60 - 20 = 40 Hz

2. A signal has a spectrum with frequencies between 1000 and 2000 Hz


(bandwidth of 1000 Hz). A medium can pass frequencies from 3000 to 4000
Hz (a bandwidth of 1000 Hz). Can this signal faithfully pass through this
medium?
The answer is definitely no. Although the signal can have the same
bandwidth (1000 Hz), the range does not overlap. The medium can only
pass the frequencies between 3000 and 4000 Hz; the signal is totally lost.
3. Assume a data stream is made of ten 0s. Encode this stream, using the
following encoding schemes.
a. Unipolar
b. NRL-L
c. NRZ-I
d. Manchester
e. Differential Manchester

4. Pulse amplitude modulation (PAM) is the first step in another very popular
conversion method called pulse code modulation (PCM). Figure 1 shows the
Quantized PAM signal of an analog signal.

Show the table containing binary data of the quantized signal. Use a simple
method of assigning sign and magnitude to quantized samples. Each value is
translated into its 7-bit binary equivalent. The eighth bit indicates the sign.
Transform the binary digits (the first three) to a digital signal by using
unipolar coding technique.
The table with binary values:

Using Unipolar coding:

Tutorial #4 Solution
Andrew Fry
E-mail: andrew.fry@rmit.edu.au
Introduction to Data Communications
Q1.
a. In CRC error detection scheme, choose P(x) = X4 + X + 1. Encode the bits
10010011011.
b. Suppose the channel introduces an error and the string 000110110111100 is
received. Can the error be detected?
c. If 000010110111100 is received will error be detected?
P=10011 (CRC will be 4 bits) = X4 + X + 1
10010011011 = X10 + X7 + X4 + X3 + X + 1
After shifting = X14 + X11 + X8 + X7 + X5 + X4

X4 + X + 1

X10 + X6 + X4 + X2
-----------------------------------------/ X14 + X11 + X8 + X7 + X5 + X4
X14 + X11 + X10
-----------------------X10 + X8 + X7 + X5 + X4
X10 +
X 7 + X6
---------------------------------X 8 + X6 + X5 + X4
X8 +
X5 + X4
---------------------------X6
X 6 + X3 + X2
------------------------X 3 + X2

CRC = X3 + X2 = 1100
Bits sent = 100100110111100

Bits received = 000110110111100


= X11 + X10 + X8 + X7 + X5 + X4 + X3 + X2
X 7 + X6 + X3 + X2 + X
-----------------------------------------4
X +X+1
/ X11 + X10 + X8 + X7 + X5 + X4 + X3 + X2
X11 +
X 8 + X7
-----------------------X10 + X5 + X4 + X3 + X2
X10 + X7 + X6
---------------------------------X 7 + X6 + X5 + X4 + X 3 + X2
X7 +
X 4 + X3
---------------------------X 6 + X5 + X2
X 6 + X3 + X2
------------------------X 5 + X3
X 5 + X2 + X
-----------------------X 3 + X2 + X
------------------------ERRORS DETECTED!!!!

Bits received = 000010110111100


= X10 + X8 + X7 + X5 + X4 + X3 + X2

X4 + X + 1

X6 + X4 + X2
-----------------------------------------/ X10 + X8 + X7 + X5 + X4 + X3 + X2
X10 +
X7 + X6
-----------------------X8 + X6 + X5 + X4 + X3 + X2
X8
+ X5 + X 4
---------------------------------X 6 + X3 + X2
X 6 + X3 + X 2
---------------------------------------------------------

NO ERRORS DETECTED

Using Base 2 method


In base 2 method, we use XOR between the bits and the pattern bits.
XOR table
A
0
0
1
1

B
0
1
0
1

A XOR B
0
1
1
0

Shifting to left and inserting 4 zeros in the end (similar to shifted polynomial)
100100110110000
10011
--------10110110000
10011
-------101110000
10011
------1000000
10011
-------1100 = CRC

Received bits
000110110111100
Perform base 2 method again
000110110111100
10011
-------100000110111100
10011
-------110110111100
10011
------10000111100
10011
-------11111100
10011
--------1100100
10011
-------101000
10011
---------1110
Since the remainder is not 0, there are errors detected.

Tutorial #5 Solution
Andrew Fry
E-mail: andrew.fry@rmit.edu.au
Introduction to Data Communications
1. Find the number of devices that could be accommodated by a T1-type TDM line
if 1% of the T1 line capacity is reserved for synchronization purposes.
a. 110-bps teleprinter terminals
b. 1200-bps computer terminals
c. 64-kbps PCM voice frequency lines
The capacity of the T1 line is 1.544 Mbps.
The available capacity (AC) is 1.544 x 0.99 =1.52856 Mbps
a. AC/110 = 13,896
b. AC/1200 = 1273
c. AC/64000 = 23
2. In a cable television system, the frequency band from 5 MHz to 42 MHz is
allocated to upstream signals from the user to the network, and the band from 550
MHz to 750 MHz is allocated for downstream signals from the network to the
users. How many 2 MHz upstream channels can the system provide? How many 6
MHz downstream channels can the system provide?
2 MHz upstream channels: (42-5)/2=18
6 MHz downstream channels: (750-550)/6=33
3. A company has two locations: a headquarters and a factory about 25km away.
The factory has four 300bps terminals that communicate with the central
computer facilities over leased voice grade lines. The company is considering
installing TDM equipment so that only one line will be needed. What cost factors
should be considered in the decision?
The four terminals could easily be multiplexed onto one voice grade line.
Therefore, the channel cost will be only one-fourth, since one channel
rather than four is now needed. The same reasoning applies to termination
charges.
The present solution requires eight low speed modems (four pairs of
modems). The new solution requires two higher-speed modems and two
multiplexers.The reliability of the multiplexed solution may be somewhat
less. The new system does not have the redundancy of the old system. A
failure anywhere except at the terminals will cause a complete loss of the
system.

4. A television transmission channel occupies a bandwidth of 6 MHz.


a. How many two-way 30 kHz analog voice channels can be frequency-division
multiplexed in a single television channel?
b. How many two-way 200 kHz GSM channels can be frequency-division
multiplexed in a single television channel?
c. Discuss the tradeoffs involved in converting existing television channels
to cellular telephony channels?
a. 6 x 106/30 x 103= 200 channels
b. 6 x 106/200 x 103= 30 channels
c. The biggest advantage of using existing television channels to provide
cellular telephony channels is the very large bandwidth that they
occupy. In theory, one could divide each television channel into many
cellular telephone channels, as shown in parts (a) and (b). The
frequency reuse aspect of cellular networks would multiply these
channels many times. This would be at the cost of television channels
that cover a broad region and presumably provide service to a large
audience.

Tutorial #6 Sem 2, 2004


Andrew Fry
E-mail: andrew.fry@rmit.edu.au
Introduction to Data Communications
1. In Stop-and-Wait ARQ why should the receiver always send an
acknowledgment message each time it receives a frame with the wrong
sequence number?
The sender cannot send the next frame until it has received the ACK
for the last frame. So, if the receiver gets a frame with the wrong
sequence it has to be a retransmission of the previous frame received.
This means that the ACK was lost so the receiver has to ACK again to
indicate the sender that it has received the frame.
2. Draw the sender and receiver windows (size 7) and show the operation
for a system using Go-Back-N ARQ, given the following:
a. Frame 0 is sent; Frame 0 is acknowledged.
b. Frames 1 and 2 are sent; Frames 1 and 2 are acknowledged.
c. Frames 3,4, and 5 are sent; Frame 4 is acknowledged; timer for
frame 5 expires.
d. Frames 5,6, and 7 are sent; Frames 4 through 7 are
acknowledged.

3. Bob from RMIT sends few MP3 files electronically to John at Monash
University using Go-Back-N ARQ. The transmission link between RMIT
and Monash is mostly noisy. Bob finds Go-Back-N ARQ to be very
inefficient for a noisy link and decides to switch to Selective Repeat
ARQ. Did Bob make the right decision? If so, explain why Go-Back-N
ARQ is very inefficient in a noisy link, but Selective Repeat ARQ is
found to be more efficient for the same link.
Yes, Bob made the right decision. A frame has a higher probability of
damage or loss in a noisy link. When a frame is lost (or damanged)
while using Go-Back-N ARQ, not only the frame in error needs to be
retransmitted, but one or more subsequent frames. This
retransmission consumes more bandwidth and slows down the
transmission. With Selective Repeat ARQ, only the damaged frame
is retransmitted by the sender. Therefore, Bob finds Selective Repeat
ARQ to be more efficient for the noisy link.
4. Consider the use of 1000-bit frames on a 1-Mbps satellite channel with a
270-ms delay. What is the maximum link utilization for
a. Stop-and-Wait flow control
b. Continuous flow control with a window size of 7?
c. Continuous flow control with a window size of 127?
d. Continuous flow control with a window size of 255?
For stop-and-wait: U= 1/(1+2a) and
for Continuous flow control: U= W/(1+2a)
Here, a= (Propagation Time)/ (Transmission Time)
Now, Transmission Time = (Frame Length) / (Data Rate)
The following values are given:
Propagation Time = 270 ms = 270 x 10-3 sec
Frame Length = 1000 bits
Data Rate = 1 Mbps= 1 x 106 bps
Therefore, a = (270 x 10-3 ) / (1000 x 1 x 106 )= 270
a.
b.
c.
d.

U= 1/(1+2a) = 1/(1+2 x 270)


= 1/541 = 0.002
U= W/(1+2a) = 7/(1+2 x 270) = 7/541 = 0.013
U= W/(1+2a) = 127/(1+2 x 270) = 127/541 = 0.23
U= W/(1+2a) = 255/(1+2 x 270) = 255/541 = 0.47

Note: Students can use alternative approach such as BW-delay product.

Tutorial #7 Solution
Andrew Fry
E-mail: andrew.fry@rmit.edu.au
Introduction to Data Communications
1. Given a network in following figure, obtain shortest path routes from
node 2 to all the other nodes in the network. Use Dijkstra and
Bellman-Ford algorithms.

Dijkstra : starting from node 2.


M

L(1)

Path

L(3)

Path

L(4)

Path

L(5)

Path

L(6)

Path

{2}

2-1

2-3

2-4

{2, 4}

2-1

2-3

2-4

2-4-5

{2, 4, 1}

2-1

2-3

2-4

2-4-5

{2, 4, 1, 3}

2-1

2-3

2-4

2-4-5

2-3-6

{2, 4, 1, 3, 5}

2-1

2-3

2-4

2-4-5

2-4-5-6

{2, 4, 1, 3, 5, 6}

2-1

2-3

2-4

2-4-5

2-4-5-6

Bellman-Ford : starting from node 2


h

Lh(1)

Path

Lh(3)

Path

Lh(4)

Path

Lh(5)

Path

Lh(6)

Path

2-1

2-3

2-4

2-1

2-3

2-4

2-4-5

2-3-6

2-1

2-3

2-4

2-4-5

2-4-5-6

2-1

2-3

2-4

2-4-5

2-4-5-6

2. Suppose a routing algorithm identifies paths that are best in the


following sense: (1) minimum number of hops, (2) minimum delay, or
(3) maximum available bandwidth. Identify the conditions under
which the paths produced by the different criteria are the same? Are
different?
The first criterion ignores the state of each link, but works well in
situations were the states of all links are the same. Counting number of
hops is also simple and efficient in terms of the number of bits required
to represent the link. Minimum hop routing is also efficient in the use of
transmission resources, since each packet consumes bandwidth using
the minimum number of links.
The minimum delay criterion will lead to paths along the route that has
minimum delay. If the delay is independent of the traffic levels, e.g.
propagation delay, then the criterion is useful. However, if the delay is
strongly dependent on the traffic levels, then rerouting based on the
current delays in the links will change the traffic on each link and hence
the delays! In this case, not only does the current link delay need to be
considered, but also the derivative of the delay with respect to traffic
level.
The maximum available bandwidth criterion tries to route traffic along
pipes with the highest cross-section to the destination. This approach
tends to spread traffic across the various links in the network. This
approach is inefficient relative to minimum hop routing in that it may use
longer paths.

At very low traffic loads, the delay across the network is the sum of the
transmission times and the propagation delays. If all links are about the
same length and bit rate, then minimum hop routing and minimum
delay routing will give the same performance. If links vary widely in
length, then minimum hop routing may not give the same performance
as minimum delay routing.
Minimum hop routing will yield the same paths as maximum available
bandwidth routing if links are loaded to about the same levels so that
the available bandwidth in links is about the same. When link utilization
varies widely, maximum available bandwidth routing will start using
longer paths.
Note: Students may have different answers.
3. It was shown that flooding can be used to determine the minimumhop route. Can it be used to determine the minimum-delay route?
No. Lets take the example of figure in Q2(ii), The minimum hop route
from 1 to 6 is 1-3-6 and the minimum delay route is 1-4-5-6. Although it
is true that the first packet to reach node 6 has experienced the
minimum delay, this delay was experienced under a condition of
network flooding, and cannot be considered valid for other network
conditions.
Yes. The flooding traffic might be negligible as compared to real
network traffic. In that case, it can be used to find the minimum-delay
route.

Tutorial #8 Sem 2, 2004


Andrew Fry
E-mail: andrew.fry@rmit.edu.au
Introduction to Data Communications
1. For each of the following networks, discuss the consequences if a
connection fails.
a. Five devices arranged in mesh topology
b. Five devices arranged in star topology
c. Five devices arranged in a ring topology
a. If one connection fails, the other connections will still be working.
b. The other devices will still be able to send data through the hub;
there will be no access to the device which has the failed connection
to the hub.
c. The failed connection may disable the whole network.
2. Draw a hybrid topology with a ring backbone and two bus networks.

3. Draw a hybrid topology with a star backbone connecting two bus


backbones. Each bus backbone connects three ring networks.

4. A 80-station traditional Ethernet is divided into four collision


domains. This means that a maximum of ______ stations contend for
medium access at any one time.
a. 320
b. 80
c. 76
d. 20

80 stations divided into 4 domains = 20 stations per domain.


Answer d.
5. A _______ station Ethernet LAN uses a four-port bridge. Each station
has an effective average data rate of 5 Mbps (assume that in an
unbridged Ethernet the total capacity is 100 Mbps).
a. 32
b. 40
c. 80
d. 160
of the stations (4 port bridge) share 100 Mbps and get 5 Mbps each.
So 20 stations per collision domain x 4 domains = 80 stations.
Answer c.
6. How is a repeater different from an amplifier? How is a hub related
to repeater?
An amplifier amplifies the signal, as well as noise that may come with
the signal, whereas a repeater regenerates the signal, creating its copy
bit for bit at the original strength.
A hub is a multiport repeater

Tutorial #9
Andrew Fry
E-mail: andrew.fry@rmit.edu.au
Introduction to Data Communications
1. Suppose that frames are 1000 bytes long including 40 bytes of overhead. Also assume
that ACK frames are 15 bytes long. Calculate the efficiency of stop-and-wait ARQ in a
system that transmits at R=1 Mbps and reaction time 2(tprop+ tproc) of 1 ms.
(Hint: See Diagram Below)

to

= tframe + tprop + tproc + tack + tprop + tproc


= tframe + 2(tprop + tproc) + tack
tframe = L/R = 1000*8/106 = 8 ms
tack = 15*8/106 = 0.12 ms
2(tprop+ tproc) = 1 ms
to
= 8 ms + 0.12 ms + 1 ms = 9.12 ms
toverhead = 40*8/106 = 0.32 ms
Eff

= (tframe toverhead) / to * 100


= (8 ms 0.32 ms) / 9.12 ms * 100
= 84.20 %

2. An analog cellular system has a total of 33 MHz of bandwidth and uses two 25-kHz
simplex (one-way) channels to provide full duplex voice and control channels.
What is the number of channels available per cell for a frequency reuse factor of:
(i) 4 cells,
(ii) 7 cells, and
(iii) 12 cells?
Total Channels = 33 106 / 50 103
= 660 Channels

4-Cells Cluster:
Number of Channels per Cell for Frequency Re-use = 660 / 4
= 165 Channels

7-Cells Cluster:
Number of Channels per Cell for Frequency Re-use = 660 / 7
= 94 Channels

12-Cells Cluster:
Number of Channels per Cell for Frequency Re-use = 660 / 12
= 55 Channels.

3. GSM uses the frequency band 890-915 MHz for Mobile to Base and 935-960 MHz for
Base to Mobile. Each radio Channel has 200 kHz bandwidth.
(i) What is the total number of available 2-way radio channels?
(ii) Each radio channel is divided into 8 time slots. What is the total number of mobile
calls that can be simultaneously serviced?
Solution (i):
Bandwidth

= 915 - 890 MHz = 25 MHz

Total Radio Channels

= 25 106 / 200 103


= 125 Channels

This is the principle of FDMA (Frequency Division Multiple


Access)
Solution: (ii)
Total Number of Mobile Calls = 125 8 = 1,000 calls
Each of the time slots of a radio channel carries a different mobile call.
This is the principle of TDMA (Time Division Multiple Access).

Tutorial #10
Andrew Fry
E-mail: andrew.fry@rmit.edu.au
Introduction to Data Communications
1. An IP packet consists of 20 bytes of header and 1480 bytes of payload. Now
suppose that the packet is mapped into ATM cells that have 5 bytes of header and 48
bytes of payload. How much of the resulting cell stream is overhead?
Accurate answer (includes padding in final ATM cell)
Overhead refers to everything that is not payload so overhead includes the IP
header, the ATM headers, and any ATM padding.
For clarity, the inaccurate calculations have been removed.
IP hdr
(20)
A
T
M

ATM Payload (48)

User dat a (1480)


A
T
M

ATM Payload (48)

A
T
M

ATM Payload

Pad

Size of IP packet (header + payload)


= 1480 + 20
= 1500
Number of ATM cells required to carry 1500 bytes (the IP packet
containing header and user data)
= 1500 / 48 = 31.25
32
(because a partial ATM packet is never used)
Total bytes in the stream of ATM cells
= 32 x 53
= 1696 bytes
(we include whole cells, including padding)
Bytes of ATM overhead (headers + padding)
= (32 x 5) + (0.75 x 48)
= 196
Total overhead (%)
= non-payload bytes / total bytes * 100%
= (ATM overhead bytes + IP overhead bytes) / total bytes * 100%
= (196 + 20) / 1696 * 100%
= 11.6%

2. Consider the queuing delay in a router buffer (preceding an outbound link).


Suppose all packets are L bits, the transmission rate is R bps, and N packets
simultaneously arrive at the buffer every LN/R seconds. Find the average queuing
delay of a packet. The queuing delay for the first packet is zero.
It takes LN / R seconds to transmit the N packets. Thus, the buffer is
empty when a batch of N packets arrive.
The first of the N packets has no queueing delay. The 2nd packet has
a queueing delay of L / R seconds. The n th packet has a delay of
( n 1) L / R seconds.
The average delay is
1 N
L 1
( n 1) L / R =

N n =1
RN

N 1

L 1 ( N 1) N L ( N 1)
=
.
2
R
2

n = R N
n =0

3. Consider sending a file of F=M.L bits over a path of Q links. Each link transmits
at R bps. The network is lightly loaded so that there are no queuing delays. When
a form of packet switching is used, the M.L bits are broken up into M packets,
each packet with L bits. Propagation delay is negligible.
a. Suppose the network is using message switching instead of packet
switching; 2h bits are added to the message, and the message is not
segmented. How long does it take to send the file.
The time required to transmit the message over one line is
(M*L + 2*h) / R.
Then the time required to transmit over Q links would be
Q * (M*L + 2*h) / R seconds
b. Suppose the network is a circuit switched network. Further suppose
that the transmission rate of the circuit between the source and the
destination is R bps. Assuming ts set-up time and h bits of header
appended to the entire file, how long does it take to send the file.
Since there is no store and forward delays at the links,
the total delay is setup time + frame transmission time
ts + [ (h + M*L) / R ]

Tutorial #11 (Repeat)


Andrew Fry
E-mail: andrew.fry@rmit.edu.au
Introduction to Data Communications
1. Suppose that the TCP entity receives a 4.5 megabyte file from the application layer
and that the IP layer is willing to carry blocks of maximum size 1500 bytes.
Calculate the amount of overhead incurred from segmenting the file into packet-sized
units.
Interested in TCP layer overhead of 20 bytes header / packet
Packet_payload = packet_size header_size
= 1500 20 = 1480
Num_packets = total_payload / packet_payload
= 4.5 mb / 1,480 bytes = 3,040.5 3,041 packets
Total_overhead = num_packets * header_size
= 3041 * 20
= 60,820 bytes
2. A multiplexer combines four 100-Kbps channels using a time slot of 2 bits (see
Figure 1). Each Frame has the size of 8 bits. Show the output with the four inputs as
shown in the figure. What is the frame rate? What is the frame duration?

Figure 1
Taking 2 bits from each frame ...
10100111, 00101101, 11001000, ......
Frame_rate

= total_data_rate / bits_per_frame
= (4 * 100 Kbps) / 8
= 50 K fps

Frame_duration

= frame_size / output_data_rate
= 8 / (4 * 100 Kbps)
= 20 uS

3. A small organization has a Class C address for seven networks each with 24 hosts.
What is an appropriate subnet mask?
Class C uses 24 bits for the Network and 8 bits for the Host.
11111111.11111111.11111111.XXXXXXXX
Number of Networks = 7
22=4, too few, 23 = 8, so select 23
Therefore, 3 bits are required to represent the network
Number of Hosts = 24
24=16, too few, and 25=32
So 5 bits are required for the host
Hence, 3 bits are required to represent the 7 networks and 5 bits are
required to represent the 24 host
Since subnet masks the host part only, the subnet would be
255.255.255.XXXXXXXX
111
Network

00000 = XXX XXXXX


Host

Hence the subnet would be


11111111.11111111.11111111.11100000
= 255.255.255.224

4. A host in an organization has an IP address 150.32.64.34 and a subnet mask


255.255.240.0. What is the address of this subnet? What is the range of IP addresses
that a host can have on this subnet?
IP = 150.32.64.34 = 10010110.00100000.01000000.00100010
this is a class B address
Subnet

AND

= 255.255.240.0
= 11111111.11111111.11110000.00000000
10010110
11111111
10010110

00100000
11111111
00100000

01000000 00100010
11110000 00000000
01000000 00000000

Address of subnet is 150.32.64.0


Range of IP
FROM
TO

10010110 00100000
10010110 00100000

0100
0100

Hence from 150.32.64.1 to 150.32.79.254

0000
1111

00000001
11111110

S-ar putea să vă placă și