Linux Networking Basics: Inspect and Troubleshoot with ip, ping, netstat, and ss

Linux RSH Network November 30, 2025 2 mins read

Learn how to inspect network interfaces, test connectivity, and troubleshoot Linux networking using ip, ping, netstat, and ss.

πŸ“– Linux Networking Basics

Networking is a core part of managing any Linux system. Whether you're debugging a server, configuring firewalls, or verifying communication between machines, Linux provides powerful built-in tools that give you deep visibility into your network state.


🌐 Why Networking Tools Matter

Linux networking utilities help you:

  • Inspect network interfaces

  • Verify connectivity

  • Check routing

  • Identify open ports and socket usage

  • Troubleshoot application/service communication

These tools are essential for admins, DevOps engineers, and security professionals.


πŸ” 1. Inspecting Network Interfaces with ip

The ip command replaces legacy tools like ifconfig.

 
ip a

What it shows:

  • All network interfaces

  • Assigned IP addresses

  • Interface status (UP/DOWN)

Use this command whenever you need to quickly check which IP your server or VM is using.


πŸ“‘ 2. Testing Connectivity with ping

 
ping google.com

Purpose:

  • Sends ICMP echo packets

  • Confirms if a host is reachable

  • Helps measure latency

πŸ’‘ Press Ctrl + C to stop continuous ping.


πŸ”— 3. Viewing Connections with netstat

Although older, netstat is still widely used.

 
netstat -tuln

Options:

  • -t → TCP

  • -u → UDP

  • -l → Listening ports

  • -n → Numeric output (IP and port numbers)

Use this to quickly check which services are listening on which ports.


⚑ 4. Modern Alternative: ss

ss is a faster and more feature-rich replacement for netstat.

 
ss -s

What it provides:

  • Socket statistics

  • Faster output

  • More detailed connection information

For open ports:

 
ss -tuln

🧠 Pro Tips for Networking in Linux

  • Use ip r to view the routing table

  • Prefer ss over netstat for performance

  • Use ping -c 4 <host> to send a fixed number of packets

  • Use ip link to view interface status


πŸš€ What’s Next?

Tomorrow’s post will cover:

Linux User Management

Creating users, managing groups, and understanding permissions with:
useradd, usermod, passwd, groupadd.

Stay tuned!

Advertisement

R
RSH Network

39 posts published

Sign in to subscribe to blog updates