11-07-2022 02:13 AM
Hi
I'm trying to use the feature in a Cisco Switch that should be able to allocate an IP-address to a client based on what port it connects to (reason is is we have to replace a HW on a specific port the new HW SHALL automatically use the same IP as the old HW)
I have used information in this link that talks about this feature
IP Addressing: DHCP Configuration Guide, Cisco IOS Release 12.2SX - DHCP Server Port-Based Address Allocation [Cisco IOS Software Releases 12.2 SX] - Cisco
So when I configure this like this (snippet from config) the DHCP server in the switch gives out the same IP to clients connecting to the ports, because it uses Vl1 as client-id instead of the actual interface id (like Gi0/1). See the debug provided below where all DHCP request from ports is sending 0056.6c31 as client id (this is Vl1 translated from using ascii-table)
Any ideas if this is a bug or I have done something wrong configuring my switch ?
-----Snippet from config------
ip dhcp use subscriber-id client-id
ip dhcp subscriber-id interface-name
!
ip dhcp pool TEST
network 10.10.10.0 255.255.255.0
default-router 10.10.10.1
dns-server 8.8.8.8
option 150 ip 10.10.10.5
lease 0 0 3
address 10.10.10.10 client-id "Gi0/0" ascii
address 10.10.10.11 client-id "Gi0/1" ascii
address 10.10.10.12 client-id "Gi0/2" ascii
address 10.10.10.13 client-id "Gi0/3" ascii
address 10.10.10.20 client-id "Vl1" ascii
!
interface GigabitEthernet0/1
switchport mode access
ip dhcp relay information option server-id-override
ip dhcp server use subscriber-id client-id
------ DEBUG part ------
*Nov 7 09:26:20.312: DHCPD: Reload workspace interface Vlan1 tableid 0.
*Nov 7 09:26:20.312: DHCPD: tableid for 10.10.10.1 on Vlan1 is 0
*Nov 7 09:26:20.312: DHCPD: client's VPN is .
*Nov 7 09:26:20.313: DHCPD: using subscriber-id as client-id
*Nov 7 09:26:20.313: DHCPD: using received relay info.
*Nov 7 09:26:20.314: DHCPD: DHCPDISCOVER received from client 0056.6c31 on interface Vlan1.
*Nov 7 09:26:20.314: DHCPD: using received relay info.
*Nov 7 09:26:20.314: DHCPD: Sending DHCPOFFER to client 0056.6c31 (10.10.10.20).
*Nov 7 09:26:20.315: DHCPD: no option 125
*Nov 7 09:26:20.316: DHCPD: creating ARP entry (10.10.10.20, 5254.0019.6cf0).
*Nov 7 09:26:20.317: DHCPD: unicasting BOOTREPLY to client 5254.0019.6cf0 (10.10.10.20).
*Nov 7 09:26:20.319: DHCPD: Reload workspace interface Vlan1 tableid 0.
*Nov 7 09:26:20.319: DHCPD: tableid for 10.10.10.1 on Vlan1 is 0
*Nov 7 09:26:20.319: DHCPD: client's VPN is .
*Nov 7 09:26:20.319: DHCPD: using subscriber-id as client-id
*Nov 7 09:26:20.319: DHCPD: DHCPREQUEST received from client 0056.6c31.
*Nov 7 09:26:20.319: DHCPD: Sending DHCPACK to client 0056.6c31 (10.10.10.20).
*Nov 7 09:26:20.319: DHCPD: no option 125
*Nov 7 09:26:20.319: DHCPD: creating ARP entry (10.10.10.20, 5254.0019.6cf0).
*Nov 7 09:26:20.319: DHCPD: unicasting BOOTREPLY to client 5254.0019.6cf0 (10.10.10.20).
*Nov 7 09:26:26.307: DHCPD: Reload workspace interface Vlan1 tableid 0.
*Nov 7 09:26:26.307: DHCPD: tableid for 10.10.10.1 on Vlan1 is 0
*Nov 7 09:26:26.307: DHCPD: client's VPN is .
*Nov 7 09:26:26.308: DHCPD: using subscriber-id as client-id
*Nov 7 09:26:26.309: DHCPD: using received relay info.
*Nov 7 09:26:26.309: DHCPD: DHCPDISCOVER received from client 0056.6c31 on interface Vlan1.
*Nov 7 09:26:26.309: DHCPD: using received relay info.
*Nov 7 09:26:26.310: DHCPD: Sending DHCPOFFER to client 0056.6c31 (10.10.10.20).
*Nov 7 09:26:26.311: DHCPD: no option 125
*Nov 7 09:26:26.311: DHCPD: creating ARP entry (10.10.10.20, 5254.000e.80fe).
*Nov 7 09:26:26.312: DHCPD: unicasting BOOTREPLY to client 5254.000e.80fe (10.10.10.20).
*Nov 7 09:26:26.323: DHCPD: Reload workspace interface Vlan1 tableid 0.
*Nov 7 09:26:26.323: DHCPD: tableid for 10.10.10.1 on Vlan1 is 0
*Nov 7 09:26:26.324: DHCPD: client's VPN is .
*Nov 7 09:26:26.324: DHCPD: using subscriber-id as client-id
*Nov 7 09:26:26.324: DHCPD: DHCPREQUEST received from client 0056.6c31.
*Nov 7 09:26:26.325: DHCPD: Sending DHCPACK to client 0056.6c31 (10.10.10.20).
*Nov 7 09:26:26.325: DHCPD: no option 125
*Nov 7 09:26:26.326: DHCPD: creating ARP entry (10.10.10.20, 5254.000e.80fe).
*Nov 7 09:26:26.326: DHCPD: unicasting BOOTREPLY to client 5254.000e.80fe (10.10.10.20).
*Nov 7 09:26:31.316: DHCPD: Reload workspace interface Vlan1 tableid 0.
*Nov 7 09:26:31.317: DHCPD: tableid for 10.10.10.1 on Vlan1 is 0
*Nov 7 09:26:31.317: DHCPD: client's VPN is .
*Nov 7 09:26:31.317: DHCPD: using subscriber-id as client-id
*Nov 7 09:26:31.318: DHCPD: using received relay info.
*Nov 7 09:26:31.318: DHCPD: DHCPDISCOVER received from client 0056.6c31 on interface Vlan1.
*Nov 7 09:26:31.319: DHCPD: using received relay info.
*Nov 7 09:26:31.319: DHCPD: Sending DHCPOFFER to client 0056.6c31 (10.10.10.20).
*Nov 7 09:26:31.320: DHCPD: no option 125
*Nov 7 09:26:31.320: DHCPD: creating ARP entry (10.10.10.20, 5254.0002.4dec).
*Nov 7 09:26:31.321: DHCPD: unicasting BOOTREPLY to client 5254.0002.4dec (10.10.10.20).
*Nov 7 09:26:31.330: DHCPD: Reload workspace interface Vlan1 tableid 0.
*Nov 7 09:26:31.331: DHCPD: tableid for 10.10.10.1 on Vlan1 is 0
*Nov 7 09:26:31.331: DHCPD: client's VPN is .
*Nov 7 09:26:31.332: DHCPD: using subscriber-id as client-id
*Nov 7 09:26:31.332: DHCPD: DHCPREQUEST received from client 0056.6c31.
*Nov 7 09:26:31.332: DHCPD: Sending DHCPACK to client 0056.6c31 (10.10.10.20).
*Nov 7 09:26:31.333: DHCPD: no option 125
*Nov 7 09:26:31.333: DHCPD: creating ARP entry (10.10.10.20, 5254.0002.4dec).
*Nov 7 09:26:31.334: DHCPD: unicasting BOOTREPLY to client 5254.0002.4dec (10.10.10.20).
Solved! Go to Solution.
11-08-2022 02:33 AM
OK, I digged out an old Catalyst 2960 and did the same test there. Worked perfect, so CML and the IOS version there on the switch is really having trouble. Problem solved
11-07-2022 02:57 AM
what is the switch model, what IOS Code running.
what is the outcome if you remove this line from dhcp pool config : address 10.10.10.20 client-id "Vl1" ascii
what is the config applied in vlan1 : show run interface vlan 1 ?
like to know what is device MAC Address - 0056.6c31. (switch mac address, what mac address of device ? you trying to connect 5254.0002.4dec ?)
11-07-2022 03:21 AM
The switch is in CML running version 15.2 (just to be able to test the functionality easily)
Cisco IOS Software, vios_l2 Software (vios_l2-ADVENTERPRISEK9-M), Experimental Version 15.2(20200924:215240) [sweickge-sep24-2020-l2iol-release 135]
If I remove that address command the clients get allocated an IP-address from the pool, but still all gets the same IP, as they report the same client-id
On vlan1 there is only an IP-address configured, without this the internal DHCP server vill not provide any IP-address to the clients
interface Vlan1
ip address 10.10.10.1 255.255.255.0
end
11-07-2022 03:33 AM
You may not get all features you looking to test over Virtual or CML,
I will turn off all port and clear MAC table and test it (if not working there may be Limitation of virtual)
i will test on my CML later when i get chance.
11-07-2022 02:59 AM
one by one with me
you have one router which is relay and DHCP local server in same times??
11-07-2022 03:43 AM
The goal is to have the switch assigning IP-addresses to hosts connection to different ports in the switch, and always assigning the same IP-address to whatever connects to a port based on what port it connects to, so if something connects to port gi 0/0 it shall gets IP-address 10.10.10.10, something connection to port gi 0/1 shall get address 10.10.10.11 and so on
I have to configure interface VLAN1 (or whatever VLAN those ports will be assigned to) to have the switch handling out IP-addresses. If I only configure the ip dhcp pool and its related commands no IP's was assigned to the hosts.
The switch is not acting as an router, just handling out IP-addresses to the clients that connects to it
11-07-2022 03:57 AM
OK,
but still
Client-SW-R(relay)-R(local DHCP server)
this is flow of DHCP
Client connect to SW in Port X,
SW can run DHCP snooping, which make SW add Op82 include VLAN-ID + Port
R(relay) can forward it add more to Op82 or keep it
R(local DHCP server) config DHCP with Class each class config Op82 and IP assign to it.
11-07-2022 04:17 AM
So what do you suggest I change to get it working ?
11-08-2022 02:33 AM
OK, I digged out an old Catalyst 2960 and did the same test there. Worked perfect, so CML and the IOS version there on the switch is really having trouble. Problem solved
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