Network Troubleshooting: Difference between revisions

From DISI
Jump to navigation Jump to search
No edit summary
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Steps to Troubleshoot a local connection on a Rocky Linux Machine ==
Last Updated October 2nd, 2026 for Rocky Linux 9.


Note: One of the steps requires administrative access.
Note: One of the steps requires administrative access.


1. Install iperf3. This will be your network testing tool.
=== General First Step ===


2. Run the following command to find the network you want to test.
1. <b>Install iperf3. This will be your network testing tool.</b>
 
<syntaxhighlight lang="bash">
sudo dnf install -y iperf3
</syntaxhighlight>
 
<blockquote>
You can check if it's properly installed by running iperf3 and seeing any output. If it says 'command not found', then it didn't install or doesn't exist.
</blockquote>
 
=== Server Side (where to test the connection from) ===
 
2. After installing iperf3, run the following command to start your origin server for testing link speeds. This will need an open port on that machine.
 
<syntaxhighlight lang="bash">
iperf3 -p {your_port_of_choice} -s
</syntaxhighlight>
 
=== Client Side (where to test the connection with) ===
 
2. <b>Run the following command to find the network you want to test.</b>


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
Line 15: Line 35:
</blockquote>
</blockquote>


3. Run ethtool with the name of the network device as an argument.
3. <b>Run ethtool with the name of the network device as an argument.</b>


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
Line 27: Line 47:
</blockquote>
</blockquote>


4. Run ethtool with the '-i' flag to get the lspci slot identifier.
4. <b>Run ethtool with the '-i' flag to get the lspci slot identifier.</b>


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
Line 39: Line 59:
</blockquote>
</blockquote>


5. Get the LnkSta and LnkCap values from lspci.
5. <b>Get the LnkSta and LnkCap values from lspci.</b>


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
Line 49: Line 69:
</blockquote>
</blockquote>


6. Run iperf3 to get active network speed data.
6. <b>Run iperf3 to get active network speed data.</b>


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
iperf3 -c {chosen testing machine} -P 4 -p {port of machine} -t 30
iperf3 -c {hostname/local ip of server machine} -P 4 -p {port of machine} -t 30
</syntaxhighlight>
</syntaxhighlight>


Line 60: Line 80:
The speed can be a little less than what's shown on ethtool, that's normal. For example, a network device may display having speeds of 10Gbi/s but in actuality it's closer to 9.40Gbi/s
The speed can be a little less than what's shown on ethtool, that's normal. For example, a network device may display having speeds of 10Gbi/s but in actuality it's closer to 9.40Gbi/s
</blockquote>
</blockquote>
[[Category:Serge]]

Latest revision as of 19:52, 2 October 2026

Last Updated October 2nd, 2026 for Rocky Linux 9.

Note: One of the steps requires administrative access.

General First Step

1. Install iperf3. This will be your network testing tool.

sudo dnf install -y iperf3

You can check if it's properly installed by running iperf3 and seeing any output. If it says 'command not found', then it didn't install or doesn't exist.

Server Side (where to test the connection from)

2. After installing iperf3, run the following command to start your origin server for testing link speeds. This will need an open port on that machine.

iperf3 -p {your_port_of_choice} -s

Client Side (where to test the connection with)

2. Run the following command to find the network you want to test.

ifconfig

Local networks general start with `10.`, for example, `10.70.***.**`. Pick the relevant one to test and copy it's network device name (such as eno2).

3. Run ethtool with the name of the network device as an argument.

ethtool {network device name}

example: `ethtool eno2`

Check the 'speed' variable. This is how fast that network device is made to be. NOTE: This is in gigaBITS, not gigaBYTES. One gigabyte is eight gigabits, so keep this in mind!

4. Run ethtool with the '-i' flag to get the lspci slot identifier.

ethtool -i {network device name}

example: `ethtool -i eno2`

Here, you want to copy the last six numbers of 'bus info'. For example, if your bus info is 0000:65:00.1, you just copy '65:00.1'.

5. Get the LnkSta and LnkCap values from lspci.

sudo lspci -vv -s {bus_info_value} | grep “Lnk”

The LnkSta value (in GT/s) shows you how fast the PCI port is, and LnkCap shows you how fast it can go. When things are perfect, these two values should be the same.

6. Run iperf3 to get active network speed data.

iperf3 -c {hostname/local ip of server machine} -P 4 -p {port of machine} -t 30

All the data we've gathered earlier is data in theory. With this, we can actively test the actual network speed between our systems.

The speed can be a little less than what's shown on ethtool, that's normal. For example, a network device may display having speeds of 10Gbi/s but in actuality it's closer to 9.40Gbi/s