DOC PREVIEW
GT ECE 4110 - Lab 3: UDP Traffic Generator

This preview shows page 1-2 out of 6 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

For this part of the lab, you will need to run udp_gen on ‘gatechftp,’ which is a machine that will be used as the sender side. To make sure your results don’t get mixed up with those of other students, you will need to use a unique port. Your port number should be 5000 + <your_group_number> (e.g. for group 1, that’s port 5001).On your machine, open a terminal and type $telnet 57.35.6.245 <ENTER> (this will establish a telnet session between your machine and gatechftp). Use linux_class as the user and linux_class as the password. Once the telnet session is opened, type the following commands.$cd lab3 <ENTER>$./udp_gen –i 0 -P <your_port_number> -a <your_ip_address> <ENTER>(this executable is already there for you. DO NOT PUT YOUR OWN UDP_SINK CODE ONTO GATECHFTP, USE ONLY THE PROGRAM ALREADY THERE. IF YOU GET A CORE DUMP MAKE SURE NO OLD UDP_SINK PROCESSES ARE RUNNING, IF SO KILL THEM. Use $ps -ef | egrep “udp_gen”<ENTER> (udp_gen between quotes) to check for running processes. (Do not run the generator in debug mode, -D argument)On your machine, you will have to run ethereal, and your udp_sink program to receive and capture UDP traffic, so just follow the instructions below.In one terminal, start network analyzer (ethereal) by typing $ethereal & <ENTER> or clicking the Redhat icon in the lower left corner of your screen and selecting System Tools => Network Analyzer.View=>Time Display Format=>Seconds since previous packetUnder capture => OptionsTurn on ‘capture packets in promiscuous mode’Turn on ‘update list of packets in real time’Turn on ‘automatic scrolling in live capture’Turn off ‘Enable MAC Name resolution’Turn off ‘Enable network name resolution’Turn off ‘Enable transport name resolution’click [OK] buttonIn a second terminal, type $./udp_sink –p <your_port_number><ENTER> to start your udp traffic receiver.On gatechftp, type <CTRL+C> in traffic generator window after 10 to 20 packets have been transmitted. Stop ethereal from collecting any more data by clicking the [Stop] button. Also, stop your sink from running by pressing <CTRL+C>. Then, at gatechftp, type $ps -ef | egrep “udp_gen”<ENTER> and find the process corresponding to the udp_gen you were running by looking at the port numbers. Once you find that process, the process ID number for that process is located in the second column from the left. Kill the process using that number. Make sure you don’t kill some other student’s udp_gen.Q1. Looking at either tcpdump or ethereal, what differences do you see between a UDP data transfer and a TCP data transfer? (You can support your reasoning with results from Lab2, and the TCP state diagram).Look at the protocol detail available in ethereal. With the mouse, select one of your UDP datagrams. In the lower window, you can expand the various frame components by clicking on the plus sign. Answer the following questions:$./udp_gen –i 0 -P <your_port_number> -a <your_ip_address> <ENTER>$./tcp_gen –i 0 -P <your_port_number + 1000> -a <your_ip_address> <ENTER>ECE 4110 Internetwork ProgrammingLab 3: UDP Traffic GeneratorGroup Number: ________Member Names: _________________________ _________________________ _________________________ _________________________Date Issued: Wednesday September 10, 2008Date Due: Wednesday September 17, 2008Last Edited: 1/31/2007Lab Goals Finish a UDP sockets programs to transmit and receive UDP datagrams. Analyze UDPand TCP network traffic using ethereal Linux network utility. Filter out specific information from ethereal using custom filters.Section I: Coding udp_gen & udp_sinkBefore you start this lab, make sure that you can access NAS (refer to ECE4110 Lab 1). After you are sure that NAS is mounted and ready for access, perform the following steps to copy and extract the source code that you will need to understand, comment, and modify:$cd /mnt/nas/Lab3 <ENTER>$cp lab3.tar ~/stevens_book/unpv12e/lab3.tar <ENTER>$cd ~/stevens_book/unpv12e <ENTER>$tar –xvf lab3.tar <ENTER>$cd lab3 <ENTER>$ls <ENTER>Now, you will see a list of files. You will make modifications to a traffic generator program namedudp_gen.c and to a receiver program named udp_sink.c. Then, your job is to understand, comment, andcomplete these two pieces of software. To compile and link them, you will use the command $make<ENTER>. As a starting point, look in the source code of the provided udp_gen.c and udp_sink.c for specifications of exactly how the programs should perform (on the first lines of these files, there is a description on how to execute them from the command line). You may find that some declared variables are not needed, so make sure that you fully understand the data flow within the programs. Also add some code to print out the number of MBITS PER SECOND that were sent as well as received. This statistic should be written to the screen after the <CTRL+C> key sequence is used to stop the program.Note: When writing your code for udp_sink.c, the fifth and sixth arguments of the Recvfrom function callshould be set to NULL:Recvfrom(<something>,<something>,<something>,<something>,NULL,NULL);Section II: Getting data from udp_gen & udp_sinkAt this point your programs should finished and ready to perform data transmission. The scenario to execute these programs is as follows:To run under X Windows:1. startx <ENTER> (If you have already started X Windows, do not type startx)2. Open 2 terminals (by right click the mouse; choose the ‘New Terminal’ menu option)2.a) in one terminal, type $./udp_sink -D - p 5000 <ENTER>2.b) in the other terminal after the first terminal is started, type $./udp_gen -D -P 5000 -a 57.35.6.(your_ own_IP_address_last_byte) <ENTER>3. To stop do type <CTRL+C> in the ./udp_gen terminal. You will see some summary results in both terminals. 4. You will need to do a <CTRL+C> in the ./udp_sink terminal to stop that process also.Note that you will need to do a ps and kill all of your traffic generator processes before you can run this again (use man to learn more about ps and kill Linux commands). Note that you may have to use ps –ef to see your traffic gen/sink processes.Using a packet size of 1,000 bytes per packet and a packet size variance of zero bytes, determine what the inter-arrival time value you should use to approximately generate 2, 4, and 6 Mbits/second of traffic. Also determine what the maximum number of Mbits/sec you can receive with your traffic generator


View Full Document

GT ECE 4110 - Lab 3: UDP Traffic Generator

Documents in this Course
PUSH Flag

PUSH Flag

17 pages

Ethernet

Ethernet

33 pages

Load more
Download Lab 3: UDP Traffic Generator
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lab 3: UDP Traffic Generator and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lab 3: UDP Traffic Generator 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?