in reply to How to list all network interfaces and their ip address in Linux

An additional approach is to use Net::SNMP and read in the ifTable MIB table for a device. This would only work for machines that have an snmp agent running on them (such as Cisco routers, or linux machines running something like snmpd).