1 chapter 4 csci 312 – data communication and computer networks midterm review rasanjalee dm

Post on 21-Dec-2015

227 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

1

Chapter 4

CSCI 312 – Data Communication and Computer NetworksMidterm Review

Rasanjalee DM

2

Chapter 4

MULTIPLE CHOICE QUESTIONS

3

Chapter 4Question• A network C advertises the CIDR network number 196.41.48/20

(and no other numbers). What network numbers (all 24 bits) could AS C own? (4-bit prefix of second-to-last octet is 0011 = 48)

A) 196.41.128 (10000000)B) 196.41.49 (00110001)C) 196.41.64 (01000000)D) 196.41.1 (00000001)E) 196.41.62 (00111110)

4

Chapter 4Answer• A network C advertises the CIDR network number 196.41.48/20

(and no other numbers). What network numbers (all 24 bits) could AS C own? (4-bit prefix of second-to-last octet is 0011 = 48)

A) 196.41.128 (10000000)B) 196.41.49 (00110001)C) 196.41.64 (01000000)D) 196.41.1 (00000001)E) 196.41.62 (00111110)

Minimum number : 196.41.48.1Maximum number: (3rd octet all 1s in host part) = 0011 1111

196.41.63.255Anything in-between is acceptable.

5

Chapter 4Question• ______ refers to the physical or logical

arrangement of a network. A) Topology B) Mode of operation C) Data flow D) None of the above

6

Chapter 4Answer• ______ refers to the physical or logical

arrangement of a network. A) Topology B) Mode of operation C) Data flow D) None of the above

7

Chapter 4QUESTION• The physical layer involves movement of _______

over the physical medium.A) protocolsB) dialogsC) programsD) bits

8

Chapter 4Answer• The physical layer involves movement of _______

over the physical medium.A) protocolsB) dialogsC) programsD) bits

9

Chapter 4Question• In TCP, there can be ______ RTT measurement(s)

in progress at any time.

A) twoB) only oneC) severalC) D) None of the choices are correct

10

Chapter 4Answer• In TCP, there can be ______ RTT measurement(s)

in progress at any time.

A) twoB) only oneC) severalC) D) None of the choices are correct

11

Chapter 4Question• A serious problem can arise in the sliding window

operation when either the sending application program creates data slowly or the receiving application program consumes data slowly, or both. This problem is called the ______.

A) silly window syndromeB) unexpected syndromeC) window bugD) None of the choices are correct

12

Chapter 4Answer• A serious problem can arise in the sliding window

operation when either the sending application program creates data slowly or the receiving application program consumes data slowly, or both. This problem is called the ______.

A) silly window syndromeB) unexpected syndromeC) window bugD) None of the choices are correct

13

Chapter 4Question• The ports ranging from 1,024 to 49,151 are

called ___________ ports.A) well-knownB) registeredC) dynamicD) None of the choices are correct

14

Chapter 4Answer• The ports ranging from 1,024 to 49,151 are

called ___________ ports.A) well-knownB) registeredC) dynamicD) None of the choices are correct

15

Chapter 4Question• RIP uses the services of _______.

A) TCPB) UDPC) IPD) None of the choices are correct

16

Chapter 4Answer• RIP uses the services of _______.

A) TCPB) UDPC) IPD) None of the choices are correct

17

Chapter 4

SHORT ANSWER QUESTIONS

18

Chapter 4Question• What is a of soft state of a router. Explain in 2-3

sentences

19

Chapter 4Answer• Soft state refers to some type of stored state that

is not hard• Only stored temporarily by some entity• Must be constantly refreshed or will expire

20

Chapter 4Question• Provide two examples of a network protocol or

technology that abides by soft state

21

Chapter 4Answer• ARP tables• DNS caches• DHCP addresses

22

Chapter 4Question• Give two reasons that sites use Network Address

Translators (NATs)

23

Chapter 4Answer• Allows multiple private addresses behind single

public (dedicated) address

• NATs provide privacy about internal deployments.

24

Chapter 4Question• You want to implement a mechanism that

automates the IP configuration. Which protocol will you use to accomplish this?

25

Chapter 4Answer• DHCP

26

Chapter 4Question• What protocol is used to find the hardware

address of a local device?

27

Chapter 4Answer• ARP

28

Chapter 4Question• What is the need for Network layer?

29

Chapter 4Answer• The network layer is responsible for the source-

to-destination delivery of a packet across multiple network links.

30

Chapter 4Question• Give four causes of packet delay.

31

Chapter 4Answer• Processing • Transmission• Propagation• Queueing

32

Chapter 4Question• What is a tool that can be used to determine the

number of hops to a destination and the round trip time (RTT) for each hop?

33

Chapter 4Answer• traceroute

34

Chapter 4Question• We have learned that the Internet provides “best

