A pedantic note on an old post: the contents of
/etc/network/interfaces will tell you how the interfaces MAY have been managed at boot (or after running
service networking restart). It is not definitive. It does not tell you how a given interface was assigned at any given moment. For example, given a
DHCP managed interface I can easily kill
dhclient and use
ifconfig to statically assign any IP I want to an interface (I can assign an IP address in the
HCHP managed range just to cause more confusion).
Maybe another admin did this to test something and forgot to clean up. Or I can run
dhclient eth0 on an interface with a static assignment now
DHCP will manage the interface. Or another admin maybe have made a typo and now
avahi has dynamically configured the interface with a link-local address.
Sure, these things don't happen every day, but it's only under development conditions or in weird situations where I have ever asked myself, "Just how did this interface get configured?" Under normal circumstances I never find myself asking this question.
In general, I believe the answer is "No, you can't know for sure." The kernel does not maintain a record, as far as know. The best you can do is to
grep through the usual suspects in
/var/log/. But if someone came in an manually assigned a static IP address then you're out of luck.