Sei sulla pagina 1di 35

Answer for EE3315 Test 1 2018-2019

Question 1. Consider the following network: [20 marks]

Say that the number on every link represents the cost of using this link. If the cost of
using the link between Node E and Node D is changed from 1 to 8, using
Dijkstra’s algorithm, compute the shortest path from Node E to all network nodes.
Use the table form below, but work out the results in your answer sheet. If there is a
tie, break it in favor of rightmost column. List out all the shortest paths from Node E
to all the other nodes.

N A B C D F G H
E   3, E 8, E 1, E  
E,F   3, E 4, F 7, F 
E,F,C 7, C 5, C 4, F 7, F 
E,F,C,D 7, C 5, C 5, D 
E,F,C,D,G 7, C 5, C 19, G
E,F,C,D,G,B 6, B 7, B
E,F,C,D,G,B,A 7, B
E,F,C,D,G,B,A,H

The shortest path from Node E to


A; ECBA
B: ECB
C: EC
D: EFD
F: EF
G: EFDG
H: ECBH

Question 2. Consider the Distance-Vector update shown in the Fig. Q.2 below. It shows
an existing table (i) in a gateway K, and update message (ii) from another gateway J.
Write down the changes in the table and give the reasons for those changes. Assume that
the distance between gateways K and J is 2. [8 marks]

1
Destination Distance Route
Net 1 0 Direct
Net 2 0 Direct
Net 17 2 Gate J
Net 18 5 Gate M
Net 24 5 Gate Q
Net 30 6 Gate M
Net 42 5 Gate J
(i) An existing routing table for a gateway K

Destination Distance
Net 1 3
Net 4 8
Net 17 4
Net 18 4
Net 24 5
Net 30 2
Net 42 5
(ii) An incoming routing update message from gateway J.

Figure Q.2

Destination Distance Route


Net 4 10 Gate J
Net 17 6 Gate J
Net 30 4 Gate J
Net 42 7 Gate J
Figure Q.2-1

For destination Net 4, it updates that a new route is setup via gateway J.
For destination Net 17, it updates that if passing via gateway J, it will take longer route.
For destination Net 30, it updates that a shorter distance resulting from routing via
gateway J.
For destination Net 42, it updates that if passing via gateway J, it will take longer route.

Question 3. In Figure Q.3, assume that link BC has gone down for a long time. Assume
A, B and D use split horizon with Poisoned Reverse. [26 marks]

3 3

1
B D

5 3

Figure Q.3

2
i. What distance to C will A report to D? 
ii. What distance to C will B report to D? 
iii. What distance to C will D report to A? 3
iv. What distance to C will D report to B? 3

Now, suppose link CD goes down.


v. What distance to C will D report to B? 
vi. At the same time, what is the distance to C that A reports to D? 
vii. At the same time, what is the distance to C that A reports to B? 6
viii. At the same time, what is the distance to C that B reports to D? 
ix. What does B then think the shortest path to C is? B-A-D-C
x. What does B then tell D about its distance to C? 9
xi. What does B then tell A about its distance to C? 
xii. What is D's route to C now? D-B-A-D-C
xiii. What does D then tell A the distance to C? 10

Question 4. Initially, we have the following distance vectors for the network below
Distance vector of y: (4, 0, 5)
Distance vector of z: (9, 5, 0)
Now link cost of y-x changes from 4 to 36. Using Distance Vector routing algorithm,
write down the steps showing that node y and node z update their distance vectors until
the routing algorithm converges. [16 marks]

y
4 5
x z
39

Answer for Question 4:


1. y updates its vector:
Dist. vector y: (14, 0, 5)
2. z updates its vector:
Dist. vector z: (19, 5, 0)
3. y updates its vector:
Dist. vector y: (24, 0, 5)
4. z updates its vector:
Dist. vector z: (29, 5, 0)
5. y updates its vector:
Dist. vector y: (34, 0, 5)
6. z updates its vector:
Dist. vector z: (39, 5, 0)
7. y updates its vector:
Dist. vector y: (36, 0, 5)
8. z updates its vector:
Dist. vector z: (39, 5, 0)

3
Question 5. Figure Q5 shows a network using Hierarchical Routing. Draw down the
topology of the network from Node 2C’s point of view under the use of Hierarchical
Routing. Write down the routing table for node 2C under Hierarchical Routing. Note that
for each destination, “next hop” and “number of hops” (to that destination) should be
included. [8 marks]

Region A Region C

1A 4A 1C 4C

2A 5A 2C
5C
3A 3C

1B 4B 1D
4D

2B 2D
5D
3B 5B 3D

Region B Region D

Figure Q5
Region A Region C

4A 1C
4C

2
2c
5C
3A 3C

1B 4D

2 2D 2

5B

Region B Region D

Routing table for 1C

Destination Next Hop No. of Hops


2C - -
1C 1C 1
3C 3C 1
4C 1C 2
5C 3C 2
A 1C 2
B 1C 5
D 3C 3

