[No audio]
traceroute, trace the network traffic.
So in this lesson, we are actually going
to learn and try to understand how we
could troubleshoot the network issues if
we are having any network issue in our
environment. And one of the commands
that is mostly used to see where your
traffic is going, which gateway or which
DNS server, it's going from one to
another to the third, and finally, how
is it going to reach its destination.
And to view that entire tracing of
those network traffic, you have to use a
command traceroute. And this is a
command I believe it is also available
in other operating systems as well. In
Windows I believe it's called tracert.
I'm not sure exactly what is the
command in Mac or other operating
system. Anyway, we our focus is Linux.
So let's see what traceroute does. The
traceroute command is used in Linux to
map the journey that a packet of
information undertakes from its source
to its destination. One use of
traceroute is to locate when data loss
occurs throughout a network, which would
signify a node that's
down. So as it says, if you just need to
find the tracing from source to
destination, how the packet went through
from one to another. Because each hop in
the record reflects a new server or
router between the originating PC and
intended target, reviewing the results
of traceroute scan also lets you
identify slow points that may
adversely, that may adversely affect your
network traffic. So it could be many
different PCs, or many different
machines or gateways in the middle while
your traffic is flowing, that affect
your traffic flow. And that's how
once you know, hey, I know this is the
machine that is the troubled machine
that is causing my network traffic to
fail, you can find that out if why by
running the command traceroute. Now,
the command itself is just simple traceroute,
and the destination hostname or
the IP address or the URL in this case.
So if you are trying to go to a URL, let's say
google.com, hotmail.com, facebook.com, or
wherever you are going, or if you are in
your local environment in your corporate
world, you probably have an IP or a
hostname of your machine, then you could
run traceroute space, the hostname as
long as your machine or where
you are running the traceroute can
resolve that hostname to IP. If it
cannot then make sure you put in the IP
address. Okay, let's get into my Linux
machine. And then we will try this
traceroute command on it and see how it works.
So I will go into
my console. And
first thing, I want to make sure I am
online. So I could just do ping any
website. So you'll see I'm getting a
response back. So I am online, so now
let's run the command traceroute. Now,
when you run it, you have to specify the
hostname if you are in your environment,
in a corporate environment, and you are
running your infrastructure and you
probably have a lot of servers, you will
have to specify the hostname if it can
resolve it, otherwise the IP address.
But for us, since we are using the lab
environment, we'll just do google.com
and hit enter. And you will see the
first hop it is going to do is, it is going
to jump on to our modem. This is my
modem which is also a gateway to my
traffic. So the first hop it is doing is
going to my modem. And this is the time
it takes to go there. And it didn't
cause any issue. If there was any
hang time there, it will tell you this
is going to take that much long time to
go to the second hop. Second hop is
going to another gateway right here,
which is most likely my NAT IP which is
the internet IP address or the internet,
IP, the gateway IP and then it will tell
you it did 1,2, all the way through
to 14 hops to get to this IP address
which is the result IP address of
google.com. So this is how you could
actually use the traceroute utility to
find out how your traffic flows from
your source to the destination. The
reason it went to my gate at first is
because that's how my gateway is
defined. And to find out your gateway,
you can run the command netstat -rnv,
and you will see the gateway I have
for all my traffic should flow from the
gateway 192.168.1.1. It might be
different in your environment, depending
on which environment you're working on.
And whether you are doing this lesson
through your work, then you will have a
different one. If you are doing from home
then most likely you will have the same
IP address as your gateway. So this is
about the traceroute. Try to find it,
how you could troubleshoot, many times
people also ask what are the different
ways you could troubleshoot networking
related issue in the operating system.
So you could also bring up this
traceroute command and this is one of
the main command that will help you
troubleshoot network related issues.
[No audio]