0% found this document useful (0 votes)
137 views

IP Datagram Problem

The subnet mask to support up to 25 hosts per subnet from the given 140.25.0.0 network address is 255.255.255.224. (b) [3 points] How many subnets can be created using this subnet mask? No. of subnets = 2^No. of bits in subnet ID = 2^11 = 2048 subnets (c) [3 points] What is the range of IP addresses that can be assigned to hosts on one of the subnets? Subnet mask: 255.255.255.224 Subnet ID bits: 11 HostID bits: 5 Range of IP addresses per subnet = from x.x.x.0 to

Uploaded by

Surya Sunder
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
137 views

IP Datagram Problem

The subnet mask to support up to 25 hosts per subnet from the given 140.25.0.0 network address is 255.255.255.224. (b) [3 points] How many subnets can be created using this subnet mask? No. of subnets = 2^No. of bits in subnet ID = 2^11 = 2048 subnets (c) [3 points] What is the range of IP addresses that can be assigned to hosts on one of the subnets? Subnet mask: 255.255.255.224 Subnet ID bits: 11 HostID bits: 5 Range of IP addresses per subnet = from x.x.x.0 to

Uploaded by

Surya Sunder
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Department of Computer Science and Engineering

COSC 4213: Computer Networks II (Fall 2006)


Instructor: N. Vlajic
Date: October 24, 2006

Midterm Examination

Instructions:

• Examination time: 75 min.


• Print your name and CS student number in the space provided below.
• This examination is closed book and closed notes.
• There are 6 questions. The points for each question are given in square brackets, next to the
question title. The overall maximum score is 100.
• Answer each question in the space provided. If you need to continue an answer onto the last
page, clearly indicate that and label the continuation with the question number.

Question Points
1 / 20
FIRST NAME: _______________________
2 / 20
LAST NAME: _______________________ 3 / 10
4 / 20
STUDENT #: _______________________ 5 / 15
6 / 15
Total / 100

1
1. Multiple Choice [20 points] time: 15 min

Circle the correct answer(s) for the following statements. For each statement, you will obtain 0
marks if the number of circled answers is more/less than appropriate.

(1.1) TCP/IP Model


In the TCP/IP model, encryption and decryption are functions of ______________ layer .
(a) data-link
(b) network
(c) transport
(d) application

(1.2) Ethernet Addressing


Ethernet uses ______________ physical addresses that are imprinted on computers’
network interface cards (NICs).
(a) 32-bit
(b) 64-bit
(c) 6-byte
(d) none of the above

(1.3) IP Addressing
Which of the following is true for the IP address 231.1.2.3?
(a) the netid is 231.1.2
(b) the class is D
(c) the hostid is 1.2.3
(d) none of the above

(1.4) IP Addressing
A host with an IP address of 142.5.0.1 needs to test internal software. Which of the
following addresses could be used as the destination address in the packet?
(a) 1.1.1.1
(b) 127.1.1.1
(c) 142.0.0.0
(d) none of the above

2
(1.5) IPv6
Suppose one IPv6 router wants to send a datagram to another IPv6 router, but the two
are connected via intermediate IPv4 routers. If the two IPv6 routers use tunnelling, then:
(a) the sending IPv6 router creates an IPv4 datagram and puts it in the data field of an
IPv6 datagram
(b) the sending IPv6 router creates one or more IPv6 fragments, non of which is larger
than the maximum size of an IPv4 datagram
(c) the sending IPv6 router creates an IPv6 datagram and puts it in the data field of an
IPv4 datagram
(d) the sending IPv6 router creates an IPv6 datagram and intermediate IPv4 routers
will reject the IPv6 datagram

(1.6) ICMP Protocol


Who can send ICMP error reporting messages?
(a) routers
(b) hosts
(c) a and b
(d) none of the above

(1.7) Multicast / Broadcast


In ___________________ , the router always forwards the received packet through only
one of its interfaces.
(a) broadcasting
(b) multicasting
(c) a and b
(d) none of the above

(1.8) IGMP Protocol