effort service.” What is meant by a “best effort” service model?

35

Chapter 4Answer• Best effort service means that the network layer

doesn’t guarantee to deliver a datagram from source to destination. It will try but makes no guarantees.

36

Chapter 4

LONG ANSWER QUESTIONS

37

Chapter 4Question • MAC and Internet architecture:

a) Define “hub”, “switch” and “router” . what is the difference between these devices? Under what circumstances would you prefer a hub over a switch?

b) Give 3 benefits of circuit switching over packet switching, and 3 benefits of packet switching over circuit switching.

c) Describe how bridges/switches learn. In particular, describe specifically (a) what data they store, i.e., what fields/information from packets they store (b) the algorithmic process they use to discover/learn that data

38

Chapter 4

a) Define “hub”, “switch” and “router” . what is the difference between these devices? Under what circumstances would you prefer a hub over a switch?

39

Chapter 4

• Answer:– hub:

• used as a repeater to extend networks

– switch:• can create point to point connections, better for bandwidth

savings

– router: • this is a network-level device, forwards at IP layer (while

switch/hub are MAC layer)

40

Chapter 4

(b) Give 3 benefits of circuit switching over packet switching, and 3 benefits of packet switching over circuit switching.

41

Chapter 4

• Answer:– Circuits:

• Guaranteed bandwidth – Not “best-effort” delivery with no real guarantees

• Simple abstraction– No worries about lost or out-of-order packets

• Simple forwarding – No need to inspect a packet header

• Low per-packet overhead– No IP (and TCP/UDP) header on each packet

– Packets: • Don’t waste bandwidth

– No traffic exchanged during idle periods• Better to allow multiplexing

– Different transfers share access to same links

• No set-up delay

42

Chapter 4

(c) Describe how switches learn. In particular, describe specifically (a) what data they store, i.e., what fields/information from packets they store (b) the algorithmic process they use to discover/learn that data

43

Chapter 4

• Answer:– when a switch observes a frame from a particular

source address, it knows the frame lies out that particular port. so, it stores (source address, port) mappings.

44

Chapter 4Question• Encoding, Framing and Error Detection

Suppose we want to transmit the message 11100011 and protect it from errors using the CRC polynomial x3+1.

a) Use polynomial long division to determine the message that should be transmitted

b) Suppose the leftmost bit of the message is inverted due to noise on the transmission link. What is the result of the receiver’s CRC calculation? How does the receiver know that an error has occurred?

45

Chapter 4• Answers:(a) We take the message 11100011,

append 000 to it, and divide by 1001 according to the method shown in Section 2.4.3. The remainder is 100;

C(x)nk = 3 pad M(x) with 2 0sP(x) = 11100011000

R(x) = 100

what we transmit is the original message with this remainder appended, or 1110 0011 100.

1 1 1 0 0 0 1 1 0 0 01 0 0 10 1 1 1 0 1 0 0 1 0 0 1 1 1 0 1 0 0 10 0 0 1 1 1 1 1 0 0 10 0 0 0 1 1 0 1 1 0 0 10 0 0 0 0 1 0 0 0 1 0 0 10 0 0 0 0 0 0 0 1 0 0

R(x) = 100

46

Chapter 4

• (b) Inverting the first bit of the transmission gives 0110 0011 100; dividing by1001 (x3 + 1) gives a remainder of 10; the fact that the remainder is nonzero tells us a bit error occurred.

47

Chapter 4Question• Sliding Window Protocol:a) Sliding window protocol can be used to implement flow control.

We can imagine doing this by having the receiver delay ACKs, that is, not send the ACK until there is free buffer space to hold the next frame. In doing so, each ACK would simultaneously acknowledge the receipt of the last frame and tell the source that there is now free buffer space available to hold the next frame. Explain why implementing flow control in this way is not a good idea

48

Chapter 4

(a)Answer:• If the receiver delays sending an ACK until buffer space is available, it risks

delaying so long that the sender times out unnecessarily and retransmits the frame.

49

Chapter 4

(b) Draw a timeline diagram for the sliding window algorithm with SWS = RWS = 3 frames, for the following two situations. Use a timeout interval of about 2×RTT.

a) Frame 4 is lostb) Frames 4 to 6 are lost.

50

Chapter 4

(b) Answer:

Frame[5]Frame[6]

timeout

timeout

When the sender retransmits frames 5 and 6 (due to timeout), the receiver can determine that it is seeinga second copy of frame 5 and 6 rather than the first copies and thereforecan ignore it.

51

Chapter 4Question• Switching and Routing:(a) For the network given in figure, give the datagram

forwarding table for each node. The links are labeled with relative costs; your tables should forward each packet via the lowest-cost path to its destination.

52

Chapter 4

• (a) Answer:

