cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
543
Views
0
Helpful
3
Replies

How to set DHCP by MAC address on a Switch WS-C2960S-48TS-L

a.guillen
Level 1
Level 1

Hi Gurus of Cisco

We have a service of DHCP on our core network like this that flow to our access switches, My client in a VLAN 2 has the following DHCP services:

!

ip dhcp excluded-address 10.10.2.1 10.10.2.46

!

ip dhcp pool Prueba_Test_Piso 4

   network 10.10.2.0 255.255.255.0

   netbios-name-server 10.10.0.12

   default-router 10.10.2.1

   domain-name ayudameporfavor.com

   dns-server 10.10.0.12 10.1.11.12

   option 252 ascii http://usarproxy.ayudameporfavor.com/intranet/wpad.dat

!

All function ok, but a new request ask me to reserve some IP's address by MAC Address

For example:

This Users:

WorkstationIpMac-Address
AxF279710.10.2.106D8-9D-67-96-94-FB
AxF225410.10.2.15314-DA-E9-F7-71-40
AxF280010.10.2.99D8-9D-67-96-A6-74

Let me know if this configuration will complete the request:

!

ip dhcp excluded-address 10.10.2.106 10.10.2.106

ip dhcp pool user_AxF2797

   host 10.10.2.106 255.255.255.0

   client-identifier 01d8.9d67.9694.fb

   netbios-name-server 10.10.0.12

   default-router 10.10.2.1

   domain-name ayudameporfavor.com

   dns-server 10.10.0.12 10.1.11.12

   option 252 ascii http://usarproxy.ayudameporfavor.com/intranet/wpad.dat

!

ip dhcp excluded-address 10.10.2.153 10.10.2.153

ip dhcp pool user_AxF2254

   host 10.10.2.153 255.255.255.0

   client-identifier 01da.dae9.f771.40

   netbios-name-server 10.10.0.12

   default-router 10.10.2.1

   domain-name ayudameporfavor.com

   dns-server 10.10.0.12 10.1.11.12

   option 252 ascii http://usarproxy.ayudameporfavor.com/intranet/wpad.dat

!

!

ip dhcp excluded-address 10.10.2.106 10.10.2.106

ip dhcp pool user_AxF2800

   host 10.10.2.99 255.255.255.0

   client-identifier 01d8.9d67.96a6.74

   netbios-name-server 10.10.0.12

   default-router 10.10.2.1

   domain-name ayudameporfavor.com

   dns-server 10.10.0.12 10.1.11.12

   option 252 ascii http://usarproxy.ayudameporfavor.com/intranet/wpad.dat

!

Let me know if the above explain could be function

Best Regards

1 Accepted Solution

Accepted Solutions

Leo Laohoo
Hall of Fame
Hall of Fame

You don't need the "exclude-address".  Once the DHCP matches the client-id, the MAC address gets assigned the correct IP address you've specified.

Otherwise, your config looks good.

View solution in original post

3 Replies 3

Leo Laohoo
Hall of Fame
Hall of Fame

You don't need the "exclude-address".  Once the DHCP matches the client-id, the MAC address gets assigned the correct IP address you've specified.

Otherwise, your config looks good.

A question

D8-9D-67-96-A6-74, this mac address originaly had (dynamic) the IP address had 10.10.2.99, But If I want to set to 10.10.2.180 (relate to his MAC address Table), using this lines

ip dhcp pool user_AxF2800

   host 10.10.2.180 255.255.255.0

   client-identifier d89d.6796.a674

   netbios-name-server 10.10.0.12

   default-router 10.10.2.1

   domain-name ayudameporfavor.com

   dns-server 10.10.0.12 10.1.11.12

   option 252 ascii http://usarproxy.ayudameporfavor.com/intranet/wpad.dat

I can not obtain the 10.10.2.180, always obtain the IP address  10.10.2.99, Why?

Also, let me know if I need to clear ARP and MAC address Table first?

Any comment is welcome

 client-identifier d89d.6796.a674

Your client-id is the wrong syntax.  EVERYTHING has to start with "01" and everything should be lower-case.  So your client-id for MAC address "D8-9D-67-96-A6-74" should be "01d8.9d67.96a6.01".

Also, let me know if I need to clear ARP and MAC address Table first?

Neither got anything to do with DHCP.  You clear the DHCP bindings "clear ip dhcp bind" FIRST before you configure above.

PS:  Thanks for taking the time to rate our posts. 

Review Cisco Networking products for a $25 gift card