09-15-2014 08:09 AM - edited 03-07-2019 08:45 PM
Hi,
I was wondering if we can configure dhcp in switch and routers such that the IP of device assigned with IP address would change if we assign same static IP to another device in the same network. does cisco support such kind of configuration?
Thanks,
Vish
09-15-2014 03:27 PM
You mean you want to assign a specific IP address to a specific MAC address? The answer is YES.
09-19-2014 07:00 AM
No.let me put it in this way--
There is one laptop with dhcp ip 192.168.1.1. Now, i gave the same ip address to my PC statically.
now, dhcp ip of laptop should be changed so that my PC would not give duplicate IP error.
Thanks,
vish
09-19-2014 03:56 PM
The answer is still yes. You can assign a specific IP address, via DHCP, to a specific MAC address. For example,
This way, the laptop and the PC will ALWAYS get the same IP address as long as their MAC addresses don't change.
09-22-2014 10:25 AM
thanks leo
09-22-2014 04:16 AM
As far as I know it's impossible, DHCP protocol has no massage to tell the client to don't use anymore a previously assigned IP address.
Bye,
enrico
PS rate if useful
09-22-2014 05:49 AM
Consider this (I will not use in a production network): if you statically assign the IP add 192.168.1.1. to the PC both host will detect a uplicate ip address. After this the first host (the one using DHCP) will not renew the lease, instead it send a:
DHCPDECLINE - Client to server indicating network address is already in use.
DHCP server will offer a new IP address and put the old one in the conflict database.
If you set a very short lease in some way you have the desired behavior but, again, it's nothing I wolud like to use ina production network
A little test with lease 1mnute
*Mar 1 01:31:01.183: DHCPD: DHCPDECLINE received from client 0063.6973.636f.2d63.3230.322e.3164.3234.2e30.3030.302d.4661.302f.30.
*Mar 1 01:31:01.187: DHCPD: Sending notification of TERMINATION:
*Mar 1 01:31:01.187: DHCPD: address 192.168.123.7 mask 255.255.255.0
*Mar 1 01:31:01.191: DHCPD: reason flags: DECLINE
*Mar 1 01:31:01.191: DHCPD: htype 1 chaddr c202.1d24.0000
*Mar 1 01:31:01.195: DHCPD: lease time remaining (secs) = 57
*Mar 1 01:31:01.195: DHCPD: returned 192.168.123.7 to address pool DP.
*Mar 1 01:31:01.199: %DHCPD-4-DECLINE_CONFLICT: DHCP address conflict: client 0063.6973.636f.2d63.3230.322e.3164.3234.2e30.3030.302d.4661.302f.30 declined 192.168.123.7.
*Mar 1 01:31:01.207: DHCPD: Sending notification of DISCOVER:
*Mar 1 01:31:01.207: DHCPD: htype 1 chaddr c202.1d24.0000
*Mar 1 01:31:01.211: DHCPD: remote id 020a0000c0a87b0100000000
*Mar 1 01:31:01.211: DHCPD: circuit id 00000000
*Mar 1 01:31:01.215: DHCPD: DHCPDISCOVER received from client 0063.6973.636f.2d63.3230.322e.3164.3234.2e30.3030.302d.4661.302f.30 on interface FastEthernet0/0.
*Mar 1 01:31:01.219: DHCPD: Seeing if there is an internally specified pool class:
*Mar 1 01:31:01.219: DHCPD: htype 1 chaddr c202.1d24.0000
*Mar 1 01:31:01.223: DHCPD: remote id 020a0000c0a87b0100000000
*Mar 1 01:31:01.223: DHCPD: circuit id 00000000
*Mar 1 01:31:01.223: DHCPD: Allocate an address without class information (192.168.123.0)
R1#
R1#
*Mar 1 01:31:03.227: DHCPD: Adding binding to radix tree (192.168.123.8)
*Mar 1 01:31:03.227: DHCPD: Adding binding to hash tree
*Mar 1 01:31:03.231: DHCPD: assigned IP address 192.168.123.8 to client 0063.6973.636f.2d63.3230.322e.3164.3234.2e30.3030.302d.4661.302f.30.
*Mar 1 01:31:03.235: DHCPD: Sending DHCPOFFER to client 0063.6973.636f.2d63.3230.322e.3164.3234.2e30.3030.302d.4661.302f.30 (192.168.123.8).
*Mar 1 01:31:03.239: DHCPD: broadcasting BOOTREPLY to client c202.1d24.0000.
*Mar 1 01:31:03.267: DHCPD: DHCPREQUEST received from client 0063.6973.636f.2d63.3230.322e.3164.3234.2e30.3030.302d.4661.302f.30.
R1#
*Mar 1 01:31:03.271: DHCPD: Sending notification of ASSIGNMENT:
*Mar 1 01:31:03.275: DHCPD: address 192.168.123.8 mask 255.255.255.0
*Mar 1 01:31:03.275: DHCPD: htype 1 chaddr c202.1d24.0000
*Mar 1 01:31:03.279: DHCPD: lease time remaining (secs) = 60
*Mar 1 01:31:03.279: DHCPD: No default domain to append - abort update
*Mar 1 01:31:03.283: DHCPD: Sending DHCPACK to client 0063.6973.636f.2d63.3230.322e.3164.3234.2e30.3030.302d.4661.302f.30 (192.168.123.8).
*Mar 1 01:31:03.283: DHCPD: broadcasting BOOTREPLY to client c202.1d24.0000.
09-22-2014 10:24 AM
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