4
Question 6. Referring to Figure Q6, what is the path used (a) from 1a to 5a (b) from 1a to
6a, respectively, using the following routing algorithms? [12 marks]
1. The shortest path routing
2. The hot potato routing (with the shortest path routing outside AS1)
3. BGP routing with the elimination rules:
i. shortest AS-PATH
ii. shortest path to NEXT-HOP

6a
AS6 4a
AS4

5a
AS5
3c 2c
3a
3b 2a
AS3 2b
1b
AS2
1a
1c AS1
1d
Figure Q6

(a) From 1a to 5a
1. 1a-1c-1b-3a-5a
2. 1a-1c-2a-2b-2c-5a
3. 1a-1c-2a-2b-2c-5a

(b) From 1a to 6a
1. 1a-1c-2a-2b-4a-6a
2. 1a-1c-2a-2b-4a-6a
3. 1a-1c-1b-3a-3b-3c-6a

Question 7. In Figure Q.7, we assume that A, B, C are provider networks and X, W, Y


are customers of provider networks. In addition, Border Gateway Protocol (BGP) is used
between networks. State whether the following statements are true or false. Explain your
answer. [10 marks]
i) W is willing to advertise to A a route to C.
ii) A is willing to advertise to C the path ABX
iii) B is willing to advertise to A the path BX
iv) A is willing to advertise to W the path ABX
v) C is willing to advertise to A the path CBX

legend: provider
C network
W
X B customer
A network

Y
5
Figure Q.4 : A simple BGP scenario
i) False. W does not want to route from A via W to C since W gets no “revenue” for
that.
ii) False. A gets no “revenue” for routing ABX since neither X nor B are A’s
customers
iii) True. B gets “revenue” for routing ABX since X is B’s customer.
iii) True. A gets “revenue” for routing WABX since W is A’s customer.
iv) False. C gets no “revenue” for routing ACBX since neither X nor A are C’s
customers

- END -

6
Answer for EE3315 Test 1 2013-2014

Question 1. (16 marks)

Consider the following network:

If the cost between Node C and Node E becomes one, using Dijkstra’s algorithm,
compute the shortest path from Node E to all network nodes. Use the table form
below but work out the results in your answer sheet. If there is a tie, break it in favor
of leftmost column. List out all the shortest paths from Node E to all the other nodes.

N A B C D F G H
E   1, E 1, E 1, E  
E,C 5, C 3, C 1,E 1, E  
E,C,D 5, C 3, C 1,E 2, D 
E,C,D,F 5, C 3, C 2, D 
E,C,D,F,G 5, C 3, C 16, G
E,C,D,F,G,B 4, B 5, B
E,C,D,F,G,B,A 5, B
E,C,D,F,G,B,A,H

The shortest path from Node E to


A; ECBA
B: ECB
C: EC
D: ED
F: EF
G: EDG
H: ECBH

1
Question 2. (8 marks)

Consider the Vector-Distance update shown in the Fig. Q2 below. It shows an existing
table (i) in a gateway K, and update message (ii) from another gateway J. Write down the
changes in the table and give the reasons for those changes. Assume that the distance
between gateway K and J is 3.
Destination Distance Route
Net 1 0 Direct
Net 2 0 Direct
Net 4 8 Gate L
Net 17 8 Gate M
Net 24 2 Gate J
Net 30 5 Gate J
Net 42 4 Gate Q
(i) An existing routing table for a gateway K

Destination Distance
Net 1 2
Net 4 2
Net 5 4
Net 17 1
Net 24 3
Net 30 1
Net 42 2
(ii) An incoming routing update message from gateway J.

Figure Q2

Destination Distance Route


Net 4 5 Gate J
Net 5 7 Gate J
Net 17 4 Gate J
Net 24 6 Gate J
Net 30 4 Gate J
Figure Q2-1

For destination Net 4, it updates that a shorter distance resulting from routing via gateway
J.

For destination Net 5, it updates that a new route is setup via gateway J.

For destination Net 17, it updates that a shorter distance resulting from routing via
gateway J.

For destination Net 24, it updates that if passing via gateway J, it will take longer route.

For destination Net 30, it updates that a shorter distance resulting from routing via
gateway J.

2
Question 3. (26 marks)

In Figure Q3, assume that link AD has gone down for a long time. Assume B, C and D
use split horizon with Poisoned Reverse.

3 5

1
D
B

3
3

Figure Q3

i. What distance to A will D report to B? 


ii. What distance to A will B report to D? 5
iii. What distance to A will D report to C? 6
iv. What distance to A will C report to D? 8

Now, suppose link AB goes down.


v. What distance to A will B report to C? 
vi. At the same time, what distance to A will C report to B? 
vii. At the same time, what is the distance to A that D reports to B? 
viii. At the same time, what is the distance to A that D reports to C? 6
ix. What does C then think the shortest path to A is? C-D-B-A
x. What does C then tell B about its distance to A? 9
xi. What does C then tell D about its distance to A? 
xii. What is B's route to A now? B-C-D-B-A
xiii. What does B then tell D the distance to A? 12

