ifconfig data interpretation

William Muriithi william.muriithi-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Fri Apr 3 15:41:23 UTC 2009


Sorensen,

Excellent. Can't be more satisfied. You really know your stuff!

> ip -s link
>
> For example:
>
> # ifconfig eth0;ip -s link show dev eth0
> eth0      Link encap:Ethernet  HWaddr 00:1A:64:D4:9F:18
>          inet addr:10.128.10.2  Bcast:10.255.255.255  Mask:255.0.0.0
>          inet6 addr: fe80::21a:64ff:fed4:9f18/64 Scope:Link
>          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>          RX packets:755756697 errors:0 dropped:0 overruns:0 frame:0
>          TX packets:570504212 errors:0 dropped:0 overruns:0 carrier:0
>          collisions:0 txqueuelen:1000
>          RX bytes:871419712393 (811.5 GiB)  TX bytes:316608994072 (294.8 GiB)
>          Interrupt:16 Memory:ce000000-ce012100
>
> 2: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
>    link/ether 00:1a:64:d4:9f:18 brd ff:ff:ff:ff:ff:ff
>    RX: bytes  packets  errors  dropped overrun mcast
>    3836318601 755756697 0       0       0       13
>    TX: bytes  packets  errors  dropped carrier collsns
>    3076381464 570504212 0       0       0       0
>
> Not sure why ip is showing 32bit truncated values for the bytes.
> Possible because I am using a 32bit binary with a 64bit kernel.

Could be, it look as below from the same host I was investigating
yesterday for comparison.
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:14:22:1e:8f:69 brd ff:ff:ff:ff:ff:ff
    RX: bytes  packets  errors  dropped overrun mcast
    1258082303 75284797 172679  0       0       388025
    TX: bytes  packets  errors  dropped carrier collsns
    1264535533 109636496 0       0       0       0
>
> Adding a second -s gives you:
> 2: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
>    link/ether 00:1a:64:d4:9f:18 brd ff:ff:ff:ff:ff:ff
>    RX: bytes  packets  errors  dropped overrun mcast
>    3836494484 755758605 0       0       0       13
>    RX errors: length  crc     frame   fifo    missed
>               0        0       0       0       0
>    TX: bytes  packets  errors  dropped carrier collsns
>    3076741152 570505260 0       0       0       0
>    TX errors: aborted fifo    window  heartbeat
>               0        0       0       0
>
>
> To a large extent, the errors have whatever meaning the driver gives them.
> Not all chips report all different types of errors seperately, so the
> driver may or may not be able to detect everything.  Sometimes the chip
> reports errors that have no flag and the driver ixes it in with another
> error type.
>
> In general though, crc errors are just that, packets with a crc checksum
> that didn't match the packet.  So it get messed up somewhere.  missed is
> whenever the network hardware for some reason could not receive a packet
> because it was out of buffer space or the pci bus was busy or whatever
> else could cause it to not keep up with incoming data.  I have never seen
> fifo error.  overrun I believe are when packets are longer than permitted.
> frame errors simply means there was something wrong with the ethernet
> packet that meant it was simply not a valid ethernet packet, which is
> sometimes caused by truncated packets.  dropped tends to be a packet
> that was received by the chip, but thrown away, or possible thrown away
> by the driver for whatever reason.  Not sure I have ever seen one.
>
> As you can see though, ip -s link shows a lot more info that ifconfig
> ever did.  It also gets it through netlink, rather than trying to parse
> /proc files, which is a lot more efficient and allows future extensions.
> I will be happy to see ifconfig go.
>
It sure will, if you look at Red Hat documentation, you will notice
they rarely mention ifconfig, its always the ip tool. So I expect at
sometime in future they will pull it out of their default install.
Just as dig replaced host. And as you mentioned, it looks like there
is a good technical reason behind it.

>>
>> Link encap:Ethernet  HWaddr 00:14:22:3E:8F:79
>>           inet addr:172.16.1.139  Bcast:172.16.3.255  Mask:255.255.252.0
>>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>>           RX packets:37156044 errors:172679 dropped:0 overruns:0 frame:172678
>>           TX packets:54908637 errors:0 dropped:0 overruns:0 carrier:0
>>           collisions:0 txqueuelen:1000
>>           RX bytes:313517308 (298.9 MiB)  TX bytes:2734438868 (2.5 GiB)
>>           Base address:0xecc0 Memory:fe6e0000-fe700000
>
> Well almost certainly something on your network is unhappy.  It may
> be that you have a device on your network sending packets your network
> card thinks are invalid.  Maybe someone is using jumbo frames, or non
> 802.3 frames.  In any case your card is treating them as errors and
> throwing them away most likely.
Hmm, quite a lot of possibilities here. Buts this is good information
to have while looking at it. Wonder if its there is any errors with
the connection from the switch perspective. Kind of a pain to follow
the cabling and will do that later.  Thanks a lot again.

William
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list