cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1526
Views
0
Helpful
8
Replies

Binding between a switch interface and DHCP

danny4569
Level 1
Level 1

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.

8 Replies 8

Krishnendu AR
Level 1
Level 1

Guys,

Even Im keen to know if this is possible.

Krishna

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




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 "Fa

1/0/0" ascii

address 25.0.0.2 client-id "Fa

1/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?

What does "sho ip dhcp bind" show for the client-id?

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

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.

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

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.

Review Cisco Networking products for a $25 gift card