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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cisco 2621 and static DHCP... does not work.

Status
Not open for further replies.

xpsuser

Programmer
Mar 10, 2007
20
CA
Ok, static DHCP is kind of an oxymoron but I can't find the right term. Basically I want to assign an address to a client using dhcp, but I want this address to be fixed based on the MAC address. My dhcp works fine for normal leases, but my specific client always gets a lease from the "dynamic" pool instead of the one that is tied to its MAC address.

Here's the related config:
Code:
service dhcp
!
no ip dhcp use vrf connected
no ip dhcp conflict logging
ip dhcp excluded-address 192.168.192.1 192.168.192.10
ip dhcp excluded-address 192.168.192.253 192.168.192.254
!
ip dhcp pool 192.168.192.0/24
   network 192.168.192.0 255.255.255.0
   default-router 192.168.192.1
   dns-server 67.69.184.24 67.69.184.155
!
ip dhcp pool testclient
   host 192.168.192.11 255.255.255.0
   hardware-address 0015.snip.snip
   client-name testclient
   default-router 192.168.192.1
   dns-server 67.69.184.24 67.69.184.155
!

My test client always gets another address than 11. (Basically it gets 12 all the time so the router seems to be aware that 11 is reserved, but it just does not trigger on the MAC).

Thanks in advance for your help, I'm sure I'm missing a small detail.

Pat
 
Hi xpsuser;

Try this:
Code:
ip dhcp pool testclient   
host 192.168.192.11 255.255.255.0   
client-identifier 0015.xxxx.xxxx
lease infinite

Hope this help.
 
When I do that, I still don't get the right ip...

sho ip dhcp binding returns this before the client request:

Code:
Bindings from all pools not associated with VRF:
IP address          Client-ID/              Lease expiration        Type
                    Hardware address/
                    User name
192.168.192.11      0015.xxxx.xxxx          Infinite                Manual

After, it shows:
Code:
Bindings from all pools not associated with VRF:
IP address          Client-ID/              Lease expiration        Type
                    Hardware address/
                    User name
192.168.192.11      0015.xxxx.xxxx          Infinite               
 Manual
192.168.192.19      0100.15xx.xxxx.xx       Mar 11 2007 12:35 PM    Automatic

In this case, my client was assigned .19 instead of .11

I'm stumped.
 
Well, using this:

Code:
ip dhcp pool testclient   
host 192.168.192.11 255.255.255.0   
client-identifier 0100.15xx.xxxx.xx
lease infinite

give me back the right ip. Odd, why there a 01 in front of my mac address??
 
Hi.

Sorry, you have to put 01 in front of your mac address, it's working now ?.

Thanks.
 
Yes, it is working now, but I'm not clear on why the 01 gets added in front of my MAC.

Thanks to all for your suggestions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top