Question 4. (10 marks)

Figure Q4 shows a network using Hierarchical Routing. Draw down the topology of the
network from Node 3B’s point of view under the use of Hierarchical Routing. Write
down the routing table for node 3B. Note that for each destination, “next hop” and
“number of hops” (to that destination) should be included.

3
Region A Region C

1A 4A 1C 4C

2A 5A 2C
5C
3A 3C

1B 4B 1D
4D

2B 2D
5D
3B 5B 3D

Region B Region D

Figure Q4

Region A Region C

4A 1C
2
2

5C
3A
Routing table for 1C

1B 4B 4D

2B 2D 2

3B 5B

Region B Region D

Destination Next Hop No. of Hops


3B - -
1B 2B 2
2B 2B 1
4B 5B 2
5B 5B 1
A 2B 3
C 5B 5
D 5B 2

Question 5. (16 marks)

Using TCP EA-RTT estimator (Exponential Average Round-Trip Time estimator), we


have the following equation:

EA-RTT(K + 1) = (1 – α) × EA-RTT(K) + α × RTT(K).

(i) Assume that all the RTT(K) are the same and equal to RTT. Write down the

4
expression for EA-RTT(n) in terms of EA-RTT(2) and RTT. Hint: The equation
for calculating EA-RTT can be rewritten to simplify the calculation, using the
equation (1 + … + n-2 + n-1) = (1 – n)/(1- ). [10 marks]

(ii) Choose  = 0.2 and EA-RTT(2) = 2 seconds, and assume all measured RTT
values = 5 second and no packet loss. What is EA-RTT(30) using the expression
written in (i)? [6 marks]

(i) EA-RTT(n) = (1 – ) n-2 EA-RTT(2) +  × RTT ((1 – ) n-3 + (1 – ) n-4 + … + 1)


= (1 – ) n-2 EA-RTT(2) + RTT [1 – (1 – ) n-2]

(ii) EA-RTT(30) = (1–0.2)28 ×2 + 5 [1 – (1–0.2)28] = 4.994 sec

Question 6. (12 marks)

Imagine that a white army is encamped in a valley. On both of the surrounding hillsides
are blue armies. The white army is larger than either of the blue armies alone, but
together the blue armies are larger than the white army. If either blue army attacks by
itself, it will be defeated, but if the two blue armies attack simultaneously, they will be
victories. The blue armies want to synchronize their attacks. However, their only
communication medium is to send messengers on foot down into the valley, where they
might be captured and the message lost.
a) Does a protocol exist that allows the blue armies to win? [4 marks]
b) What is the concern of the side of blues armies who sends the last message for
attacking the white army? [4 marks]
c) What conclusion we can draw from this “two-army problem” for the
connection termination problem? [4 marks]

a) No, it does not exist.

b) They are not sure that their message can get through so they may not take the risk to
attack.

c) No protocol exits that allows two users to synchronize their connection termination
through an unreliable channel/network where disconnection messages could be lost.

Question 7. (12 marks)

After Host A reaches the expected timeout limit in the following four situations, describe
whether Host A will retransmit any segment(s) or not and the reason behind.

5
(a) (b)

(c) (d)

6
(a) Host A will not retransmit segment after the timeout since the acknowledgment
(ACK=120) was received before the timeout meaning the segments with sequence
number 92 has been successfully received.
(b) Host A will not retransmit segment after the timeout since the acknowledgment
(ACK=120) was received before the timeout meaning the segments with sequence
number 92 has been successfully received.
(c) Host A will not retransmit segment after the timeout since the corresponding
acknowledgment (i.e. ACK=100) was received before the timeout meaning the
segments with sequence number 92 has been successfully received.
(d) Host A will not retransmit segment after the timeout since the corresponding
acknowledgment (i.e. ACK=100) was received before the timeout meaning the
segments with sequence number 92 has been successfully received.

- END -

7
Answer for EE3315 Test 1 2014-2015

Question 1. Consider the following network: [20 marks]

Say that the number on every link represents the cost of using this link. If the cost of
using the link between Node E and Node F is changed from 1 to 3, using
Dijkstra’s algorithm, compute the shortest path from Node E to all network nodes.
Use the table form below, but work out the results in your answer sheet. If there is a
tie, break it in favor of rightmost column. List out all the shortest paths from Node E
to all the other nodes.

N A B C D F G H
E   3, E 1, E 3, E  
E,D  10, D 2, D 3, E 2, D 
E,D,G  6, G 2, D 3, E 16, G
E,D,G,C 6, C 4, C 3, E 16, G
E,D,G,C,F 6, C 4, C 16, G
E,D,G,C,F,B 5, B 6, B
E,D,G,C,F,B,A 6, B
E,D,G,C,F,B,A,H

The shortest path from Node E to


