cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1850
Views
15
Helpful
5
Replies

Cisco 2960 IP to MAC Binding

holyfeeler
Level 1
Level 1

Hi Everyone,

I have a simple requirement.

I just want to bind the one IP with MAC Address so that i could Allow the certain services in firewall against that IP.

No matter device connects to which port, it should always be getting the same IP based on the MAC Address Binding.

2960 switch is DHCP server which is connected to one Cisco SME switch and my device is connected to this SME switch.

so far i have done the following on cisco 2960 but it didn't seem to work.

ip dhcp exclude-address 192.168.10.10

ip dhcp pool test

host 192.168.10.10 255.255.255.0

client-identifier <macaddress>

 

Need your kind advise

1 Accepted Solution

Accepted Solutions

you can use one of the options :

 

client-identifier 01XXXXXXXXXXXX  - The client-identifier option prepends a 01 (for Ethernet) to the MAC address.

or

hardware-address xxxx.xxxx.xxxx

 

 

From Cisco Notes :

 

DHCP clients require client identifiers. You can specify the unique identifier for the client in either of the following ways:

  • A 7-byte dotted hexadecimal notation. For example, 01100.04f3.0158.b3, where 01 represents the Ethernet media type and the remaining bytes represent the MAC address of the DHCP client.
  •  27-byte dotted hexadecimal notation. For example, 7665.6e64.6f72.2d30.3032.342e.3937.6230.2e33.3734.312d.4661.302f.31. The equivalent ASCII string for this hexadecimal value is vendor-0024.97b0.3741, where vendor represents the vendor, 0024.97b0.3741 represents the MAC address of the source interface.

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

View solution in original post

5 Replies 5

balaji.bandi
Hall of Fame
Hall of Fame
ip dhcp pool test
host 192.168.10.10 255.255.255.0
client-identifier <macaddress>
client-identifier 01aa.bbcc.0010.00   <-- this is very important
 default-router 192.168.10.X

 

more information can be find here :

 

https://www.theroutingtable.com/configuring-a-cisco-dhcp-ip-reservation/

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

holyfeeler
Level 1
Level 1

@balaji.bandi 

Many thanks, i will try this now, from your post i came to know that i haven't added the dns and gateway into that pool, may be this is the reason that it wasn't working, will try adding the gateway and dns.

however i have one confusion,  in my switch the mac address format is different, it is xxxx.xxxx.xxxx format not the format you have mentioned above should i follow your format or the format which my switch is showing me upon "sh mac address-table".

 

many thanks!

you can use one of the options :

 

client-identifier 01XXXXXXXXXXXX  - The client-identifier option prepends a 01 (for Ethernet) to the MAC address.

or

hardware-address xxxx.xxxx.xxxx

 

 

From Cisco Notes :

 

DHCP clients require client identifiers. You can specify the unique identifier for the client in either of the following ways:

  • A 7-byte dotted hexadecimal notation. For example, 01100.04f3.0158.b3, where 01 represents the Ethernet media type and the remaining bytes represent the MAC address of the DHCP client.
  •  27-byte dotted hexadecimal notation. For example, 7665.6e64.6f72.2d30.3032.342e.3937.6230.2e33.3734.312d.4661.302f.31. The equivalent ASCII string for this hexadecimal value is vendor-0024.97b0.3741, where vendor represents the vendor, 0024.97b0.3741 represents the MAC address of the source interface.

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

@balaji.bandi 

Hi Balaji,

below is the final config, i am going to make just one question left.

==================================

ip dhcp pool bind_host

host 192.168.10.10 255.255.255.0

client-identifier 01XXXXXXXXXXXX

OR

hardware-address xxxx.xxxx.xxxx

default-router 192.168.10.1

dns 8.8.8.8 8.8.4.4

==================================

MAIN Question

the above required binded IP i.e. "192.168.10.10" Do i need to exclude this address by ip dhcp exclude-address 192.168.10.10 ?

Below is the main DHCP pool for everyone one and no IP Addresses are excluded so far. because it was not required until the above one host that is needed to bind.

====================================

MAIN DHCP pool which is working fine.

ip dhcp pool net_10x

network 192.168.10.0 255.255.255.0

default-router 192.168.10.1

dns 8.8.8.8 8.8.4.4

====================================

MAIN Question

the above required binded IP i.e. "192.168.10.10" Do i need to exclude this address by ip dhcp exclude-address 192.168.10.10 ?

Below is the main DHCP pool for everyone one and no IP Addresses are excluded so far. because it was not required until the above one host that is needed to bind.

If you looking to static IP for the device, you need to exclude the IP range from the Pool. If not it may have conflict.

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

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: