Problem Max. Points Act. Points Grader

Networks and Protocols Jacobs University Bremen Dr. J¨ urgen Sch¨ onw¨ alder Course: 320301 Date: 2008-10-22 Duration: 75 minutes Midterm Examinatio...
Author: Gyles Welch
0 downloads 0 Views 109KB Size
Networks and Protocols Jacobs University Bremen Dr. J¨ urgen Sch¨ onw¨ alder

Course: 320301 Date: 2008-10-22 Duration: 75 minutes

Midterm Examination

The Jacobs University’s Code of Academic Integrity applies to this examination. Please fill in your name (please write readable) and sign below.

Name: Signature:

This exam closed book. In addition, you are not allowed to use any electronic equipment such as computers, smart phones, cell phones, or calculators. Please answer the questions on the problem sheets. If you need more space, feel free to write on the back of the pages. Please keep the papers stapled.

Problem

Max. Points Act. Points

M.1

10

M.2

16

M.3

14

M.4

21

M.5

14

M.6

15

M.7

10

Total

100

Grader

Problem M.1: bridging and routing

(2+2+2+2+2 = 10 points)

Indicate which of the following statements are correct or incorrect by marking the appropriate boxes. For every correctly marked box, you will earn two points. For every incorrectly marked box, you will loose one point. Statements which are not marked or which are marked as true and false will be ignored. The minimum number of points you can achieve is zero. true

false





An IP packet changes its destination address when traversing a router.





An IP router forwarding an IP packet contained in an Ethernet frame changes the destination MAC address.





The Internet checksum covers both the IP header and the IP payload.





The Ethernet checksum needs to be recomputed when an IP packet is forwarded by a router from an incoming Ethernet interface to an outgoing Ethernet interface.





Several IP addresses may map to the same MAC address.

Solution: true

false





An IP packet changes its destination address when traversing a router.





An IP router forwarding an IP packet contained in an Ethernet frame changes the destination MAC address.





The Internet checksum covers both the IP header and the IP payload.





The Ethernet checksum needs to be recomputed when an IP packet is forwarded by a router from an incoming Ethernet interface to an outgoing Ethernet interface.





Several IP addresses may map to the same MAC address.

Problem M.2: signal encoding

(4+4+4+4 = 16 points)

Different encoding techniques can be used to encode digital bit sequences into a signal.

a) Encode the bit string “10100110” using Non-Return-to-Zero (NRZ) encoding (high signal level represents 1). 1

0

1

0

0

1

1

0

high

low

b) Encode the bit string “10100110” using Return-to-Zero (RZ) encoding (high signal level represents 1). 1

0

1

0

0

1

1

0

high

low

c) What is the original bit string if the following signal uses Manchester encoding (high→low signal level change represents 1).

high

low

d) What is the original bit string if the signal shown in c) uses Differential Manchester encoding (no signal level change represents 1).

Solution:

a) Non-Return-to-Zero (NRZ) encoding: 1

0

1

0

0

1

1

0

high

low

b) Return-to-Zero (RZ) encoding: 1

0

1

0

0

1

1

0

high

low

c) Manchester decoding: “10001001” d) Differential Manchester decoding: “11001101”

Problem M.3: csma/cd media access protocol

(5+9 = 14 points)

The CSMA/CD protocol used by the classic Ethernet works as follows:

1. If the channel is idle (no signal energy for 96 bit times), start the transmission of the frame. Otherwise, wait until the channel is idle (no signal energy for 96 bit times) and then start the transmission of the frame. 2. While transmitting, monitor the presence of signal energy from other adapters. If the adapter transmits the entire frame without detecting signal energy from other adapters, the adapter is finished with the frame. 3. If the adapter detects signal energy from other adapters while transmitting, it stops transmitting and instead transmits a 48-bit jam signal. 4. After aborting (that is, transmitting the jam signal), the adapter enters an exponential backoff phase. Specifically, when transmitting a given frame, after experiencing the nth collision in a row for this frame, the adapter chooses a value for K at random from {0, 1, 2, . . . 2m−1 } where m = min(n, 10). The adapter then waits K · 512 bit times and then returns to step 1.

The bit time is the time needed to transmit a single bit. (For a 10 Mbps Ethernet, a bit time is 0.1 microsecond.) Recall that an Ethernet frame is at least 64 bytes long (including the header and the CRC code) and the preamble used to synchronize the receiver is 8 bytes long.

