how to find out if an IP address is assigned statically or dynamically?

Jason Hellenthal jhellenthal at DataIX.net
Tue Feb 12 07:49:32 UTC 2013


Just a OOB thought...

But couldn't you adjust a dhclient script to be run up success and assign a description to the interface that the address was dynamically configured by DHCP.

Wouldn't scale well in a large deployment but then again it might for you.

BOL

-- 

 Jason Hellenthal
 JJH48-ARIN
 - (2^(N-1))


On Feb 12, 2013, at 2:30, hiren panchasara <hiren.panchasara at gmail.com> wrote:

> On Feb 11, 2013 10:44 PM, "h bagade" <bagadeh at gmail.com> wrote:
>> 
>> Hi all,
>> 
>> I want to know if there is a way to find out if an interface address is
>> assigned by dhcp or statically? For example, any distinctive flag or
>> something like that on ifconfig output! or any other way except processing
>> dhclient leases files?
> 
> As per my limited knowledge, no.
> The only reliable way is to look at
> /var/db/dhclient.leases.<interface_name> files as you mentioned.
> 
> Hiren  _______________________________________________
>> freebsd-net at freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-net
>> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"
> _______________________________________________
> freebsd-net at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"


More information about the freebsd-net mailing list