You are on page 1of 10

University of Waterloo

Midterm Examination
Winter 2009

Student Name _____________________________________________________________

UW Student ID Number ____________________________

Course Abbreviation and Number CS 456/656

Course Title Computer Networks

Section(s) 01 and 02

Instructor Martin Karsten

Date of Exam February 24, 2009

Time Period 19:00-20:30

Duration of Exam 1.5 hours

Number of Exam Pages 10 pages


(including this cover sheet)

Exam Type Closed Book

Additional Material Allowed None

Marking Scheme
Question Maximum Score Question Maximum Score
1 14 5 12
2 16 6 8
3 12 7 14
4 10 8 14

Maximum Total Score: 100 Total Score:


CS 456/656 Midterm Exam 2 of 10 ID Number ____________________
Winter 2009
Question 1 (14 points) General
Assess whether the following statements are true or false.

Statement True or False?

Pure Aloha is less efficient that Slotted Aloha. true

The Ethernet minimum frame size depends on the propagation speed. true

A nodes link-layer address must be changed when the node is moved and false
connected to a different switch.

Soft state makes it easier to deal with crashing end nodes. true

Ethernet utilizes the medium more efficiently with larger frame sizes. true

A router does not need to use ARP false

BGP is a link-state protocol. false

2 points each, no deduction for wrong answers


CS 456/656 Midterm Exam 3 of 10 ID Number ____________________
Winter 2009
Question 2 (16 points) General
a. (2 points) Assume a sender node sends 100 packets towards a receiver node. The traffic
traverses two links with 10% loss probability each. How many packets can be expected to reach
the receiver?

81 packets

2 points

b. (2 points) What is the easiest way ro reduce queueing delay at the expense of higher drop rates?

reduce maximum buffer

2 points

c. (4 points) Why can a virtual circuit forwarding table often be implemented with a fixed size
array?

The maximum of virtual circuit identifiers is roughly the number of ongoing connections and vir-
tual circuit identifiers can be reused between connections. For a specific link, the maximum
number of connections can often be estimated to be sm

2 points for number of ongoing connections


2 point for identifier reuse
CS 456/656 Midterm Exam 4 of 10 ID Number ____________________
Winter 2009
d. (4 points) Briefly explain under what circumstances an ARP request does not incur extra broad-
cast overhead in a switched Ethernet.

The self-learning algorithm broadcasts packets with an unknown destination address. However,
the ARP request preloads the switch table already, so in total only one broadcast is needed and
not two.

2 points for switch broadcast


2 point for ARP combination

e. (2 points) Why is the DHCP DISCOVER message transmitted broadcast?

Client needs to find the server(s).

2 points

f. (2 points) Why is the DHCP REQUEST message transmitted broadcast?

Multiple DHCP servers in the local network are informed about the clients choice.

2 points
CS 456/656 Midterm Exam 5 of 10 ID Number ____________________
Winter 2009
Question 3 (12 points) Data Link Layer - Medium Access Control
a. (4 points) What is the role of the random variable p in Aloha? What is the problem with it?

After a collision, p describes the probability that the node retransmits in any given time slot.
The best p depends on the number of nodes wanting to transmit at the same time. Ideally, p would
adapt to this number, but it cannot be determined.

2 points for p explanation


2 points for problem

b. (4 points) What is the main advantage of CSMA over Aloha? What is the additional advantage
of collision detection (CD)?

CSMA drastically reduces the probability of collisions, since nodes do not begin sending when
they detect another ongoing transmission.
Collision detection reduces the wasted time when frames collide, because collisions are dected
while the frame is still transmitted. (and theres no wait for a missing ack).

2 points for CSMA explanation


2 points for CD explanation

c. (4 points) MAC protocols that use the taking turns principle have a good combination of ran-
dom access and channel partioning properties. What is their main disadvantage and why does that
disadvantage not matter e.g. for terminals that are connected to a mainframe?

main disadvantage is single point of failure: master or token


no problem with mainframe, since when mainframe down, terminal useless

2 points each
CS 456/656 Midterm Exam 6 of 10 ID Number ____________________
Winter 2009
Question 4 (10 points) Data Link Layer - Ethernet
a. (2 points) What is the main requirement for link layer addresses?

uniqueness

2 points

