DHCP
-
Thank you @tonyshowoff .
Is this works the same with LAN and WAN?
According to my researches, there is a thing called LEASE. It's like a permission or a contract to me but can you please explain more what it is?
-
Thank you @tonyshowoff .
Is this works the same with LAN and WAN?
It can and often does, but for certain types of networks like Cable or DSL, it may work differently, though we don't think of those as WANs. More often the assignment works slightly differently, but the spirit of it is basically the same. In a regular WAN, for a private network, or whatever it does often work the same.
According to my researches, there is a thing called LEASE. It's like a permission or a contract to me but can you please explain more what it is?
Lease is typically just another term for the exchange I mentioned above, but it can also refer to the amount of time the IP address is associated with that machine, which you can call a contract. This is done for two primary reasons:
- The client itself may not always be connected, but this way it can (usually, but it depends on the client) obtain the same IP when it comes back if its within the lease time
- Related to the above, if a client disappears that IP will be held until the lease is up then it will be re-assigned. This solves the issue of running out of IP addresses in case someone comes back.
So in this manner the lease time is a contract between client and server, they both know that the IP is only available to that client until the expire time.
-
@tonyshowoff -- That is the most excellent explanation of DHCP I've ever seen... It's totally not my fault if that shows up on random geeky websites across the internet!
-
Your device will attempt to renew your lease at the 50% mark of what you set your timeout to. So if it's 7 days, in 3.5 days it's going to try to renew. Then if it doesn't renew it will be 50% of that, so on and so forth until it drops the lease completely. So if you have a ton of devices going in and out of a place it makes sense to set the lease time lower so you don't run out of IP addresses.
-
DHCP is a single protocol and works the same way no matter where it is used. However you can't use DHCP "over" a WAN, it is non-routable. So at best you can get a DHCP lease from a local router that you are connected to.
-
@scottalanmiller said in DHCP:
DHCP is a single protocol and works the same way no matter where it is used. However you can't use DHCP "over" a WAN, it is non-routable. So at best you can get a DHCP lease from a local router that you are connected to.
Not straight up traditional DHCP, no, but with certain router configurations (in my experience with Cisco's broadcast forwarding, for example) you can indeed do this. Is it a smart idea? Probably not for all kinds of reasons. Additionally as I said some things like cable transceivers work in some sort of oddly similar fashion, not like hooking up to a regular switch à la Moscow city-LAN or something.
But I was trying to keep it all simple for the non-network guy
-
@tonyshowoff said in DHCP:
@scottalanmiller said in DHCP:
DHCP is a single protocol and works the same way no matter where it is used. However you can't use DHCP "over" a WAN, it is non-routable. So at best you can get a DHCP lease from a local router that you are connected to.
Not straight up traditional DHCP, no, but with certain router configurations (in my experience with Cisco's broadcast forwarding, for example) you can indeed do this. Is it a smart idea? Probably not for all kinds of reasons. Additionally as I said some things like cable transceivers work in some sort of oddly similar fashion, not like hooking up to a regular switch à la Moscow city-LAN or something.
Still non-routable, being forwarded is an agent that is retransmitting.
-
@scottalanmiller said in DHCP:
@tonyshowoff said in DHCP:
@scottalanmiller said in DHCP:
DHCP is a single protocol and works the same way no matter where it is used. However you can't use DHCP "over" a WAN, it is non-routable. So at best you can get a DHCP lease from a local router that you are connected to.
Not straight up traditional DHCP, no, but with certain router configurations (in my experience with Cisco's broadcast forwarding, for example) you can indeed do this. Is it a smart idea? Probably not for all kinds of reasons. Additionally as I said some things like cable transceivers work in some sort of oddly similar fashion, not like hooking up to a regular switch à la Moscow city-LAN or something.
Still non-routable, being forwarded is an agent that is retransmitting.
Yes, that's true, but from the perspective of a non-networking guy with just wanting a basic understanding of what works then I can't imagine there'd be much of a difference. I imagine any situation where one tried to do it without the specialty knowledge, they'd give up and just setup another DHCP server locally.
-
Thanks all of you.. This discussion really is a big help.
-
Glad that it helped