4.3.1) Ping
Overview
Ping is one of the most common network diagnosis tools. Ping works by sending ICMP ECHO_REQUEST messages to a destination IP address, and, upon receiving a corresponding ICMP ECHO_REPLY, by default it prints one information line with the sequence number, ttl, as well as the round trip time.
Location
The sample code for initiating a ping request is located in:
/root/Profiles/ProfileScripts/Traffic/Samples/startPing.sh
According to the instructions for running sample applications, the best way to use ping is to copy the script to the startTraffic.sh script (in either of the E-VMs, possibly in all E-VMs, if so desired):
$cp /root/Profiles/ProfileScripts/Traffic/Samples/startPing.sh /root/Profiles/ProfileScripts/Traffic/startTraffic.sh
Edit the helper script in /root/Profiles/ProfileScripts/Traffic/Helpers/pingHelper.sh to change the number of pings, frequency, or to add any of the many options available for this versatile tool:
PING_DESTINATION is the destination IP address. The default value (172.16.0.1) corresponds to the default IP address of eNBs in the srsRAN experiment. Therefore, for setting up traffic from the UEs to the eNB nothing needs to be changed. However, for all other destinations, the IP address of the destination should be setup instead.
PING_PERIOD is the time between two consecutive probe packets (in seconds). The default value is 0.2s, corresponding to 5Hz.
PING_COUNT is the number of probe packets to send. If left undefined, an infinite amount of probes is sent (practically, stop_experiment.sh will stop the sending process).
The current script is setup to first verify the reachability of the destination IP address before starting the traffic.
Measuring Packet Loss
Despite the simplicity of ping, the manual page reveals a multitude of options that can be useful in different scenarios. One interesting feature of ping is that it uses unique sequence numbers for the ECHO_REQUEST messages, which enables an Experimenter to detect when a packet was lost. Thus, in addition to round trip delays, packet losses can also be measured.
Potential Pitfall
In SRS-LTE, when an UE is first disconnected from the eNB and then reconnected, the UE will acquire a new IP address. For example, at first attachment to the network an UE may be assigned 172.16.0.2, but upon reconnecting, the same UE may now be assigned 172.16.0.3. As such, running ping from the eNB to the initial IP address of the UE (172.16.0.2) will continue to fail after the UE is reconnected (with the new IP address). In contrast, a ping initiated from the UE to the eNB (which, by default has 172.16.0.1) will continue to succeed after the UE reconnects.