Ping Measurements: Difference between revisions
en>Jlabdaq |
m 1 revision imported |
(No difference)
|
Latest revision as of 17:59, 24 December 2024
Connecting Machines[edit | edit source]
Idea[edit | edit source]
In order for the computer's to talk to each other, a network needs to be established between the two machines. This can be done by establishing a manual IP configuration that allows for the two computers to transfer information between each other. In this case, we will be using a Linux system utility called ping which broadcasts a small (usually less than 100 bytes) IP packet to another machine on a specified network (our manually configured network). Once the packet is sent, the second computer acts as a mirror by identifying what was sent and rebroadcasting back to the first machine. Ping will then report the the total round trip time.
Simplified Model: By using the ping function, the first computer will send a signal to the second computer. The signal will travel through an ethernet cable to the other computer. Then, the second computer will receive the signal and sent it back to the first computer. Finally, the signal will reach the first computer and the elapsed time is recorded by the first machine. The ping information will be stored in a file and saved to a flash drive so the data can be transferred to a computer for analysis.
Method[edit | edit source]
IP Configuration[edit | edit source]
1. Allow the computer to boot into the GUI
2. Load the Network Connections Assistant (Each OS will varry. For Ubuntu, you can simply search for Network Connections)
3. Now select the edit options within the network settings and choose IPv4 Settings
4. Change the method type from DHCP to Manual
5. The IP Address, Netmask, and Gateway need to be manually entered
6. One computer will have the following configuration : Address :: 192.168.1.1 ; Netmask :: 255.255.255.0 ; Gateway :: 192.168.1.1
7. The second computer will have the following configuration : Address :: 192.168.1.2 ; Netmask :: 255.255.255.0 ; Gateway :: 192.168.1.2
8. To test if this was done properly, use the first computer to ping the second using the command ping 192.168.1.2
Ping Testing/Data Capture[edit | edit source]
How to Ping using Linux?[edit | edit source]
From a terminal window simply type ping followed by the address you want to ping. For example, ping 192.168.1.1 will continually ping a connected computer until the user tells it to stop. To end the ping test press crtl+c. Another useful ability of ping is the -i and -c functions. -i will allow you to set the "pinging" rate and -c will set the amount of pings that are sent. Below are the steps for completing a ping test using these functions:
1. Run the computer in Single User Mode and activate a Superuser
2. Connect both computers using a crossover ethernet cable
3. Choose a time interval and a number of times you wish to ping
4. Type ping -i rate -c amount address For instance, ping -i 0.01 -c 10000 192.168.1.2
5. If you wish to save the ping test: ping -i rate -c amount address > file name For instance, ping -i 0.01 -c 10000 192.168.1.2 > test_1.txt
For additional help or other ping functions:
http://linux.about.com/od/commands/l/blcmdl8_ping.htm
http://www.wikihow.com/Ping-in-Linux
Example: The ping command can be manipulated to send 10000 signals at set interval rates. For example, the command written in single-user mode: ping -i 0.01 -c 10000 192.168.1.2. This command prompts the computer to send 10000 signals to that IP address (which was the second computer's) at a rate of one signal every 0.01 seconds. After each of the signals are sent, the round trip time is recorded and stored.