An IGMP packet is carried in an _____________________ packet .
(a) Ethernet frame
(b) ICMP
(c) IP
(d) UDP

3
(1.9) Unicast Routing
In Distance Vector routing, each node periodically shares its routing table with
________________ and whenever there is a change.
(a) every router in the network
(b) its immediate neighbours
(c) one neighbour
(d) none of the above

(1.10) TCP Protocol


The inclusion of the checksum in the TCP segment is __________________ .
(a) optional
(b) mandatory
(c) at the discretion of the application program
(d) none of the above

4
2. Queueing Theory / Packet Switching [20 points] time: 15 min

Let us consider a simple packet-switching system as shown in the figure below.


• The path from sender A to receiver B passes through two intermediate routers.
• Each router has an input queue of size 1 [Mbit].
• The three links support the same data rate R=10 [kbps].

In all the subsequent questions, show your work to receive credit!

flow of data

R [bps] R [bps] R [bps]


R1 R2
sender A ρ1 ρ2 receiver B

(a) [6 points] Assume the utilization of the first router (R1) is ρ1 = 0.2, the utilization
of the second router is ρ2 = 0.3, and sender A generates and sends one packet of size 10 [kbit]
every 3 seconds. What is the rate at which packets arrive at receiver B?

arrival rate to R1 = departure rate from A


arrival rate to R2 = departure rate from R1
arrival rate to B = departure rate from R2

3 sec 3 sec
departure from A

transmission delay
1 sec
arrival to R1

0.6 sec R1 processing delay


Ts1 = ρ*Tλ1 = 0.2*3=0.6 sec
departure from R1

1 sec
arrival to R2

0.9 sec R2 processing delay


Ts2 = ρ*Tλ2 = 0.3*3=0.9 sec
departure from R2

1 sec
arrival to B

The arrival rate to B is the same as the departure rate from A = 1/3 [packet/sec] or
A = 3.33 [kbit/sec].

5
(b) [6 points] The assumptions remain the same as in (a); except, sender A
generates and sends only 3 packets in total. What is the overall time required to deliver these
three packets to receiver B? (Propagation delay can be ignored on all three links.)

Based on the above picture, the overall delay = 6 [sec] + time to deliver last packet

Time do deliver last packet = dtrans.(A,R1) + dproc.(R1) + dtrans.(R1,R2) + dproc.(R2) + dtrans.(R2,B) =


= 1 sec + 0.6 sec + 1 sec + 0.9 sec + 1 sec = 4.5 [sec]

overall delay = 10.5 [sec]

(c) [5 points] The assumptions are the same as in (a); except, the utilization of the
second router (R2) changes to ρ2 = 1.2. What is the rate at which packets arrive at receiver B in
this case?

In this case, R2 is clearly a ‘bottleneck’ – its slow processing (i.e. its long service time of
Ts2 = 1.2*3 [sec] = 3.6 [sec]) dictates the packet departure rate, i.e. the packet arrival rate at B.

Hence, arrival rate at B = 1/Ts2 = 1/3.6 [packets/sec] = 2.7 [kbit/sec]

(d) [3 points] The assumptions remain the same as in (c). What are the maximum
size to which queues in routers R1 and R2 grow? (Answer for each queue individually.)

R1: Based on the above picture, it is clear that packets always arrive to ‘idle’ R1. This, and ρ1 =
0.2, suggest that the size of R1 queue remains 0 at all times.

R2: ρ2 = 1.2 suggests that R2 is over-utilized. Accordingly, we conclude - the size of R2 queue
will keep growing until reaches its maximum. After that point, newly arrived packets will have to
be dropped.

6
3. Subnetting [10 points] time: 10 min

An organization has been assigned the network address: 140.25.0.0, and it needs to create a
set of subnets that support up to 25 hosts on each subnet.

(a) [4 points] What is the subnet mask you would use to do this?

140.25.0.0 – class B address ⇒ available bits in hostID part = 16

required No. of hosts = 25, 24<25<25 ⇒ required No. of bits in new hostID = 5
required No. of bits in subnet ID = 11