b. (4 points) Compute the maximum supported distance for a CSMA/CD network given the fol-
lowing parameters:
minimum packet size: 100 bytes
transmission rate: 100 Mbit/s
propagation speed: 200,000 km/s

200,000 km/s * 100 bytes / 100 Mbit/s = 1600m


needs to be divided by 2 -> 800m

2 points for 1600m


4 points for 800m

c. (4 points) An Ethernet hub is essentially a bit reflector. Name 2 differences between a hub and
switch.

CSMA/CD
buffering
checksum
self-learning directed forwarding
spanning tree protocol

2 points each
CS 456/656 Midterm Exam 7 of 10 ID Number ____________________
Winter 2009
Question 5 (12 points) Data Link Layer - Wireless
a. (4 points) One reason for ACKs in Wireless LAN (802.11) is that senders cannot tell whether
transmissions have collided. However, there are other errors that an Ethernet sender would not
notice, but that are caught by ACKs. Briefly describe two such errors

bit errors -> checksum failure


receiver not present or not listening

2 points each

b. (4 points) Explain the purpose of the distributed inter-frame spacing (DIFS) in Wireless LAN
(802.11).

After an ongoing transmission finishes, each station has to wait for DIFS, before their next send-
ing attempt, *except* for the receiver of the previous frame, which can transmit the ACK earlier.
This effectively gives priority to ACKs.

Note: theres also PIFS, by which the the base station can transmit between the receiver and any
other station. Ignore for this question.

2 points for waiting time


2 points for priority

c. (4 points) Why does the RTS/CTS have a packet size threshold?

RTS/CTS are also subject to collisions and loss and thus only mitigate (not solve) the CSMA hid-
den terminal problem (and others). Since RTS/CTS incurs extra overhead, the mechanism only
makes sense to protect large frames.

-2 if mitigate vs. solve is not clear


CS 456/656 Midterm Exam 8 of 10 ID Number ____________________
Winter 2009
Question 6 (8 points) Network Layer
a. (4 points) A subnet is specified by the CIDR address 129.97.32.0/22. Give the lowest and high-
est numbered address which are part of this subnet.

129.97.32.0
129.37.35.255

2 points each

b. (4 points) An ISP is allocated the subnet 211.77.128.0/17. If the ISP wants to divide that subnet
into four pieces, each with the same number of IP addresses,what are the CIDR addresses of each
piece?

211.77.128.0/19
211.77.160.0/19
211.77.192.0/19
211.77.224.0/19

1 points each
CS 456/656 Midterm Exam 9 of 10 ID Number ____________________
Winter 2009
Question 7 (14 points) Network Layer - Routing
Consider the following network topology. Using the table below, apply Dijkstras routing algo-
rithm step by step to determine all shortest paths from node a.

1
f e
2 4
3 1
a d
2
6
1
b c

Step N D(b),p(b) D(c),p(c) D(d),p(d) D(e),p(e) D(f),p(f)


0 a 6,a inf inf inf 2,a
1 af 6,a 5,f inf 3,f 2,a
2 aef 6,a 4,e 7,e 3,f 2,a
3 acef 5,c 4,e 6,c 3,f 2,a
4 abcef 5,c 4,e 6,c 3,f 2,a
5 abcdef

12 points for first 4 steps (3 each)


2 points for last 2 steps
CS 456/656 Midterm Exam 10 of 10 ID Number ____________________
Winter 2009
Question 8 (14 points) Network Layer - Protocols
a. (6 points) An IP packet with a total size of 2000 bytes (header & payload) needs to be transmit-
ted across a link that imposes a maximum link layer payload of 500 bytes. Assume that no IP
options are used. How many fragments are needed to transmit the original IP packet and how big
are they? The IP header size is 20 bytes.

5 fragments: 480+20, 480+20, 480+20, 480+20, 60+20

how to award partial marks?

b. (4 points) Briefly describe two goals (not the corresponding protocol changes) for the develop-
ment of IPv6.

expand addressing space


streamline header & packet processing
support future VC/QoS mechanisms

2 points per correct item

c. (4 points) Describe a scenario where BGP policies are useful to suppress the announcement of
certain routing paths. Draw a picture, if you want to.

multi-homed customer -> dont want to forward traffic between providers


mixed access/transit provider (unless contract with peer) -> dont forward traffic to other provider

how to award partial marks?

You might also like