Latency Troubleshooting

Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or

Already have an account? Sign In »

Difficulty
Intermediate
Video Transcription
00:00
>> Hello cybrarians and welcome back to
00:00
the Linux plus course here at Cybrary.
00:00
I'm your instructor Rob Gills and in today's lesson,
00:00
we're going to be covering latency troubleshooting.
00:00
Upon completion of today's lesson,
00:00
you're going to be able to understand the causes
00:00
and impact of latency on network performance.
00:00
We're going to see how RDMA drivers
00:00
can be used to mitigate latency and
00:00
then later on we're going to learn the tools
00:00
to troubleshoot network latency during a demo.
00:00
Just recall this, latency is
00:00
the time between sending a packet and then
00:00
the destination receiving that packet and
00:00
latency represents any communication delay.
00:00
Latency is measured in the time it
00:00
takes that packet to travel round trip,
00:00
and high latency generally means slow network traffic,
00:00
which can be caused by low bandwidth,
00:00
network saturation, or overloaded equipment.
00:00
The idea here is that we want
00:00
low latency or fast network traffic. That is our goal.
00:00
One way that latency can be mitigated is with RDMA.
00:00
RDMA is Remote Direct Memory Access,
00:00
and that's a technology that allows direct access to
00:00
one computer's memory from
00:00
another system's memory without using either OS.
00:00
This results in lower network latency
00:00
as well as higher bandwidth and a decrease in
00:00
CPU overhead due to offloading
00:00
>> because a lot of this work
00:00
>> goes through the NIC rather than having to use the CPU.
00:00
Now, RDMA does generally require
00:00
a specialized network adapter or an HBA,
00:00
such as InfiniBand,
00:00
but it can also be used on
00:00
a standard network interface card
00:00
with a soft RoCE driver.
00:00
RoCE stands for RDMA over converged Ethernet.
00:00
This is really all that you'll need to know about
00:00
RDMA for the purposes of the exam.
00:00
You definitely don't need to know how to set it up,
00:00
but just know what it is and what it does,
00:00
and how it can benefit you.
00:00
In terms of the tools that we can use to
00:00
troubleshoot latency and see what's going on,
00:00
we can use MTR and
00:00
traceroute commands and these are going to
00:00
display the travel times and packet loss
00:00
from the source machine to the destination,
00:00
which is really what we care about
00:00
when we're looking at latency.
00:00
Now, MTR only goes through the first 10 routers
00:00
and it displays the information
00:00
>> in a graph report format.
00:00
>> We're really just going to see the endpoints
00:00
of those first two and then
00:00
the tracepath command can be used to display
00:00
travel times between each
00:00
router from source machine to destination.
00:00
But it also is going to report
00:00
the maximum transition unit or
00:00
MTU size as well in its report.
00:00
We can use our friend the ping command
00:00
to display statistics on
00:00
round-trip times and test the
00:00
>> throughput of ICMP packets.
00:00
>> Because remember, round
00:00
>> trip is how latency is measured.
00:00
>> Finally, we could also use Netcat or
00:00
NC to perform network throughput tests.
00:00
Be aware though that Netc is not enabled on
00:00
all distributions and not allowed in some environments.
00:00
We're not going to be looking at NC in our demo today,
00:00
but we are going to be looking at
00:00
a lot of these other commands.
00:00
Let's do that. Let's take a look at some of
00:00
these commands with our demo.
00:00
Here we are in
00:00
our demo environment and right off the bat,
00:00
let's run a traceroute.
00:00
We'll do a traceroute to Google.
00:00
We'll go traceroute www.google.com.
00:00
We can see that this is pretty quick.
00:00
We can see all the traceroute
00:00
>> information going through.
00:00
>> Now, let's check out the traceroute replacement,
00:00
which is my traceroute,
00:00
which is actually just MTR.
00:00
We can do MTR www.google.com.
00:00
Here we can see that MTR
00:00
is running a report that refreshes.
00:00
It's just going to continuously go through and run
00:00
this traceroute that we just saw.
00:00
But it's just displaying the host and the destination
00:00
and then all of the statistics
00:00
on how the traceroute went.
00:00
We see all of these different fields here.
00:00
Loss percentage, sent,
00:00
last average, best,
00:00
worst, standard deviation.
00:00
We can hit control c to get out of MTR.
00:00
Now if we wanted to display
00:00
just specific fields, we can do that.
00:00
We can do MTR and we can pass with
00:00
the dash o option to specify the fields.
00:00
For instance, let's say that we want to
00:00
display L for loss,
00:00
D for drop, A for average round-trip time,
00:00
and W for the worst round trip time,
00:00
then we hit enter and now we can see
00:00
that we just see those fields over here,
00:00
lost, drop, average, and worst.
00:00
That's pretty much all you need to know about MTR.
00:00
Let's hit control c and get
00:00
out of this and then let's go ahead and
00:00
clear our screen by hitting control l. Now,
00:00
the next command that we can run is tracepath.
00:00
Let's run tracepath to
00:00
www.google.com and when we run this command,
00:00
what we're going to see is
00:00
that it's actually going to give us
00:00
the MTU information as it goes along here.
00:00
We see PMTU,
00:00
we also see the round trip time, the information,
00:00
and this may not display on
00:00
every hop because it's trying to
00:00
get information on every hop and may not even complete.
00:00
But this is how tracepath works
00:00
and this is the information that it displays.
00:00
Let's go ahead and hit control c and get out of this
00:00
and now let's finally look at
00:00
our ping command. We'll do another one.
00:00
We'll do ping to www.google.com
00:00
and what we see here is the time,
00:00
this time field at the end.
00:00
This is going to tell us what
00:00
the actual round-trip time is for us
00:00
sending a packet to the destination and
00:00
the destination responding back.
00:00
That tells us how long it takes and gives us
00:00
a baseline idea of the latency for the communication.
00:00
We'll go ahead and hit control c on this one as well.
00:00
With that, we've reached the end of this
00:00
lesson and in this lesson,
00:00
we covered the impact and causes of network latency.
00:00
We saw how RDMA drivers can be
00:00
used to mitigate latency and then we
00:00
covered some of the tools that are used to troubleshoot
00:00
network latency such as traceroute and MTR,
00:00
tracepath, ping and we talked a little bit
00:00
about the Netcat command or NC.
00:00
Thanks so much for being here and I look
00:00
forward to seeing you in the next lesson.
Up Next
Network Performance Troubleshooting
Name Resolution Troubleshooting
Network Security Troubleshooting
Network Mapping and Protocol Analyzers
Basic Network Troubleshooting
Virtual Lab