# Computer Network Final Exam 2005

Networking and Communications

Oct 26, 2013 (4 years and 6 months ago)

91 views

Computer Network Final Exam 2005

1.

What are the differences between routing and forwarding? Please briefly explain
each of them.

(5%)

Ans

forwarding:

move packets from router’s input to appropriate router output
.

routing:

determine route taken by pac
kets from source to dest
ination
.

2.

During normal IP packet forward
ing

at

a router, which the following packet fields are
updated
? (2%)

Ans

(c)
TTL

(d)
checksum

3.
Routing Algorithm

Consider the network topology

shown below. The topology consists of mult
iple

static cost associated with it which
represents the cost of sending data over that link.

a.

s shortest
-
path algorithm to compute the shortest path
from y to

all network nodes. Show your work by computing a table similar
to
tables below.

Ans

N

D(
x
)
,p(
x
)

D(
m
),
p(
m
)

D(
z
),
p(
z
)

D(
n
),
p(
n
)

D(
s
),
p(
s
)

D(
u
),
p(
u
)

y

3,y

1,y

10,y

I
nf

inf

I
nf

ym

2,m

6,m

3,m

I
nf

inf

ymx

6,m

3,m

inf

I
nf

ymxn

5,n

4,n

10,n

ymxns

5,n

7,s

ymxnsz

5,n

ymxnszu

x

y

m

z

s

n

u

3

5

10

2

3

1

2

2

7

1

1

b.

Consider the Distance Vector Algorith
m. When the link cost between
x

and
y

changes. For the following figure (a), please show why good news (cost
change from 3 to 1) travel fast, and for figure (b), please show why bad
news (cost change from 3 to 90) travel slowly. Please describe how the
rou
ting table of
x

changes with time. (10%)

Fig (a): Good news travel fast

Fig (b): Bad news travel slowly

4
(5%)

Ans

OSPF

uses

.A

information to all other routers in the AS, not just to its neighboring routers. This
routing information sent by a router has one entry for each of the router’s neighbors;
the e
ntry gives the distance from the router to the neighbor.

A
RIP

by a router contains information about all the networks in the AS, although this
information is only sent to its neighboring routers.

Use Distance Vector Algorithm.

5.

Wha
t is the difference between Link
-
Layer and Transport
-
Layer

reliable data
transfers? (Hint: With the TCP reliable data transfer, why does the underlying
link layer support data transmission reliability?) (5%)

Ans

Similar to transport

layer reliable delivery service, a link layer reliable
delivery service is achieved with acknowledgements and retransmissions.

layer reliable delivery service is often used for links that are prone to high error rates,
such
as a wireless link, with the goal of correcting an error locally

the error occurs

rather than forcing an end
-
to
-
end retransmission of the data by
transport or application
-
layer protocol.

(

P.421)

x

z

1

3

80

y

90

x

z

1

3

80

y

1

6.
Suppose
that in pure ALOHA, there are

N

active

nodes
with
many frames to send
.
E
ach
node
transmits in
a
slot with probability
p
. F
ind the maximum efficiency of
pure ALOHA. Please derive the maximum efficiency STEP
-
BY
-
STEP. (10%)

Ans

Pure ALOHA

U
nslotted Aloha: simpler, no synchronization

W
he
n frame first arrives
,
transmit immediately

C
ollision probability increases:

F
rame sent at t0 collides with other frames sent in [t0
-
1,t0+1]

P(success by given node) = P(node transmits) .

