cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1518
Views
4
Helpful
20
Replies

DCHP IP Changed

hs08
VIP
VIP

Hello,

My laptop ip address is 10.100.50.31 under vlan 250, then i try to change my vlan to other vlan for testing purpose. When i back to vlan 250 i feel strange that my ip is changed and not use 10.100.50.31.

Checked there is no mac address change in my NIC. Anyone know why?

Here my dhcp server config

!
network 10.100.50.0 255.255.255.0
default-router 10.100.50.1
dns-server 10.200.1.1
lease 7

20 Replies 20

Show ip dhcp binding 

Show ip dhcp pool server

Share these 

MHM

hs08
VIP
VIP

Hi @MHM Cisco World 

Here result of both command:hs08_0-1725249567870.png

hs08_1-1725249590260.png

 

 

hs08_1-1725249590260.png

Hi @MHM Cisco World 

sorry i not understand your reply.

Here my ip now 10.100.50.48

hs08_1-1725257465239.png

Then i switch to other vlan i got ip 10.100.1.27

hs08_2-1725257551828.png

Then i go back to vlan 250 and my ip changed from 10.100.50.48 to 10.100.50.50 now.

hs08_3-1725257610431.png

 

 

 

 

Now in binding you will see mac end with 03 and IP end with. 50

The old IP .48 the dhcp assume it use by host and dhcp pool will never use it until lease time end.

To make you vlan always use same IP you need to use static IP 

https://sites.google.com/site/blahutajannet/cisco-tutorials/cisco-router-set-up-dhcp-static-mapping

MHM

hi @MHM Cisco World 

Please cmiiw, as my experience when using windows as dhcp server the client will have same ip if the mac address also not changed.

So on the window dhcp database will map like below
Vlan 250 :: 00-15-5D-54-96-03 :: 10.100.50.48
Vlan 101 :: 00-15-5D-54-96-03 :: 10.100.1.27
So whenever the client go to any vlan, when the client connect to vlan 250 the ip always and should be 10.100.50.48 as long the lease not expired.

Or maybe in the cisco router the mac address is not stored per vlan, so when the client connect to vlan 101 then it will remove existing entry on vlan 250?

as my experience when using windows as dhcp server the client will have same ip if the mac address also not changed. <<- that I think not correct, when host ask IP from DHCP (server or local in router) it will get new IP unless you static IP 

Or maybe in the cisco router the mac address is not stored per vlan, so when the client connect to vlan 101 then it will remove existing entry on vlan 250? <<- if you see binding table you can see the vlan appear so router store per vlan 

MHM

So what purpose of dhcp lease time if every client request ip address to the dhcp server and dhcp server assign different ip? When the client connect to different vlan, this mean lease time still exist and not deleted until the leased time expired in the previous vlan. Am i right?

 

So what purpose of dhcp lease time if every client request ip address to the dhcp server and dhcp server assign different ip? lease time will make dhcp release the IP, without lease time the DHCP will for ever assume there is host use IP 
and Yes there is con for this, if you remember your old previous issue about guest client and dhcp pool exhausted, this exhausted happened because guest connect ask IP then disconnect and re-connect ask IP this will exhaust the dhcp and dhcp dont have anymore IP to assign.

When the client connect to different vlan, this mean lease time still exist and not deleted until the leased time expired in the previous vlan. Am i right? Yes correct 

Hi @MHM Cisco World 

yes i agree the dhcp will assign different ip if the dhcp pool is exhausted or we manually clear the binding. In my post now we can see the dhcp pool is not exhausted and when the client back to vlan 250 the client should have same ip since the lease time still not expired. I'm still not understand except my previous statement is true that dhcp on cisco router will not stored per vlan.

not exhausted <<- it will exhausted, you have 248 free IP to assign, make you vlan ask many IP and you end that dhcp pool dont have IP to assign, this case seen clearly with guest that why we suggest reduce lease time

MHM

Hi @MHM Cisco World 

yes it will exhausted but in my case now the pool is not exhausted, in my previous picture we can see the pool still have many free ip. 

hs08_0-1725260673616.png

 

friend that why I make red color circle
NOW if the binding have 22 entry why leased is 44 ? there is 22  IP assign before to host and dhcp pool keep it and never re-assign it to other host (same mac or different mac) until the expire end 
after expired end you will see leased equal binding 

MHM

I try using my gadget,

When i connect to vlan 250 i got ip 10.100.50.51 

hs08_0-1725261079584.png

Then i move to other vlan and i got ip 10.100.131.75. Now in the binding there are 2 entry with same mac address

hs08_1-1725261117420.png

Then i go back to vlan 250 and i still get same IP 10.100.50.51, but idk this is not happened with my laptop. My laptop always get different ip.

Sorry my friend when i capture of show ip dhcp binding you only see 22 due i not full capture the result, actually i have 44 binding. I'm sorry for that,