subnet mask: 255.255.255.224, or 11111111 11111111 11111111 11100000

(b) [3 points] What is the maximum possible number of such subnets in the given
network? The use of special address must be avoided!

Number of subnets = 211 – 2 = 2046

(c) [4 points] Given that there are 25 hosts on each subnet, how much of the
address space is being wasted (in percentages)?

Instead of 25 - 2 = 30 hosts, each subnet uses only 25 hosts.

So, in each subnet 5 addresses are not used.

Wastage=5/30=1/6=16.67%

7
4. Routing [20 points] time: 15 min

(a) [12 points] The nodes participating in the Link State algorithm in one network
are broadcasting the following link-state packets. Based on these packets,
• Draw the network topology and assign link costs.
• Run the Link State (Dijkstra) algorithm to determine the shortest path from D to A.
(Clearly specify what this path is.)

Router B Router C Router D Router E Router F


A 4 B 3 C 3 A 5 B 6
C 3 D 3 F 5 C 2 D 5
F 6 E 2 F 8 E 8

3
B C
4
3
6 2
A
5 5 D

F E
8

8
(b) [8 points] Consider a network topology as shown in the picture, and a
synchronous version of distance vector algorithm (in one iterative step all the nodes compute
their distance tables at the same time and then exchange them). Suppose that at each iteration,
a node exchanges its minimum cost with its neighbours and receives their minimum cost.
Assuming that the algorithm begins with each node knowing only the cost to its immediate
neighbours, what is the maximum number of iterations required until the distributed algorithm
converges?

Convergence time = length of the longest HOP-path (without loops) between any two nodes in
the network.

Max distance from 1: 2


Max distance from 2: 3
Max distance from 3: 3
Max distance from 4: 2
Max distance from 5: 2
Max distance from 6: 3
Max distance from 7: 3

Hence, we can expect that the algorithm converges after 3 iterations.

9
5. Multicasting [15 points] time: 10 min

(a) [10 points] Suppose two multicast groups (A, B) are formed and get to choose
their multicast addresses at exactly the same time. The groups choose their respective multicast
addresses, from the pool of all available multicast addresses, randomly and independently of
each other.

Now, assume we know group A has picked the following multicast address: 224.7.7.7. What is
the probability that group B chooses the same address?

244.0.0.0 = 1110 0000 00000000 00000000 00000000


239.255.255.255 = 1110 1111 11111111 11111111 11111111

32 - 4 = 28 bits are available for multicast addresses.

Thus, the size of the multicast address space is N = 228 .

1
The probability that group B chooses the same address: p 2 = = 2 −28
N

(b) [5 points] A system uses Reverse Path Forwarding (RPF) algorithm to build
multicast trees and deliver multicast packets. There are 100 multicast sources (each generating
a single stream of multicast traffic) and 5 groups currently active in the system. What is the
number of RPF multicast trees existing in the system?

RPF is a source-based multicast routing algorithm. Hence, there is one tree per each
active source, or 100 RPF trees in total.

10
6. IP Fragmentation [15 points] time: 10 min
An IP datagram carrying 10000 bytes of data must be sent over a link (i.e. network) that has an
MTU of 4468 bytes. Assume the datagram has no Options, and the Identification number is 218.

How many fragments will be generated?


State the values (in decimal numbers) of the following fields for each of the fragments:
Identification, Total Length, D-bit, M-bit, Fragmentation Offset.

The format of the IP header is shown on the subsequent page.

3 fragments.

1st fragment : 4448 +20 bytes


2nd fragment: 4448 +20 bytes
3rd fragment: 1104 +20 bytes

First Second Third


IDENTIFICATION 218 218 218
TOTAL LENGTH 4468 4468 1124
DNF 0 0 0
MF 1 1 0
FRAGMENT 0 556 1112
OFFSET

http://web2.uwindsor.ca/courses/cs/aggarwal/cs60375/papers/MidTerm1_1.doc

11
12
13

You might also like