cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
27299
Views
13
Helpful
0
Comments

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

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.

Dear cadet alain,

       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

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.

This document was generated from the following discussion: How can i bind ip address to the respective mac address of a PC?

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: