Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

How can i bind ip address to the respective mac address of a PC?

Dear all,

     How can i bind ip address to the respective mac address of a PC in a dhcp enabled network?

     wat are all the commands to bind it?

     Basically i know this command to bind ip address to the pc statically.

# ip dhcp excluded address xx.xx.xx.xx

       i am expecting any other special commands to bind it.

     Please do needful.

     Advance in Thanks.

with regards,

Chandhuru.M

Thanks and regards, Chandhuru.M
2 ACCEPTED SOLUTIONS

Accepted Solutions
Purple

How can i bind ip address to the respective mac address of a PC?

Hi,

the excluded-address command simply tells the DHCP server not to try to allocate these IP addresses, it means they are already statically assigned.

Now for MAC binding, you must do this:

1) not exclude this address

2) when DHCP dynamically assigned an IP to the device use this command to view the client-identifier:

   show ip dhcp binding x.x.x.x  where x.x.x.x is the allocated IP

3) take note of the client-identifier and delete the dynamic entry:

   clear ip dhcp binding x.x.x.x

4) create a host pool for this IP:

    ip dhcp pool host_pool

    host x.x.x.x y.y.y.y.y  where y.y.y.y is the subnet mask for the host

    client-identifier 01xx.xxxx.xxxx.xx or hardware-address xxxx.xxxx.xxxx

   the last command differs according to the client-identifier used  where xxxx.xxxx.xxxx is the MAC address

Regards

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.
Purple

How can i bind ip address to the respective mac address of a PC?

Hi,

yes it is doable in GNS3 but I don't think it is in PT though.

here I've got one router doing DHCP server and one host attached which is DHCP client:

1) I do my parent dynamic pool

R1(dhcp-config)#do sh run | s dhcp

no ip dhcp use vrf connected

ip dhcp pool mypool

   network 10.0.0.0 255.255.255.0

   default-router 10.0.0.254

2) let's verify our binding table

R1(dhcp-config)#do sh ip dhcp binding

Bindings from all pools not associated with VRF:

IP address          Client-ID/              Lease expiration        Type

                    Hardware address/

                    User name

10.0.0.1           01c2.020f.3800.00       Mar 02 2002 12:05 AM    Automatic

3) let's clear the dynamic binding

R1(dhcp-config)#do clear ip dhcp binding 10.0.0.1

R1(dhcp-config)#do sh ip dhcp binding

Bindings from all pools not associated with VRF:

IP address          Client-ID/              Lease expiration        Type

                    Hardware address/

                    User name

4) let's create the host pool

R1(dhcp-config)#ip dhcp pool host_pool

R1(dhcp-config)#host 10.0.0.1 255.255.255.0

R1(dhcp-config)#client

R1(dhcp-config)#client-id

R1(dhcp-config)#client-identifier 01c2.020f.3800.00

5) let's renew on the client and verify our binding table again

R1(dhcp-config)#do sh ip dhcp binding

Bindings from all pools not associated with VRF:

IP address          Client-ID/              Lease expiration        Type

                    Hardware address/

                    User name

10.0.0.1            01c2.020f.3800.00       Infinite                Manual

Regards

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.
5 REPLIES
Purple

How can i bind ip address to the respective mac address of a PC?

Hi,

the excluded-address command simply tells the DHCP server not to try to allocate these IP addresses, it means they are already statically assigned.

Now for MAC binding, you must do this:

1) not exclude this address

2) when DHCP dynamically assigned an IP to the device use this command to view the client-identifier:

   show ip dhcp binding x.x.x.x  where x.x.x.x is the allocated IP

3) take note of the client-identifier and delete the dynamic entry:

   clear ip dhcp binding x.x.x.x

4) create a host pool for this IP:

    ip dhcp pool host_pool

    host x.x.x.x y.y.y.y.y  where y.y.y.y is the subnet mask for the host

    client-identifier 01xx.xxxx.xxxx.xx or hardware-address xxxx.xxxx.xxxx

   the last command differs according to the client-identifier used  where xxxx.xxxx.xxxx is the MAC address

Regards

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

How can i bind ip address to the respective mac address of a PC?

Dear cadet alain,

     Really thanks for your kind reply.

     I had one question. If u dont mind,please tell me is there any chance to do it in emulators like Packet Tracer or GNS3.

     If so help or guide me through that with small sample network. If you can.

     Advance in thanks.

With thanks and regards,

Chandhuru.M

Thanks and regards, Chandhuru.M
Purple

How can i bind ip address to the respective mac address of a PC?

Hi,

yes it is doable in GNS3 but I don't think it is in PT though.

here I've got one router doing DHCP server and one host attached which is DHCP client:

1) I do my parent dynamic pool

R1(dhcp-config)#do sh run | s dhcp

no ip dhcp use vrf connected

ip dhcp pool mypool

   network 10.0.0.0 255.255.255.0

   default-router 10.0.0.254

2) let's verify our binding table

R1(dhcp-config)#do sh ip dhcp binding

Bindings from all pools not associated with VRF:

IP address          Client-ID/              Lease expiration        Type

                    Hardware address/

                    User name

10.0.0.1           01c2.020f.3800.00       Mar 02 2002 12:05 AM    Automatic

3) let's clear the dynamic binding

R1(dhcp-config)#do clear ip dhcp binding 10.0.0.1

R1(dhcp-config)#do sh ip dhcp binding

Bindings from all pools not associated with VRF:

IP address          Client-ID/              Lease expiration        Type

                    Hardware address/

                    User name

4) let's create the host pool

R1(dhcp-config)#ip dhcp pool host_pool

R1(dhcp-config)#host 10.0.0.1 255.255.255.0

R1(dhcp-config)#client

R1(dhcp-config)#client-id

R1(dhcp-config)#client-identifier 01c2.020f.3800.00

5) let's renew on the client and verify our binding table again

R1(dhcp-config)#do sh ip dhcp binding

Bindings from all pools not associated with VRF:

IP address          Client-ID/              Lease expiration        Type

                    Hardware address/

                    User name

10.0.0.1            01c2.020f.3800.00       Infinite                Manual

Regards

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

How can i bind ip address to the respective mac address of a PC?

Dear cadet alain,

     Really thanks for your kind reply. I got cleared on these topic. Thanks thanks alot. It was very appreciable.

.

     Thank you.

With Thanks and regards,

Chandhuru.M

Thanks and regards, Chandhuru.M
New Member

if i have multiple device

if i have multiple device need to bind to specific ip address. What should I do ?

Create multiple dhcp pool ?

491
Views
10
Helpful
5
Replies