CSCI 312 * Data Communication and Computer Networks MidTerm

advertisement
Chapter 4
CSCI 312 – Data Communication and
Computer Networks
Midterm Review
Rasanjalee DM
1
Chapter 4
MULTIPLE CHOICE QUESTIONS
2
• 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)
Chapter 4
Question
3
• 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)
Chapter 4
Answer
Minimum number : 196.41.48.1
Maximum number: (3rd octet all 1s in host part) = 0011 1111
196.41.63.255
Anything in-between is acceptable.
4
• ______ refers to the physical or logical
arrangement of a network.
A) Topology
B) Mode of operation
C) Data flow
D) None of the above
Chapter 4
Question
5
• ______ refers to the physical or logical
arrangement of a network.
A) Topology
B) Mode of operation
C) Data flow
D) None of the above
Chapter 4
Answer
6
Chapter 4
QUESTION
• The physical layer involves movement of _______
over the physical medium.
A)
B)
C)
D)
protocols
dialogs
programs
bits
7
Chapter 4
Answer
• The physical layer involves movement of _______
over the physical medium.
A)
B)
C)
D)
protocols
dialogs
programs
bits
8
• In TCP, there can be ______ RTT measurement(s)
in progress at any time.
Chapter 4
Question
A) two
B) only one
C) several
B) D)None of the choices are correct
9
• In TCP, there can be ______ RTT measurement(s)
in progress at any time.
Chapter 4
Answer
A) two
B) only one
C) several
B) D)None of the choices are correct
10
Chapter 4
Question
• 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)
B)
C)
D)
silly window syndrome
unexpected syndrome
window bug
None of the choices are correct
11
Chapter 4
Answer
• 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)
B)
C)
D)
silly window syndrome
unexpected syndrome
window bug
None of the choices are correct
12
• The ports ranging from 1,024 to 49,151 are
called ___________ ports.
A) well-known
B) registered
C) dynamic
D) None of the choices are correct
Chapter 4
Question
13
• The ports ranging from 1,024 to 49,151 are
called ___________ ports.
A) well-known
B) registered
C) dynamic
D) None of the choices are correct
Chapter 4
Answer
14
• RIP uses the services of _______.
A) TCP
B) UDP
C) IP
D) None of the choices are correct
Chapter 4
Question
15
• RIP uses the services of _______.
A) TCP
B) UDP
C) IP
D) None of the choices are correct
Chapter 4
Answer
16
Chapter 4
SHORT ANSWER QUESTIONS
17
• What is a of soft state of a router. Explain in 2-3
sentences
Chapter 4
Question
18
• 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
Chapter 4
Answer
19
• Provide two examples of a network protocol or
technology that abides by soft state
Chapter 4
Question
20
• ARP tables
• DNS caches
• DHCP addresses
Chapter 4
Answer
21
• Give two reasons that sites use Network Address
Translators (NATs)
Chapter 4
Question
22
• Allows multiple private addresses behind single
public (dedicated) address
Chapter 4
Answer
• NATs provide privacy about internal deployments.
23
• You want to implement a mechanism that
automates the IP configuration. Which protocol
will you use to accomplish this?
Chapter 4
Question
24
• DHCP
Chapter 4
Answer
25
• What protocol is used to find the hardware
address of a local device?
Chapter 4
Question
26
• ARP
Chapter 4
Answer
27
• What is the need for Network layer?
Chapter 4
Question
28
• The network layer is responsible for the sourceto-destination delivery of a packet across
multiple network links.
Chapter 4
Answer
29
• Give four causes of packet delay.
Chapter 4
Question
30
•
•
•
•
Processing
Transmission
Propagation
Queueing
Chapter 4
Answer
31
• 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?
Chapter 4
Question
32
• traceroute
Chapter 4
Answer
33
Chapter 4
Question
• We have learned that the Internet provides “best
effort service.” What is meant by a “best effort”
service model?
34
• 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.
Chapter 4
Answer
35
Chapter 4
LONG ANSWER QUESTIONS
36
Chapter 4
Question
• 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
37
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?
38
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)
39
Chapter 4
(b) Give 3 benefits of circuit switching over packet
switching, and 3 benefits of packet switching over
circuit switching.
40
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
41
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
42
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.
43
Chapter 4
Question
• 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?
44
(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)nk = 3  pad M(x) with 2 0s
P(x) = 11100011000
R(x) = 100
what we transmit is the original
message with this remainder
appended, or 1110 0011 100.
11100011000
1001
01110
1001
001110
100 1
0001111
1001
00001101
1001
000001000
1001
00000000100
Chapter 4
• Answers:
R(x) = 100
45
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.
46
• Sliding Window Protocol:
Chapter 4
Question
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
47
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.
48
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)
b)
Frame 4 is lost
Frames 4 to 6 are lost.
49
When the sender
retransmits frames
5 and 6 (due to
timeout), the
receiver can
determine that it is
seeing
a second copy of
frame 5 and 6 rather
than the first copies
and therefore
can ignore it.
Chapter 4
(b) Answer:
timeout
timeout
50
• Switching and Routing:
Chapter 4
Question
(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.
51
Chapter 4
• (a) Answer:
52
Chapter 4
(b) Given the extended LAN shown in Figure,
indicate which ports are not selected by the
spanning tree algorithm.
53
Chapter 4
(b) Answer:
X
X
X
X
54
Chapter 4
Question
• 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?
55
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.
56
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.
57
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.
58
Chapter 4
• (c)Give an example where two packets exchange
their relative cost ranks as time progresses.
59
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.
60
Chapter 4
Question
• 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?
61
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.
62
Chapter 4
• Based on your answers above, fill in the sequence
numbers and acknowledgement numbers in the
ladder diagram.
Host A
Seq:1
Host B
Ack:?
Seq:?
Seq:?
Ack:?
Ack:?
63
Chapter 4
• (c) Answer
Host A
Seq:1
Host B
Ack:1461
Seq:1461
Seq:2921
Ack:2921
Ack:4381
64
Chapter 4
• (d) Which phase of the congestion control
algorithm is the ladder diagram showing? Explain
your answer
65
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
66
Chapter 4
Question
Subnet A
Subnet B
R2
Subnet C
Subnet E
R1
Subnet D
• Each of the subnets contain at most 31 hosts.
Subnet E connect routers R1 and R2.
a) Assign network addresses to the 5 subnets
67
• (a) Answer:
Chapter 4
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
68
Chapter 4
• (b) Assume subnet A and D have two hosts each.
Assign full IP addresses for each of the two hosts:
69
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
70
Download