A; EDCBA
B: EDCB
C: EDC
D: ED
F: EF
G: EDG
H: EDCBH

Question 2. Consider the Distance-Vector update shown in the Fig. Q.2 below. It shows
an existing table (i) in a gateway K, and update message (ii) from another gateway J.
Write down the changes in the table and give the reasons for those changes. Assume that
the distance between gateways K and J is 3. [8 marks]

1
Destination Distance Route
Net 1 0 Direct
Net 2 0 Direct
Net 4 8 Gate L
Net 17 8 Gate M
Net 24 8 Gate J
Net 30 5 Gate Q
Net 42 4 Gate J
(i) An existing routing table for a gateway K

Destination Distance
Net 1 2
Net 4 8
Net 17 2
Net 18 4
Net 24 3
Net 30 8
Net 42 2
(ii) An incoming routing update message from gateway J.

Figure Q.2

Destination Distance Route


Net 17 5 Gate J
Net 18 7 Gate J
Net 24 6 Gate J
Net 42 5 Gate J
Figure Q.2-1

For destination Net 17, it updates that a shorter distance resulting from routing via
gateway J.
For destination Net 18, it updates that a new route is setup via gateway J.
For destination Net 24, it updates that a shorter distance resulting from routing via
gateway J.
For destination Net 42, it updates that if passing via gateway J, it will take longer route.

Question 3. In Figure Q.3, assume that link CD has gone down for a long time. Assume
A, B and D use split horizon with Poisoned Reverse. [26 marks]

3 3

1
B D

5 3

Figure Q.3

2
i. What distance to C will A report to D? 8
ii. What distance to C will B report to D? 5
iii. What distance to C will D report to A? 6
iv. What distance to C will D report to B? 

Now, suppose link BC goes down.


v. What distance to C will B report to A? 
vi. At the same time, what is the distance to C that D reports to A? 6
vii. At the same time, what is the distance to C that A reports to B? 
viii. At the same time, what is the distance to C that D reports to B? 
ix. What does A then think the shortest path to C is? A-D-B-C
x. What does A then tell B about its distance to C? 9
xi. What does A then tell D about its distance to C? 
xii. What is B's route to C now? B-A-D-B-C
xiii. What does B then tell D the distance to C? 12

Question 4. In Figure Q.4, we assume that A, B, C are provider networks and X, W, Y


are customers of provider networks. In addition, Border Gateway Protocol (BGP) is used
between networks. State whether the following statements are true or false. Explain your
answer. [8 marks]
i) W is willing to advertise to C a route to B.
ii) A is willing to advertise to C the path AX
iii) C is willing to advertise to W the path CAX
iv) C is willing to advertise to B the path CAX

legend: provider
C network
W
X A customer
B network

Figure Q.4 : A simple BGP scenario


i) False. W does not want to route from C via W to B since W gets no “revenue” for
that.
ii) True. A gets “revenue” for routing CAX since X is A’s customer.
iii) True. C gets “revenue” for routing WCAX since W is C’s customer.
iv) False. C gets no “revenue” for routing BCAX since neither X nor B are C’s
customers

Question 5. Referring to Figure Q5, what is the path used (a) from 1a to 5a (b) from 1a to
6a, respectively, using the following routing algorithms? [12 marks]
1. The shortest path routing
2. The hot potato routing (with the shortest path routing outside AS1)
3. BGP routing with the elimination rules:
i. shortest AS-PATH
ii. shortest path to NEXT-HOP

3
5a
AS5 4a
AS4

6a
AS6
2c 3c
2a
2b 3a
AS2 3b
1c
AS3
1a
1b AS1
1d
Figure Q5

(a) From 1a to 5a
1. 1a-1b-3a-3b-4a-5a
2. 1a-1b-3a-3b-4a-5a
3. 1a-1b-1c-2a-2b-2c-5a

(b) From 1a to 6a
1. 1a-1b-1c-2a-6a
2. 1a-1b-3a-3b-3c-6a
3. 1a-1b-3a-3b-3c-6a

Question 6. [14 marks]

Initially, we have the following distance vectors for the network below:
Distance vector of y: (5, 0, 2)
Distance vector of z: (7, 2, 0)
Now link cost of x-y changes from 5 to 60. Using Distance Vector routing algorithm,
write down the steps showing that node y and node z update their distance vectors until
the routing algorithm converges.

Answer for Question 6:

1. y updates its vector:


Dist. vector y: (9, 0, 2)
2. z updates its vector:
Dist. vector z: (11, 2, 0)

4
3. y updates its vector:
Dist. vector y: (13, 0, 2)
4. z updates its vector:
Dist. vector z: (15, 2, 0)
5. y updates its vector:
Dist. vector y: (17, 0, 2)
6. z updates its vector:
Dist. vector z: (16, 2, 0)
7. y updates its vector:
Dist. vector y: (18, 0, 2)

Question 7. [12 marks]

Let link cost be equal to the amount of carried traffic in a link. Let the traffic from node
B, node C and node D to node A be 1 unit, 2 units and 4 units, respectively. According to
the routing decision initially given by the following figure, draw down three
corresponding figures if we use Link State routing algorithm three times to find the
shortest paths to node A.

Answer for Question 7:

- END -

5
Answer for EE3315 Test 1 2015-2016

Question 1. (8 marks)
Consider the Distance-Vector update shown in the Fig. Q.1 below. It shows an existing
table (i) in Gateway K, and update message (ii) from Gateway J. Write down the changes
in the table and give the reasons for those changes. Assume that the distance between
Gateway K and J is 2.

Destination Distance Route


Net 1 0 Direct
Net 2 0 Direct
Net 4 8 Gate L
Net 17 2 Gate M
Net 25 3 Gate J
Net 30 5 Gate Q
Net 44 4 Gate J
(i) An existing routing table for a gateway K

Destination Distance
Net 1 2
Net 4 1
Net 17 2
Net 25 4
Net 26 3
Net 30 8
Net 44 1
(ii) An incoming routing update message from gateway J.

Figure Q.1

Destination Distance Route


Net 4 3 Gate J
Net 25 6 Gate J
Net 26 5 Gate J
Net 44 3 Gate J
Figure Q.1a

For destination Net 4, it updates that a shorter distance resulting from routing via gateway
J.
For destination Net 25, it updates that if passing via gateway J, it will take longer route.
For destination Net 26, it updates that a new route is setup via gateway J.
For destination Net 44, it updates that a shorter distance resulting from routing via
gateway J.

1
Question 2. (16 marks)
Let link cost be equal to the amount of carried traffic in a link, and let the traffic from
node B, node C and node D to node A be 2 units, 4 units and 2 units, respectively.
According to the routing decision initially given by Figure Q.2, draw three corresponding
figures if we use Link State routing algorithm three times to find new shortest paths to
node A resulting in new costs.

Figure Q.2

Answer for Question 2:

Question 3. (26 marks)


In Figure Q.3, assume that link CD has gone down for a long time. Assume A, B and C
use split horizon with Poisoned Reverse.

3 3

1
B C

5 3

Figure Q.3

2
i. What is the distance to D that C reports from C to A? 6
ii. What is the distance to D that C reports from C to B? 
iii. What is the distance to D that A reports from A to C? 8
iv. What is the distance to D that B reports from B to C? 5

Now, suppose link BD goes down.


v. What is the distance to D that B reports from B to A? 
vi. At the same time, what is the distance to D that C reports from C to B? 
vii. At the same time, what is the distance to D that C reports from C to A? 6
viii. At the same time, what is the distance to D that A reports from A to B? 
ix. What will A think the shortest path from A to D is? A-C-B-D
x. What will A tell B about its distance from A to D? 9
xi. What will A tell C about its distance from A to D? 
xii. What is B's route to D now? B-A-C-B-D
What will B tell C the distance from B to D? 12

Question 4. (16 marks)


Consider the following network:

Say that the number on every link represents the cost of using this link. If the cost of
using the link between Node E and Node D is changed from 1 to 5, using
Dijkstra’s algorithm, compute the shortest path from Node E to all nodes in the
network. Use the table below, but work out the results in your answer book. If there is
a tie, break it in favor of rightmost column. List out all the shortest paths from Node
E to all the other nodes and their corresponding costs.

N A B C D F G H
E   3, E 5, E 1, E  
E,F   3, E 4, F 7, F 
E,F,C 7, C 5, C 4, F 7, F 
E,F,C,D 7, C 5, C 5, D 
E,F,C,D,G 7, C 5, C 19, G
E,F,C,D,G,B 6, B 7, B
E,F,C,D,G,B,A 7, B
E,F,C,D,G,B,A,H

3
The shortest path from Node E to
A: ECBA, Cost: 6
B: ECB Cost: 5
C: EC Cost: 3
D: EFD Cost: 4
F: EF Cost: 1
G: EFDG Cost: 5
H: ECBH Cost: 7

Question 5. (8 marks)
In Figure Q.5, we assume that A, B, C are provider networks and X, W, Y are customers
of provider networks. In addition, Border Gateway Protocol (BGP) is used between
networks. State whether the following statements are true or false. Explain your answer.

i) W is not willing to advertise to C a route to A.


ii) B is not willing to advertise to C the path BX.
iii) C is not willing to advertise to W the path CBX.
iv) C is not willing to advertise to A the path CBX.

legend: provider
C network
W
X B customer
A network

Figure Q.5 : A simple BGP scenario


i) True. W does not want to route from C via W to A since W gets no “revenue” for
that.
ii) False. B gets “revenue” for routing CBX since X is B’s customer.
iii) False. C gets “revenue” for routing WCBX since W is C’s customer.
iv) True. C gets no “revenue” for routing ACBX since neither X nor A are C’s
customers

Question 6. (14 marks)