P(no other node transmits in [p0
-
1,p0]

.

P(no other node transmits in [p0
-
1,p0] =p . (1
-
p)N
-
1 . (1
-
p)N
-
1=

choosing optimum p and then letting n
-
> infty= 1/(2e)

(6%)

(4%)

7.

Why Ethernet chooses CSMA/CD as its protocol instead of others. Please list its

(4%)

and compare it with slotted ALOHA, pure ALOHA and
CSMA.
(6%)

(10%)

Ans

CSMA/CD (C潬lisi潮 Detecti潮)

collisions

detected

within short time

colliding transmissions aborted, reducing channel wastage

collision detection:

easy in wired LANs: measure signal strengths, compare transmitted,

human analogy: the polite conversationalist

ALOHA

unslotted A
loha: simpler, no synchronization

when frame first arrives

transmit immediately

collision probability increases:

frame sent at t0 collides with other frames sent in [t0
-
1,t0+1]

***
maximum efficiency

and even worse

S
-
ALOHA

Pros

single active node can continuously transmit at full rate of channel
(1%)

highly decentralized: only slots in nodes need to be in sync

simple

Cons

collisions, wasting slots

idle slots

clock synchronization

***
efficiency

(1%)

CSMA

Carrier Sense Multiple Access

(2%)

If channel sensed idle: transmit entire frame

If channel sensed busy, defer transmission

Human analogy: don’t interrupt others!

colliding transmissions

aborted, reducing channel wastage
(1%)

The same with CSMA/CD but only detection but when collision happens, it can
not handle it.

8.
Hubs Switches and Routers

a.

describe

the sameness and differences between switches and
routers.
(5%)

Ans

Sam
eness

They are
both store
-
and
-
forward devices
.

Differences

But routers are
network layer devices (examine network layer headers)

and s
.

R
outers maintain routing tables, implement routing algorithms

S
witches maintain switch
tables, implement filtering, learning algorithms

b.

What is a collision d
associated
it
with switch
es

and hub
s
).

(5%)

Ans

A c

will h慰pen
if n潤e recei癥s tw漠潲 m潲e si杮慬s⁡ the⁳慭e⁴ime
.

Between⁴he⁨ub 慮d the⁨潳ts⁴h慴 co
nnect t漠ohe⁨ub
.
In a single segment, the
maximum node and its hub is 100 meters.

All of the LAN segments belong to the
same collision domain.

Whenever two or more nodes on the LAN segments
transmit at the same time, there will be a collision.

All of the
transmitting nodes
will enter exponential backoff.

Individual segment collision domains become one
large collision domain

and b
andwidth can not be aggregated

S
witch installation breaks subnet into LAN segments

switch filters packets:

same
-
LAN
-
segment fram
es not usually forwarded onto other LAN
segments

***
segments become separate collision domains

9.

Use module 2 arithmetic to compute the CRC code for message 101101110011
with the generator 10011.

Ans

CRC code

1011

10.

If a host was shut down and replaced its
network interface card, it will cause the
inconsistency of ARP caches in the other hosts in the same LAN. How can you
solve it

(5%)

Ans

ARP

is “plug
-
and
-
play”:

N
odes create their ARP table
s without
intervention from net

.

Each IP node (Host, Router) on LAN has ARP table

ARP Table: IP/MAC address mappings for some LAN nodes
:

TTL (Time To Live): time after which address mapping will be forgotten
(typically
20 min)

and
A caches (saves)
IP
-
to
-
MAC address pair in its ARP table until information becomes old
(times out)

soft state: information that times out (goes away) unless refreshed

The host

network

ARP packet

include

other host in the same Len

ARP tables

other host

s
ARP table TTL timeout

host

query

IP/MAC
，藉以得到新的值。

11.

What

s the main deference between MAC flat

(3%)

Ans

@

portability

C
an move LAN card from one LAN to another

@

D
epends on IP subnet to which node is attached

12
.
Please list the characteristics of wireless

(5%)

Ans

P.508

D
attenuates as

it propagates
through matter (path loss)

I
nterference from other sources: standardized wireless network
frequencies (e.g., 2.4 GHz) shared by other devices (e.g., phone)
;
devices (motors) interfere as well

share

M
ultipath propagation: radio signal reflects off objects ground,
arriving at destination at slightly different times

mobile
portable

13.
Please compare CSMA/CA with CSMA/CD. Why IE
EE 802.11 uses CSMA/CA

Ans

IEEE 㠰㈮8ㄠ1AC Pr潴潣潬: CSMA/CA

A
void collisions: 2+ nodes transmitting at same time

802.11: CSMA
-

sense before transmitting
,
don’t collide with ongoing
transmission by other node

802.11:
no

collisi
on detection!

difficult to receive (sense collisions) when transmitting due to weak

can’t sense all collisions in any case: hidden terminal, fading

goal:
avoid collisions:

CSMA/C(ollision)A(voidance)

802.11 sender

1
.

if sense chan
nel idle for
DIFS

then

transmit entire frame (no CD)

2
.
if sense channel busy then

start random backoff time

timer counts down while channel idle

transmit when timer expires

if no ACK, increase random backoff interval, repeat 2

-

if fram

return ACK after
SIFS
(ACK needed due to hidden terminal problem)

Avoiding collisions (more)

idea:

allow sender to “reserve” channel rather than random access of data frames:
avoid collisions of long data frames

sender first transmits

small

request
-
to
-
send (RTS) packets to BS using
CSMA

RTSs may still collide with each other (but they’re short)

-
to
-
send CTS in response to RTS

RTS heard by all nodes

*
sender transmits data frame

*
other stations defer transmissions

Avo
id data frame collisions completely

using small reservation packets!

Collision Avoidance: RTS
-
CTS exchange

CSMA/CD

CSMA/CA

sensing
，如果
sense idle

CSMA/CD

collision detection

collision

CSMA/CA

detection

coll
ision avoidance
，在
sense

idle

random backoff time

collision

data
，傳完之後回覆一個
ack

802.11

CSMA/CA

wireless

collision is hard to detect
，因為有
hidden terminal problem
，因此不適用
CSMA/CD

14.

compare mobility support via Direct Routing with that via Indirect
Routing. (5%)

Ans

Let end
-
systems handle it:

indirect routing:

communication from correspondent to mobile goes
through home agent, then forwarded to remote

direct routing:

correspondent g
ets foreign address of mobile, sends
directly to mobile

Indirect routing

permanent address: used by correspondent (hence mobile location is
transparent

to correspondent)

care
-
of
-
address: used by home agent to forward datagrams
to mobile

F
oreign agent functions may be done by mobile itself

T
riangle routing: correspondent
-
home
-
network
-
mobile

inefficient when correspondent, mobile are in same network

S
uppose mobile user moves to another network

registers with new foreign agent

new
foreign agent registers with home agent

home agent update care
-
of
-

packets continue to be forwarded to mobile (but with new
care
-
of
-

mobility, changing foreign networks transparent:
on going connections can be
maintained!

Direct
routing

O
vercome triangle routing problem

non
-
transparent to correspondent: correspondent must get care
-
of
-
from home agent

If

mobile changes visited network

Accommodating mobility with direct routing

anchor foreign agent: FA in first visited netw
ork

data always routed first to anchor FA

when mobile moves: new FA arranges to have data forwarded from old FA
(chaining)