Anda di halaman 1dari 2

B.E.

(COE) 5th Semester Students Winter Training on Computer Networks Lab Exercises
Exercise 1 Review of basic programming tools: Use vi editor, gcc compiler, Makefile, gdb debugger. Create and handle Processes in Linux operating system. Make use of fork, sleep, wait, exit, getpid, getppid system calls and ps, kill Linux commands. Design and implement a simple, interactive shell program that prompts the user for a command, parses the command, and then executes it with a child process by looking at PATH environment variable. Also handle Ctrl-c, Ctrld signals. Exercise 2 (a) Write two C programs making use of Message Queues for Inter-Process communication. (b.1) Simulate the M/M/1 queuing system using Event Scheduling based Discrete Time Simulation with a C/C++ program. Verify the simulated results with analytical values. (b.2) Write a C/C++ program based on Process Oriented Discrete Time Simulation to model the M/M/1 queuing system using message queues based inter-process communication facility in Linux operating system. Verify the simulated results with theoretical results. Exercise 3 (a) Experiment with the following Linux Networking Commands specifying different important flags: ifconfig, route, netstat, ping, arp, traceroute, tcpdump, xxd, host, nslookup, dig, ifup, ifdown, nmap, service, chkconfig etc. (b) Ethereal Network Protocol Analyzer is a tool for capturing, displaying, and analyzing the frames, packets, and messages that are exchanged in a network. (b.1) Web Browsing (DNS, TCP, HTTP): Analyze the layered structure of network protocols using a web browsing example. Examine the header structure of the PDUs at the data link, IP, Transport, and Application layers. In particular observe how addresses and port numbers work together to enable end-to-end applications. (b.2) Probing the Internet (ICMP, PING, Traceroute): Investigate two applications of the Internet Control Message Protocol (ICMP): PING uses ICMP to determine whether a host is reachable and Traceroute uses ICMP to allow users to determine the route that an IP packet takes from a local host to a remote host. (b.3) Telnet and HTTP (Telnet, TCP, HTTP): First, Examine the Telnet protocol by logging into a remote host, then show how Telnet can be used to connect to the well-known port of a server and to interact with the server through a command line. In the process, investigate additional details of the TCP and HTTP protocols. (b.4) Analyzing an Ethernet Packet Trace: Learn to work with Ethernet frames including recognizing the frame type, interpret Ethernet hardware (MAC) address, parsing out various fields in an IP packet such as IP addresses of the sender and the receiver. Next try to extract from the same traces more data contained in the body of the frames. (c) Use libpcap library functions to write a C program to extract the information from binary dump file saved from Ethereal for HTTP session. Extract all relevant details. (d) Now you are supposed to write your own C function to extract the relevant details from Dump file without using libpcap library.

Exercise 4 (a) Write a simple conversational program in C using sockets. The program should be possible to start as client or as server. The server should notify about a call from the client's host, by giving its name, and prompt for reply. After that a half-duplex conversation will begin, both ends display received messages and prompt for reply. The conversation ends by a host sending a "close" message. (b) Write a simple FTP server and client using the TCP sockets on Linux. (c) Write two programs: (1) a simple WWW client and (2) a simple WWW server. (d) Write a program to create a process called network that simulates datagram loss. Also write program for sender that sends a datagram to network using Datagram Socket and a program for receiver that receives a datagram from network. Exercise 5 Implement a 1-bit Sliding Window Protocol using three processes namely sender, receiver, and network where network process simulates a lossy network (packets are lost only not get corrupted) and sender and receiver communicate with 1-bit sliding window protocol. Make use of SIGALRM signal available in Linux to implement timer. Exercise 6 Implement a Distance Vector Routing Algorithm for network topologies defined in a file called Config. Assume a suitable format for this file. Write a routine to initialize the routing tables of all nodes in your topology. From Config file read a change in the link cost for one/few nodes because of which update routine is called. If possible show the Count-to-infinity problem in your simulation. Exercise 7: Complete Computer Network Simulation Assume a network of host computers and some special computers that are useful for data routing only. Suppose there is a file transfer application process, a TCP process and an IP process on each host. FTP process communicates with its TCP process using message queues, TCP further communicates with its IP process message queues. There is a network simulated using a set of processes running on special computers (could be running on same computer as host computer for testing). Nodes in network have only IP process running (no TCP/application). Network is not reliable (i.e. packets can get corrupted or even can be dropped somewhere in the network). IP process of a source host sends data to next node in network using Datagram Sockets. The data is routed through the network based on routing tables being managed by IP process of network nodes and finally reaches the destination. You can assume static routing tables for simplicity. Simulate the maximum features of each layer (IP/TCP) (e.g. fragmentation, routing, reliability, in-order delivery, flow control, congestion management etc) for the above scenario on Linux machines.

Anda mungkin juga menyukai