Chapter 1 Data Communications and Networks Overview

Download Report

Transcript Chapter 1 Data Communications and Networks Overview

Data Communications &
Computer Networks
Assignment 1
Solutions
Fall 2004
1
Reminder for the rules for
assignments (1)
•
All assignments must be done individually
You should NOT:
1. Copy any part of another student's answers.
2. Allow another student to copy your work.
3. Present the work of another as your own. If you use
the idea of another in your work, you MUST provide
appropriate attribution (that is, cite the work and the
author).
2
Reminder for the rules for
assignments (2)
• It is the student’s responsibility to make up for any
missed work due to his/her absence(s).
• Assignments should be handed-in on time
— 10 November 2004 for assignment 1
• However, they can be submitted up to one week late,
but will receive a 10% mark reduction penalty.
• NO credit will be given for ANY assignment submitted
later than one week from the due date, since we will go
over the assignment in class.
3
Answer to Problem 1
a) Give two reasons for using layered protocols? (4 marks)
- Smaller more manageable pieces
- Protocols can be changed without effecting higher or lower layers.
b) List two main disadvantages to layered approach to protocols
(4 marks)
- More processing
- More overhead due to the headers added by the layers
c) A system has an n-layer protocol hierarchy. Applications generate
messages of length M-bytes. At each of the layers, an h-byte header
is added. What fraction of the network bandwidth is filled with
headers? (6 marks)
Each message is M-bytes long. There are n-layers each one adding an h-byte
header, therefore, each message that is transmitted through the network is
(nh+M) bytes long. The fraction of the network bandwidth that is filled with
headers is given by nh/(nh+M)
If it is assumed that the bottom layer (physical) does not generate any header,
then there shall be (n-1)h headers generated, so the fraction of the network
bandwidth that is filled with headers is given by (n-1)h/[(n-1)h+M]
4
Answer to Problem 2
a) What is the difference between a confirmed service and an
unconfirmed service? For each of the following, tell whether it might
be a confirmed service, an unconfirmed service, both or neither:
(7 marks)
(i)
Connection establishment
(ii)
Data transfer
(iii)
Connection release
In a confirmed service, there is a request, an indication, a response and a
confirmation.
In an unconfirmed service, there is just a request and an indication.
Connection establishment: Confirmed service, since an explicit response is
required
Data transfer: Can be confirmed or uncorfirmed, depending whether or not the
sender needs an acknowledgement
Connection release: This is a disconnect service, therefore it is unconfirmed
since there is no response
5
Answer to Problem 2
b) What is the principal difference between connectionless
communication and connection-oriented communication? Is it possible to
have both of them in two adjacent layers? Discuss! (6 marks)
Connection-oriented service is modelled after the telephone system. To use a
connection-oriented network service, the service user first establishes a connection,
uses the connection and then it releases the connection.
Connectionless service is modelled after the postal system. Each message (letter)
carries the destination address and each one is routed through the system
independent of all the others.
Yes, it is possible to have connection-oriented and connectionless service in
adjacent layers. Example is TCP/IP. TCP is connection-oriented protocol that lies in
transport layer (layer 4), IP is connectionless that lies in network layer (layer-3).
c) What is the main difference between TCP and UDP protocols? Give an
example of a service these protocols can support? (6 marks)
TCP provides reliable connection-oriented protocol that delivers a byte stream from
one node to another, guaranteeing delivery and provides flow control. TCP can be
used in file transfer applications.
UDP provides unreliable connectionless protocol for applications. UDP can be used
in applications for carrying voice traffic over packet-switched networks.
6
Answer to Problem 3
a) Contrast and criticize OSI and TCP reference models outlining their similarities
and differences. (6 marks)
Both models have network, transport and application layers with similar functionalities. Both
are based on the concept of a stack of independent protocols. However, OSI supports both
connectionless and connection-oriented communication in the network layer but only
connection-oriented communication in the transport layer. TCP/IP has only connectionless
mode in the network layer but supports both connectionless and connection-oriented
communication in the transport layer.
OSI model : • Has been devised before the corresponding protocols were invented
• Has good definition of service, interface, and protocol
• Fits well with object oriented programming concepts
• Protocols are better hidden
TCP model : • the protocols came first, the model was just a description of the protocols
• the model isn't good for any other protocols part from TCP/IP.
A critique of OSI model: • Bad Timing (TCP already in use by the time OSI came along)
• Bad Technology (Layers don't really match. Dominated by phone
company mentality)
• Bad Implementation (Huge, unwieldy, slow).
A critique of TCP/IP model: • Doesn't separate specification from implementation.
• Model is only good for describing TCP.
7
• Doesn't specify physical and data link layers.
Answer to Problem 3
b) Which layer of the OSI reference model is responsible for the
following: (6 marks)
(i) Negotiating data transfer syntax
Presentation
(ii) Addressing devices and routing through an internetwork Network
(iii) Framing
Data Link
(iv) Flow control, acknowledgement, windowing
Transport
(v) Coordinating communications between systems
Session
(vi) Synchronizing sending and receiving applications
Application
c) At which layer of the OSI reference model are the following
components positioned? (4 marks)
(i)
Router
Layer 3 - Network
(ii)
Repeater
Layer 1 – Physical
(iii)
Switch
Layer 2 – Data Link
(iv)
Hub
Layer 1 - Physical
8
Answer to Problem 4
a) A noiseless channel has a bandwidth of 10kHz. If digital quaternary
signaling is used (i.e. four voltage levels per symbol)
(i) What is the maximum bit rate (capacity) of the channel? (4 marks)
The maximum bit rate for a noiseless channel of 10kHz bandwidth with
quaternary signalling is 2 x BW x log2n = 2 x 10 kHz x 2 = 40kbps, using
Nyquist equation.
(ii) How would (i) change if the channel signal to noise ratio is 30dB?
(4 marks)
If the channel SNRdB=30 dB then we must use Shannon’s equation, that is
Maximum bit rate = BW x log2(1+SNR).
For a SNRdB of 30dB, the SNR ratio is 103=1000 since 10 log10(SNR)=30 dB
So, the maximum bit rate is 10kHz x log2(1+1000)=99.67kbps
9
Answer to Problem 4
(iii) One way to increase the maximum bit rate is to change the
encoding and use phase modulation together with amplitude
modulation. This will increase channel capacity. For the constellation
pattern shown below, find the maximum bit rate of the channel,
assuming that the channel is noise free. (4 marks)
..
.
.
.
.
.
.
Assuming a noiseless channel, the maximum bit rate is 2 x BW x log2(n) =
2 x 10kHz x 3 = 60kbps, where n=8 states.
10
Answer to Problem 4
(b) A signal described by the following equation is inserted through a noisy
channel of 13dB signal-to-noise ratio. What is the maximum achievable data rate?
(6 marks)
where k= 1, 3, 5
The above equation can be expanded as follows
s(t)=(4/π){sin(20000t)+(1/3)[sin(60000t)]+(1/5)[sin(100000t)]}
This equation is in analogy with the general Fourier series equation for k=1, 3, 5 i.e.
s(t)=(4/π){sin(2πft)+(1/3)[sin(2π(3f)t)]+(1/5)[sin(2π(5f)t)]}
Bandwidth is the highest frequency component minus the lowest frequency component of the signal.
The highest frequency component is given by sin(2π(5f)t) and the lowest by sin(2πft). So,
2πft=20000t => 2πflowestt = 20000t => flowest=20000/2π = 3.183kHz
2π(5f)t=100000t => 2πfhighestt = 100000t => fhighest = 100000/2π = 15.915kHz
Bandwidth = fhighest - flowest = 15.915 – 3.183 = 12.732kHz
For a SNRdB of 13dB, SNRdB=10 log10(SNR)=13 dB, so SNR ratio is 101.3=19.95
Maximum data rate as given by Shannon’s equation is
BW x log2(1+SNR) = 12732 x log2(1+19.95) = 55.88kbps
11
Answer to Problem 5
a) Briefly differentiate between copper and fiber optic cables for
establishing a communication channel in terms of bandwidth,
interference, flow of information and cost. (8 marks)
Metric
Bandwidth
Interference
Flow of Information
Cost
Fiber
High
Low
Uni-directional
High
Copper
Low
High
Bi-directional
Low
b) A leased line is known to have a loss of 40dB. The output signal power
is measured as 7mW and the output noise level is measured as
3.5μW. Using this information calculate the output signal-to-noise
ratio in dB. (6 marks)
SNRdB=10 log10 (SNR)= 10 log10(Pout/Nout)= 10log10(7x10-3/3.5x10-6)= 33dB
12
Answer to Problem 6
(a) By halving the transmission frequency as well as halving the
distance between transmitting and receiving antennas by how many
decibels is the received signal power improved or reduced? (8 marks)
Assume that tx and rx antennas are d1 meters apart at a frequency f1. Then
(Pt/Pr)1 = (4πd1)2/λ12 = (4π f1 d1)2/c2
If frequency is halved, i.e. f2=f1/2, and distance is halved, i.e. d2=d1/2 then
(Pt/Pr)2 = (4πd2)2/λ22 = (4π f2 d2)2/c2 = (4π (f1/2) (d1/2))2/c2 =
(1/16)(4π f1 d1)2/c2 = (1/16)(Pt/Pr)1
Therefore, signal reduces by 10log10 [(Pt/Pr)2 / (Pt/Pr)1 ] = 10log10 (1/16)= -12dB
13
Answer to Problem 6
b) You are receiving television signals from a synchronous geostationary
satellite 40,000 km away at 11.75 GHz using a parabolic antenna.
(i) What is the free space loss in decibels? (5 marks)
The free space loss in ratio is Pt/Pr = (4πd)2/λ2 = (4π f d)2/c2
or, in decibels: LdB = 10 log10 (Pt/Pr) = -20log(λ) + 20log(d) + 21.98 dB
where Pt = signal power at tx antenna,
Pr = signal power at rx antenna,
c = speed of light (~3x108 m/s),
λ = carrier wavelength in m
f = carrier frequency,
d = distance between antennas in m
Since f=11.75GHz, then λ=c/f = 3x108/11.75x109 = 0.02553 meters
Hence, LdB = -20log(λ) + 20log(d) + 21.98 dB =>
-20log(0.02553) + 20log(40000x103) + 21.98 =
31.87 + 152.04 + 21.98 = 205.9dB
14
Answer to Problem 6
(ii) Assuming that the antenna gain of both the satellite and groundbased earth station are 45dB and 50dB, respectively, and that the earth
station transmits at an output power of 200W, what is the power
received at the satellite antenna? (6 marks)
Assuming that the antenna gain of both the satellite and ground-based earth
station are 45dB and 50dB the free space loss is
LdB = 205.9 – 45 – 50 = 110.9dB
Since the Earth station transmits at an output power of 200W, a power of 200W
translates into 10log(200) = 23dBW, so the power received at the receiving
satellite antenna is 23-110.9 = -87.9 dB
PowerdB=10 log10Power=-87.9 dB =>
Power=10(-87.9/10)=1.62x10-9= 1.62nW
15