DOC PREVIEW
GT ECE 4110 - TCP 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 tcp_sink on ‘gatechftp,’ which is a machine that will be used as the receiver 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 lab2 <ENTER>$./tcp_sink –p <your_port_number> <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 “tcp_sink”<ENTER> (tcp_sink between quotes) to check for running processes. (Do not run the sink in debug mode, -D argument)On your machine, you will have to run ethereal, tcpdump, and your tcp_gen program to generate and capture TCP 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 $tcpdump –S –nli eth0 <ENTER> to start tcpdump and make this window as wide as possible so it will be easier to read. (You can see how to use tcpdump, by typing ‘man tcpdump’)In a third terminal, type $./tcp_gen –D –i 0.2 –P <your_port_number> –a 57.35.6.245 <ENTER> to start your TCP traffic generator.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. Type <CTRL+C> in tcpdump window to stop it from collecting any more data. On gatechftp, stop your sink from running by pressing <CTRL+C>. Then, type $ps -ef | egrep “tcp_sink”<ENTER> and find the process corresponding to the tcp_sink 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 tcp_sink.Q1. How do you think the type of data from tcpdump compares to the type of data from ethereal?Q2. Which do you like better?Look at the protocol detail available in ethereal. With the mouse, select one of your TCP datagrams. In the lower window, expand ‘Ethernet II’ by clicking on the plus sign. Answer the following questions:Q3. What is the value of your Ethernet MAC address of the machine you are using?Q4. What is the value in the ‘Differentiated Services Field’ (correctly called Type of Service field) in the IP header of this TCP datagram?Q5. What does the value mean? (Don’t ask TA for the answer)Q6. What was the source port number?Q7. Where does the source port number come from? (e.g., ports up to 1024 are called reserved ports) (Don’t ask TA for the answer) (To see the source port number, expand the field named Transport Control Protocol)Fill in the following table (for at least 5 of the TCP packets from your tcp_gen run) with the information obtained from your tcp_gen ( with debug mode ON) and the ethereal:As seen on your PC by tcp_genAs deduced by youAs observed by etherealPacket size (bytes)Inter-arrival time(sec)TCP segment size header plus data (bytes)Inter-arrival time(sec) of TCP segmentsTo Setup the PrinterECE 4110 Internetwork ProgrammingLab 2: TCP Traffic GeneratorGroup Number: ________Member Names: _________________________ _________________________ _________________________ _________________________Date Issued: Monday Sept 1, 2008Date Due: Wednesday, Sept 10, 2008Lab Goals Finish a TCP sockets programs to transmit and receive TCP datagrams. Analyze TCP network traffic using tcpdump and ethereal Linux network utilities.PrelabThese questions pertain to the tcp_gen.c and tcp_sink.c code. They are designed to help you understand thepresented code as well as the differences between our code and Steven’s example code from the lecture slides. The code for these files should be attached to your handout, or you can get it from the NAS as described in Section I.P1. In both our and Stevens’ tcp client programs, the IP address of the sink is read in from the command line when the program is started. However, in Stevens’ example the IP address is always the first argument passed to the program, and so is always in the same place within argv[]. In our code, however, we have a variable number of command line arguments, so we cannot guarantee that the IP address and port number will always be in the same place. How is this handled in our code (i.e. how and where are the IP address and port number of the sink stored for future access?)Section I: Coding tcp_gen & tcp_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/Lab2 <ENTER>$cp lab2.tar ~/stevens_book/unpv12e/lab2.tar <ENTER>$cd ~/stevens_book/unpv12e <ENTER>$tar –xvf lab2.tar <ENTER>$cd lab2 <ENTER>$ls <ENTER>Now, you will see a list of files. You will make modifications to a traffic generator program namedtcp_gen.c and to a receiver program named tcp_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 tcp_gen.c and tcp_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). 1You may find that some declared variables are not needed, so make sure


View Full Document

GT ECE 4110 - TCP Traffic Generator

Documents in this Course
PUSH Flag

PUSH Flag

17 pages

Ethernet

Ethernet

33 pages

Load more
Download TCP 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 TCP 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 TCP 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?