📌 Beyond IP Addresses: Troubleshooting Network Errors and Packet Drops with ip command 📌

Prashant Lakhera
3 min readFeb 26, 2024

--

✅ Introduction

The ip command is part of the iproute2 package, which provides a collection of utilities for controlling TCP/IP networking and traffic control in Linux.

🛠️ How it works

ip command communicates with the kernel through the Netlink socket interface, a more advanced and flexible way of communicating with the kernel’s networking stack. The ip command can request detailed information about network interfaces, routes, policy routing rules, etc. It can also modify these settings. When querying for errors or dropped packets, ip reads counters maintained by the kernel for each network interface, which is incremented whenever an error occurs, or a packet is dropped due to network conditions or configuration issues.

❗Understanding Error and Drop Counts

❌ Errors: This count increases when the network interface encounters problematic frames that cannot be successfully transmitted or received. These errors might be due to damaged cables, bad network interface cards (NICs), or incorrect drivers.

🔴 Dropped: The drop count increases when the network interface or the kernel drops packets. This could happen for several reasons, including buffer overflows (when the incoming packets rate exceeds the processing capacity), or when packets do not meet specific criteria (e.g., due to firewall rules or routing issues).

🔍 Troubleshooting Steps

1️⃣ Check Physical Connections: Verify cables are securely connected, undamaged, and LEDs on network devices show proper connectivity.

2️⃣ Verify Network Configuration: Confirm correct IP, subnet mask, and gateway settings with ip addr show.

3️⃣ Update Network Drivers: Ensure network drivers are current to prevent errors due to outdated or corrupt drivers.

4️⃣ Examine System Logs: Check dmesg and /var/log/syslog for network-related system messages.

5️⃣ Check for Overloaded Servers/Equipment: Use network monitoring tools to detect high traffic levels or spikes.

6️⃣ Inspect for Faulty Network Equipment: Test by connecting to a different port or replacing the network device temporarily.

7️⃣ Review Firewall and Security Settings: Adjust firewall and security settings to avoid blocking or dropping valid traffic.

8️⃣ Use Network Diagnostic Tools: Employ ping, traceroute, mtr, and Wireshark for network issue diagnosis.

9️⃣ Address Buffer Overflows: Tune buffer sizes and network parameters with sysctl to mitigate packet drops from buffer overflows.

📚 If you’re interested in more tips like these, please check out my new book.

📚 If you’re interested in more tips like these, please check out my new book.

1️⃣ Cracking the DevOps Interview: https://pratimuniyal.gumroad.com/l/cracking-the-devops-interview

2️⃣ https://www.amazon.com/AWS-System-Administrators-automate-infrastructure/dp/1800201532/?_encoding=UTF8&pd_rd_w=xI51B&content-id=amzn1.sym.d0ebfbb2-6761-494f-8e2f-95743b37c35c%3Aamzn1.symc.50e00d6c-ec8b-42ef-bb15-298531ab4497&pf_rd_p=d0ebfbb2-6761-494f-8e2f-95743b37c35c&pf_rd_r=QP32TXADHZCEEW0GVVM3&pd_rd_wg=3LIjA&pd_rd_r=7d15b19d-2da7-4d1e-8782-5880812cc2a4&ref_=pd_gw_ci_mcx_mr_hp_atf_m

--

--

Prashant Lakhera
Prashant Lakhera

Written by Prashant Lakhera

AWS Community Builder, Ex-Redhat, Author, Blogger, YouTuber, RHCA, RHCDS, RHCE, Docker Certified,4XAWS, CCNA, MCP, Certified Jenkins, Terraform Certified, 1XGCP

No responses yet