Network Troubleshooting: Difference between revisions
(Documenting network testing.) |
(Prettier text) |
||
| Line 7: | Line 7: | ||
2. Run the following command and look at the network you want to test. | 2. Run the following command and look at the network you want to test. | ||
<syntaxhighlight lang="bash"> | |||
`ifconfig` | `ifconfig` | ||
</syntaxhighlight> | |||
<blockquote> | |||
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). | 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). | ||
</blockquote> | |||
3. Run ethtool with the name of the network device as an argument. | 3. Run ethtool with the name of the network device as an argument. | ||
<syntaxhighlight lang="bash"> | |||
`ethtool {network device name}` | `ethtool {network device name}` | ||
</syntaxhighlight> | |||
example: `ethtool eno2` | example: `ethtool eno2` | ||
<blockquote> | |||
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! | 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! | ||
</blockquote> | |||
4. Run ethtool with the '-i' flag to get the lspci slot identifier. | 4. Run ethtool with the '-i' flag to get the lspci slot identifier. | ||
<syntaxhighlight lang="bash"> | |||
`ethtool -i {network device name}` | `ethtool -i {network device name}` | ||
</syntaxhighlight> | |||
example: `ethtool -i eno2` | example: `ethtool -i eno2` | ||
<blockquote> | |||
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'. | 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'. | ||
</blockquote> | |||
5. Get the LnkSta and LnkCap values from lspci. | 5. Get the LnkSta and LnkCap values from lspci. | ||
<syntaxhighlight lang="bash"> | |||
`sudo lspci -vv -s {bus_info_value} | grep “Lnk”` | `sudo lspci -vv -s {bus_info_value} | grep “Lnk”` | ||
</syntaxhighlight> | |||
<blockquote> | |||
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. | 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. | ||
</blockquote> | |||
6. Run iperf3 to get active network speed data. | 6. Run iperf3 to get active network speed data. | ||
<syntaxhighlight lang="bash"> | |||
`iperf3 -c {chosen testing machine} -P 4 -p {port of machine} -t 30` | `iperf3 -c {chosen testing machine} -P 4 -p {port of machine} -t 30` | ||
</syntaxhighlight> | |||
<blockquote> | |||
All the data we've gathered earlier is data in theory. With this, we can actively test the actual network speed between our systems. | 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 | 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> | |||
Revision as of 21:23, 1 October 2026
Steps to Troubleshoot a local connection on a Rocky Linux Machine
Note: One of the steps requires administrative access.
1. Install iperf3. This will be your network testing tool.
2. Run the following command and look at 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 {chosen testing 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