Hello everyone,
I am a student at Purdue and was encouraged to reach out of the Linux community to help grow my knowledge as well as become more comfortable in this space. I was curious if anyone have any good tips for troubleshooting a network as if you were a Linux Administrator. I know there are some useful tools such as using a nslookup or host command to query DNS servers as well as using ARP tables to identify IPv4 addresses to MAC addresses.
My question would be: What are some common network issues a Linux Admin has to handle and what are some commands or tools to correct these issues? Sorry if this was confusing, I am new to Linux and trying me best to learn. Thank you!
Hello BlueFish,
Whoever encouraged you to reachout to this community, deserves a Starbucks gift card from you - let your conscience determine the value
I don't know about any common network issues issues, but I do know about some good networking tools.
- tcpdump
* The textual version of Wireshark. An awesome tool, when it comes to
looking at the traffic entering/leaving a particular interface. You could
easily spend an 8-week semester to become proficient with this tool.
All depending on your level of networking knowledge, this tool could
even serve to expand your networking knowledge, as it relates to the
contents of packets. It's like looking under a microscope! Start out by
having a look at the manpage for tcpdump, and then just go wild from
there. There's more info on the web about tcpdump, than you have
time to read/study!
- ip
* Like a fork (or spoon) is a normal utensil used when eating, you'll want
to make this tool a regular in your networking repertoire.
- ss
* This is one that I use religiously, when it comes to looking at port
information. You'll thank me down the road for mentioning this one!
This is not a complete and exhaustive list of the tools that can be used, but
they certainly represent three that I use regularly.
Whatever you do, treat you learning journey with these tools as a
marathon, and not a sprint. The making of a fine wine cannot be rushed,
no matter how eager you are to get to the finish line!!!
Stay tuned for some much more enlightening responses from other
members of this incredible community!!!
A tool that doesn't get much press is mtr
It does some things that other tools do individually, but it instead does them all in one.
The mtr command is a network analysis and troubleshooting tool - it's a network diagnostic tool that combines ping and traceroute into one!
mtr is analogous to the top command, in that it refreshes on its own - meaning updates are in real-time.
mtr will continue to refresh until the 'q' (quit) key is pressed.
mtr gives you the ability to look only at IPv4 traffic, or IPv6 traffic.
$ mtr -4
- Only IPv4 related traffic
$ mtr -6
- Only IPv6 related traffic
mtr - a nice little tool to investigate if a problem is actually with the network, vs the Linux system.
As always, you should have a look at the manpage for this tool. Manpages aren't intended to be textbooks, and can be a little terse, but there's always some golden nuggets on them!!
@BlueFishTwoFish Yes Network troubleshooting is an essential part of Linux admin job profile and one must expect scenario based network troubleshooting questions in any such job interviews.
Refer Interview series posted by me in this forum for many such cases.
For example you can get many such scenarios like :
1. Connection refused
2. No route to host
3. ssh - port 22: Connection timed out
4. Access denied
5. kernel: nfs: server <servername> not responding, timed out
6. ping <servername> fails but ping <IP> works
7. Slow network
8. Network interface not detected
9. IP address not assigned
10. DHCP issues
11. port not open
12. ping to an IP gives 100% packet loss
13. packet drop after reaching a particular IP
14. Network performance & tuning
15. port mapping / port forwarding issues
16. Tunneling
17. Different protocols issues
Now, once you start to use the scientific methodology of troubleshooting - you will need tools to identify the root cause and resolve it. The tools can be commands like ip, ping, netstat, ss, arp, ifconfig, traceroute, tracepath, wireshark, tcpdump, iptables, firewall-cmd, mtr, ethtool, ping, nslookup, telnet, nc, curl, wget , iperf, nmap, nmcli, ssh, scp, host, dig, sar etc.
Refer https://www.redhat.com/en/blog/7-great-network-commands
use man page for digging into these commands and their use cases.
Learn about each command in detail and use them in specific scenarios as described above.
Listen up BlueFish - this is GOLD!!!!!!!
As I mentioned in my initial response, there would be much more enlightening responses from other members of this incredible community! That response from Chetan is exactly what I was referring to!!!
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.