DHCP IP Renewal


 
Thread Tools Search this Thread
Operating Systems Linux DHCP IP Renewal
# 1  
Old 10-15-2008
DHCP IP Renewal

Hi guys,

I just wanted to know is there any way we can know that the linux has renew it's lease time..

My network has configuration that gives the same IP every time u renew the IP. So when it automatically checks or send the query to the dhcp server for the renewal of the IP ( when the lease time reached to the 50% ) I am not able to know whether it has renewed or not.
# 2  
Old 10-15-2008
Your DHCP server (assuming your DHCP server also runs Linux this would be dhcpd) should be configured to keep logs, where you should find the information about when it gave out a particular address to a particular machine the last time.

Your DHCP client daemon (dhclient) also keeps a log file under /var/lib/dhcpd/dhclient.leases where all the current leases it has been assigned are noted.

See the manpage for dhclient.leases(5) or dhclient(8) and dhcpd.conf(5) respectively for details and read RFC2132 (Droms et al., 1997) and/or RFC2131 (Droms, 1997) for a detailed description about the DHCP process. Note that RFC1533 (Droms et al., 1993) and RFC1534 (Droms, 1993) are obsoleted.

I hope this helps.

bakunin
# 3  
Old 10-16-2008
lease {
interface "eth0";
fixed-address 10.101.1.133;
filename "pxelinux.bin";
option subnet-mask 255.255.255.0;
option routers 10.101.1.1;
option dhcp-lease-time 1209600;
option dhcp-message-type 5;
option domain-name-servers 192.168.6.4,203.88.135.250,203.90.66.79,202.138.103.100,192.168.6.2;
option dhcp-server-identifier 192.168.6.15;
option broadcast-address 10.101.1.255;
renew 2 2008/10/21 13:15:26;
rebind 2 2008/10/28 08:33:17;
expire 4 2008/10/30 02:33:17;

}

I use check the file you have mention. And I got the information reqiuire. But I wanted to know after it reaches the time of renewal it really query for for the another lease time or not.

So what i did is change the time to 2008/10/21 13:15:00 and waited till 13:16 but even after then the dhclient.leases time shows the same date/time for the renew, rebind and expier. Is that mean it hasn't query for the renewal.

I don't know anything about this, Will be thankful if you will spot some light on this,

Thanx in advance.
# 4  
Old 10-16-2008
Quote:
Originally Posted by Gaurang033
Is that mean it hasn't query for the renewal.
Perhaps so. Otherwise the log file wouldn't make much sense, yes?

Quote:
Originally Posted by Gaurang033
I don't know anything about this, Will be thankful if you will spot some light on this,
The best advice i can give you is to read the RFCs i mentioned. The inner workings of the DHCP protocol, the messages passed back and forth between the client and server parts, etc. are all laid out there.

RTFM and be enlightened.

I hope this helps.

bakunin
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. IP Networking

Dhcp

I have a DHCP thing on my HP printer. How can I find information on numbers for that? (2 Replies)
Discussion started by: teak
2 Replies

2. IP Networking

Get DHCP relay interfaces IP address using DHCP

Hi All , please view the set up below: ------------------------------------------------------------------- | DHCP Server |-----------| ROUTER & |-----------| Clients | | 192.168.99.1 | - -<eth1>| DHCP-RELAY|<eth2>-- | 192.168.88.X | ... (2 Replies)
Discussion started by: gdangoor
2 Replies

3. IP Networking

Can't get DHCP IP

Dear Experts, I have a TI DM8148 EVM board REV C, the EZSDK5.05 SW package, and DVRRDK1.09 SW package. EZSDK5.05, DVRRDK1.09 both use Linux2.6.37, however, there are some modifications between these two kernels. When I use uImage of DVRRDK1.09 to boot up EVM board, this board can be given a... (0 Replies)
Discussion started by: oobin168
0 Replies

4. Red Hat

SSL Certificate Renewal on Tomcat

Hi, I want to renew the ssl certificate for one of my application on tomcat without down time. I want to know what would the possible impacts for the users who currently have sessions to the app. Regards, Arumon (1 Reply)
Discussion started by: arumon
1 Replies

5. UNIX for Dummies Questions & Answers

Help on DHCP

Hi All, I am trying to configure dhcp server on a linux host with eth0:1 which is using 192.168.1.10 I also want to restrict my DHCP client to just one Host adcnew222. DHCP Server Host name - adcnew111 DHCP client name - adcnew222 My conf file is as follows on dhcp server : ... (2 Replies)
Discussion started by: sriram003
2 Replies

6. IP Networking

DHCP Help

So I'm trying to work with a Linux box that was designed by a group of people who are no longer around and I'm having difficulty getting into the box. The board has an ethernet port and two serial ports, but it doesn't look like there is a getty service running on either serial port which leaves... (0 Replies)
Discussion started by: cmcmanus3
0 Replies

7. Solaris

DHCP help

Can someone help me with this please. I am new to this: I am trying to install Solaris 8 over the network using my DHCP. After I type the comman: ./add_install_client -d -e 8:0:20:7e:97:51 I would get something like this: cleaning up preexisting install client "8:0:20:7e:97:51"... (0 Replies)
Discussion started by: aliban83
0 Replies

8. UNIX for Advanced & Expert Users

Dhcp

Last question for today!! :rolleyes: In what file does the DHCP server keep its list of leases? THANKS!!! :) Maria from Maria (2 Replies)
Discussion started by: marjeg
2 Replies

9. UNIX for Dummies Questions & Answers

Dhcp

HI, New to Unix and I inherited a network that runs DHCP in manual configuration mode. Basically, in order for a machine to get an IP it has to have an entry in dhcpd.conf with its MAC address mapped to a hostname (the hostname then maps to an IP address listed in the DNS db file). If there is... (2 Replies)
Discussion started by: NJay
2 Replies

10. IP Networking

Dhcp

Hello all, I have this Intel Pentium 233/128 running Solaris 8. I also have a dhcp/router/dns running SuSElinux 7.2.(Sorry if it is out of topic here) My problem is that the Solaris box when it tries to configure the interface (elxl0) via dhcp it fails. It appears, according to the... (1 Reply)
Discussion started by: jdevarie
1 Replies
Login or Register to Ask a Question