CS 742 Computer Communication Networks Final Exam - Name: Fall 2003 Part 1: (75 points - 3 points for each problem) ( A ) 1. WAP is a (A) protocol (B) hardware (C) software (D) network architecture ( C ) 2. An Ethernet link is working at 40 Megabaud. What is the data transfer rate for this link? (A) 5 Mbps (B) 10 Mbps (C) 20 Mbps (D) 80 Mbps. ( A ) 3. Which framing approach is used in PPP? (A) character stuffing (B) bit stuffing (C) clock-based framing (D) frequency framing ( D ) 4. Which is not a connection-oriented network? (A) X.25 (B) Frame Relay (C) ATM (D) none of the above. ( B ) 5. Which transmission techniques are not specified in 802.11? (A) FHSS (B) QPSK (C) DSSS (D) OFDM ( D ) 6. Which statement about IEEE 802.11g is incorrect? (A) It operates at radio frequencies 2.4 GHz. (B) It uses OFDM modulation. (C) It makes possible data speeds as high as 54 Mbps. (D) none of the above ( C ) 7. When the Packet InterNet Groper (ping) is executed, which type of message is transmitted: (A) an ICMP Time Request (B) an ICMP Redirect (C) an ICMP Echo Request (D) none of the above ( C ) 8. What is the header size of a IPv6 packet? (A) 60 bytes (B) 48 bytes (C) 40 bytes (D) 20 bytes ( B ) 9. Which function is not used in UDP socket programming in C? (A) bind (B) accept (C) socket (D) sendto ( A ) 10. Based on the QoS, which application requires high reliability? (A) file transfer (B) audio on demand (C) videoconference (D) none of the above ( D ) 11. An 802.16 network has a channel width of 20 MHz. When QAM64 is used, what is the transfer rate? (A) 40 Mbps (B) 64 Mbps (C) 80 Mbps (D) 120 Mbps ( D ) 12. Which types of messages are not encapsulated in IP datagrams? (A) TCP (B) UDP (C) ICMP (D) ARP ( B ) 13. A DHCP server can be used to provide the same functionality as a(n): (A) ARP server (B) BOOTP server (C) TFTP server (D) none of the above ( A ) 14. The Internet Protocol (TCP) provides a delivery service that is: (A) connection-oriented and reliable (B) connectionless and reliable (C) connection-oriented and unreliable (D) connectionless and unreliable ( C ) 15. In which function do we specify PF UNIX or PF INET? (A) connect (B) listen (C) socket (D) bind ( C ) 16. If a datagram that is 1420 bytes long (20-byte IP header plus 1400 bytes of data) arrives for transmission across a network that has the maximum transmission unit (MTU) of 532 bytes. How long will each of the segments be (including the IP header)? (A) 512 bytes, 512 bytes, and 376 bytes (B) 532 bytes, 532 bytes, and 376 bytes (C) 532 bytes, 532 bytes, and 396 bytes (D) none of the above
( B ) 17. Which device operates in the data link layer? (A) repeater (B) bridge (C) router (D) gateway ( D ) 18. Which is not a routing algorithm or protocol? (A) Distance Vector (B) BGP (C) OSPF (D) none of the above ( D ) 19. Which type is set to query the domain name server in nslookup? (A) MX (B) HINFO (C) CNAME (D) NS ( B ) 20. In Java socket programming, which class represents a socket for sending and receiving datagram packets on the server side? (A) DatagramPacket (B) DatagramSocket (C) ServerSocket (D) DatagramServerSocket ( D ) 21. The assigned port for the SMTP server is: (A) 21 (B) 22 (C) 23 (D) 25 ( C ) 22. Which server interprets name to IP address and vice versa? (A) SMTP (B) FTP (C) DNS (D) DHCP ( B ) 23. IPv6 represents local loopback address as (A) ::127.0.0.0 (B) ::1 (C) ::0 (D) none of the above ( A ) 24. Which can be used to encrypt and decrypt email? (A) PGP (B) TLS (C) RTP (D) SSH ( A ) 25. Which command prints network connections, routing tables, and interface statistics? (A) netstat (B) ping (C) traceroute (D) dig Part 2: (125 points) 1. (15 pts.) Briefly explain these terminologies. If they are acronyms, also write what they stand for. (a) BGP Border Gateway Protocol (BGP) is a protocol for exchanging routing information between autonomous systems. (b) NAT Network Address Translation (NAT) is the translation of an IP address used within one network to a different IP address known within another network. (c) CSMA/CA Carrier Sensing Multiple Access with Collision Avoidance (CSMA/CA) is a protocol used in wireless networking. (d) AODV Ad hoc On-demand Distance Vector (AODV) is a routing algorithm used to solve the problem of mobile routers. (e) HTTPS The HyperText Transport Protocol Secure (HTTPS), is standard encrypted communication mechanism on the World Wide Web. It is just HTTP over SSL. 2. (10 pts.) Complete the following table listing the seven layers in the OSI 7-Layer Reference Model. Then, identify three of the four layers used in the TCP/IP protocol suite (write TCP/IP beside them). Finally, identify where the following protocols belong: TCP, UDP, IP, ICMP, PPP, RARP, IMAP. Layer 7: Application Layer - IMAP (TCP/IP) Layer 6: Presentation Layer Layer 5: Session Layer Layer 4: Transport Layer - TCP, UDP (TCP/IP) Layer 3: Network Layer - IP, ICMP (TCP/IP) Layer 2: Data Link Layer - PPP, RARP (TCP/IP) Layer 1: Physical Layer
3. (9 pts.) Recall the Nyquist s theorem: A filtered signal, run through a filter of bandwidth H Hz, can be completely reconstructed by taking 2H exact samples per second. If the signal has V discrete levels: max. data rate = 2Hlog 2 (V ) bits/sec. Now, answer the following questions: (a) A media server is transmitting a video of 2 x 2 inch at a resolution 60 pixels per inch, 2 bytes/pixel color encoding and 30 frames/second. Calculate the bandwidth necessary for transmitting in real times. (b) A noiseless channel is 2-MHz wide. How many bits per second can be sent on this noiseless channel if four-level digital signals are used? (c) Without loss of the resolution and color, how many frames per second can this media server transfer on this noiseless channel? (a) A frame size is 2 2 60 2 2 8 = 0.2304 Mbps. The bandwidth is 0.2304 30 = 6.912 Mbps. (b) The noiseless channel provide 2 2 log 2 (4) = 8 Mbps transfer rate. (c) It can transfer 8/0.2304 = 34 frames/s 4. (12 pts.) Suppose that a code consists of the following valid codewords: {00000000, 00001111, 11110000, 11111111}. (a) What is the Hamming distance of the code? (b) Can a single bit error be corrected? Explain. (c) If a codeword 00000011 is received, it must contain errors. Assuming that only two errors have occurred, can these two errors be corrected? Briefly explain how it would corrected, or why it cannot be corrected. (a) The Hamming distance of the code is 4 because the number of bit positions in which two codewords differ is 4. (b) Yes, to correct a single bit error the Hamming distance 2 1 + 1 = 3 is required. The Hamming distance of the code is 4 > 3. So one bit error can be corrected. (c) No, there is no way to tell 00000000 or 00001111 will be the correct codeword. To correct 2 bit error, 2d + 1 = 2 2 + 1 = 5 Hamming distance is required.
5. (7 pts.) Using the divisor polynomial x 4 + x + 1 for CRC, what frame will be transmitted for the data M = 1001? ns: M(x) = 1001, C(x) =, r = 4 1101101 -------------- )10010000 ------ 10101 ------- 11000 ------ 10111 ------- 10000 -------- 1100 So the transmission frame T(x) is 10011100 6. (8 pts.) Suppose that 2 n stations use the adaptive tree walk protocol to arbitrate access to a shared channel. At a certain instant 2 stations become ready. What are the minimum and maximum number of bit slots needed to walk the tree if 2 n is much larger than 1? (a) The minimum number happens when two stations are in two different subtrees from the root. It will be 3 bit slots. (b) The maximum number happens when two stations are in the same deepst subtree. Traversing from the root node, there are n collision nodes and n + 1 nodes without collision. So the maximum number is n + n + 1 = 2n + 1. 7. (6 pts.) Suppose a router has built up the routing table as shown in the following table. The router can deliver packets directly over interfaces eth0 and eth1, or it can forward packets to other routers in the table. Destination Netmask Gateway 156.26.10.0 255.255.255.128 eth0 156.26.10.128 255.255.255.128 eth1 156.26.11.0 255.255.255.192 R1 <Default> R2 Describe what the router does with a packet addressed to each of the following destinations: (a) 156.26.10.239 - deliver packets directly through eth1 (b) 156.26.11.208 - forward to R2 (c) 156.26.12.27 - forward to R2 8. (9 pts.) For the network 168.78.16.0/20, answer the following questions: (a) How many IP addresses can be allocated? (b) What is the last IP address? (c) What is the netmask? (a) 2 32 20 = 2 12 = 4096. (b) 16 256 = 4096, 16 + 16 1 = 31 168.78.31.255. (c) The host ranges from 168.78.16.0 to 168.78.31.255. The first, second, and forth part of the netmask are 255, 255, and 0, respectively. The third part of the netmask 256 2 24 20 = 240. Hence, the netmask is 255.255.240.0.
9. (12 pts.) An organization has a class C network 192.168.1 and wants to form subnets for 3 departments, with hosts as follows: A B C 72 hosts 46 hosts 52 hosts (a) There are 170 hosts in all. Give a possible arrangement of network and subnet masks to make this possible. (b) Suggest what the organization might do if the department C grows to 70 hosts. (a) Department Network Netmask IP Addresses A 192.168.1.0/25 255.255.255.128 128 B 192.168.1.128/26 255.255.255.192 64 C 192.168.1.192/26 255.255.255.224 64 (b) These are possible choices: either assign multiple subnets to single department, abandon subnets and buy a bridge, or let B and C use the same subnet. Here is a possible deployment giving A two subnets, of sizes 64 and 32; every other department gets a sigle subnet of size of the next highest power of 2: Department Network Netmask IP Addresses A 192.168.1.0/26 255.255.255.192 64 A 192.168.1.64/27 255.255.255.224 32 B 192.168.1.96/26 255.255.255.192 64 C 192.168.1.160/27 255.255.255.224 32 C 192.168.1.192/26 255.255.255.192 64 10. (12 pts.) For True or False questions, if it is false, explain why. (a) Each host computer or router can only be assigned one Internet (IP) address. (b) The address 156.26.255.255 is a valid host IP address. (c) The ARP is used to obtain an IP address. (d) For wireless communication, error-detecting can be used to make the transmission reliable. (a) False, a host with two Ethernet cards should have two IP addresses, also routers always have multiple IP addresses assigned (b) False, the address 156.26.255.255 is used to broadcast a message to all hosts on the network 156.26.0.0. (c) False, the ARP is used to obtain the hardware address. (d) False, error-correcting should be used to make the transmission reliable. 11. (8 pts.) Encrypt the following plaintext using a transposition cipher based on the key LEOPARD. plaintext = H A V E A G R E A T W I N T E R B R E A K L E O P A R D 4 3 5 6 1 7 2 H A V E A G R E A T W I N T E R B R E A K ciphertext = A I E R T K A A R H E E V T B E W R G N A
12. (8 pts.) Using the RSA public key cryptography algorithm. (a) If p = 11 and q = 13, list five legal values for d. (b) If p = 5, q = 17, and d = 7, find e. (a) z = (p - 1) (q - 1) = 10 12 = 120. d should be relatively prime to 120. The possible values for d are 7, 11, 13, 17, 19, 23, 29, etc. (b) z = (5-1) (17-1) = 64. 7e % 64 = 1, 65, 129, 257, 321, 385. 7e = 385 e = 55 13. (9 pts.) Choose one of the following questions to answer: Describe the steps the TCP client and server go through in C socket programming. Describe the steps the TCP client and server go through in Java socket programming. The steps the TCP client and server go through in C socket programming: (a) The TCP client goes through four steps: i. Create a TCP socket using socket(). ii. Establish a connection to the server using connect(). iii. Communicate using send() and recv(). iv. Close the connection with close(). (b) The TCP server goes through three steps: i. Create a TCP socket using socket(). ii. Assign a port number to the socket with bind(). iii. Tell the system to allow connections to be made to that port, using listen(). iv. Repeatedly do the following: A. Call accept() to get a new socket for each client connection. B. Communicate with the client via that new socket using send() and recv(). C. Close the client connection using close(). The steps the TCP client and server go through in Java socket programming: (a) The TCP client goes through three steps: i. Construct an instance of Socket: The constructor establishes a TCP connection to the specified remote host and port. ii. Communicate using the socket s I/O streams: A connected instance of Socket contains an InputStream and OutputStream that can be used just like any other Java I/O stream. iii. Close the connection using the close() method of Socket. (b) The TCP server goes through two steps: i. Construct a ServerSocket instance, specifying the local port. This socket listens for incoming connections to the specified port. ii. Repeatedly do the following: A. Call the accept() method of ServerSocket to get the next incoming client connection. Upon establishment of a new client connection, an instance of Socket for the new connection is created and returned by accept(). B. Communicate with the client using the returned Socket s InputStream and Output- Stream. C. Close the new client socket connection using the close() method of Socket.