53

Chapter 4

(b) Given the extended LAN shown in Figure, indicate which ports are not selected by the spanning tree algorithm.

54

Chapter 4

(b) Answer:

XX

X

X

55

Chapter 4Question• Congestion Control• Suppose a router’s drop policy is to drop the highest-cost packet

whenever queues are full, where it defines the “cost” of a packet to be the product of its size by the time remaining that it will spend in the queue. (Note that in calculating cost it is equivalent to use the sum of the sizes of the earlier packets in lieu of remaining time.)

(a) What advantages and disadvantages might such a policy offer, compared to tail drop?

56

Chapter 4

• (a) Answer:• The advantage would be that the dropped

packets are the resource hogs, in terms of buffer space consumed over time.

• One drawback is the need to recompute cost whenever the queue advances.

57

Chapter 4

• (b) Give an example of a sequence of queued packets for which dropping the highest-cost packet differs from dropping the largest packet.

58

Chapter 4

• (b) Answer:• Suppose the queue contains three packets. The

first has size 5, the second has size 15, and the third has size 5. Using the sum of the sizes of the earlier packets as the measure of time remaining, the cost of the third packet is 5 × 20 = 100, and the cost of the (larger) second is 15 × 5 = 75.

59

Chapter 4

• (c)Give an example where two packets exchange their relative cost ranks as time progresses.

60

Chapter 4

• (c) Answer:• We again measure cost in terms of size; i.e. we assume it takes 1

time unit to transmit 1 size unit. A packet of size 3 arrives at T=0, with the queue such that the packet will be sent at T=5. A packet of size 1 arrives right after.– At T=0 the costs are 3 × 5 = 15 and 1 × 8 = 8.– At T=3 the costs are 3 × 2 = 6 and 1 × 5 = 5.– At T=4 the costs are 3×1 = 3 and 1×4 = 4; cost ranks have now reversed.– At T=5 the costs are 0 and 3.

61

Chapter 4Question• File Transfer Using TCP

– Sam wants to send a 292 kilobyte picture from Host A to Host B using TCP. Both hosts are physically connected to the same Ethernet. The Maximum Transmission Unit (MTU) on the Ethernet is 1500 bytes. The IP header is 20 bytes and the TCP header is 20 bytes. Assume that there is no packet loss or corruption within this Ethernet.

– (a). What is the Maximum Segment Size (MSS) of the hosts?

– (b). How many data packets will Host A send to Host B?

62

Chapter 4

• (a) Answer:– MSS is the size of maximum TCP payload. 1500 − 20 −

20 = 1460 bytes.

• (b) Answer:– Each data packet will contain 1460 bytes of data. We

need to send 292 kilobytes. – 292 1024/1460 = 204.8. ∗– So 205 packets will be sent.

63

Chapter 4

• Based on your answers above, fill in the sequence numbers and acknowledgement numbers in the ladder diagram.

Host A Host BSeq:1

Seq:?Seq:?

Ack:?

Ack:?Ack:?

64

Chapter 4

• (c) Answer

Host A Host BSeq:1

Seq:1461Seq:2921

Ack:1461

Ack:2921Ack:4381

65

Chapter 4

• (d) Which phase of the congestion control algorithm is the ladder diagram showing? Explain your answer

66

Chapter 4

• (d) Answer:– Additive increase phase in AIMD– Reason: no. of packets sent in RTT increase linearly:

1,2,3…– i.e. congestion window is increased 1MSS whenever

an Ack is received

67

Chapter 4Question

• Each of the subnets contain at most 31 hosts. Subnet E connect routers R1 and R2.

a) Assign network addresses to the 5 subnets

Subnet ASubnet B Subnet C

Subnet DR2 R1Subnet E

68

Chapter 4Answer• (a) Answer:

– Each of the subnets contain at most 31 hosts. – i.e. only 5 bits are enough for host portion– To uniquely identify subnet, three bits prefix in last

octet need to be unique in this case.– 5 subnet addresses (randomly assigned):

• Subnet A: x.y.z.000_/27 x.y.z.0/27• Subnet B: x.y.z.001_/27 x.y.z.32/27• Subnet C: x.y.z.010_/27 x.y.z.64/27• Subnet D: x.y.z.011_/27 x.y.z.96/27• Subnet E: x.y.z.100_/27 x.y.z.128/27

69

Chapter 4

• (b) Assume subnet A and D have two hosts each. Assign full IP addresses for each of the two hosts:

70

Chapter 4

• (b) Answer:– Only the host portion need to be unique. Subnet id

must remain same for all host in a given subnet.– subnetA:

• Host1: x.y.z.00000001 • Host2: x.y.z.00001001

– subnetD:• Host1: x.y.z.01100100 • Host2: x.y.z.01101100

top related