This has already been answered by @SuB on Ask Ubuntu. I've adapted the answer for CentOS:
Those counters are kept by the kernel, so your answer depends on how your network card driver is built. Two possible choices:
- As a kernel module
- Built into the kernel
file itself
In second case, you can not reset counters. In the first case, you can do it by unloading the module from the kernel and then loading it back again. If your NIC card uses the e1000 module, use the following commands:
ifconfig eth0 down
modprobe -r e1000
modprobe e1000
ifconfig eth0 up
Use ethtool to find out your NIC module:
ethtool -i eth0
After "driver" you see your module name:
driver: e1000
version: 7.3.21-k8-NAPI
firmware-version:
...
Use yum to install ethtool as follows:
yum install ethtool