Documente Academic
Documente Profesional
Documente Cultură
Andrew Fry
E-mail: andrew.fry@rmit.edu.au
Introduction to Data Communications
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.)
Tutorial #2 Solution
Andrew Fry
E-mail: andrew.fry@rmit.edu.au
Introduction to Data Communications
(Ack: solution prepared by HT Chetan Mehta)
AND
= 255.255.240.0
= 11111111.11111111.11110000.00000000
10010110
11111111
10010110
00100000
11111111
00100000
01000000 00100010
11110000 00000000
01000000 00000000
10010110 00100000
10010110 00100000
0100
0100
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
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)
http://people.cs.uchicago.edu/~iraicu/research/conference
/IPv4_IPv6_tunneling_sec.pdf
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
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:
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
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
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.
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.
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.
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
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
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 #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
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
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
A
T
M
ATM Payload
Pad
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 ]
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
AND
= 255.255.240.0
= 11111111.11111111.11110000.00000000
10010110
11111111
10010110
00100000
11111111
00100000
01000000 00100010
11110000 00000000
01000000 00000000
10010110 00100000
10010110 00100000
0100
0100
0000
1111
00000001
11111110