11-09-2011 12:50 AM - edited 03-07-2019 03:17 AM
Hi all.
I am looking for a way to bind between a switch interface (cat 3750X) and a DHCP server reply.
The switch can operate as the DHCP server .
For example,
a PC connected to interface Gi 1/0/1 will lways get IP address 10.0.0.1 because it is connected to interface Gi 1/0/1, a PC connected to interface Gi 1/0/5 will lways get IP address 10.0.0.5 because it is connected to interface Gi 1/0/5 and so on... (no matter the source MAC address who sends the DHCP request).
Is it possible on CAT 3750X?
Danny.
11-15-2011 07:02 PM
Guys,
Even Im keen to know if this is possible.
Krishna
11-15-2011 09:05 PM
Hi,
DHCP protocol recognizes DHCP clients by the client identifier option in the DHCP packet. Clients that do not include the client identifier option are identified by the client hardware address. When you configure this feature, the switch port, becomes the client identifier. and you can bind the port with the specific IP Address.
enable this feature using command in global config mode:
ip dhcp use subscriber-id client-id
ip dhcp subscriber-id interface-name
address 10.0.0.1 client-id "Gi 1/0/0" ascii
11-16-2011 07:22 AM
Hi.
I vave the following configuration on my 3750 switch:
ip dhcp use subscriber-id client-id
ip dhcp subscriber-id interface-name
IP dhcp pool VLAN2
network 25.0.0.0 255.255.255.0
address 25.0.0.1 client-id "Fa1/0/0" ascii
address 25.0.0.2 client-id "Fa1/0/1" ascii
interface FastEthernet 1/0/1
switchport access vlan 2
switchport mode access
ip dhcp server use subscriber-id client-id
spanning-tree portfast
The problem is that the DHCP server (which is the CAT3750) assigne any
IP address from the pool but not the specific address configured.
For example: at this moment interface Fa 1/0/1 gets 25.0.0.7
Any idea why?
11-16-2011 06:54 PM
What does "sho ip dhcp bind" show for the client-id?
11-17-2011 03:00 AM
Hi Pascal.
The output of the command: "show ip dhcp binding"
IP address client ID/H/W address/User name Lease expiration Type
25.0.0.1 4661.2031.2f30.2f30 infinite manual
25.0.0.2 4661.2031.2f30.2f31 infinite manual
25.0.0.3 4661.2031.2f30.2f32 infinite manual
25.0.0.7 4661.312f.302f.31 Mar 02 1993 06:26 PM Automatic
The PC gets 25.0.0.7 when it is connected to interface Fa 1/0/1
11-17-2011 05:29 AM
Problem was solved!
The problem was with the ascii name and the way you type the name of the interface were you want to get a manual/static IP address acording to the interface name.
when configuring the command: address 25.0.0.5 client-id "name of the interface" ascii
you should write the short name of the interface exactly as it is being showed under the command "show interface status" for example.
in my my case: address 25.0.0.5 client-id "Fa1/0/5" ascii with NO space btween Fa and number.
Danny.
09-28-2012 02:31 PM
Dany, I had the same problem and just did what you were showing but still not working. Are you using the external DHCP server or from IOS?
Thanks
Phuong
10-02-2012 02:31 AM
Hi Phuong.
I am using the 3750/3750X IOS as my DHCP server.
Don't forget to confgure also each interface on the switch with the command:
ip dhcp server use subscriber-id client-id.
Best regards,
Danny.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide