You are on page 1of 7

Fall 2014 Computer Communication Networks

Final Exam_sol (Exam date: 2015/01/14)


Question 1(8%):
Create a system of three LANs with four bridges. The bridges (B1 to B4)
connect the LANs as follows:
a. B1 connects LAN 1 and LAN 2.
b. B2 connects LAN 1 and LAN 3.
c. B3 connects LAN 2 and LAN 3.
d. B4 connects LAN 1, LAN 2 and LAN 3.
Choose B1 as the root bridge. Show the forwarding and blocking ports,
after applying the spanning tree procedure.
The following figure shows one possible solution. We have shown the
network, the graph, the spanning tree, and the blocking ports.

1/7

Question 2(8%):
An Organization is granted the block 130.56.0.0/16. The administrator
wants to create 1024 fixed-length subnets.
a. Find the number of addresses in each subnet.
b. Find the subnet mask.
c. Find the first and last addresses in the first subnet.
d. Find the first and last addresses in the last subnet.
a. Each subnet can have Nsub = 65,536 /1024 = 64 addresses.
b. The subnet prefix for each subnet is nsub = 32 log2Nsub = 32 6 = 26.
c. Now we can calculate the first and the last address in the first subnet.
The first address is the beginning address of the block; the last
address is the first address plus 63.
First address: 130.56.0.0/26
Last address: 130.56.0.63/26
d. To find the first address in subnet 1024, we need to add 65,472 (1023
64) in base 256 (0.0.255.192) to the first address in subnet 1. The
last address can then be found by adding 63 to the first.
First address: 130. 56.255.192/26
Last address: 130. 56.255.255/26

Question 3(6%):
Find the topology of the network if the following is the routing table for
R1.
Mask
Network
Next-Hop
Interface
Address
Address
/27
202.14.17.224
N/A
m1
/18
145.23.192.0
N/A
m0
Default
Default
130.56.12.4
m2

2/7

Question 4 (10%):
An IPv4 datagram has arrived with the following information in the
header (in hexadecimal):
0x45 00 00 34 00 00 40 00 3a 06 fe 33 a3 1c 05 20 8c 71 0d e3
a. Calculate and check whether the packet is corrupted. (5%)
b. Are there any options? (1%)
c. Is the packet fragmented? (1%)
d. What is the size of the data? (1%)
e. How many more routers can the packet travel to? (1%)
f. What is the identification number of the packet? (1%)

a. 0x4500+0x34+0x0+0x4000+0x3a06+0xfe33+0xa31c+0x0520+0x8c71+
0x0de3=0x2fffd
0xfffd+0x2=0xffff
The packet is not corrupted.
b. IHL=0x5length=20 bytesNo options
c. DF=1No
d. 20 bytes
e. 58 routers
f. 0

3/7

Question 5 (10%):
Use Dijkstras algorithm to find the shortest path tree and the forwarding
table for node A in following figure.

Shortest path tree:

Forwarding table

4/7

Question 6 (8%):
Assume that the network in the following figure uses distance vector
routing with the forwarding table as shown for each node. If node E is
added to the network with a link of cost 1 to node D, can you find the
new forwarding tables for each node?

Question 7 (10%):
Compare NAT and DHCP. Both can solve the problem of a shortage of
addresses in an organization, but by using different strategies.
Both NAT and DHCP can be used for this purpose. DHCP dynamically
assigns one of the assigned addressed when a host needs to access the
Internet; NAT permanently assigns a set of private addresses to the host,
but maps the private address to the global address when a host needs to
use the Internet.

5/7

Question 8 (10%):
In computer science, when we encounter an algorithm, we often need to
ask about the complexity of that algorithm (how many computations we
need to do). To find the complexity of Dijkstras algorithm, find the
number of searches we have to do to find the shortest path for a single
node when the number of nodes is n.
The number of searches in each iteration of Dijkstras algorithm is
different. In the first iteration, we need n number of searches, in the
second iteration, we need (n-1), and finally in the last iteration, we need
only one. In other words, the total number of searches for each node to
find its own shortest-path tree is
Number of searches=n+n-1+n-2+n-3++3+2+1=n(n+1)/2
The series can be calculated if it is written twice: once in order and once
in the reverse order. We then have n items, each of value (n + 1), which
results in n(n+1). However, we need to divide the result by 2. In
computer science, this complexity is written as O(n2) and is referred to
as Big-O notation.

Question 9 (10%):
Suppose a network uses distance-vector routing. Explain what happen if:
a. The router fails to claim a link that is attached to it.
b. The router claims to have a link that does not exist.
a. The link will be eventually omitted from the routing tables and as a
result will not be utilized. This will result in some routing decisions
that are not the shortest (optimal) paths. Loss of connectivity is also
possible. Moreover, a routing loop may occur due to confusion
among routers as to which links they are attached to.
b. If a router claims to have a link that does not exist, it reports false
topology information to other routers within the network. If this
non-existing link belongs to a shortest path, all the packets that are
sent via this path will be lost. This will affect the network
performance severely.

6/7

Question 10 (4%)
In an IPv4 datagram, the value of total-length field is (00A0)16 and the
value of the header-length (HLEN) is (5)16. How many bytes of payload
are being carried by the datagram? What is the efficiency (ratio of the
payload length to the total length) of this datagram?
The total length of the datagram is (00A0)16=160bytes. The header
length is 5*4=20. The size of the payload is then 160-20=140. The
efficiency=140/160=87.5%

Question 11 (6%)
Which fields of the IPv4 main header may change from router to router?
a. HLEN: If there is option change
b. Total length: If fragmented or options change
c. Flags: If fragmented
d. Fragmentation Offset: If fragmented
e. Time-to-Live; Decremented at each router
f. Header Checksum: Need to change because of other changes

Question 12 (10%)
Briefly explain the idea of Tunneling in multicasting.

7/7

You might also like