DHCP question
dagr8tim
Member Posts: 36 ■■□□□□□□□□
in CCNA & CCENT
Ok, I know you can set a cisco router to emulate DHCP servers. I know you can exclude ranges of IP's that you do not want served. But I just read that you can map IP's to mac addresses. I understand that.
My question is this. Let's say your a network geek an Acme wigit company. You assign the machine in your office/cubical to the ip address of 192.168.1.150 by mapping the mac in the machine to that IP in the router. Now you use the fact that you basically have a static IP inside the company to say host lan games. If your DHCP lease expires and there is a request for information to 192.168.1.150, will that packet reach your machine or will it die at the router because you do not have a DHCP lease?
My question is this. Let's say your a network geek an Acme wigit company. You assign the machine in your office/cubical to the ip address of 192.168.1.150 by mapping the mac in the machine to that IP in the router. Now you use the fact that you basically have a static IP inside the company to say host lan games. If your DHCP lease expires and there is a request for information to 192.168.1.150, will that packet reach your machine or will it die at the router because you do not have a DHCP lease?
There are two major products that came out of Berkeley: LSD and Unix. We don't believe this to be a coincidence.
Comments
-
pandimus Member Posts: 651I am not an expert, but wanna stab at this..
If your router is your dhcp server, the only way your reserved lease should expire is if your router goes down? So could the traffic flow regardless? Unless it is in the same subnet..
Just throwing that out there.Xinxing is the hairy one. -
dagr8tim Member Posts: 36 ■■□□□□□□□□Yeah, I understand that. My thing was this. Say we have the example above and I go on vacation for a week and leave my computer on. The lease is set to expire after 24 hours. What happens after that.
Or is it a case that the lease keeps renewing because people are contacting it and it is replying with information?There are two major products that came out of Berkeley: LSD and Unix. We don't believe this to be a coincidence. -
pandimus Member Posts: 651No after 50% of lease time, the computer automatically requests a refresh of that lease. A lease time does not end after said time, unless the server is down or the lease reservation is moved elsewere..
Just going off of memory, so if i am shooting incorrect info please correct me.Xinxing is the hairy one. -
dagr8tim Member Posts: 36 ■■□□□□□□□□That's the way I understand DHCP. But I was just curious about the mapping issue.
I kinda figured that either the router would have to go down or the PC would have to be turned off. Either way getting the data from the PC would be impossible.
Thanx.There are two major products that came out of Berkeley: LSD and Unix. We don't believe this to be a coincidence. -
pandimus Member Posts: 651I concur on the Berkley thing. My wife wants to go there really bad, but refuses to believe me when i tell her everyone there runs around naked , chewing on acid tabs.Xinxing is the hairy one.
-
Sartan Inactive Imported Users Posts: 152DHCP packets are broadcast packets, with 255.255.255.255 with the address. All of the DHCP-specific information is included in the actual UDP packet. Your computer does not have an IP address when you turn it on, yet it still gets one
Let me go in a little more detail, it's kind of handy knowledge to know (This is not beyond the scope of the 3.0.0 ccna)
When your computer boots up, it does not have an IP address. It must find one, so it sends a DHCP Request packet out on the broadcast IP 255.255.255.255, that also contains it's own MAC address. This is the DHCP Discover packet. If a DHCP server finds the packet, it checks it's database and performs operations such as subnet, supernet, multiscope, and static DHCP mappings. Then it sends a packet out with the destinatino 0.0.0.0 (meaning all IPs) and destination MAC address of the PC that requested it. This is the DHCP Offer packet, "Hey, I'm a DHCP server, you can have this IP!"
The client then re-sends a packet out saying "Yea, I hear you.." and sends an acknowledgement packet to the server if it wants the IP.
DHCP is a four step process:
1 - DHCP Discover. -- Client sends broadcast request for an IP address. (Remember, switches forward broadcasts, routers do not [unless configured])
2- DHCP Offer -- Server offers IP to client
3- DHCP Request -- Client selects one of the offers and notifies that server with the servers destination IP
4- DHCP Acknowledge -- Server OK's the lease.
(5-) DHCP Nack -- Server says no ~ wrong subnet? denied mac? renew denied?
A DHCP Lease is not an exact number, though.
The client will wait exactly 50% of it's lease time, then send a DHCP Renew packet out to the DHCP Server IP Address. If no server replies, it just sits happily by itself until 87.5% of the time, then sends out a broadcast DHCP request to all available servers asking for an IP address, sort of a panic. After this request there will be no more automatic renewals.
I should write a technote!Network Tech student, actively learning Windows 2000, Linux, Cisco, Cabling & Internet Security. -
Webmaster Admin Posts: 10,292 Admin
-
Sartan Inactive Imported Users Posts: 152doh..
okay a cisco configuration technote when i get home :PNetwork Tech student, actively learning Windows 2000, Linux, Cisco, Cabling & Internet Security. -
dagr8tim Member Posts: 36 ■■□□□□□□□□Thanx guys. I understand the basics of DHCP. Can any one go into alittle farther detail about mapping a specific private IP to a mac address.There are two major products that came out of Berkeley: LSD and Unix. We don't believe this to be a coincidence.
-
dagr8tim Member Posts: 36 ■■□□□□□□□□Thanx, that describes it more than I could have wanted.There are two major products that came out of Berkeley: LSD and Unix. We don't believe this to be a coincidence.