Re: Get active IP from an dhcp enabled interface

2016-10-27 Thread Florian Ermisch
Am 27. Oktober 2016 17:10:16 MESZ, schrieb "Sjöholm Per-Olov" : > Hi > > If you use a dhclient on the Internet interface, what is the best > method to > get the currently used IP address? A regexp to get the IP from > "ifconfig > inet” output or check the dhclient lease file? […] A regex like t

Get active IP from an dhcp enabled interface

2016-10-27 Thread Sjöholm Per-Olov
Hi If you use a dhclient on the Internet interface, what is the best method to get the currently used IP address? A regexp to get the IP from "ifconfig inet” output or check the dhclient lease file? Or maybe use python with of http://pypi.python.org/pypi/netifaces/ or perl with Net::Address::IP