a) Suppose nodes A and B are on the same Ethernet segment and the propagation delay between the two nodes is 225 bit times. Suppose A and B send frames at time t0 = 0 bit times. The frames collide and A and B finish transmitting a jam signal at t = 225 + 48 = 273 bit times. A and B now choose different values of K in the CSMA/CD algorithm. Suppose KA = 0 and KB = 1. Will the retransmissions of A and B collide again? Explain why or why not. b) In a), we assumed that A and B start the original transmission at t0 = 0 bit times so the collision of the signals happens in the middle between A and B. Suppose A sends before B such that the collision happens exactly when node B starts its transmission. Suppose A chooses KA = 0 and B chooses KB = 1 like in a). Will the retransmissions of A and B collide again? Explain why or why not.

Solution:

a) Node A starts sense the channel at t = 273. The channel carries B’s transmission until t = 273 + 225 = 498. The channel is idle for 96 bit times at t = 498 + 96 = 594 and A starts sending the frame. With a propagation delay of 225 bit times, node B will receive A’s transmission at t = 594 + 225 = 819. data

jam

backoff

sensing

B

data

data

A

0

500

1000

Node B has to wait 512 bit times until t = 273 + 512 = 785 before starting to sense the channel. Since A’s transmission is received before 96 bit times have passed, B will detect a busy channel and wait before starting its own transmission. b) In this case, A detects the collision at bit time t = 225 = 225 bit times and finishes transmitting a jam signal at t = 225 + 48 = 273. With the 96 bit times wait time, A starts retransmitting the frame at t = 498 + 96 = 594. Since the minimum frame size including preamble is 64 + 8 bytes or 576 bits, A will transmit at least until t = 594 + 576 = 1170 if there is no further collision. jam

backoff

sensing

B

data

data

A

0

500

1000

Node B starts sending at t = 225 and immediately detects the collision. B finishes transmitting its jam signal at t = 225 + 48 = 273 bit times. Node B afterwards waits 512 bit times until t = 273 + 512 = 785 bit times. At t = 785, B starts sensing the channel. A started sending data at t = 594 and consequently A’s signal will reach B at t = 594 + 225 = 819, well before B can decide that the channel is free at t = 785 + 96 = 881. B therefore concludes that the channel is not idle and waits until A’s transmission is complete before sending its own data. No second collision occurs.

Problem M.4: brides and spanning trees

(1+5+10+5 = 21 points)

Consider an IEEE 802 Local Area Network (LAN) with the following topology:

Segment I P1.4 Segment A P1.1

P1.3 P2.1 Segment B

B1

B2

P1.2 P3.2

P2.3 Segment C

P2.2 P4.1

Segm

ent E

P3.1

B3

B4

P4.2

ent F

Segm

P3.3

P4.3

P5.2

Segment D P5.1

B5

P6.2 Segment G P5.3

P6.1

B6

P6.4 Segment H

P6.3 Segment J

Assume that the delay and cost on all segments is the same and that all systems use the same default priorities. Compute the spanning tree generated by the IEEE 802.1 spanning tree algorithm. (If there is a tie, use the bridge/port with the lower ID.)

a) Identify the root bridge. b) Identify the root ports of all non-root bridges. c) Identify the designated port for each LAN segment. d) Identify the ports that will be blocked.

Solution:

a) Bridge B1 is the root bridge (lowest bridge ID). b) The root ports of all non-root bridges: Bridge Port

B2 P2.1

B3 P3.2

B4 P4.2

B5 P5.1

B6 P6.2

c) Designated ports of the LAN segments: Segment Port

A P1.1

B P1.3

B2

B3

C P2.3

D P3.3

E P1.2

F P2.2

G P6.1

d) Blocked ports: Bridge Port

B4 P4.1

B5 P5.2, P5.3

B6 P6.3, P6.4

H P4.3

I P1.4

J P3.1

Problem M.5: IP forwarding

(4+2+8 = 14 points)

Consider the following IPv4 network (GW = gateway = default route):

R

prefix

interface

172.16.1.253/25

172.16.1.253

A

IP = 172.16.1.1 GW = 172.16.2.253

B

IP = 172.16.1.2 GW = 172.16.1.253

C

IP = 172.16.5.2 GW = 172.16.5.1

R IP = 172.16.5.1

IP = 172.16.1.253

172.16.5.0/24 172.16.1.0/24

