CS335 Sample Questions for Exam #2.) Compare connection-oriented with connectionless protocols. What type of protocol is IP? How about TCP and UDP? 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. 2.) 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. 3.) Are packets sent inside frames, or is it frames inside packets? What about TCP segments? Data from higher layers are encapsulated inside transmission units of lower layers. Thus a data link layer frame might contain a network layer packet which might contain a TCP segment.
4.) What is the MTU and what does it have to do with datagrams? MTU is the Maximum Transmission Unit. It is the maximum size for data link layer frames. When a datagram will not fit inside a single frame, it must be fragmented (divided into smaller packets). 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? 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? Yes, because the time to live value is decremented at each hop. The time to live is fixed size (8-bits) so there can be no more than 255 hops. 7.) How can we tell a class B network address from a class C network address? The first few bits of the address specify the class. Which address class provides more host addresses per network? A class B network provides close to 64K host addresses per network, while a class C network provides about 256 host addresses per network. Which address class allocates more network addresses? A class C network provides more network addresses. 8.) What is subnetting, and how is it different from supernetting? Subnetting utilizes address bits that the class designated as host address bits to extend the network address. Supernetting utilizes address bits that the class designated as network address bits to extend the host address. 9.) Suppose that we want to split a network with address 23.32.23.0/24 into 6 subnets. How many hosts could we put on each subnet? 0.) In a class C network there 8 bits allocated for the host address. Subnetting to create 6 subnets will require log 2 6 bits = 4 bits. The remaining bits
will provide 2 4 = 6 host addresses. Two of these addresses are reserved for broadcasting and to specify this host, leaving 4 addresses available for hosts..) What is the special significance of the following addresses?.) 0.0.0.0 The address of this host. (the primary IP address of the machine executing the instruction. 2.) 0.0.0.8 The host with the host address 8 on this local network. 3.) 255.255.255.255 Broadcast 4.) 6.5.255.255 Broadcast on network 6.5 5.) 27.0.0. The address of this host. (loopback) 2.) Suppose host 6.5.44.9/6 wants to send a message to host 6.5.44.20/6. What is the minimum number of routers the packets have to pass through? How is this determined? There are 6 bits of the IP address allocated for the network address, while the remaining 6 bits are used to specify the host address. So the network address for both machines is 6.5. Because both the source and destination are on the same network, the message will not have to pass through any routers. will be stored in a table for later use. 3.) CS335: What does the fork() system call do? When would we want to use it? The fork() system call, which is supported under Unix but not Windows, creates a child process that is identical to the parent process in every respect with the exception of the return status from the fork call itself. The fork call is often used in network servers that handle multiple clients. Each time a client connects to the server, a new child process is created to handle the client s requests. The parent process is then available to await other client connections.
4.) Which of the following protocols are transport-layer protocols? IP TCP UDP 5.) Under which of the following protocols can data arrive out of order? TCP UDP 6.) Which of the following protocols is reliable TCP UDP 7.) Which of the following protocols is connection-oriented TCP UDP 8.) Which two network layers utilize sliding window protocols? Data link layer and transport layer. 9.) Are TCP segments ever contained in packets? Yes, lower-layer transmission units can contain higher-layer transmission units. Are packets ever contained in TCP segments? No, lower-layer transmission units can contain higher-layer transmission units, but not the other way around. Are frames ever contained in TCP segments? No, lower-layer transmission units can contain higher-layer transmission units, but not the other way around.
20.) For each of the following, identify whether it occurs as part of distance vector routing, link state routing, flooding, or some combination..) Perform Dijkstra s all shortest paths algorithm. 2.) Shortest paths are always followed. ii. Flooding 3.) Only neighbors exchange information about their routes. 4.) Non-neighbors exchange information about their routes. 5.) Routing tables entries are determined. i 6.) The algorithm determines the complete topology of the network. 7.) The count to infinity problem might be encountered. 8.) The procedure must be repeated multiple time to generate good results. 9.) Neighbors might lie about the best routes they know.
2.) Consider the network shown in the figure. B 3 C 3 E A 6 2 D 2 F 2 G Using distance vector routing: a.) Show the data that node A will receive on the first iteration of the algorithm. From ode C: B, 3 E, From ode D: B, 2 F, From ode E: C, F, G, 6 A, 0, A B, 4, C C,, C D, 2, D E, 2, C F, 3, D G, 8 (or 9), E b.) Show the routing table for node A after the first iteration of the algorithm has been completed. (6 pts)
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. B.8 C 4 E A.5 D 2.5 F 0.3 G ode ame Distance to Destination ext hop A 0 A C A E 2 C D 2.5 A B 2.8 C F 3 E G 3.3 F