am having a lease file which contains lots os lease info. In that i have to copy the whole block(shown below) by identifying the mac and change the IP according to the i/p.
I have used like
above lines are in for loop
here i grep using before and after option, but now the lines in lease info may vary....
I need a solution to copy the lease info.
Any help is appreciated!!!
Thanks in advance
Last edited by Scott; 03-05-2010 at 02:10 AM..
Reason: Code tags
Hi *,
I need to delete duplicate lease entries in file according to MAC/IP.
I'm having tempfile which contains many lease info and need to have one entry for each IP(not more than that), if it contains more than one entry for same set, need to be deleted that entry...
EX:
lease... (4 Replies)
Hi,
I need a help that i want to get the IP which is located at the first line of lease block, using mac id i have to get that ip....In between IP and MAC, the number of lines may vary.....i tried using Grep before 5 line and using awk i took the IP...But the scenario am facing is that... (3 Replies)
Hi,
I got a strange issue here: We are using ISC DHCP v4 which is default in Open SuSE 11.4. These two options 'default-lease-time' and 'max-lease-time' are set in all subnets, with values between 43200 (12 hours) to 518400 (144 hours). See partial dhcpd.conf below please.
Now the lease time... (0 Replies)
Hi,
I got a strange issue here: We are using ISC DHCP v4 which is default in Open SuSE 11.4. These two options 'default-lease-time' and 'max-lease-time' are set in all subnets, with values between 43200 (12 hours) to 518400 (144 hours). See partial dhcpd.conf below please.
Now the lease... (5 Replies)
Hello,
Thank you in advance for helping a newbie who is having great trouble with this simple task.
I'm allowed to copy one file remotely each night due to bandwidth restrictions.
A new file gets generated once a day, and I need to copy the previous day's file.
Here is what I'd like to do:... (1 Reply)
Hi,
I have to parse the dhcp.lease file and have to keep the most recent entry and remove the rest and also the number of lines between any two leases might not always be the same.
eg:
lease 5.5.5.252 {
starts Wed Jul 27 09:48:39 2011
ends Wed Jul 27 21:48:39 2011
tstp Wed Jul... (1 Reply)
Hi frnds
I am testing DHCP server on vmware.I have two REDHAT 9 vmware machine.DHCP is installed on one machine and second machine is using as a client .I have configured DHCP with Ip Address ,Mask and Gateway.But client machine is not getting ip address.When i type ifconfig command on client it... (6 Replies)
Hi,
I am writing a script to copy certain file name in txt file .
It is working fine if I provide a single directory name (for example "/eos/uscms/store/user/pooja04//analysis2012/525/data/doubleele/2012/datav1/" ) where those specific files are present ending with *root .
But I want to modify... (14 Replies)
Discussion started by: nrjrasaxena
14 Replies
LEARN ABOUT FREEBSD
dhclient.leases
DHCLIENT.LEASES(5) BSD File Formats Manual DHCLIENT.LEASES(5)NAME
dhclient.leases -- DHCP client lease database
DESCRIPTION
The Internet Software Consortium DHCP client keeps a persistent database of leases that it has acquired that are still valid. The database
is a free-form ASCII file containing one valid declaration per lease. If more than one declaration appears for a given lease, the last one
in the file is used. The file is written as a log, so this is not an unusual occurrence.
The lease file is named dhclient.leases.IFNAME, where IFNAME represents the network interface the DHCP client acquired the lease on. For
example, if dhclient(8) is configured for the em0 network device, the lease file will be named dhclient.leases.em0.
The format of the lease declarations is described in dhclient.conf(5).
FILES
/var/db/dhclient.leases.IFNAME Current lease file.
SEE ALSO dhclient.conf(5), dhcp-options(5), dhcpd.conf(5), dhclient(8), dhcpd(8)
RFC 2132, RFC 2131.
AUTHORS
The dhclient(8) utility was written by Ted Lemon <mellon@vix.com> under a contract with Vixie Labs.
The current implementation was reworked by Henning Brauer <henning@openbsd.org>.
BSD January 1, 1997 BSD