Lesson 9 — Networking Troubleshooting Basics
ip + ping + ss + curl
When a Linux system cannot reach another system, the right move is not random guessing. This lesson teaches a simple troubleshooting flow using four high-value tools: ip to inspect interfaces and addresses, ping to test reachability, ss to inspect listening ports and connections, and curl to test application-level access.
Good network troubleshooting moves in layers: interface → addressing → reachability → ports/services → application response.
Check whether an interface is up, verify IP addressing, test whether a host responds, inspect whether a service is listening, and confirm whether an HTTP service actually responds.
Lesson Objectives
By the end of this lesson
- Inspect interfaces and IP addresses with
ip - Test basic reachability with
ping - Inspect ports and listening services with
ss - Test HTTP responses with
curl - Follow a clean network troubleshooting sequence
Why this matters
- Many “server is broken” problems are actually network path problems
- A service can be running but not listening where you expect
- A port can be open but the application can still return an error
1) Check Interfaces and Addresses with ip
Show addresses
Use ip addr to view interfaces and assigned IP addresses.
Look for whether the interface is UP and whether it has the expected address.
Show link state
Use ip link to quickly inspect whether an interface appears up or down.
Show routing basics
Use ip route to inspect the routing table and default gateway.
Before blaming DNS, firewalls, or remote servers, first confirm that your own interface, address, and default route make sense.
2) Test Reachability with ping
ping helps you test whether a host responds across the network. It is simple, but still useful when used correctly.
Ping another host
This tests whether your system can reach a target. Using an IP checks raw reachability. Using a hostname also introduces DNS into the test.
Interpret carefully
- A failed ping does not always mean the host is down
- Some systems block ICMP responses
- But ping is still a fast first test for path problems
3) Check Ports and Sockets with ss
ss is a strong tool for seeing whether services are listening on the ports you expect.
Show listening TCP/UDP ports
This can tell you whether a service is listening, and often which process owns the socket.
Filter for a specific port
This is useful when checking whether a web server, SSH service, or another daemon is actually bound to the expected port.
A service may be “running” but not actually listening on the right interface or port. Check both service status and listening sockets.
4) Test the Application with curl
curl is useful when you want to test what an HTTP or HTTPS service actually returns.
Basic HTTP check
This tests the application response, not just whether the port exists.
Headers only
This is useful when you only want the response headers and status code.
Why this matters
If ss shows a port is open but curl returns an error, the problem may be inside the application rather than the network path.
5) Fast Troubleshooting Pattern
- Check whether the interface is up and has an address
- Check the route table
- Ping a useful target
- Check whether the expected service is listening
- Use curl to test the application response
Practical — Test a Service Path
This practical teaches a clean admin workflow instead of random command memorization.
Practical Task
- Check whether your system has a usable address
- Ping a target that makes sense in your lab
- Check whether a common service is listening, such as SSH on port 22 or a web server on port 80
- Use curl if an HTTP service exists
- Write one sentence describing what looks healthy and what does not
Walkthrough
You may not have every service installed. That is fine. The point is to follow a logical sequence and interpret what each command tells you.
Write Your Observation
Use a simple note like a junior admin would write.
Mini Knowledge Check
Score 75% or higher to unlock the next lesson link. Your score is saved on this browser.
1) Which command is best for inspecting Linux interfaces and IP addresses?
2) What is a strong use for ss?
3) Why might you use curl after checking a port with ss?
4) What is the strongest troubleshooting habit in this lesson?
Next Lesson
Tip: update the next lesson link when your page exists.