a) Does forwarding packets from A to C work? If yes, why? If not, how can the situation be fixed? b) Does forwarding packets from C to A work? If yes, why? If not, how can the situation be fixed? c) Suppose correct static forwarding bases have been configured on all nodes that the network was just reinitialized. Node A sends an IP packet to node C and node C in turn sends an IP packet to node B. How many frames are transmitted on the Ethernet link with the IP prefix 172.16.1.0/24 and how many frames are transmitted on the Ethernet link with the IP prefix 172.16.5.0/24? Explain how you arrived at your answer.

Solution:

a) The gateway address on node A is wrong. It should be 172.16.1.253. The router R has no forwarding table entry to reach the subnet containing node C. Added the following entry fixes this: 172.16.5.0/24 → 172.16.5.1 b) The forwarding table on R has an entry for the prefix 172.16.1.253/25 and A’s IP address does not fall into this subnet. This can be fixed by replacing this forwarding table entry with the following: 172.16.1.0/24 → 172.16.1.253 (Alternatively, the nodes A and B could be renumbered.) c) Node A first broadcasts an ARP request for R. Node R responds and afterwards node A can send the IP packet to R. (3 messages on link 172.16.1.0/24) Router R broadcasts an ARP request for C. Node C responds and afterwards node R sends the IP packet to C. The node C can now send the response IP packet to R (it does not need ARP since it knows R already). (4 messages on link 172.16.5.0/24) Router R broadcasts an ARP request for B. Node B responds and afterwards R sends the IP packet to B. (3 messages on link 172.16.1.0/24) In total, 6 frames are transmitted over the Ethernet link with the IP prefix 172.16.1.0/24 and 4 frames are transmitted over the Ethernet link with the IP prefix 172.16.5.0/24.

Problem M.6: dijkstra’s algorithm

(15 points)

Consider the following network topology (the numbers indicate link costs):

3

1

A

3

B

2

2

C

D 4

1

E

1

F

2

3

Determine the shortest-paths from node C to all other nodes using Dijkstra’s algorithm. If there is a tie during the execution of Dijkstra’s algorithm, preference should be given to paths with fewer hops. As an additional tie breaker, choose the router with the lower ID. For each step of Dijkstra’s algorithm, fill a row in the following table. An entry of the form A(4) means that the node represented by the cell of the table can be reached via node A with a cost of 4. The column “Current” marks the current node. It is sufficient to mark only the columns that change relative to the previous row.

Step 0 1 2 3 4 5 6 7 8 ...

A ∞

Step 0 1 2 3 4 5 6 ...

A ∞ C(1) C(1) C(1) C(1) C(1) C(1)

B C ∞ C(0)

D ∞

E ∞

F ∞

Current

D ∞ ∞ A(4) A(4) A(4) A(4) A(4)

E ∞ C(1) C(1) C(1) C(1) C(1) C(1)

F ∞ C(3) C(3) E(2) E(2) E(2) E(2)

Current

Solution: B ∞ ∞ A(3) A(3) A(3) A(3) A(3)

C C(0) C(0) C(0) C(0) C(0) C(0) C(0)

C A E F B D

Problem M.7: Internet transport layer

(2+2+2+2+2 = 10 points)

Indicate which of the following statements are correct or incorrect by marking the appropriate boxes. For every correctly marked box, you will earn two points. For every incorrectly marked box, you will loose one point. Statements which are not marked or which are marked as true and false will be ignored. The minimum number of points you can achieve is zero. true

false





The Internet transport layer protocols provide reliable data transfer between end systems.





TCP congestion control is designed to prevent buffer overflow in network end-systems.





Due to the characteristics of its congestion avoidance algorithm, TCP can be said to be a “fair” protocol with regard to sharing available bandwidth among users of a common transmission link.





Early congestion notifications (ECNs) marks are generated by routers (network layer devices) and subsequently forwarded by the receiving TCP engine to the sending TCP engine.





The TCP engine starting the TCP teardown procedure ends up in the TIME-WAIT state.

Solution: true

false





The Internet transport layer protocols provide reliable data transfer between end systems.





TCP congestion control is designed to prevent buffer overflow in network end-systems.





Due to the characteristics of its congestion avoidance algorithm, TCP can be said to be a “fair” protocol with regard to sharing available bandwidth among users of a common transmission link.





Early congestion notifications (ECNs) marks are generated by routers (network layer devices) and subsequently forwarded by the receiving TCP engine to the sending TCP engine.





The TCP engine starting the TCP teardown procedure ends up in the TIME-WAIT state.

Suggest Documents