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. And see here for current known issues.

New Member

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

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
Hall of Fame Super Gold

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

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.

3 REPLIES
Hall of Fame Super Gold

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

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.

New Member

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

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

Hall of Fame Super Gold

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

 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. 

228
Views
0
Helpful
3
Replies