Universität Stuttgart Communication Networks I Sample Solution

INSTITUT FÜR
KOMMUNIKATIONSNETZE
UND RECHNERSYSTEME
Universität Stuttgart
Prof. Dr.-Ing. Andreas Kirstädter
Sample Solution
Communication Networks I
Examiner:
Professor Dr.-Ing. Andreas Kirstädter
Date:
March 5, 2010
Duration:
120 Minutes
Required:
All Problems
Permitted Resources:
All
Problem 1
Link Layer ARQ Protocol
Question 1
2 Points
TD = d / c = 50 µs
TS = lF / r = 10 µs
TA = lA / r = 0.2 µs
Question 2
a)
The receiver has to differentiate between original and retransmitted frames.
b)
The feedback is always referring to the last transmitted frame.
c)
The SN alternates between 0 and 1. No pipelining is used.
3 Points
Question 3
a)
10 Points
R
S
TS
2TD
F1
ACK
TA
F0
ACK
F1
ACK
b)
R
S
TS
F1
2TD
ACK
TA
F0
NACK
F0
ACK
F1
ACK
c)
R
S
TS
2TD
F1
ACK
TA
F0
NACK
F0
ACK
F1
ACK
Question 4
4 Points
Problem 1
In case of acorrupted ACK S will be triggered to retransmit although R may
have already received the frame correctly. R will then discard this frame and will
Page 2
not forward the packet included to the network layer. However, S is waiting for a
ACK from R to see that this transmission was ok and thus to be able to continue.
R
S
F1
ACK
F1
ACK
Question 5
a)
9 Points
B
Wait for
feedback
Sender
SN=1
T
Feedback
A
Frame
Wait for
packet
Reset T
Set (now+T0, T)
Check
feedback
Packet
Including
Sequence
Number SN
(unchanged)
B
N
Generate
frame
FB
ok?
Y
Frame
Frame
Packet confirm
Set (now+T0, T)
Set (now+T0, T)
A
B
B
Modulo-2
SN++
b)
Receiver
D
ESN=1
Extract
RSN
C
N
Wait for
frame
RSN
==
ESN?
Sequence
Number in
arrived frame
Y
Extract
packet
Frame
(unchanged)
Packet
Check
frame
N Frame
ok ?
C
ESN++
Modulo-2
Y
D
Feedback
= ACK
Feedback
(unchanged)
Question 6
6 Points
Problem 1
C
a)
TS, TD, TA
b)
Too large values of T0 slow down protocol operation ⇒ T0 should be chosen as small as possible
Page 3
T0 ≥ TS+2TD+TA = 110.2 µs in order to receive feedback within T0
⇒ T0 = 110.2 µs (+ a small "delta")
c)
R
S
F1
ACK
F0
T0
?
F0
ACK
F1
ACK
Question 7
a)
Especially, at low bit error rates the probability of an errored ACK/NACK
is much smaller than that of an errored frame due to the small size of the
ACKs/NACKs.
b)
py = Prob{"y link layer transmissions needed"}
p1 = 1-E
p2 = E (1-E)
py = Ey-1 (1-E) for y > 0
c)
Number of frame transmissions = y
Expectation: n = 1p1+2p2+3p3+...= (1 - E)-1
d)
Duration of a transmit cycle: TS+2TD+TA
Cycles per packet transmission: n
Resulting throughput: T1 = lF/[n(TS+2TD+TA)]=lF(1-E)/[lF/r+2d/c+lA/r]
a)
A timer for TS has to be introduced together with a second waiting state
"Wait for TS" that is entered after the transmission of the first frame and left
after the timer expires. Only then, the second frame is sent and S enters the
state "Wait for feedback".
b)
S collects both the feedback for FA and FB. If neither feedback is an uncorrupted ACK, S will retransmit FA and FB.
11 Points
Question 8
9 Points
Problem 1
Page 4
c)
B
Wait for
feedback
Sender
SN=1
Feedback
G
FB_cnt++
ACK_cnt=0
FB_cnt=0
A
Wait for
packet
Packet
Generate
frame
Frame
Check
feedback
N
Y
FB
ok?
Set (now+TS, T)
N ACK? Y
ACK_cnt++
Wait
TS
G
N
T
FB_cnt
==2?
B
Y
N ACK_cnt Y
Frame
G
>0?
SN++
Modulo-2
B
Packet confirm
A
Question 9
a)
Probability for at least one uncorrupted frame out of two: p1*=1-E2
Cycles per packet transmission: n* = 1/p1*= (1-E2)-1
Duration of a transmit cycle: 2TS+2TD+TA
Resulting throughput: T2 = lF/[n(2TS+2TD+TA)]=lF(1-E2)/[2lF/r+2d/c+lA/r]
b)
Calculation of break even point E0:
9 Points
T1 = T2
2
lF ⋅ ( 1 – E0 )
lF ⋅ ( 1 – E0 )
lF ⋅ ( 1 – E0 ) ⋅ ( 1 + E0 )
----------------------------- = -------------------------------- = ----------------------------------------------------lF
lF
lF
d lA
d lA
d lA
---- + 2 --- + ----2 ---- + 2 --- + ----2 ---- + 2 --- + ----r
c r
r
c r
r
c r
lF
E 0 = ------------------------------dr
l F + 2 ----- + l A
c
T2 > T1 for E > E0
Problem 1
Page 5
Problem 2
Ethernet & IP
Question 1
flooding ⇒ congested network
spanning tree ⇒ inefficient resource usage
flat addresses ⇒ impractical large forwarding tables
no separation of (sub-)networks possible ⇒ security and privacy concerns
3 Points
Question 2
7 Points
a)
address resolution protocol (ARP)
b)
local subnetwork
host broadcasts an ARP request message to all hosts within subnetwork;
this message requests the MAC address belonging to the IP of the destination host; the according destination host sends an ARP response message
containing its IP and MAC address
another subnetwork
host broadcasts an ARP request message to all hosts within subnetwork;
this message requests the MAC address belonging to the IP of the router
responsible for the destination host (the routers IP is derived by the hosts
routing table); the according router sends an ARP response message containing its IP and MAC address
Question 3
a)
24 bit subnetmask ⇒ 28 = 256 IP addresses within subnet
network address 10.0.1.0 not usable for a PC
broadcast address 10.0.2.255 not usable for a PC
⇒ 256 - 2 = 254 addresses usable for devices
b)
occurrence of shared segments (e.g. with repeaters, hubs)
no collisions of frames in switched Ethernet
a)
addresses of supernet completely covered by subnetworks
all subnetworks reachable over same interface
b)
smallest supernet including both subnetworks: 10.0.4.0/22
10.0.4.0/22 includes also 10.0.5.0/24 and 10.0.7.0/24
⇒ gaps in address range
Under normal conditions it would be not possible to build a supernet and
have a common routing entry.
However, in this special scenario neither 10.0.5.0/24 nor 10.0.7.0/24 is
used.
⇒ in principle it would work with entry 10.0.4.0/22
3 Points
Question 4
4 Points
Question 5
a)
2 Points
MAC(B eth 1)MAC(A eth 3)
IP(PC 1)IP(PC 3)
MAC DA
IP SA
Problem 2
MAC SA
IP DA
Page 6
Question 6
a)
Router A
8 Points
subnetwork
10.0.1.0/24
10.0.2.0/24
next hop
IP(C eth 1)
direct
interface
eth 2
eth 1
10.0.4.0/24
10.0.6.0/24
IP(B eth 1)
IP(B eth 1)
eth 3
eth 3
subnetwork
next hop
interface
10.0.1.0/24
10.0.2.0/24
10.0.4.0/24
IP(C eth 3)
IP(A eth 3)
direct
eth 2
eth 1
eth 4
10.0.6.0/24
direct
eth 3
subnetwork
next hop
interface
10.0.1.0/24
10.0.2.0/24
10.0.4.0/24
10.0.6.0/24
direct
IP(A eth 2)
IP(B eth 2)
eth 2
eth 1
eth 3
IP(B eth 2)
eth 3
Router B
Router C
(If the routing table of router A is fixed, the routing table of C may remain
unchanged for correct operation and vice versa.)
Question 7
5 Points
Question 8
b)
Traffic for 10.0.6.0/24 loops between A and C. TTL of IP packets is
reduced until they are discarded. PC 1 and PC 4 cannot reach PC 3.
10.0.4.0/24 has wrong interface at B. Packets for this subnet get lost within
10.0.6.0/24 (more precisely, the according MAC addresses cannot be
resolved). PC 2 ist not reachable by any other PC.
a)
IP addresses of interfaces, direct connected subnetworks and network mask
b)
OSPF
c)
each node has complete view on topology of network (link-state)
node knows only the next hop for each destination (distance-vector)
a)
a node receives a routing information update from each other node
⇒ (n-1) updates
b)
a node reiceives a routing information update from each neighboring node
⇒ m updates
4 Points
Problem 2
Page 7
Question 9
a)
a node receives from each other node n-1 updates ⇒ (n-1)2 updates
thereof (n-1) updates are not duplicates
⇒ (n-1) * (n-2) duplicates
b)
the number of received messages does not scale very well (n2) with increasing number of nodes
5 Points
Question 10 a)
single processor + pure delay system
⇒ offered traffic needs to be smaller than 1 Erlang
1000 / (60s) * h + 60000 / (5*60s) * 0.001 s < 1 Erlang
⇒ h < 48 ms
the processing time of a non-duplicate needs to be below 48 ms
4 Points
b)
Yes. In case of a link-state protocol there are not significantly more updates
in case if a network change (in contrast to a distance-vector protocol).
Question 11 a)
network topology + propagation delays + line rates + processing times
determine time needed for information spread in the network
used protocol determines the required number of updates until there is
again a consistent view (e.g. count-to-infinity problem)
update time interval
7 Points
b)
although the links itself might be still alive, this does not guarantee that the
routing engine is still working;
cost of links might have been changed
Question 12 Router A
6 Points
subnetwork
next hop
cost
S
S
S
S
B
C
D
0
2
3
5
subnetwork
S 1
S 2
S 3
next hop
A
C
cost
2
0
2
S 4
C
5
1
2
3
4
Router B
Problem 2
Page 8
Router C
subnetwork
S 1
S 2
next hop
A
B
cost
3
2
S 3
S 4
D
0
3
subnetwork
next hop
cost
S 1
S 2
S 3
A
C
C
5
5
3
S 4
-
0
subnetwork
next hop
cost
S
S
S
S
B
B
B
0
2
2
2
subnetwork
S 1
S 2
S 3
next hop
B
B
-
cost
2
2
0
S 4
B
2
subnetwork
S 1
S 2
next hop
C
C
cost
5
5
S 3
S 4
C
-
3
0
Router D
Question 13 a)
Router A
5 Points
1
2
3
4
Router C
Router D
b)
Problem 2
Subnet 4 is not reachable anymore from A, B and C as with A and C the
only routers directly connected to D route the traffic to B.
Page 9
Question 14 a)
7 Points
In order to solve the problem of Question 13 either A or C has to forward
the traffic for subnet 4 to D and not to B.
Example to achieve this:
Update sent to A
subnetwork
S 1
cost
0
S 2
S 3
S 4
0
0
0
Update sent to C
b)
Problem 2
subnetwork
S 1
S 2
cost
0
0
S 3
0
S 4
2 (or greater)
No, traffic exchanged between subnetworks 4 and 3 does not go over B.
Also traffic form subnetwork 4 to 1 does not go over B. All other traffic
goes over B.
Page 10