Jump to content


DHCP question


  • Please log in to reply
5 replies to this topic

#1 eXPlosionas

eXPlosionas

    Member

  • Members
  • PipPip
  • 104 posts
  • Location:Lithuania

Posted 07 February 2014 - 06:59 AM

Feb  6 17:19:09 src@dhcp2 dhcpd: DHCPREQUEST for x.240.25.74 from d4:ca:6d:eb:d0:x (MikroTik) via x.240.9.190

Feb  6 17:19:09 src@dhcp2 dhcpd: DHCPACK on x.240.25.74 to d4:ca:6d:eb:d0:x (MikroTik) via x.240.9.190

Feb  6 17:38:16 src@dhcp2 dhcpd: Lease for x.240.25.74 , is connected to interface 1/11 , VLAN 110 , on switch 0:1e:79:1b:73:x , client MAC d4:ca0

Feb  6 17:38:16 src@dhcp2 dhcpd: DHCPDISCOVER from x:ca:6d:eb:d0:ae via x.240.9.190

Feb  6 17:38:16 src@dhcp2 dhcpd: DHCPOFFER on x.240.25.74 to d4:ca:6d:eb:d0:x (Teex-PC) via x.240.9.190

Feb  6 17:38:30 src@dhcp2 dhcpd: Lease for x.240.25.74 , is connected to interface 1/11 , VLAN 110 , on switch 0:1e:79:1b:73:x , client MAC d4:ca0

Feb  6 17:38:30 src@dhcp2 dhcpd: DHCPDISCOVER from d4:ca:6d:eb:d0:x (Teex-PC) via x.240.9.190

Feb  6 17:38:30 src@dhcp2 dhcpd: DHCPOFFER on x.240.25.74 to d4:ca:6d:eb:d0:x (Teex-PC) via x.240.9.190

Feb  6 17:42:37 src@dhcp2 dhcpd: Lease for x.240.25.74 , is connected to interface 1/11 , VLAN 110 , on switch 0:1e:79:1b:73:x , client MAC d4:ca0

Feb  6 17:42:37 src@dhcp2 dhcpd: DHCPDISCOVER from d4:ca:6d:eb:d0:x via x.240.9.190

Feb  6 17:42:37 src@dhcp2 dhcpd: DHCPOFFER on x.240.25.74 to d4:ca:6d:eb:d0:x (Teex-PC) via x.240.9.190

Feb  6 17:42:39 src@dhcp2 dhcpd: Lease for x.240.25.74 , is connected to interface 1/11 , VLAN 110 , on switch 0:1e:79:1b:73:x , client MAC d4:ca0

Feb  6 17:42:39 src@dhcp2 dhcpd: DHCPREQUEST for x.240.25.74 (x.240.1.25) from d4:ca:6d:eb:d0:x (Teex-PC) via x.240.9.190

Feb  6 17:42:39 src@dhcp2 dhcpd: DHCPACK on x.240.25.74 to d4:ca:6d:eb:d0:x (Teex-PC) via x.240.9.190

Feb  6 17:42:42 src@dhcp2 dhcpd: DHCPACK to x.240.25.74 (d4:ca:6d:eb:d0:x) via eth0

Feb  6 17:42:45 src@dhcp2 dhcpd: DHCPACK to x.240.25.74 (d4:ca:6d:eb:d0:x) via eth0

Feb  6 17:58:39 src@dhcp2 dhcpd: Lease for x.240.25.74 , is connected to interface 1/11 , VLAN 110 , on switch 0:1e:79:1b:73:x , client MAC d4:ca0

Feb  6 17:58:39 src@dhcp2 dhcpd: DHCPREQUEST for x.240.25.74 from d4:ca:6d:eb:d0:x via x.240.9.190

Feb  6 17:58:39 src@dhcp2 dhcpd: DHCPACK on x.240.25.74 to d4:ca:6d:eb:d0:x (Teex-PC) via x.240.9.190

 

 

Here is the log from dhcp server. Can anyone explain how can IP adress be leased without request message? at time 17:38:16 as you can see there is discover, offer and lease only. Also why 3 ACK are being sent? is this a bug or something?


Edited by eXPlosionas, 07 February 2014 - 07:01 AM.

  • 0

#2 MarkinManchester

