When examining network interface statistics in Linux using ifconfig
, the RX (Receive) section provides crucial diagnostic information. The specific counters we're examining are:
RX packets:277593775 errors:1049 dropped:0 overruns:0 frame:536
RX errors represent the total count of receive errors, which is an aggregate of several types of packet reception problems:
- CRC errors (invalid frame checksums)
- Alignment errors (packets not ending on byte boundary)
- FIFO overruns (when NIC buffer fills faster than kernel can process)
Frame errors specifically indicate packets with:
- Incorrect frame length (either too short or too long)
- Misaligned frames that don't meet Ethernet specifications
- Packets that fail layer 2 validation checks
The combination of errors (1049) and frame issues (536) suggests physical layer problems. Possible causes include:
# Check interface statistics in detail
ethtool -S eth2 | grep -i error
# Monitor errors in real-time
watch -n 1 "ethtool -S eth2 | grep -i err"
Step 1: Verify cable and connection quality
# Check for physical link issues
ethtool eth2 | grep -i speed
mii-tool -v eth2
Step 2: Check for duplex mismatches
# Compare local and remote duplex settings
ethtool eth2 | grep -i duplex
Step 3: Examine ring buffer settings
# Check current ring buffer size
ethtool -g eth2
# Example of increasing RX ring buffer
ethtool -G eth2 rx 4096
For persistent issues, consider packet-level analysis:
# Capture packets with CRC errors
tcpdump -i eth2 -s 0 -w errors.pcap 'ether[0] & 1'
And kernel-level debugging:
# Check kernel ring buffer for NIC errors
dmesg | grep -i eth2
To make optimal settings persistent across reboots, add to /etc/network/interfaces:
post-up /usr/sbin/ethtool -G eth2 rx 4096 tx 4096
post-up /usr/sbin/ethtool -K eth2 rx on tx on sg on tso on gso on gro on
When analyzing network issues on Linux systems, the ifconfig
output provides crucial diagnostic information in its RX (Receive) counters:
eth2 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
...
RX packets:277593775 errors:1049 dropped:0 overruns:0 frame:536
Here's what each RX counter specifically measures:
- errors: Total number of bad packets received (CRC errors, alignment issues, etc.)
- frame: Packets with framing errors (incorrect Ethernet frame structure)
- dropped: Packets dropped due to buffer issues or queue limitations
- overruns: Receiver hardware FIFO overflows
The frame counter (536 in our example) typically indicates:
# Check detailed NIC statistics
ethtool -S eth2 | grep -i frame
Potential root causes include:
- Faulty network cables or connectors
- Duplex mismatch (visible in ethtool output)
- Electromagnetic interference
- Failing network hardware
For deeper analysis, combine these tools:
# Check driver-level statistics
ethtool -S eth2
# Monitor real-time errors
watch -n 1 'ifconfig eth2 | grep errors'
# Check ring buffer settings
ethtool -g eth2
A common scenario with frame errors involves duplex mismatch. Compare these outputs:
# On switch port:
show interface gigabitethernet 1/0/1
# On Linux host:
ethtool eth2 | grep -i duplex
If mismatched, force the correct setting:
ethtool -s eth2 autoneg off speed 1000 duplex full
For persistent issues, packet capture helps identify patterns:
tcpdump -i eth2 -s 0 -w /tmp/eth2_errors.pcap
Key filters for error analysis:
tcpdump -r /tmp/eth2_errors.pcap 'ether[0] & 1' # Multicast/broadcast
tcpdump -r /tmp/eth2_errors.pcap 'ether[12:2] < 1500' # IEEE802.3 frames
Remember to balance monitoring overhead:
# Sample rate limiting
tcpdump -i eth2 -s 0 -C 100 -W 10 -w /tmp/eth2_sample.pcap