troubleshooting Question

Cisco 2960 switch DHCP Server Port-Based Address Allocation

Avatar of RikeR
RikeR asked on
Switches / HubsDHCPNetwork Operations
5 Comments1 Solution2759 ViewsLast Modified:
Hi experts,

I'm working on a configuration of a Cisco 2960 switch and would like to do port-based address allocation meaning whatever device connects to a certain port it will then receive the same IP address as different device did on the same port.

What I found so far is:
http://www.cisco.com/en/US/docs/ios/ipaddr/configuration/guide/iad_dhcp_portaddr.pdf
http://www.cisco.com/en/US/docs/ios/ipaddr/configuration/guide/iad_dhcp_portaddr.html#wp1054969

I believe the key commands are:

- Global -
ip dhcp use subscriber-id client-id
ip dhcp subscriber-id interface-name

- in the DHCP pool -
address 192.168.1.77 client-id "fa0/19" ascii

- in the port configuration -
 ip dhcp server use subscriber-id client-id

But annoyingly a client keeps on getting the IP address it's requesting for. So for example if I connect a client to port fa0/19 it request for it's "old" address 192.168.1.78 and will receive .78 in stead of .77.

If I perform a sh ip dhcp binding it does not show the served .78 address, which is even more weird.

Kindly advise.
hostname SW01
!
boot-start-marker
boot-end-marker
!
no aaa new-model
system mtu routing 1500
ip dhcp relay information policy removal pad
no ip dhcp use vrf connected
ip dhcp use subscriber-id client-id
ip dhcp subscriber-id interface-name
ip dhcp excluded-address 192.168.1.65
ip dhcp excluded-address 192.168.1.69
ip dhcp excluded-address 192.168.1.70
!
ip dhcp pool Publiek
   import all
   network 192.168.1.0 255.255.255.0
   dns-server 8.8.8.8
   default-router 192.168.1.65
   address 192.168.1.77 client-id "fa0/19" ascii
   address 192.168.1.78 client-id "fa0/17" ascii
   address 192.168.1.71 client-id "fa0/1" ascii
!
!
no ip domain-lookup
!
mls qos
!
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
!
policy-map Police-10M
 class class-default
  police 10000000 512000 exceed-action drop
policy-map Police-5M
 class class-default
  police 5000000 512000 exceed-action drop
policy-map Police-3M
 class class-default
  police 3000000 512000 exceed-action drop
!
!
!
interface FastEthernet0/1
 description clientA
 speed 10
 srr-queue bandwidth limit 50
 service-policy input Police-5M
!
interface FastEthernet0/2
 description clientB
 speed 10
 srr-queue bandwidth limit 50
 service-policy input Police-5M
!
interface FastEthernet0/3
 description clientC
 speed 10
 srr-queue bandwidth limit 50
 service-policy input Police-5M
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
 ip dhcp server use subscriber-id client-id
!
interface FastEthernet0/18
!
interface FastEthernet0/19
 ip dhcp server use subscriber-id client-id
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
 ip address 192.168.1.69 255.255.255.0
 no ip route-cache
end
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros