HostOnNet Blog

FreeBSD DHCP Lease

Looking for Linux Server Admin or WordPress Expert? We can help.

To assign IP from DHCP for your network card on FreeBSD, add following line to /etc/rc.conf

ifconfig_lnc0=”DHCP”

You can see current lease info at

/var/db/dhclient.leases

freebsd# cat /var/db/dhclient.leases
lease {
interface “lnc0”;
fixed-address 192.168.199.128;
option subnet-mask 255.255.255.0;
option dhcp-lease-time 1800;
option routers 192.168.199.2;
option dhcp-message-type 5;
option dhcp-server-identifier 192.168.199.254;
option domain-name-servers 192.168.199.2;
option broadcast-address 192.168.199.255;
option domain-name “localdomain”;
renew 6 2005/12/24 09:33:15;
rebind 6 2005/12/24 09:46:02;
expire 6 2005/12/24 09:49:47;
}
freebsd#

Posted in FreeBSD. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.