Sample Test CS335/CS235 Fall 2010 1. What is TCP multiplexing/demultiplexing? Why is it needed? What data does the multiplexing process require to correctly function? 2. Briefly describe each of the following protocols a. Selective Repeat i. The sender and receiver maintain sliding windows 1. The receiver’ss window contains all the segments that the receiver is willing to accept 2. The sender’s window contains all the segments that the sender is willing to send ii. The receiver will accept any segments that are within the receive window iii. The sender can send any of the segments in the send window iv. Acknowledges are not cumulative b. Go-Back-N i. The sender maintains a “sliding window” 1. The sender’s window contains all the segments that the sender is willing to send ii. The receiver will only accept the expected segment iii. The sender can send any of the segments in the send window iv. Acknowledges are cumulative c. Stop and Wait i. Sender does not send another segment until the first segment is acknowledged 3. Compare connection-oriented with connectionless protocols. What type of protocol is IP? How about TCP and UDP? Answer: Connection-oriented protocols Require a setup time to establish a connection Always receive data in the order that it was sent. Tend to be more reliable Connection-less protocols Require no setup time Can receive data out of order Tend to be less reliable IP is an unreliable connectionless protocol. TCP is a reliable connection-oriented protocol. UDP is an unreliable connectionless protocol. 4. Which of the following are guaranteed under IP? Packets will arrive in the same order that they are sent. IP uses the IP address stored in each datagram to route the packet. IP packets will contain both source and destination IP addresses. IP uses the port number stored in each datagram to route the packet. Packets contain uncorrupted data. Packets have a fixed length. After the connection is established, packets all take the same route. 5. If a datagram is fragmented on the first hop on route to its destination, will the destination host necessarily know that the packet was fragmented? Answer: Yes, because the packet will remain fragmented until it arrives at the final destination. 6. Is there a maximum number of routers that a packet can pass through on its way to its destination? Why or why not? Answer: Yes, because the time to live value is decremented at each hop. The time to live is fixed size (8bits) so there can be no more than 255 hops. 7. Suppose that we want to split a network with address 123.132.23.0/24 into 16 subnets. Approximately how many hosts could we put on each subnet? Answer: 16 subnets will require log2(16) = 4 bits. The network address will then contain 24+4 = 28 bits, leaving 4 bits for hosts addresses. So there will be 16 hosts addresses/subnet. Two of them are reserved. 8. Which of the following protocols are transport-layer protocols? IP TCP UDP 9. Under which of the following protocols can data arrive at the application layer out of order? TCP UDP 10. Which of the following protocols is considered reliable? TCP UDP 11. Which of the following protocols is connection-oriented? TCP UDP 12. Are TCP segments ever contained in packets? Answer: Yes, lower-layer transmission units can contain higher-layer transmission units. 13. Are packets ever contained in TCP segments? Answer: No, lower-layer transmission units can contain higher-layer transmission units, but not the other way around. 14. For each of the following, identify whether it occurs as part of distance vector routing, link state routing, flooding, or some combination. a. Perform Dijkstra’s all shortest paths algorithm. i. Link state routing b. Shortest paths are always followed. i. Link state routing ii. Flooding c. Only neighbors exchange information about their routes. i. Distance vector routing d. Non-neighbors exchange information about their routes. i. Link state routing e. Routing tables entries are determined. i. Distance vector routing ii. Link state routing f. The algorithm determines the complete topology of the network. i. Link state routing g. The count to infinity problem might be encountered. i. Distance vector routing h. The procedure must be repeated multiple time to generate good results. i. Distance vector routing i. Neighbors might lie about the best routes they know. i. Distance vector routing 15. 1.) Consider the network shown in the figure. 1 C 3 1 3 A B 2 D E 1 6 2 1 F G 2 Using distance vector routing: a.) Show the data that node A will receive on the first iteration of the algorithm. Answer: From Node C: B, 3 E, 1 From Node D: B, 2 F, 1 From Node E: C,1 F, 1 G, 6 b.) Show the routing table for node A after the first iteration of the algorithm has been completed. (6 pts) Answer: A, 0, A B, 4, C C, 1, C D, 2, D E, 2, C F, 3, D G, 8 (or 9), E 22.) Use Dijkstra’s all shortest paths algorithm to determine the shortest paths to node A. Record the order in which the nodes are made permanent along with the next hop and the distance to the destination. 1 C 1.8 1 4 A B 1 D E 1 1.5 G 2.5 1 F 0.3 Answer: Node Name A C E D B F G Distance to Destination 0 1 2 2.5 2.8 3 3.3 Next hop A A C A C E F 23.) Which of the protocols we have studied engage in congestion control? Briefly explain how this is accomplished. a. TCP. b. TCP maintains a “congestion window size” c. The congestion window size constrains the size of the send window d. The congestion window size changes as follows i. Increase the window size by 1 for each acked segment until the congestion window is ½ the size it was at the last time-out ii. Increase the window size linearly from that point on iii. On time-out, restart at window size 1 iv. On triple duplicate ACK, half the windows size + 3*MSS 24.) Describe the concepts of sender window size and receiver window size in TCP. 25.) How is congestion control different than flow control? 26.) How are virtual circuit networks different than datagram networks? 27.) What are some differences between IPv4 with IPv6? 28.) What is ICMP?