# assignment1_solutions

Δίκτυα και Επικοινωνίες

23 Οκτ 2013 (πριν από 5 χρόνια και 2 μήνες)

101 εμφανίσεις

1

Data Communications &
Computer Networks

Assignment 1

Solutions

Fall 2004

2

Reminder for the r
ules 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).

3

Reminder for the r
ules 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.

4

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]

5

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

6

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
.

7

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.

Doesn't specify physical and data link layers.

8

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

9

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)

T
he maximum bit rate for a noiseless channel of 10kHz bandwidth with
quaternary signalling is 2 x BW x log
2
n = 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 SNR
dB
=30 dB then we must use Shannon’s equation, that is

Maximum bit rate = BW

x

log
2
(1+SNR).

For a SNR
dB

of 30dB, the SNR ratio is 10
3
=1000 since 10 log
10
(SNR)=30 dB

So, the maximum bit rate is 10kHz x log
2
(1+1000)=
99.67kbps

10

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

log
2
(n)

=

2

x

10
kHz

x

3

=

60
kbps
,

where

n=
8

states
.

.

.

.

.

.

.

.

.

11

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
π
f
lowest
t = 20000t => f
lowest
=20000/2
π

= 3.183kHz

2
π
(5f)t=100000t => 2
π
f
highest
t = 100000t => f
highest
= 100000/2
π

= 15.915kHz

Bandwidth

= f
highest
-

f
lowest

= 15.915

3.183 =
12.732kHz

For a SNR
dB

of 13dB, SNR
dB
=10 log
10
(SNR)=13 dB, so SNR ratio is 10
1.3
=19.95

Maximum data rate as given by Shannon’s equation is

BW x log
2
(1+SNR) = 12732 x log
2
(1+19.95) =
55.88kbps

12

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)

b)

A

leased

line

is

known

to

have

a

loss

of

40
dB
.

The

output

signal

power

is

measured

as

7
mW

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)

SNR
dB
=10 log
10

(SNR)= 10 log
10
(P
out
/N
out
)= 10log
10
(7x10
-
3
/3.5x10
-
6
)=
33dB

Metric

Fiber

Copper

Bandwidth

High

Low

Interference

Low

High

Flow of Information

Uni
-
directional

Bi
-
directional

Cost

High

Low

13

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 d
1

meters apart at a frequency f
1
. Then
(P
t
/P
r
)
1

= (4
π
d
1
)
2
/
λ
1
2

= (4
π

f
1

d
1
)
2
/c
2

If f
requency

is halved, i.e. f
2
=f
1
/2, and d
istance

is halved, i.e. d
2
=d
1
/2 then

(P
t
/P
r
)
2

= (4
π
d
2
)
2
/
λ
2
2

= (4
π

f
2

d
2
)
2
/c
2

= (4
π

(f
1
/2) (d
1
/2))
2
/c
2

=

(1/16)(4
π

f
1

d
1
)
2
/c
2

= (1/16)(P
t
/P
r
)
1

Therefore, signal reduces by 10log
10

[(P
t
/P
r
)
2

/ (P
t
/P
r
)
1

] = 10log
10

(1/16)=

-
12dB

14

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)

T
he free space loss in ratio is P
t
/P
r
= (4
π
d)
2
/
λ
2

= (4
π

f d)
2
/c
2

or, in decibels: L
dB

= 10 log
10

(P
t
/P
r
) =
-
20log(
λ
) + 20log(d) + 21.98 dB

where

P
t

= signal power at tx antenna,

λ

= carrier wavelength

in m

P
r

= signal power at rx antenna
,

f
= carrier frequency,

c

= speed of light (~3x10
8

m/s),

d

=

distance between antennas

in m

Since f=11.75GHz, then
λ
=c/f = 3x10
8
/11.75x10
9

= 0.02553

m
eters

Hence, L
dB

=
-
20log(
λ
) + 20log(d) + 21.98 dB =>

-
20log(0.02553) + 20log(40000x10
3
) + 21.98 =

31.87 + 152.04 + 21.98

= 205.9dB

15

Answer to

Problem 6

(ii)

Assuming

that

the

antenna

gain

of

both

the

satellite

and

ground
-
based

earth

station

are

45
dB

and

50
dB,

respectively,

and

that

the

earth

station

transmits

at

an

output

power

of

200
W,

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

Power
dB
=10 log
10
Power=
-
87.9 dB =>

Power=10
(
-
87.9/10)
=1.62x10
-
9
=
1.62nW