MarkinManchester

    Village Elder

  • Veterans
  • PipPipPipPipPip
  • 3976 posts
  • Gender:Male
  • Location:Manchester

Posted 07 February 2014 - 10:50 PM

remove the dhcp binding from the configured switch/router/server you should then see the process you are expecting, where a lease already exists you will see the process below

 

DHCP Lease Reallocation Process
 

When a DHCP client starts up for the first time and has no lease, it begins in the INIT (initialize) state and goes through the allocation process described in the preceding topic to acquire a lease. The same process is used when a lease ends, if a lease renewal fails, or some error or other happening causes a client to need a new lease.

Situations Where Reallocation Is Performed

There are certain situations in which a client starts up while it still has a lease already in place. In this situation, the client does not need to go through the entire process of getting an IP address allocation and a new lease setup. Instead, it simply tries to re-establish its existing lease, through a process that I call reallocation.

There are two primary circumstances under which a client performs reallocation rather than allocation:

  • Power On With Existing Lease: The length of time that a client lease lasts can range from minutes to years; it is entirely a matter of the lease length policy set for the network and client by the administrator. Many, if not most client machines are not left connected to the network 24 hours a day; they are turned on during the day and then shut down at night, and also shut down on weekends. A client with a very short lease that is shut down and then later started again will probably find that its lease has expired, and will have to get a new one. However, if a lease is longer than a few days, it will still probably be in effect when the client starts up again.


  • Reboot: Clients are also sometimes rebooted, to install new software or correct a problem. In this case even when the lease length is very short, the restarting client will still have a valid lease when it starts up.

  • 0

#3 eXPlosionas

eXPlosionas

    Member

  • Members
  • PipPip
  • 104 posts
  • Location:Lithuania

Posted 09 February 2014 - 12:21 AM

If i remove lease from process i see DISCOVER and OFFER  three times. Is  this reallocation process? How does client know if server's lease for that client is still valid. Client still should broadcast REQUEST.

This logg is from one client. (MikroTik) maybe was other computer, but from Feb  6 17:38:16 with  (Teex-PC) which has the same mac as Microtik, the DHCP whole process doesn't make sense to me.


  • 0

#4 eXPlosionas

eXPlosionas

    Member

  • Members
  • PipPip
  • 104 posts
  • Location:Lithuania

Posted 18 March 2014 - 09:15 AM

Any ideas?


  • 0

#5 MarkinManchester

MarkinManchester

    Village Elder

  • Veterans
  • PipPipPipPipPip
  • 3976 posts
  • Gender:Male
  • Location:Manchester

Posted 21 March 2014 - 09:15 AM

sorry no! best intent i was going to look into it further but time is not currently my friend


  • 0

#6 sonu_s

sonu_s

    Member

  • Members
  • PipPip
  • 68 posts

Posted 29 March 2014 - 04:45 AM

I think DHCP server is missing the log messages in between. You can tell that based on the time stamp as well. e.g. below one.

 

Feb  6 17:38:30 src@dhcp2 dhcpd: DHCPDISCOVER from d4:ca:6d:eb:d0:x (Teex-PC) via x.240.9.190

Feb  6 17:38:30 src@dhcp2 dhcpd: DHCPOFFER on x.240.25.74 to d4:ca:6d:eb:d0:x (Teex-PC) via x.240.9.190

Feb  6 17:42:37 src@dhcp2 dhcpd: Lease for x.240.25.74 , is connected to interface 1/11 , VLAN 110 , on switch 0:1e:79:1b:73:x , client MAC d4:ca0

 
 
I can't imagine that the server responded 4 minutes later for a DHCP discovery ? Certainly some activities are not being logged by the DHCP server.
 
 
BTW, when a DHCP clients wants to renew a lease, then it wouldn't send any DHCP Discover. Rather, the DHCP client would directly send the DHCP request to the DHCP server without exploring the DHCP server through DHCP discover.
 
Here is a high level flow for a DHCP renew
 
DHCP Client --------------------------------------------------------> DHCP Server
                                         DHCP Request
 
 
DHCP Client <-------------------------------------------------------- DHCP Server
                                         DHCP ACK

 

DHCP ACK will contain information on the lease extension including information on if the lease was extended or not.


  • 0





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users