Sie sind auf Seite 1von 8

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.

TCP Socket i. Write client and server programs using connection oriented service that will do a simple bank application. The client sends the account number and server sends the account details along with its last transaction, displaying the (25) same on the client screen. ii. Write client and server programs wherein the module implements a mark file system of students. The client sends the roll number of a student. The server sends mark sheet file pertaining to the roll number. (25) iii.Implement 1-bit sliding window for the below scenario Both A and B are sending and receiving data with seq no 0 or 1. (Initial packet with Seq no: 0 and ack: 1). Show the duplicates received at both ends. (A sends 0,1 and B sends 0,1. B gets 0,1 (got 0, but no ack of Bs 0) and hence B unnecessarily re-sends 0,0.). Similarly at As end.

(50)

2.

UDP Socket i.Write client and server programs using connectionless service wherein the client request for a file along with its user name. The server matches the user name in the file if authenticated the server sends the requested file else the server sends the Meta information of file like, the number of lines and words in the file. ii.Write a client /server program implementing connectionless service. The server is host name provider, the client sends the IP address and obtains the matched host name from the server. iii.Develop a Client/server application for implementing the below scenario 1. The client sends a structure containing the member declarations for ARP request to the server. 2.Assume the server maintains the below ARP cache table IP address MAC address 192.168.2.1 0123.4567.89aa 192.168.2.2 0123.4567.89ab 192.168.2.3 0123.4567.89ac 192.168.2.4 0123.4567.89ad 192.168.2.5 0123.4567.89ae (Note: ARP requests destination address field value should be any one of the IP address column value from the above table. The ARP reply should have the exact match as per the ARP cache table in the server. Use a searching (50) algorithm which runs with time complexity O(n)).

(25)

(25)

3.

Socket application i.Write client and server programs using connectionless service wherein the client request Modify the server program in the above protocol to accommodate a concurrent server. The server should be capable of handling multiple clients at a time. Concurrency can be brought in by either making the server create multiple children to handle multiple clients or by creating multiple threads to handle multiple children. ii.Simulation of DNS using UDP sockets. Maintain a root server, 3 TLD servers (say, corresponding to com, edu and gov), 3 authoritative server. Iterative: The client sends a DNS query to the root server. The root server sends the IP address of TLD server to the client. The client sends the DNS query to the TLD server. The TLD server sends the IP address of the authoritative server to the client. The client sends the DNS query to the authoritative server and gets the IP address of the required host NOTE:A domain name consists of one or more parts, technically called labels. Each label may contain up to 63 characters. The full domain name may not exceed a total length of 253 characters. The characters allowed in a label follow the LDH rule (letters, digits, hyphen). Domain names are interpreted in case- independent manner. Labels should not start or end with a hyphen.

(50)

(50)

4.

Sliding window Protocol i. Simulation of sliding window protocol of type selective repeat. The client and server can maintain a window limit and can transmit and acknowledge based on that. Simulation of loss of packets can be done so that retransmission takes place only for that packet which receives a negative acknowledgement referring to its sequence number. ii.Simulation of sliding window protocol of type Go Back- N algorithm. The client and server can maintain a window limit and can transmit and acknowledge based on that. Simulation of loss of packets can be done so that retransmission takes place for all the packet starting from the sequence number which is referring in the received negative acknowledgement .

(50)

(50)

5.

Routing protocol i.Simulate an OSPF routing protocol. Given the number of nodes and distance between one node and its neighboring node. Consider a random topology for all the nodes and compute the distance between a given two nodes in the (70) topology. ii.Write a client / server program where in when the client makes a connection (30) to the server, the server sends the system details of the server machine along with date and time.

6.

Application development i.Simulation of FTP understanding control and data channels. The client initiates a TCP connection to the server and sends the required FTP command to the server. For example, get filename. The server reads the command, initiates a new TCP connection with the client using a different port number. The server then sends the result of the command to the client (70) and closes the connection. ii.Implement a Client/Server application to perform TFTP service using UDP (30) Sockets. Network Management protocol. i.Simulate a simple network management application wherein the network server program monitors the given working hours, the server shuts the client connection down. ii.Simulation of HTTP protocol The client sends a HTTP request ( the request is sent in the actual format with request line, header lines). The server gets the HTTP request and understands what method is to be done and responds in a HTTP response message. The response message can have a status line and header lines followed by the data. Client Request line format : method/ request http version Server reply format : http version status code followed by requested page implement foe two methods a.. Get : Retrieval of resource b. Post : Creation of a new resource or the updates of existing resources

(50)

(50)

8.

Network simulator i.Write a script to simulate wired environment to implement a unicast routing protocol / client and server programs. Trace the following TCP parameters : congestion window( cwnd_), sequence number(maxseq_), round trip time(rtt_) a) Plot the following: The congestion window (cwnd) as a function time. b) Have the simulation run from time 0 to 51sec. find the number of bytes transmitted in 50 seconds? What is the throughput achieved? c) Can you find the first packet droped? What is its sequence number? d) Introduce errors in any one of the link. Start with an error probability of 0.01 (1 percent), and increase in steps of 0.01, upto 0.10 (10 percent). Also include the 0 percent error case for comparison.

(60)

