09-14-2021 12:05 PM
We have a Cisco 2960 switch that uses DHCP to send specific IP addresses to devices that are connected to specific ports on the 2960. Even after resetting the switch to factory and uploading new known good switch configuration script is not distributing the correct IP addresses to certain nodes connected to the switch. For example on port 14 we have a device that is getting an address ending in .108. If I connect a different device to that port I get a different IP address. When connecting back the original device still has .108 when it should be .1 or .2 based on our DHCP configuration script. We have power cycled the switch, restored to factory, reupload the config script, issue remains.
Solved! Go to Solution.
09-14-2021 01:41 PM - edited 09-14-2021 01:45 PM
Can you post-show version " i need to verify "ip dhcp server use subscriber-id client-id" based on version is that works ?
If this is your Layer 3 address :
nterface Vlan1
description PLC VLAN
ip address 192.168.1.253 255.255.255.0
!
interface Vlan 2
description TA VLAN
ip address 10.250.0.253 255.255.255.0
then this need to change :
ip dhcp pool 1
network 10.250.0.0 255.255.0.0
default-router 10.250.0.253
09-14-2021 12:15 PM
Let's be clear, DHCP Reservation is based on the MAC Address, not based on the user-connected port.
If the xxxxxxx MAC address is reserved for to get .108, it does not matter where it is connected in that VLAN, the device gets a same IP address.
I do not believe that option you looking work (nor i aware in simple switching level)
is this worked for you before? or are you testing that feature? or is that requirement?
09-14-2021 01:10 PM
We connect different devices to the same port and they are supposed to get the same IP Address. So it is not based on MAC addresses.
09-14-2021 01:19 PM - edited 09-14-2021 01:38 PM
other solution not suggested, if you like to do, make each port as different VLAN, create a different subnet scope (with 1 IP address in the allocation list) - then you need to setup lease time less.
09-14-2021 01:23 PM
Here is the config script we are using:
no aaa new-model
ip routing
no ip cef optimize neighbor resolution
ip dhcp use subscriber-id client-id
ip dhcp subscriber-id interface-name
ip dhcp excluded-address 10.250.0.3 10.250.0.100
ip dhcp excluded-address 10.250.0.103 10.250.0.255
ip dhcp excluded-address 10.250.1.4 10.250.1.30
ip dhcp excluded-address 10.250.1.33 10.250.1.255
ip dhcp excluded-address 192.168.1.1
ip dhcp excluded-address 192.168.1.3 192.168.1.10
ip dhcp excluded-address 192.168.1.12 192.168.1.49
ip dhcp excluded-address 192.168.1.51 192.168.1.100
ip dhcp excluded-address 192.168.1.102 192.168.1.255
ip dhcp ping packets 1
!
ip dhcp pool 1
network 10.250.0.0 255.255.0.0
default-router 10.250.0.99
dns-server 10.104.194.244 10.104.194.245
lease infinite
reserved-only
address 10.250.0.1 client-id "Gi1/0/13" ascii
address 10.250.0.2 client-id "Gi1/0/14" ascii
address 10.250.1.1 client-id "Gi1/0/19" ascii
address 10.250.1.2 client-id "Gi1/0/20" ascii
address 10.250.1.3 client-id "Gi1/0/21" ascii
address 10.250.1.31 client-id "Gi1/0/22" ascii
address 10.250.1.32 client-id "Gi1/0/23" ascii
address 10.250.0.102 client-id "Gi1/0/16" ascii
!
ip dhcp pool 2
network 192.168.1.0 255.255.255.0
lease infinite
reserved-only
address 192.168.1.11 client-id "Gi1/0/1" ascii
address 192.168.1.2 client-id "Gi1/0/2" ascii
address 192.168.1.101 client-id "Gi1/0/7" ascii
address 192.168.1.50 client-id "Gi1/0/12" ascii
!
!
ip dhcp snooping
login on-success log
!
spanning-tree mode pvst
spanning-tree extend system-id
vlan internal allocation policy ascending
!
!
interface FastEthernet0
no ip address
!
interface GigabitEthernet1/0/1
description TA PLC LAN
switchport mode access
ip dhcp server use subscriber-id client-id
!
interface GigabitEthernet1/0/2
description Beckhoff PLC LAN
switchport mode access
ip dhcp server use subscriber-id client-id
!
interface GigabitEthernet1/0/3
!
interface GigabitEthernet1/0/4
!
interface GigabitEthernet1/0/5
!
interface GigabitEthernet1/0/6
!
interface GigabitEthernet1/0/7
description Chiller
switchport mode access
ip dhcp server use subscriber-id client-id
!
interface GigabitEthernet1/0/8
!
interface GigabitEthernet1/0/9
!
interface GigabitEthernet1/0/10
!
interface GigabitEthernet1/0/11
!
interface GigabitEthernet1/0/12
description I2C Board
switchport mode access
ip dhcp server use subscriber-id client-id
!
interface GigabitEthernet1/0/13
description Tester A101
switchport access vlan 2
switchport mode access
ip dhcp server use subscriber-id client-id
!
interface GigabitEthernet1/0/14
description Tester A102
switchport access vlan 2
switchport mode access
ip dhcp server use subscriber-id client-id
!
interface GigabitEthernet1/0/15
description TA Tester LAN
switchport access vlan 2
switchport mode access
!
interface GigabitEthernet1/0/16
description Engineering Debug
switchport access vlan 2
switchport mode access
ip dhcp server use subscriber-id client-id
!
interface GigabitEthernet1/0/17
description DPC Tester LAN
switchport access vlan 2
!
interface GigabitEthernet1/0/18
description TC Tester LAN
switchport access vlan 2
switchport mode access
!
interface GigabitEthernet1/0/19
description TCC A101
switchport access vlan 2
switchport mode access
ip dhcp server use subscriber-id client-id
!
interface GigabitEthernet1/0/20
description TCC A102
switchport access vlan 2
switchport mode access
ip dhcp server use subscriber-id client-id
!
interface GigabitEthernet1/0/21
description TCC DS
switchport access vlan 2
switchport mode access
ip dhcp server use subscriber-id client-id
!
interface GigabitEthernet1/0/22
description CME A101
switchport access vlan 2
switchport mode access
ip dhcp server use subscriber-id client-id
!
interface GigabitEthernet1/0/23
description CME A102
switchport access vlan 2
switchport mode access
ip dhcp server use subscriber-id client-id
!
interface GigabitEthernet1/0/24
description Station Controller
switchport access vlan 2
switchport mode access
!
interface GigabitEthernet1/0/25
!
interface GigabitEthernet1/0/26
!
interface TenGigabitEthernet1/0/1
!
interface TenGigabitEthernet1/0/2
!
interface Vlan1
description PLC VLAN
ip address 192.168.1.253 255.255.255.0
!
interface Vlan 2
description TA VLAN
ip address 10.250.0.253 255.255.255.0
09-14-2021 01:41 PM - edited 09-14-2021 01:45 PM
Can you post-show version " i need to verify "ip dhcp server use subscriber-id client-id" based on version is that works ?
If this is your Layer 3 address :
nterface Vlan1
description PLC VLAN
ip address 192.168.1.253 255.255.255.0
!
interface Vlan 2
description TA VLAN
ip address 10.250.0.253 255.255.255.0
then this need to change :
ip dhcp pool 1
network 10.250.0.0 255.255.0.0
default-router 10.250.0.253
09-14-2021 01:53 PM
Cisco IOS Software, C2960X Software (C2960X-UNIVERSALK9-M), Version 15.2(7)E1, RELEASE SOFTWARE (fc4)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2019 by Cisco Systems, Inc.
Compiled Sat 07-Dec-19 09:42 by prod_rel_team
ROM: Bootstrap program is C2960X boot loader
BOOTLDR: C2960X Boot Loader (C2960X-HBOOT-M) Version 15.2(6r)E, RELEASE SOFTWARE (fc1)
iCDC_V2 uptime is 2 hours, 19 minutes
System returned to ROM by power-on
System restarted at 18:32:35 UTC Tue Sep 14 2021
System image file is "flash:/c2960x-universalk9-mz.152-7.E1/c2960x-universalk9-mz.152-7.E1.bin"
Last reload reason: power-on
09-14-2021 02:59 PM
THANK YOU!!!!!!!! ALL FIXED NOW
09-14-2021 03:06 PM
Just tested in my Lab works as expected with the simple client. what was your fix ?
09-14-2021 03:47 PM
We changed the router address in the config file as you suggested. The up address on the node was correct after uploading the new config file but now it looks like if the node is rebooted the address changes back to .108 when it is supposed to be .2 for port 14.
09-14-2021 03:50 PM
Looks like it was actually an issue coming from another computer connected to the network. Thanks again!
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