π 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.
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
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.
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.
What it provides:
-
Socket statistics
-
Faster output
-
More detailed connection information
For open ports:
π§ Pro Tips for Networking in Linux
-
Use
ip rto view the routing table -
Prefer
ssovernetstatfor performance -
Use
ping -c 4 <host>to send a fixed number of packets -
Use
ip linkto 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!
FAQs (0)
Sign in to ask a question. You can read FAQs without logging in.