ii.Write client and server programs using UDP socket wherein the server implements a simple calculator. The client request for a calculation by sending the pertaining data in the request. The server performs the requested calculation send the result which is latter displayed at the clients terminal. Implement concurrent server in a iterative manner to process the request from the client. 9. i.Write a script to simulate wireless environment to implement a unicast routing protocol. Consider a wireless network with 6-nodes network over an area of a size of 500mX 400m The initial location of nodes 0,1,and 2 are respectively (5,5), (490,285) and (150,240). At time 10, node 0 starts moving towards point (250,250) at a speed of 3m/sec. Assume initial location of nodes 4, 5 & 6 are10m away from node 0,1 & 3 respectively. At time 15, node 1 starts moving towards point (45, 258) at a speed of 5m/sec. At time 110, node 0 starts moving towards point (480,300) at a speed of 5m/sec. Nodes 4,5 & 6 move at speed of 30m/sec which pauses for 2sec every 10m of traversal. The simulation lasts 150 sec. At time 10, a TCP connection using the DSDV ad-hoc routing protocol and the IEEE802.11 MAC protocol is initiated between node 0 and node 1. Change packet rate (1, 2, 3) when generating traffic and draw a chart that shows speed versus end to end delay. ii.Write a client / server program using TCP sockets, wherein the client sends the name of a program to be executed at the server. The server then sends the result of the executed program back to the client.

(40)

(70)

(30)

10.

i.Write a client / server program wherein the server implements passwords authentication. The client sends the user name password and the server checks whether the username and password matches any of the entries in its password file. Implement the above using connection oriented service. ii. Simulate the behavior of SMTP /POP3 / IMAP as per the below given scenario. Consider Node A, B and C. A likes to send a mail to B where C is a mail server.

(50)

(50)

11

i. Develop a Client/server application in C for implementing the below scenario a. Consider nodes A, B, C and D. Implement Node A as the source, node B as the router. Nodes C and D are two nodes acting as two different networks connected with two interfaces of the router B. Node A should send an IP datagram to B. B extracts the network address from the destination IP of the datagram and forwards it to either C or D. Note: Construct IP header with proper fields. Use a static routing table in node B and suitable subnet masks for forwarding to C and D. Show the output for both cases( Case 1.IP datagram to C. Case 2.Ip datagram to node D.) b.

(75)

ii.Using UDP Sockets transfer a large file from Client to Server. The server should send back the size of the file to the Client. 12. i. Implement 1-bit sliding window for the below scenario a. A is sending data starting with seq no 0. (Initial packet with Seq no: 0). b. B is sending the acknowledgement (ack no:1). ii. Develop a Client/server application in C for implementing the below scenario

(25)

(40)

Consider nodes A, B, C and D. Implement Node A as the source which generates an IP Datagram (with all fields) and sends to node B. Node B performs IP-in-IP encapsulation if the PROTOCOL field of the header is TCP and sends to node C. Node C decapsulates the packet and displays the inner IP Datagram. If the PROTOCOL field is UDP it just sends to node D.

(60)

i. 13

Implement a Client/server application using TCP sockets for simulating the TCPs behavior while transmitting a file. 1. 3-way handshake- Connection establishment. 2. Receiver advertising window to the sender. 3. AIMD at initial stage. 4. Slow start in case of congestion.

(70)

ii. Implement a Client/server application using TCP sockets to perform Chatting service. (30) 14 i. Implement a Client/server application using TCP sockets / that sends a .C a file from client to server and display in the server. The Server should parse the file and tokenize into symbols and characters and write them in two separate text files. Send the two files to the client. ii. Implement a program to generate the SNMP PDUS from Manager Station to user agent and vice versa. i. Maintain MIB structure in user agents and pass queries from Manager Station using Object Identifiers. ii. Develop a Client/server application for implementing the DNS operation as below i. URL from Client to Server ii. IP address from Client to Server iii. Error reports for both cases. 16. i. Using NS2 simulator perform the packet flow operation between 5 nodes. Show the behavior in Xgraph and trace file. ii. Write a program to find the shortest path between n nodes to route packets. Show the routing table content at each node. i. Write a program to perform the Layer 3 functionality of IP encapsulation by considering data from Transport Layer. ii.Write a program to perform Layer 4 functionality of Constructing TCP or UDP Packets.

(50)

15

(50) (50)

(50)

(40)

(60) (50)

17

(50)

18

i.

Simulate the behavior of HTTP protocol in client and server. Perform the GET and POST method operations.

(50)

ii. Write a client server program to implement an echo server that echoes only those words received from the client which starts with a vowel letter. If the phrase doesnt have any vowels, the server sends a message TRY AGAIN.

(50)

19

i. Write a java program to capture the specified number of packets a. one by one. b. as a group from the network interface and process , save the packet. (50) ii. Implement the scenario where the sender is sending a sequence of packets (50) and receiver is sending a negative ack if it receives an out-of-order packet.

20

i. Simulation of DNS using UDP sockets. Maintain a root server, 2 TLD servers (say, corresponding to com and gov), 2 authoritative server. Iterative: The client sends a DNS query to the root server. The root server sends the IP address of TLD server to the client. The client sends the DNS query to the TLD server. The TLD server sends the IP address of the authoritative server to the client. The client sends the DNS query to the authoritative server and gets the IP address of the required host. Modification: Simulation of recursive version. ii. Implement a multiuser chat program using UDP Sockets.

(70)

(30)

Das könnte Ihnen auch gefallen