Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DHCP - lease reservation

Status
Not open for further replies.

jaki

MIS
Feb 21, 2002
32
US
Hi all,

I want my C26xx router with IOS 12.3 doing the DHCP server for a attached Ethernet Network, it works all fine, but now i want to add what Microsoft DHCP Server calls "reservation".

Is it possible to add a reservation af a defined IP address for a specified MAC address ? that this address is always given to the MAC address when it requests an address and is never given any other client?

I tried around with defining a dhcp pool over the whole network, exluded 1-100 ( reserved for static adresses )
and added for any reservation a seperate pool ( manual binding ), but this only did prevent the dhcp server to give this adress to anyboby, even not the machine i reserved it for .... see config below:

!
ip dhcp excluded-address xx.xx.178.1 xx.xx.178.100
!
ip dhcp pool EthernetMilan
network xx.xx.178.0 255.255.255.0
domain-name eu.twc.com
dns-server xx.xx.120.20 xx.xx.192.20
default-router xx.xx.178.1
netbios-name-server xx.xx.120.20 xx.xx.192.20
netbios-node-type h-node
lease 30
!!
ip dhcp pool 7e35kt8zj0rd
host xx.xx.178.101 255.255.255.0
hardware-address 0100.0802.947c.9b
client-name 7e35kt8zj0rd
!

after the client got an IP it looked the following:

euitmi02#sho ip dhcp bind
Bindings from all pools not associated with VRF:
IP address Client-ID/ Lease expiration Type
Hardware address/
User name
xx.xx.178.101 0100.0802.947c.9b Infinite Manual
xx.xx.178.102 0100.0802.947c.9b Aug 12 2003 06:20 AM Automatic
euitmi02#

Any ideas how i could reserv the address xx.xx.178.101 for the client with MAC 0100.0802.947c.9b ????

thanks for all hints ...


Mark
 
Would you try the following syntax?
hardware-address 0008.0294.7c9b ieee802
 
it would be less problematic in the longrun if you just gave that one device a static IP

and

exclude the dhcp server on the router from passing that address out
'exclude-address'

it is also a good practice to exclude the router's IPs from the process also
 
So as i understand from you comments it is not possible to reserve an IP address for a specified MAC address, only by excluding the IP from DHCP and make it static ?

I dont want to make the IP static, because the machine is a laptop of a person who travels a lot to other company locations, where we have DHCP running. So the system must run DHCP to get an IP when not in Home location. If the user is in his office then i want him to get a specified IP.

Mark
 
fmonteiro:

writing the MAC in other syntax doesn't solve the Problem...

ip dhcp pool 7e35kt8zj0rd
host xx.xx.178.101 255.255.255.0
hardware-address 0008.0294.7c9b ieee802
!

euitmi02#sho ip dhcp bind
Bindings from all pools not associated with VRF:
IP address Client-ID/ Lease expiration Type
Hardware address/
User name
xx.xx.178.101 0008.0294.7c9b Infinite Manual
xx.xx.178.102 0100.0802.947c.9b Aug 06 2003 09:34 AM Automatic
 
Would you try one more time?

Here is the way to reserver the ip address for a mac address using dhcp on a router. If the mac address is 00.10.5a.dd.c5.3, here is the way to assign 192.168.0.1 to that statically

ip dhcp pool foramac
host 192.168.0.1 255.255.255.0
client-identifier 0100.105a.ddc5.31
client-name home1
!
ip dhcp pool default
network 192.168.0.0 255.255.255.0
dns-server x.x.x.x y.y.y.y.y
default-router 192.168.0.2
 
fmonteiro:
Thanks ... that worked !

if i now request a DHCP address i get xx.xx.178.101

so the command to reserv a IP is :
client-identifier xxxx.xxxx.xxxx.xx

cu

Mark
 
"So as i understand from you comments it is not possible to reserve an IP address for a specified MAC address, only by excluding the IP from DHCP and make it static ?"

no i didn't mean that
i just said it may be less problematic to give it a static ip


i didn't know your situation about the mobile/laptop user and the pure need for reserving that address.
anyway, glad to see you got it working :^)

cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top