Initially, we have the following distance vectors for the network below:
Distance vector of y: (2, 0, 5)
Distance vector of z: (7, 5, 0)
Now link cost of x-y changes from 2 to 33. Using Distance Vector routing algorithm,
write down the steps showing that how node y and node z update their distance vectors
until the routing algorithm converges.

4
Answer for Question 6:
1. y updates its vector:
Dist. vector y: (12, 0, 5)
2. z updates its vector:
Dist. vector z: (17, 5, 0)
3. y updates its vector:
Dist. vector y: (22, 0, 5)
4. z updates its vector:
Dist. vector z: (27, 5, 0)
5. y updates its vector:
Dist. vector y: (32, 0, 5)
6. z updates its vector:
Dist. vector z: (34, 5, 0)
7. y updates its vector:
Dist. vector y: (33, 0, 5)

Question 7. (12 marks)


Figure Q7 shows a network using Hierarchical Routing. Draw down the topology of the
network from Node 2C’s point of view under the use of Hierarchical Routing. Write
down the routing table for Node 2C. Note that for each destination, “next hop” and
“number of hops” (to that destination) should be included.

Figure Q7

5
Answer for Question 7:

Routing table for 2C

Destination Next Hop No. of Hops


2C - -
1C 1C 1
3C 3C 1
4C 1C 2
5C 3C 2
A 1C 2
B 1C 5
D 3C 3

- END -

6
Answer for EE3315 Test 1 2016-2017 SemB

Question 1. [8 marks]
Consider the Distance-Vector update shown in the Fig. Q.1 below. It shows an existing
table (i) in a gateway K, and update messages (ii) from another gateway J and (iii) from
another gateway M. Write down the changes in the table and give the reasons for those
changes. Assume that the distance between gateways K and J is 2 and the distance
between gateways K and M is 3.

Destination Distance Route


Net 1 0 Direct
Net 2 0 Direct
Net 4 8 Gate L
Net 17 2 Gate M
Net 25 3 Gate J
Net 30 5 Gate Q
Net 44 4 Gate J
(i) An existing routing table for a gateway K

Destination Distance
Net 1 2
Net 4 4
Net 17 6
Net 25 4
Net 27 5
Net 30 8
Net 44 10
(ii) An incoming routing update message from gateway J.

Destination Distance
Net 1 2
Net 4 1
Net 17 4
Net 25 4
Net 27 3
Net 30 7
Net 44 4
(iii) An incoming routing update message from gateway M.

Figure Q.1

Destination Distance Route


Net 4 4 Gate M
Net 17 7 Gate M
Net 25 6 Gate J
Net 27 6 Gate M
Net 44 7 Gate M
Figure Q.1a

1
For destination Net 4, it updates that a shorter distance resulting from routing via gateway
M.
For destination Net 17, it updates that if passing via gateway M, it will take longer route.
For destination Net 25, it updates that if passing via gateway J, it will take longer route.
For destination Net 27, it updates that a new route is setup via gateway M.
For destination Net 44, it updates that a shorter distance resulting from routing via
gateway M compared with the updated route via gateway J.

Question 2. [26 marks]


In Figure Q.2, assume that the network has been operating for a long time. Assume A, B
and C use split horizon with Poisoned Reverse.

3 3

1
B C
D

5 3

D
C

Figure Q.2

i. What distance to D will C report to A? 3


ii. What distance to D will C report to B? 3
iii. What distance to D will A report to C? 
iv. What distance to D will B report to C? 

Now, suppose link BD goes down.


v. What distance to D will B report to A? 4
vi. At the same time, what is the distance to D that C reports to B? 3
vii. At the same time, what is the distance to D that C reports to A? 3
viii. At the same time, what is the distance to D that A reports to B? 6
ix. What does A then think the shortest path to D is? A-C-D
x. What does A then tell B about its distance to D? 6
xi. What does A then tell C about its distance to D? 
xii. What is B's route to D now? B-C-D
xiii. What does B then tell C the distance to D? 

Question 3. [16 marks]


Let link cost be equal to the amount of carried traffic in a link. Let the traffic from node
B, node C and node D to node A be 2 units, 4 units and 5 units, respectively. According
to the routing decision initially given by the following figure, draw down three
corresponding figures if we use Link State routing algorithm three times to find new
shortest paths to node A resulting in new costs.

2
Answer for Question 3:

Question 4. [16 marks]


Consider the following network:

Say that the number on every link represents the cost of using this link. If the cost of
using the link between Node E and Node D is changed from 1 to 4 and the cost of
using the link between Node E and Node C is changed from 3 to 1, using Dijkstra’s
algorithm, compute the shortest path from Node E to all network nodes. Use the table
form below, but work out the results in your answer sheet. If there is a tie, break it in
favor of leftmost column. List out all the shortest paths from Node E to all the other

3
nodes and their corresponding costs.

