11.07.2015 Views

Sample Test #2 from previous year

Sample Test #2 from previous year

Sample Test #2 from previous year

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CS335 <strong>Sample</strong> Questions for Exam <strong>#2</strong>1.) Compare connection-oriented with connectionless protocols. What type ofprotocol is IP? How about TCP and UDP?Answer:Connection-oriented protocolsRequire a setup time to establish a connectionAlways receive data in the order that it was sent.Tend to be more reliableConnection-less protocolsRequire no setup timeCan receive data out of orderTend 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 TCPsegments?Answer:Data <strong>from</strong> higher layers are encapsulated inside transmission units of lowerlayers. Thus a data link layer frame might contain a network layer packet whichmight contain a TCP segment.


4.) What is the MTU and what does it have to do with datagrams?Answer:MTU is the Maximum Transmission Unit. It is the maximum size for data linklayer frames. When a datagram will not fit inside a single frame, it must befragmented (divided into smaller packets).5.) If a datagram is fragmented on the first hop on route to its destination, will thedestination host necessarily know that the packet was fragmented?Answer:Yes, because the packet will remain fragmented until it arrives at the finaldestination.6.) Is there a maximum number of routers that a packet can pass through on its wayto its destination? Why or why not?Answer:Yes, because the time to live value is decremented at each hop. The time to liveis fixed size (8-bits) so there can be no more than 255 hops.7.) How can we tell a class B network address <strong>from</strong> a class C network address?Answer: The first few bits of the address specify the class.Which address class provides more host addresses per network?Answer: 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?Answer: A class “C” network provides more network addresses.8.) What is subnetting, and how is it different <strong>from</strong> supernetting?Answer: Subnetting utilizes address bits that the class designated as host addressbits to extend the network address. Supernetting utilizes address bits that the classdesignated as network address bits to extend the host address.9.) Suppose that we want to split a network with address 123.132.23.0/24 into 16subnets. How many hosts could we put on each subnet?10.)Answer: In a class “C” network there 8 bits allocated for the host address.Subnetting to create 16 subnets will require log 2 16 bits = 4 bits. The remaining bits


will provide 2 4 = 16 host addresses. Two of these addresses are reserved forbroadcasting and to specify “this host,” leaving 14 addresses available for hosts.11.) What is the special significance of the following addresses?1.) 0.0.0.0♦ The address of “this host.” (the primary IP address of the machineexecuting the instruction.2.) 0.0.0.18♦ The host with the host address 18 on “this local network.”3.) 255.255.255.255♦ Broadcast4.) 161.115.255.255♦ Broadcast on network 161.1155.) 127.0.0.1♦ The address of “this host.” (loopback)12.) Suppose host 161.115.144.19/16 wants to send a message to host161.115.144.120/16. What is the minimum number of routers the packets have topass through? How is this determined?Answer:♦ There are 16 bits of the IP address allocated for the network address,while the remaining 16 bits are used to specify the host address. Sothe network address for both machines is 161.115. Because both thesource and destination are on the same network, the message will nothave to pass through any routers.will be stored in a table for later use.13.) CS335: What does the fork() system call do? When would we want touse it?Answer:The fork() system call, which is supported under Unix but not Windows, creates achild process that is identical to the parent process in every respect with theexception of the return status <strong>from</strong> the fork call itself.The fork call is often used in network servers that handle multiple clients. Eachtime a client connects to the server, a new child process is created to handle theclient’s requests. The parent process is then available to await other clientconnections.


14.) Which of the following protocols are transport-layer protocols?× IP TCP UDP15.) Under which of the following protocols can data arrive out of order?× TCP UDP16.) Which of the following protocols is reliable TCP× UDP17.) Which of the following protocols is connection-oriented TCP× UDP18.) Which two network layers utilize sliding window protocols?Answer:Data link layer and transport layer.19.)Are TCP segments ever contained in packets?Answer: Yes, lower-layer transmission units can contain higher-layer transmission units.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.Are frames ever contained in TCP segments?Answer: 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 distancevector routing, link state routing, flooding, or some combination.1.) Perform Dijkstra’s all shortest paths algorithm.i. Link state routing2.) Shortest paths are always followed.i. Link state routingii. Flooding3.) Only neighbors exchange information about their routes.i. Distance vector routing4.) Non-neighbors exchange information about their routes.i. Link state routing5.) Routing tables entries are determined.i. Distance vector routingii. Link state routing6.) The algorithm determines the complete topology of the network.i. Link state routing7.) The count to infinity problem might be encountered.i. Distance vector routing8.) The procedure must be repeated multiple time to generate good results.i. Distance vector routing9.) Neighbors might lie about the best routes they know.i. Distance vector routing


21.) Consider the network shown in the figure.B13C1 3EA 1 62 D21F2GUsing distance vector routing:a.) Show the data that node A will receive on the first iteration of thealgorithm.Answer:From ode C:B, 3E, 1From ode D:B, 2F, 1From ode E:C,1F, 1G, 6Answer:A, 0, AB, 4, CC, 1, CD, 2, DE, 2, CF, 3, DG, 8 (or 9), Eb.) Show the routing table for node A after the first iteration of thealgorithm has been completed. (6 pts)


22.) Use Dijkstra’s all shortest paths algorithm to determine the shortestpaths to node A. Record the order in which the nodes are madepermanent along with the next hop and the distance to the destination.B11.8C1 4EA 1 1.51 D2.51F0.3GAnswer:ode ame Distance to Destination ext hopA 0 AC 1 AE 2 CD 2.5 AB 2.8 CF 3 EG 3.3 F

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!