Copy of Cs9216_set 2

download Copy of Cs9216_set 2

of 4

Transcript of Copy of Cs9216_set 2

  • 7/26/2019 Copy of Cs9216_set 2

    1/4

    ANNA UNIVERSITY: CHENNAI 600 025

    M.E./M.Tech. DEGREE EXAMINATIONS, JAN - 2012

    Regulations - 2009

    First Semester

    (Computer Science and Engg. /Software Engg./ Information Technology)

    CS9216 NETWORKING LABORATORY

    Time: 3 Hours Maximum Marks: 100

    1. Write an echo procedure using the TCP socket program between a client and server. 100

    2. Write a chat procedure using the TCP socket program between a client and server. 100

    3. Write an echo procedure using the UDP socket program between a client andserver.

    100

    4. Write a chat procedure using the UDP socket program between a client and server. 100

    5. Write a socket program using TCP protocol which gets two numbers from theclient and performs the various arithmetic functions on the server side based onthese two numbers. The results are displayed on the client side.

    100

    6. Write a socket program using UDP protocol which enters a list of numbers in theascending order on the client side. This file is modified on the server side using thedescending procedure and time of modification is displayed on the client side.

    100

    7. Write a file transfer program using TCP protocol which gets an array of charactersin a file as its input on the client side and uses the ascending procedure to reorderit and displays the output at the server side.

    100

    8. Write a file transfer program using UDP protocol which displays the hello worldmessage when it establishes a connection between the client and server. It accepts

    a file with a string as its input on the client side and on the server side it checkswhether the string is a palindrome or not. It the string is a palindrome then itcontinues else the connection is lost between them.

    100

    9. Write a file transfer program using UDP protocol which retrieves the lines in a fileon the server side whose first letter matches with that of the file name.

    100

  • 7/26/2019 Copy of Cs9216_set 2

    2/4

    10. Write a program to capture the packets where the sending window limits thesender to a maximum of five outstanding, unacknowledged packets. To send anew packet write a Send _New () which will create a packet and begin the

    simulation of data moving between sender and receiver. To simulate the loss of a packet or acknowledgment write a Kill_Packet (). Use the Stop function to capturethe contents of the packet and display on the receiver side.

    100

    11. Write the sender portion of the Go-Back-N algorithm for reliable data transfer.The program allows the user to type messages that will be sent and reassembled bya receiver. The receiver is somewhat malicious; it will cause some packets to getthrown away. It will, however, keep track of all the packets it has received or sentso you can use this information for debugging your program. The test area at the

    bottom of the receiver shows the packet as they are delivered to the application, sothe text that appears here should be identical to what the sender sent. The receiver

    will not cause data corruption so you do not need to deal with checksums. Thesender will send a single character in a packet along with an id number through aUDP channel. The data in the packet will therefore be three bytes long. One bytewill be the sequence number of the packet, the next two will be the two bytes fromthe character. ACK packets will contain one byte of data indicating the packetnumber that is being acknowledged.

    100

    12. Write a sliding window algorithm code with a SWS=8 and RWS=8 where there is a lossof alternative data. Use the ACK and NACK code to show the implementation of lost andretrieved data.

    100

    13. Write a sliding window program which has a sender window of size 5 and receiverwindow of size 3 with an acknowledgement for the frames as either 1/0.

    100

    14. Write a distance vector routing program for the following network and find theaverage time with the number of messages sent to cover the entire network.

    100

  • 7/26/2019 Copy of Cs9216_set 2

    3/4

    15. Write a program to implement the domain name system when the client sends arequest www.google.com to the name server. The program should exhibit the codefor obtaining the IP address for each level of domain (Ex. Com, google.com).

    100

    16. Assume that a blackberry application is being developed for which a code has to be written such that the HTTP request and response should be captured when thewebsites

    100

    17. Write a program to create an instant chat room and perform the followingoperations:

    a. Send invitations for multi-users to join the chat room.

    b. Discover the different users present in the chat room and list theirnames

    c. Change the subject of the room to some New subject

    d. Change the role of the user from visitor to participant

    100

    18. Write a program to check the availability of an SNMP agent for a manager whichwill locate some utilities like ucd-snmp and fetch the entire system group usingGET-NEXT operations retrieving one entry at a time.

    100

    19. Write a program using UDP protocol to simulate the packet transfer between threenodes n1(source),n2 and n3(Destination) using NS2 with following specifications:

    e. Create a simplex link between n1 and n2 with a bandwidth of5Mbps, delay of 5ms, queue type of RED (Link l1)

    f. Create a duplex link between n2 and n3 with a bandwidth of1Mbps, delay of 50ms, queue type of RED (Link l2)

    g. The total simulation time is 100sec and the packet transfer startsfrom the 10 th sec of the simulation

    h. Generate FTP traffic from node n1 for a packet size is 512 bytes inan interval of 0.5 sec

    Calculate the through put and delay for l1 and l2.

    100

    http://www.google.com/http://www.google.com/
  • 7/26/2019 Copy of Cs9216_set 2

    4/4

    20. Write a program using UDP protocol to simulate the packet transfer between threenodes n1(source),n2 and n3(Destination) using NS2 with following specifications:

    i. Create a duplex link between n1 and n2 with a bandwidth of3Mbps, delay of 5ms, queue type of Drop tail (Link l1)

    j. Create a duplex link between n2 and n3 with a bandwidth of1Mbps, delay of 30ms, queue type of Drop tail (Link l2)

    k. The total simulation time is 50sec and the packet transfer startsfrom the 5 th sec of the simulation

    l. Generate CBR traffic from node n1 for a packet size is 512 bytes inan interval of 0.1 sec

    Calculate the through put and delay for l1 and l2.

    100