Skip to main content
Engineering LibreTexts

10-F.11: How to Troubleshoot Networking Problems

  • Page ID
    40965
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    EXAM OBJECTIVES COVERED
    1.3 Given a scenario, configure and verify network connection parameters.
    4.1 Given a scenario, analyze system properties and remediate accordingly.

    Where to Start?

    To begin with remember, keep it simple. That is a good place to start. Some simple things to check out:

    • Is the device powered on - no, really - make sure.
    • Is the cable plugged into the network interface - most NICs show a green light if it is seeing a network signal.
    • Is the other end of the cable plugged into an appropriate place - either a wall plate, or a switch/router.
    • Is the NIC in an "up" state?

    If these things all check out then move on to some of the tools that have been talked about:

    • Attempt to ping a host - first try one on the local network, then one out on the Internet.
    • Attempt an IP based ping - if this works but the hostname doesn't ping the name resolution is not set properly.
    • Test multiple systems on the network segment - do they all fail the same?

    An overview of some of the network troublshooting tools that are available.

    The ping Command

    The ping command is used to check the network connectivity between host and server/host. This command takes IP address and sends a data packet to the specified address with the message “PING” and gets a response from the server/host. This time is recorded and is called latency. Fast ping low latency means faster connection. Ping is generally measured in milliseconds. Every modern operating system has this ping pre-installed.

    Syntax

    ping [ OPTIONS ] [ IP address ]

    Command Options:

    Options Meaning
    -4 Use IPv4 only.
    -6 Use IPv6 only.
    -a Audible ping.
    -A Adaptive ping. Interpacket interval adapts to round-trip time, so that effectively not more than one (or more, if preload is set) unanswered probe is present in the network.
    -b Allow pinging a broadcast address.
    -B Do not allow ping to change source address of probes. The address is bound to one selected when ping starts.
    -c count Stop after sending count ECHO_REQUEST packets. With deadline option, ping waits for count ECHO_REPLY packets, until the timeout expires.
    -D Print timestamp (unix time + microseconds as in gettimeofday) before each line.
    -f Flood ping. For every ECHO_REQUEST sent a period “.” is printed, while for every ECHO_REPLY received a backspace is printed.
    -h Show help.
    -i interval Wait interval seconds between sending each packet. Real number allowed with dot as a decimal separator (regardless locale setup)
    -I interface interface is either an address, or an interface name

    In the following example we see four replies from the host www.google.com - notice the icmp_seq number: this is the sequence number of the reply, then at the end is the round trip time for the ping request and the reply to get back to the sender.

    pbmac@pbmac-server $ ping www.google.com
    PING www.google.com (172.217.6.68) 56(84) bytes of data.
    64 bytes from sfo07s17-in-f4.1e100.net (172.217.6.68): icmp_seq=1 ttl=114 time=17.6 ms
    64 bytes from sfo07s17-in-f4.1e100.net (172.217.6.68): icmp_seq=2 ttl=114 time=23.2 ms
    64 bytes from sfo07s17-in-f4.1e100.net (172.217.6.68): icmp_seq=3 ttl=114 time=21.7 ms
    64 bytes from sfo07s17-in-f4.1e100.net (172.217.6.68): icmp_seq=4 ttl=114 time=20.1 ms
    --- www.google.com ping statistics ---
    4 packets transmitted, 4 received, 0% packet loss, time 1001ms
    rtt min/avg/max/mdev = 17.684/20.484/23.285/2.804 ms
    

    The traceroute / tracepath Commands

    The traceroute command prints the route that a packet takes to reach the specified host. This command is useful when you want to know about the route and about all the hops that a packet takes. The image below depicts how traceroute command is used to reach the Google(172.217.26.206) host from the local machine, and it also prints details about all the hops that it visits in between. The tracepath command is used to trace paths to destination discovering MTU along this path. It uses UDP port or some random port. It is similar to traceroute, but it does not require superuser privileges and has no fancy options.

    Syntax:

    traceroute / tracepath [ OPTIONS ] [ IP address ]

    Command Options:

    Options Meaning
    -4, -6 Explicitly force IPv4 or IPv6 tracerouting. By default, the program will try to resolve the name given, and choose the appropriate protocol automatically. If resolving a host name returns both IPv4 and IPv6 addresses, traceroute will use IPv4.
    -I, --icmp Use ICMP ECHO for probes
    -T, --tcp Use TCP SYN for probes
    -d, --debug Enable socket level debugging (when the Linux kernel supports it)
    -f first_ttl, --first=first_ttl Specifies with what TTL to start. Defaults to 1.
    -g gateway, --gateway=gateway Tells traceroute to add an IP source routing option to the outgoing packet that tells the network to route the packet through the specified gateway
    -i interface, --interface=interface Specifies the interface through which traceroute should send packets. By default, the interface is selected according to the routing table.
    -m max_ttl, --max-hops=max_ttl Specifies the maximum number of hops (max time-to-live value) traceroute will probe. The default is 30.

    Here is an example of traceroute output. It shows the hostname/IP address and then three round trip time (RTT) for the packet to reach that point and return to your computer. This is listed in milliseconds. There are three columns because the traceroute sends three separate signal packets. This is to display consistency, or a lack thereof, in the route that is being traced.

    pbmac@pbmac-server $ traceroute www.deltacollege.edu
    traceroute to www.deltacollege.edu (52.36.131.229), 30 hops max, 60 byte packets
     1  _gateway (192.168.1.1)  3.411 ms  3.405 ms  3.395 ms
     2  96.120.86.49 (96.120.86.49)  12.338 ms  12.339 ms  12.330 ms
     3  ae-252-1216-rur02.park.ca.ccal.comcast.net (96.110.146.133)  12.974 ms  12.965 ms  12.953 ms
     4  ae-30-ar01.sacramento.ca.ccal.comcast.net (162.151.40.153)  13.836 ms  13.827 ms  13.816 ms
    

    Adapted from:
    "PING Command in Linux with examples" by him0000, Geeks for Geeks is licensed under CC BY-SA 4.0
    "traceroute command in Linux with Examples" by codstar, Geeks for Geeks is licensed under CC BY-SA 4.0


    10-F.11: How to Troubleshoot Networking Problems is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?