N A B C D F G H
E   1,E 4,E 1,E  
E,C 5,C 3,C 2,C 1,E  
E,C,F 5, C 3,C 2,C 7, F 
E,C,F,D 5,C 3,C 3,D 
E,C,F,D,B 4,B 3,D 5,B
E,C,F,D,B,G 4,B 5,B
E,C,F,D,B,G,A 5,B
E,C,F,D,B,G,A,H

The shortest path from Node E to


A: ECBA Cost: 4
B: ECB Cost: 3
C: EC Cost: 1
D: ECD Cost: 2
F: EF Cost: 1
G: ECDG Cost: 3
H: ECBH Cost: 5

Question 5. [8 marks]
In Figure Q.5, we assume that A, B, C are provider networks and X, W, Y are customers
of provider networks. In addition, Border Gateway Protocol (BGP) is used between
networks. State whether the following statements are true or false. Explain your answer.
i) W is willing to advertise to A a route to C.
ii) B is willing to advertise to A the path BX
iii) A is willing to advertise to W the path ABX
iv) A is willing to advertise to Y the path ABX

legend: provider
C network
W
X B customer
A network

Figure Q.5 : A simple BGP scenario


i) False. W does not want to route from A via W to C since W gets no “revenue” for
that.
ii) True. B gets “revenue” for routing ABX since X is B’s customer.
iii) True. A gets “revenue” for routing WABX since W is A’s customer.
iv) True. A gets “revenue” for routing YABX since y is A’s customer.

4
Question 6. [12 marks]
Referring to Figure Q6, what is the path used (a) from 2a to 5a (b) from 2a to 6a,
respectively, using the following routing algorithms?

1. The shortest path routing


2. The hot potato routing (with the shortest path routing outside AS2)
3. BGP routing with the elimination rules:
i. shortest AS-PATH
ii. shortest path to NEXT-HOP

5a
AS5 3a
AS3

6a
AS6
1c 4c
1a
1b 4a
AS1 4b
2c
AS4
2a
2b AS2
2d
Figure Q6

(a) From 2a to 5a
1. 2a-2b-4a-4b-3a-5a
2. 2a-2b-4a-4b-3a-5a
3. 2a-2b-2c-1a-1b-1c-5a

(b) From 2a to 6a
1. 2a-2b-2c-1a-6a
2. 2a-2b-4a-4b-4c-6a
3. 2a-2b-4a-4b-4c-6a

Question 7. [14 marks]


Initially, we have the following distance vectors for the network below
Distance vector of y: (2, 0, 5)
Distance vector of z: (7, 5, 0)
Now link cost of y-z changes from 5 to 28. Using Distance Vector routing algorithm,
write down the steps showing that node y and node z update their distance vectors until
the routing algorithm converges.

5
Answer for Question 2d:
1. y updates its vector:
Dist. vector y: (2, 0, 9)
2. z updates its vector:
Dist. vector z: (30, 28, 0)
3. y updates its vector:
Dist. vector y: (2, 0, 13)
4. z updates its vector:
Dist. vector z: (30, 28, 0)
5. y updates its vector:
Dist. vector y: (2, 0, 17)
6. z updates its vector:
Dist. vector z: (30, 28, 0)
7. y updates its vector:
Dist. vector y: (2, 0, 21)
8. z updates its vector:
Dist. vector z: (30, 28, 0)
9. y updates its vector:
Dist. vector y: (2, 0, 25)
10. z updates its vector:
Dist. vector z: (30, 28, 0)
11. y updates its vector:
Dist. vector y: (2, 0, 28)

Or
1. y updates its vector:
Dist. vector y: (2, 0, 9)
2. z updates its vector:
Dist. vector z: (30, 28, 0)
3. y updates its vector:
Dist. vector y: (2, 0, 13)
4. y updates its vector:
Dist. vector y: (2, 0, 17)
5. y updates its vector:
Dist. vector y: (2, 0, 21)
6. y updates its vector:
Dist. vector y: (2, 0, 25)
7. y updates its vector:
Dist. vector y: (2, 0, 28)

- END -

6
Answer for EE3315 Test 1 2017-2018B

1. Consider the following network: [20 marks]

4
1 41
4
3

If the cost between Node F and Node G becomes one, using Dijkstra’s algorithm,
compute and write down the shortest path from Node E to all network nodes. Use the
table form below but work out the results in your answer book. If there is a tie, break
it in favor of rightmost column.

N A B C D F G H
E   3, E 1, E 1, E  
E,F   3, E 1, E 2, F 
E,F,D  10, D 2, D 2, F 
E,F,D,G  6, G 2, D 16, G
E,F,D,G,C 6, C 4, C 16, G
E,F,D,G,C,B 5, B 6, B
E,F,D,G,C,B,A 6, B
E,F,D,G,C,B,A,H

The shortest path from Node E to


A; EDCBA
B: EDCB
C: EDC
D: ED
F: EF
G: EFG
H: EDCBH

