Practice Use drills for recall and labs for real operating judgment.

LAB-NET-04 - Ports and Connections

Inspect listening ports and active connections so you can tell whether a service is actually waiting for traffic.

NET Networking and Communication

Ports and Connections

Inspect listening ports and active connections so you can tell whether a service is actually waiting for traffic.

35 min INTERMEDIATE LINUX Curriculum-reviewed
Success criteria
  • Use ss to inspect listening sockets.
  • Explain the difference between a listening port and an established connection.
Safety notes
  • Inspect first; do not kill or reconfigure services unless you know exactly what they are.

Part A: The Field Guide

A host can be reachable while the service you want is still unavailable.

That is why port and socket inspection is a separate step.

A listening service is waiting for connections. An established connection means traffic is already flowing between endpoints.

Useful Distinction

Network reachability and service availability are related but not identical. A machine can answer pings while the target service is not listening on the expected port.


Part B: The Drill Deck

Terminal required: inspect first and keep the exercise observational.

G
Guided Step by step - type exactly this and compare the result
>

Exercise G1: Inspect listening sockets

  1. Run sudo ss -tulpn
  2. Identify one listening service
  3. Note the port and the process information if available

Exercise G2: Look at active connections

  1. Run sudo ss -tupan
  2. Notice that the output can include both listening and active connections depending on flags
  3. Find one state value such as LISTEN or ESTAB

Exercise G3: Focus on one port

  1. Run sudo ss -tulpn | grep ':22 ' if SSH is present, or use another familiar port on your system
  2. Explain what this filtered view is helping you answer
S
Solo Task described, hints available - figure it out
>

Exercise S1: TCP versus UDP

Run a view that includes both TCP and UDP, then explain why checking only one protocol family can miss a service you care about.

Exercise S2: Listening versus connected

In your own words, explain:

  1. what LISTEN means
  2. what ESTAB means
  3. why those states answer different questions
M
Mission Real scenario - no hints, combine multiple skills
>

Mission M1: Add the service-layer step to your troubleshooting ladder

Write the place where ss belongs in a broader network debugging flow.

For example, after checking connectivity and naming, where do you ask whether the service is actually listening?

If that placement feels natural, the network model is becoming more operational and less memorized.