cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
34818
Views
35
Helpful
8
Replies

DHCP static binding on cisco switch

ajay chauhan
Level 7
Level 7

Hi,

I have created this config on switch.

p dhcp pool CARLSON
   network 10.36.247.64 255.255.255.224
   domain-name carlson.com
   dns-server 203.122.63.152 203.122.63.154
   default-router 10.36.247.81
!
ip dhcp pool pool2
   host 10.36.247.82 255.255.255.224
   hardware-address 0100.16d3.0f1d

interface Vlan1
ip address 10.36.247.81 255.255.255.224
end

DHCP works fine but i need to map MAC addresses. I saw a doc where it was mentioned if i need to do that i need to go for special pool so i created pool2.

still the machine is getting IP address dynamic way.

Switch#sh ip arp
Protocol  Address          Age (min)  Hardware Addr   Type   Interface
Internet  10.36.247.81            -   ecc8.82f4.76c0  ARPA   Vlan1
Internet  10.36.247.67            0   0016.d30f.1db3  ARPA   Vlan1
Switch#

Can some help me what i am missing here ?

Thanks

Ajay

8 Replies 8

cadet alain
VIP Alumni
VIP Alumni

Hi,

post the output of show ip dhcp binding

Regards.

Alain.

Don't forget to rate helpful posts.

Hi,

Here is that.

witch#sh ip dhcp binding
IP address       Client-ID/              Lease expiration        Type
                 Hardware address
10.36.247.82     0100.16d3.0f1d          Infinite                Manual
Switch#

Hi,

So it worked as you wanted . Where is the problem?

Regards.

Alain.

Don't forget to rate helpful posts.

no it doesnt work...PC still takes IP from DHCP

and ignore the static map.

So it get .67 IP address but i mapped it for .82.

Thanks

Ajay

witch#sh ip dhcp binding
IP address       Client-ID/              Lease expiration        Type
                 Hardware address
10.36.247.82     0100.16d3.0f1d          Infinite                Manual


ip dhcp pool pool2
   host 10.36.247.82 255.255.255.224
   hardware-address 0100.16d3.0f1d


Switch#sh ip arp
Protocol  Address          Age (min)  Hardware Addr   Type   Interface
Internet  10.36.247.81            -   ecc8.82f4.76c0  ARPA   Vlan1
Internet  10.36.247.67            0   0016.d30f.1db3  ARPA   Vlan1
Switch#

The .67 hasn't got the same MAC address and the manual mapping worked like you want

Can you ping .82 and then sh ip arp.

Regards.

Alain.

Don't forget to rate helpful posts.

Hi ajay,

Your question has also answered in LAN SWITCHING AND ROUTING forum.

Also here is the solution for you....

Specify a new DHCP pool for each differentiated with each hardware-address
that you want to tie in.


ip dhcp pool CLIENTS
network 192.168.198.0 255.255.255.0
default-router 192.168.198.1
dns-server 192.168.200.5 192.168.199.5
domain-name example.local
lease 0 4
!
ip dhcp pool RESERVED-HOST
host 192.168.198.80 255.255.255.0
client-identifier 0100.4096.3944.3f
!

So the client with MAC 0040.9639.443f will always lease the IP
192.168.198.80/24 with the other options from the pool CLIENTS

Please rate the helpfull posts.

Regards,
Naidu.

Ivan Moskalev
Level 1
Level 1

Because, Command:

Router(dhcp-config)# hardware-address hardware-address type

(Optional) Specifies a hardware address for the client. This command is used for BOOTP requests.

And, command:

Router(dhcp-config)# client-identifier unique-identifier

Specifies the unique identifier for DHCP clients. This command is used for DHCP requests.

More: Configuring DHCP

http://www.cisco.com/en/US/docs/ios/12_2/ip/configuration/guide/1cfdhcp.html

elhan
Level 1
Level 1

You can not configure manual bindings within the same pool that is configured with the network command.

Review Cisco Networking for a $25 gift card