1
2. In Figure Q.2, we assume that A,B,C are provider networks and X,W,Y are customers
of provider networks. In addition, Border Gateway Protocol (BGP) is assumed to be used
between networks. State whether the following statements are true or false. Explain your
answer. [8 marks]
i) X is willing to advertise to B a route to C.
ii) A is willing to advertise to B the path AW
iii) B is willing to advertise to X the path BAW
iv) B is willing to advertise to C the path BAW

legend: provider
B network
X
W A customer
C network:

Figure Q.2 : A simple BGP scenario

i) False. X does not want to route from B via X to C since X gets no “revenue” for
that.
ii) True. A gets “revenue” for routing BAW since W is A’s customer.
iii) True. B gets “revenue” for routing XBAW since X is B’s customer.
iv) False. B gets no “revenue” for routing CBAW since neither W (or A) nor C are
B’s customers

4 3

1
B
C

3
3

Figure Q.3

2
3. In Figure Q.3, assume that link AC has gone down for a long time. If B, C and D use
split horizon with Poisoned Reverse. [26 marks]

i. What distance to A will D report to C? 7


ii. What distance to A will C report to D? 5
iii. What distance to A will B report to C? 4
iv. What distance to A will C report to B? 
Now, suppose the AB link goes down.
v. What distance to A will B report to D? 
vi. At the same time, what distance to A will D report to B? 
vii. At the same time, what is the distance to A that C reports to D? 5
viii. At the same time, what is the distance to A that C reports to B? 
ix. What does D then think the shortest path to A is? D-C-B-A
x. What does D then tell C about its distance to A? 
xi. What does D then tell B about its distance to A? 8
xii. What is B's route to A now? B-D-C-B-A
xiii. What does B then tell C the distance to A? 11

4. Consider a subnet with routers A, B, C, D, and E, distance vector routing is used; and
the following vectors have just come in to router C: from A indicating the delay to routers
A, B, C, D, and E: (0,6,3,2,4); from B: (6,0,8,11,6); from D: (16,2,6,0,7); and from E:
(8,6,3,4,0). The measured delays from router C to its neighbours A, B, D, and E, are 3, 2,
3, and 5, respectively. Assume that C’s original routing table indicating the delay to
routers A, B, C, D, and E (1,7,0,4,4) and the next routers to be used (A, B, −, D, A). What
is C’s new routing table? Give both the next router to be used and the expected delay.
[14 marks]
Going via A gives (3, 9, 6, 5, 7)
Going via B gives (8, 2, 10, 13, 8)
Going via D gives (19, 5, 9, 3, 10)
Going via E gives (13, 11, 8, 19, 5)
The original table is (1, 7, 0, 4, 5)

C’s new routing table indicating the delay (3,2,0,3,5) and the next routers (A, B, −, D, E).

5. Consider the Vector-Distance update shown in the Fig. Q. 5 below. It shows an


existing table i) in a gateway K, and update message ii) from another gateway J.
Write down the changes in the table and give the reasons for those changes. Assume
that the distance between gateway K and J is 2. [16 marks]
Destination Distance Route
Net 1 0 Direct
Net 2 0 Direct
Net 4 8 Gate L
Net 17 4 Gate M
Net 24 5 Gate J
Net 30 10 Gate Q
Net 42 4 Gate J
i) An existing routing table for a gateway K

3
Destination Distance
Net 1 2
Net 4 2
Net 17 1
Net 24 4
Net 30 12
Net 40 4
Net 42 2
ii) An incoming routing update message from gateway J.

Figure Q. 5

Destination Distance Route


Net 4 4 Gate J
Net 17 3 Gate J
Net 24 6 Gate J
Net 40 6 Gate J
Figure Q. 5.1

For destination Net 4, it updates that a shorter distance resulting from routing via gateway
J.
For destination Net 17, it updates that a shorter distance resulting from routing via
gateway J.
For destination Net 24, it updates that if passing via gateway J, it will take longer route.
For destination Net 40, it updates that a new route is setup via gateway J.

6. Initially, we have the following distance vectors for the network below
Distance vector of y: (4, 0, 5)
Distance vector of x: (0, 4, 9)
Now link cost of y-z changes from 5 to 36. Using Distance Vector routing algorithm,
write down the steps showing that node y and node x update their distance vectors until
the routing algorithm converges. [16 marks]

y
4 5
x z
34

4
Answer for Question 6:
1. y updates its vector:
Dist. vector y: (4, 0, 13)
2. x updates its vector:
Dist. vector x: (0, 4, 17)
3. y updates its vector:
Dist. vector y: (4, 0, 21)
4. x updates its vector:
Dist. vector x: (0, 4, 25)
5. y updates its vector:
Dist. vector y: (4, 0, 29)
6. x updates its vector:
Dist. vector x: (0, 4, 33)
7. y updates its vector:
Dist. vector y: (4, 0, 36)
8. x updates its vector:
Dist. vector x: (0, 4, 34)

- END -

Potrebbero piacerti anche