Вы находитесь на странице: 1из 6

CSE 123: Computer Networks

Fall Quarter, 2010


MIDTERM EXAM
Instructor: Alex C. Snoeren

Name
Student ID

Question
1
2
3
4
Total

Score

Points
20
20
30
30
100

This exam is closed book. You are allowed one 8.5x11-inch, double-sided sheet of paper containing whatever you would like (a crib sheet). The exam contains questions of differing point values. Each question
is clearly labeled with its value. Please answer all questions in the space provided. You have 80 minutes to
complete this exam. As with any exam, I suggest you read through all the questions first before answering
any of them.

GOOD LUCK!

1. (20 pts) True/False. Determine whether each of the following statements is true or false. No explanation is necessary; partial credit will not be awarded.
a) UDP provides unreliable bytestream service.
False; unreliable datagram service
b) TDMA uses collision detection.
False
c) For a fixed set of transmitters and offered load, Slotted Aloha will have fewer collisions than
Aloha.
True
d) A code of uniform Hamming distance can correct as many errors as it can detect.
False
e) A TCP timeout triggers slow start.
True
f) A bridge responds to an ARP query.
False; a bridge is invisible to the MAC layer.
g) Checksums are better at detecting burst errors than CRCs.
False
h) A signal obeying the Nyquist Limit will experience inter-symbol interference (ISI).
False
i) Bit stuffing ensures the sentinel value never appears in the transmitted payload.
True
j) A DNS server for the .edu TLD will resolve a query for google.com.
False

2. (20 pts) Media Access. Concisely answer the following questions.


a) List three different ways to partition a link into fixed subchannels.

Frequency-division multiple access (FDMA), time-division multiple access (TDMA), and


code-division multiple access (CDMA).

b) Whats the difference between a CSMA scheme and Aloha?

CSMA senses the channel to see if it is idle before transmitting, while a node using Aloha
simply transmits any time it has data to send.

c) Why does Ethernet define a maximum cable length?


In order to ensure that there is bounded delay between any two stations. It uses this delay
to implement collision detection, including specifying a minimum frame size and jamming
signal length. Partial credit was given for citing attenuation, although, strictly speaking,
repeaters can be used to alleviate this issue without extending the cable past its maximum
length.

d) Why is Ethernets binary exponential back-off scheme superior to a p-persistent scheme for any
fixed p?
A particular value of p is optimal for only one offered load, and quickly becomes inefficient as load increases or decreases. Ethernets back-off scheme dynamically adjusts to the
offered load on the network at any moment.

3. (30 pts) Encoding. Concisely answer the following questions.


a) Give an example of two five-bit codewords with a Hamming Distance of 3.
00000 and 10101

b) Consider the CRC generator function x8 + x2 + x1 + 1. How many bits will the resulting frame
check sequence be?
8 bits

c) Suppose you had a channel with bandwidth B and signal-to-noise ratio S/N >> 1. According
to Shannons law, how much would you need to increase the bandwidth to double the bit rate?
Shannons law says C = B log2 (1 + S/N ). If you need to double C, it suffices to double
B.

d) Alternatively, if you were unable to increase the bandwidth, how much would you have to increase the signal-to-noise ratio to achieve the same effect?
Here, you need to double log2 (1 + S/N ). Since S/N >> 1, this is equivalent to doubling
log2 (S/N ). Using the identity that 2 log2 (X) = log2 (X 2 ), this implies you need to square
the signal-to-noise ratio.
e) Youve been having trouble with your cable modem. After talking to tech support, you learn that
outgoing link has an MTU of 500 bytes, which is causing the 1500-byte Ethernet frames from
your apartment network to be fragmented into three pieces. The technician also discovers that
your cable modem is dropping 50% of the packets on the outgoing link.
The tech support guy offers two solutions. Hes willing to either triple your cable modems
bandwidth or halve the loss rate to 25%. Presuming you always send MTU-sized packets (i.e.,
1500-byte Ethernet frames) Which should you choose? Why? (Hint: your decision should be
based on how IP works, and not any details about TCP or any other transport protocol.)
Every packet gets fragmented into 3, so the success rate is (1 p)3 , which is = .53 = 0.125
right now. For a fixed speed x, thats an efficiency of 0.125x Tripling the bandwidth gets
you 0.125x 3 = 0.375x. On the other hand, if you take the halve the loss rate deal, you get
0.753 = 0.42, or 0.42x, which is betterso you should choose the lower speed, lower loss
link.

4. (30 pts) IP forwarding. Consider the network diagram below. Each router (a square in the figure)
is labeled with the names of its interfaces (e.g., eth0) and the IP addresses assigned to each. Each
network (a circle) is labeled with its network name and prefix length.

192.168.128/17

192.168.128.1

192.168.16.1

eth0
10.0.1.2

eth3 R1 eth1
eth2

192.168.16/21

eth0
10.0.2.2
10.0.2.1

eth3 R2 eth1

192.168.8.1

eth2

192.168.7.2

10.0.3.1

192.168.8/22

10.0.3.2
eth0

192.168.7.1

eth3 R3 eth1

192.168.5.1

eth2
192.168.6.1

192.168.7/24

192.168.5/24

192.168.6/24

a) The machine Im typing this on has an IP address 192.168.7.74 with netmask 255.255.255.0.
What is the network address of the subnet this machine is connected to?

192.168.7.0. Note that 192.168.7/24 is the prefix or CIDR block; network addresses are
always expressed as full, 32-bit quantities.

b) What is the most concise CIDR block R2 can use to describe the networks reachable through
R3?

192.168.4/22

c) List the forwarding table R3. (Assume that R3 should forward traffic destined to network D
directly, but not send other traffic through D to R1; i.e., route through R2 instead.) As an
example, we show the forwarding table for R1.
Destination
127.0.0.1/32
default
10.0.1/24
10.0.2/24
192.168.0/17
192.168.7/24
192.168.128/17

Destination
127.0.0.1/32
default
10.0.3/24
192.168.5/24
192.168.6/24
192.168.7/24

Next Hop
127.0.0.1
10.0.1.1

10.0.2.2

Next Hop
127.0.0.1
10.0.3.1

Interface
lo0
eth3
eth3
eth1
eth1
eth2
eth0

Interface
lo0
eth0
eth0
eth1
eth2
eth3

Note that you need an explicit route for 10.0.3/24 in case you need to forward a packet
addressed to 10.0.3.1. This is often called a point-to-point (or p2p) route.
d) List a forwarding table for R2. There is a choice of routes for network D. Pick one, and explain
how your table handles traffic to network D.

Destination
127.0.0.1/32
default
10.0.2/24
10.0.3/24
192.168.16/21
192.168.8/22
192.168.4/22

Next Hop
127.0.0.1
10.0.2.1

Interface
lo0
eth3
eth3
eth2
eth0
eth1
eth2

Packets for network D will be routed through R3 due to the aggregated network block
192.168.4/22 as constructed in part b)

Вам также может понравиться