CS2363 COMPUTER NETWORKS TUTORIAL WORK BOOK FOR VI SEMESTER B.E (EEE) ACADEMIC YEAR 2013-2014 (FOR PRIVATE CIRCULATION ONLY) ANNA UNIVERSITY, CHENNAI (R-2008) NAME REG.NO BATCH : : : DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING DR.NAVALAR NEDUNCHEZHIAYN COLLEGE OF ENGINEERING, THOLUDUR-606303, CUDDALORE DIST. 1
ANNA UNIVERSITY, CHENNAI (R-2008) CS2363 COMPUTER NETWORKS III-YEAR EEE (VI SEM) SYLLABUS UNIT I 9 Introduction to networks network architecture network performance Direct link networks encoding framing error detection transmission Ethernet Rings FDDI - Wireless networks Switched networks bridges UNIT II 9 Internetworking IP - ARP Reverse Address Resolution Protocol Dynamic Host Configuration Protocol Internet Control Message Protocol Routing Routing algorithms Addressing Subnetting CIDR Inter domain routing IPv6 UNIT III 9 Transport Layer User Datagram Protocol (UDP) Transmission Control Protocol Congestion control Flow control Queuing Disciplines Congestion Avoidance Mechanisms. UNIT IV 9 Data Compression introduction to JPEG, MPEG, and MP3 cryptography symmetric-key publickey authentication key distribution key agreement PGP SSH Transport layer security IP Security wireless security Firewalls UNIT V 9 Domain Name System (DNS) E-mail World Wide Web (HTTP) Simple Network Management Protocol File Transfer Protocol (FTP) Web Services -Multimedia Applications Overlay networks L = 45 T = 15 TOTAL = 60 PERIODS TEXT BOOK: 1. Larry L. Peterson and Bruce S. Davie, Computer Networks: A Systems Approach, Fourth Edition, Elsevier Publishers Inc., 2007. REFERENCES: 1. James F. Kuross and Keith W. Ross, Computer Networking: A Top-Down Approach Featuring the Internet, Third Edition, Addision wesley, 2004. 2. Andrew S. Tanenbaum, Computer Networks, Fourth Edition, PHI, 2003. 3. William Stallings, Data and Computer Communication, Sixth Edition, Pearson Education, 2000. 4. Nader F. Mir, Computer and communication networks, Pearson Education, 2007. 2
S.NO Page No Signature of Lab Incharge Dr.NNCE EEE/VI Sem CN-TWB CONTENTS LIST OF EXPERIMENTS 1 FOUNDATION 2 DIRECT LINK NETWORKS 3 PACKET SWITCHING 4 INTERNETWORKING 5 END-TO-END PROTOCOLS 6 CONGESTION CONTROL AND RESOURSE ALLOCATION 7 END-TO-END DATA 8 NETWORK SECURITY SIGNATURE OF STAFF-IN CHARGE (C.SELVAGANESAN) 3
Exercise Number: 1 Title of the Exercise : FOUNDATION Date of the Exercise : OBJECTIVE (AIM) OF THE EXPERIMENT To study the Building a Network 1. PROBLEM: Calculate the total time required to transfer a 1.5-MB file in the following cases, assuming an RTT of 80 MS, a packet size of 1 KB and an initial 2*RTT of hand shaking before data is sent. (a) The bandwidth is 10 Mbps, and data packets can be sent continuously. (b) The bandwidth is 10 Mbps, but after we finish sending each data packet we must wait one RTT before sending the next. (c) The link allows infinitely fast transmit, but limits bandwidth such that only 20 packets can be sent per RTT. (d) Zero transmit time as in (c),but during the first RTT we can send one packet, during the second RTT we can send two packets,during the third we can send four =2 3-1,and so on. 4
Details 5
2. PROBLEM: Consider a point to- point link 2 km in length. At what bandwidth would propagation delay equal transmit delay for 100 byte packets? What about 512 byte packets? Details 6
Exercise Number: 2 Title of the Exercise : DIRECT LINK NETWORKS Date of the Exercise : OBJECTIVE (AIM) OF THE EXPERIMENT To study the Physically Connecting Hosts 1. PROBLEM: Show the 4B/5B encoding, and the resulting NRZI signal, for the following bit sequence: 1101 1110 1010 1101 1011 1110 1110 1111 Details 7
2. PROBLEM: Suppose the following sequence of bits arrive over a link: 011010111110101001111111011001111110 Show the resulting frame after any stuffed bits have been removed. Indicate any errors that might have been introduced into the frame. Details 8
Exercise Number: 3 Title of the Exercise : PACKET SWITCHING Date of the Exercise : OBJECTIVE (AIM) OF THE EXPERIMENT To study the Not All Networks are Directly Connected 1. PROBLEM: Suppose a workstation has an I/O bus speed of 1 Gbps and memory bandwidth of 2 Gbps. Assuming DMA in and out of main memory, how many interfaces to 45-Mbps T3 links could a switch on this workstation handle? Details Solution 50 Total 50 9
Exercise Number: 4 Title of the Exercise : INTERNETWORKING Date of the Exercise : OBJECTIVE (AIM) OF THE EXPERIMENT To Study the concept of internetworking there is more than one network 1. PROBLEM: Path MTU is the smallest MTU of any link on the current path between two hosts. Assume we could discover the path MTU of the path used in the network. And that we use this value as the MTU for all the path segments. Give the sizes and offsets of the sequence of fragments delivered to the network layer at the destination host. 10
Details 11
2. PROBLEM: Suppose we have the forwarding tables shown below for nodes A and F, in a network where all links have cost i. give a diagram of the smallest network consistent with these tables. Node Cost NextHop B C D E F 1 1 2 3 2 B C B C C Node Cost NextHop A B C D E 2 3 1 2 1 C C C C E 12
Details 13
Exercise Number: 5 Title of the Exercise : END-TO-END PROTOCOLS Date of the Exercise : OBJECTIVE (AIM) OF THE EXPERIMENT To study the concept of End-To-End Protocols getting processes to communicate. 1. PROBLEM: You are hired to design a reliable byte stream protocol that uses a sliding window (like TCP). This protocol will run over a 1 Gbps network. The RTT of the network is 140 ms, and the maximum segment lifetime is 60 seconds. How many bits would you include in the Advertised Window and Sequnce Num fields of your protocol header? 14
Details 15
2. PROBLEM: Suppose TCP operates over a 40-Gbps STS 768 link. (a) Assuming TCP could utilize the full bandwidth continuously, how long would it take sequence numbers to wrap around completely? (b) Suppose an added 32 bit timestamp field increments 100 times during the wraparound time you found above. How long would it take for the timestamp to wrp around? Details 16
3. PROBLEM: Suppose, in TCP s adaptive retransmission mechanism, that Estimated RTT is 90 at some point and subsequent measured RTTs all are 200. How long does it take before the Timeout value, as calculated by the Jacobson/ Karels algorithm, falls below 300? Assume initial Deviation value of 25; use δ= 1/8. Details 17
Exercise Number: 6 Title of the Exercise : CONGESTION CONTROL AND RESOURSE ALLOCATION Date of the Exercise : OBJECTIVE (AIM) OF THE EXPERIMENT To study the concept of Congestion Control and Resource Allocation 1. PROBLEM: Conside a RED gateway with MaxP = ρ, and with an average queue length halfway. Between the two thresholds. (a) Calculate the probability that none of the first η packets are dropped. (b) Find ρ such that probability that none of the first η packets are dropped is α. Time (seconds) 0 1 2 3 4 5 Packets Sent 5 5 1 0 6 1 18
Details 19
2. PROBLEM: The transmission schedule for a given flow lists for each second the number of packets sent between that time and the following second. The flow must stay within the bounds of a token bucket filter. Find the necessary bucket depth D as a function of token rate ɤ. Note that ɤ takes only positive integer values. Assume the bucket is initially full. 20
Details 21
Exercise Number: 7 Title of the Exercise : END-TO-END DATA Date of the Exercise : OBJECTIVE (AIM) OF THE EXPERIMENT To study the concept of end-to-end data 1. PROBLEM: Give the ASN. 1 encoding for the following three integers. Note that ASN, 1 integers, like those in XDR, are 32 bits in length. (a) 15 (b) 29,496,729 (c) 58,993,458 Details 22
2. PROBLEM: Give the big-endian and little endian representation for the integers from previous exercise Details 23
Exercise Number: 8 Title of the Exercise : NETWORK SECURITY Date of the Exercise : OBJECTIVE (AIM) OF THE EXPERIMENT To study the concept of network security. 1. PROBLEM: perform round I +1 of DES encryption, using the result of the previous exercise to fill in L, and R i, and let K i+1 be 5af310 7a3fff.give R i+1, assuming that we use a simplified S box that reduces each 6 bit chunk to 4 bits by dropping the first and last bits. Details 24
2. PROBLEM: suppose you are doing RSA encryption with ρ = 13,ϥ =7, and e =5. (a) Find the decryption exponent d. (Hint: Use the Euclidean dividing algorithm.) (b) Encrypt the message m = 7. (c) Decrypt the cipher c = 2. Details 25