cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1678
Views
0
Helpful
2
Replies

DHCP Lease Time with DHCP Static Mapping

sgvoip001
Level 1
Level 1

Hello,

I want to configure a DHCP server on 2851 with 12.4.11T IOS version.

I created a dhcp database as written in http://www.cisco.com/en/US/products/sw/iosswrel/ps5207/products_feature_guide09186a008027fa7c.html#wp1027258

with the "origin file tftp...." command I associate the DHCP Pool with this static mapping file. The IOS parses the file correct and saves it to the DHCP Binding database excepting the DHCP Lease time.

The IOS allways saves infinite in the DHCP database but I want a lease duration of one day.

Has anyone a correct configuration? Please help!

Olli

2 Replies 2

gauravshar
Level 2
Level 2

Hi

I'm just wondering why do you want the lease time to be 1 day when it is statically-binded/mapped addresses.

Moreover, this document may help you out.

http://www.cisco.com/en/US/docs/ios/12_0t/12_0t1/feature/guide/Easyip2.html#wp14438

In dhcp config mode just do :

lease 1(days) 0(hrs) 0(minutes)

or just

lease 1

for one day lease. You have to configure this for all of your static binded IP addresses.

Let me know if it works!

--gauarv

Hi,

first of all: thanks for your answer.

I tried it as the documation file says but I have a textfile on a TFTP Server which includes all DHCP bindings. With the "origin file" command I include this bindings to the DHCP database in the Router memory.

Here the example of the Cisco documentation

*time* Jan 21 2005 03:52 PM

*version* 2

!IP address Type Hardware address Lease expiration

10.0.0.4 /24 1 0090.bff6.081e Infinite

10.0.0.5 /28 id 00b7.0813.88f1.66 Infinite

10.0.0.2 /21 1 0090.bff6.081d Infinite

*end*

This "infinite" keyword in the file overrides every value of the "lease" command.

show ip dhcp binding shows the lease expiration of "infinite" next to every static DHCP binding. But if I write another value in the textfile it will be ignore - the DHCP database shows "infinite" again. The value in the Router memory is allways "infinite" undepends on the value in the file. :(

This is my question: how I can write one day lease expiration to the textfile?

Olli

Review Cisco Networking products for a $25 gift card