Technology in terms you understand. Sign up for the Confident Computing newsletter for weekly solutions to make your life easier. Click here and get The Ask Leo! Guide to Staying Safe on the Internet — FREE Edition as my thank you for subscribing!

What is DHCP?

Question: What is DHCP?

DHCP stands for Dynamic Host Configuration Protocol.

I can hear you thinking, “Thanks a bunch, but … what’s that?”

In a nutshell, DHCP is all about the request that your computer makes and the response that it receives when assigning a “dynamic” IP address.

Let’s look at that a little more closely.

Become a Patron of Ask Leo! and go ad-free!

Internet IP addressing

First, a refresher. Every computer on the internet has an address. That address is just a number, but that number uniquely identifies that computer; no other computer on the internet can have the same address. If your computer is behind a router, then it’s not attached directly to the internet, but the router is, so the IP address of the router on the internet is unique.

There are two types of IP addresses: static and dynamic.

Static IP addresses are just that – unchanging. They refer to a particular computer, whether that computer is turned on or not, connected or not. Typically, domain names like “askleo.com” map to a single static IP address which is assigned to a specific server on the internet. ISPs and other service providers on the internet manage and assign static IP addresses manually.

Dynamic IP addresses are assigned on-the-fly. Originally, the most common scenario was a dial-up connection. When you dialed your ISP to connect to the internet, part of the initial conversation between your computer and the ISP was your computer asking for an IP address. The ISP would then assign it one of the addresses that it had that wasn’t currently in use. On disconnect, that IP address was returned to the list of available addresses and could be reused by someone else.

Because most home users tend to turn their computers off, even broadband connections, such as DSL and cable, continue to use dynamic addresses. If your computer is off, you don’t need an IP address so someone else might get to use it.

Local IP addressing

As I said, when your computer is connected to the internet via a router, it isn’t directly connected to the internet. In fact, it’s connected to a local network or LAN that’s set up and managed by your router. Your router then also handles all of the data that’s going between the computers on your LAN (even if there’s only one computer) and the servers that you access out on the internet.

Routers also use dynamic addresses when setting up that local network. Each computer that you connect to your router will also ask for an IP address and that router will respond with an IP address that’s available within your LAN. (Routers can also be configured to ask for an IP address when they connect to the internet, but that’s unrelated to how it manages the local network.)

The DHCP protocol

The actual DHCP protocol is fairly simple.

Hello?The computer in need of an IP address broadcasts a request. In other words, it sends a message out on the network to anyone that says, “Hello? Anyone? I need an IP address!” On any network, there’s one (and only one) device whose job it is to listen for those requests and answer back, “Sure, here ya go. Have this one.” That’s the DHCP server.

With that answer, the DHCP server usually includes additional information, such as the machines to ask for domain name look-ups (the DNS server) and the address of the device that’s handling all outgoing (internet) network traffic (the gateway address).

In Windows, if your computer asks for an IP address, but doesn’t get a response from a DHCP server within a certain amount of time, it kind of ‘gives up.’ What that really means is that it typically reverts to trying again every so often. In the meantime, it may “make up” an answer of its own as well. For example, if the IP address of a computer begins with “169.”, the DHCP server didn’t assign an IP address so Windows temporarily made one up. When that happens, it doesn’t really help much because it’s a usually a symptom of a larger problem – your networking and internet probably won’t work.

Do this

Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.

I'll see you there!

18 comments on “What is DHCP?”

  1. I have two computers networked with a hub. For some reason, I can only have the internet on one computer or the other. I had them both working at the same time, but now for some reason it doesnt. I have checked connections and they are fine. To get the internet of whichever computer I am using, I click repair in the network connections. When trying to connected without doing that, it says something about TCP or whatever. any suggestions?

    Reply
  2. I’ve read some of your Network solution to some of the difficulty problems that everyone posted. And I think it’s very very helpful and visually details.

    Thank you for your information. Myself encountered problem with my network.

    I’m using a Linksys switch with 4 ports. port#1 to my primary computer to access internet, port#2 go to my kids computer which occassionally permission to get on the internet, and the third connect to my X-box (game console). Recently I bought another Xbox which will provide connect to share the gaming experience by challenging each other on difference screen and differences xbox.

    But the problem is only one Xbox can get on xbox-live at a time. Then I saw your article and thought of the similar problem that I encountered, your solution may aslo solve my Gaming connection problem.

    Thank you in advance. (I will try to buy a router and install it to see if provide two IPs address for both Xbox to access on the net)

    Reply
  3. Leo,

    I’m at wits end.

    When my wife plays Everquest, the computer freezes almost randomly. In the event viewer-system, various errors occur: DHCP IP address lease has been denied or cannot be renewed (or something similiar) event 1000,1001,1002, or 1003, cannot obtain DHCP address.

    I’ve spent hours talking to the ISP only to have them say its the PC (the connection from the ISP to the cable modem). The LAN card shows as being connected and sending infromation to out, but not receiving any informaton. The computer only faulters running on-line video games.

    I’ve also updated the drivers, reinstalled XP, replaced the video card, replaced the LAN and replaced the memory. I’ve even connected the computer directly to the cable modem without any network.

    I’ve also ran spyware, and antivirus programs.

    Can you point me in the right direction?

    Here are the PC particulars:
    P4 1.8A
    MS9118E Motherboard
    2GB PC3200/replacing 1GB PC2100
    ATI 9550 replacing ATI7500
    Linksys 10/100 LAN card replacing on-board
    XP Prof SP2
    Linksys B/G wireless router/switch
    ISP Timewarner/RoadRunner

    BTW: Matsonic responded saying its the OS
    Linksys responded saying its the ISP
    ISP says take PC to the repair shop
    ATI says its not their problem

    Thanks for having a great site!
    Tom

    Reply
    • The first issue I see is that you are running XP SP2, which is an unsupported operating system. It gets no updates anymore. Is there any good reason why you have not gotten SP3 and allow your operating system to get regular updates? My first fix would be to allow your operating system to update, get sp3, which you might have to get as a separate download from microsoft and then get the rest of the updates you have missed.

      Steve

      Reply
      • Tom’s reason for not running SP3

        um because Leo is recycling old articles

        check the date of Tom’s post:

        Tom says:
        March 14, 2006 at 8:23 pm

        SP 3 wasn’t released until 2008

        Reply
        • “Recycling”? I am most definitely updating, expanding and improving on some of my older articles whose topics are still relevant and that are still the subject of ongoing questions and the like. (You’ll also see an update notice at the bottom of the articles for which this is happening.) I’ve not taken the time to weed through the comments for each – perhaps I should? Yanking comments just because they’re old seems a little … unfriendly? … but it could reduce the confusion, I suppose.

          Reply
          • re: “Recycling”
            not meant as offensive, just a term used for revisiting, updating (or not) & bringing attention to previously published items that might be worth looking at again in light of current changes etc in tech. or any other part of everyday life

            I don’t think I’d recommend deletion of older comments either,
            it’s the responsibility of anyone who might think they should comment on someones problem to read the entirety of the comment including the date it was published which is why I mentioned the post date

            I’m sure if there were any questions / comments here about issues with DHCP in win NT 4 or win98
            someone would be along to point out that they shouldn’t be using NT4 or 98 in 2013

            Cheers

  4. Based on what I’ve just read about this DHCP thing….and, even this 75 yr old unreconstructed “bookie” i.e. non- techie could understand it, I believe now that dial-up access may have its advantages in anonymity..am I correct? Could you perhaps make it the subject of another column?
    Best,
    Charlie G.

    Reply
    • Charlie, dial-up does not offer any advantages in anonymity. Dial-up is simply the *means* of connecting to your ISP. Broadband connections are always-on, and dial-up connections are established as needed. Either way, once connected and authenticated, the only difference is speed.

      Reply
      • I think dial-up does provide some anonymity. Most dial-up ISPs don’t let you leave your computer connected to the internet forever and even if they do, most people don’t do it because most people don’t pay for two phone lines. That means that every time you connect to the internet, you are getting a different IP address.

        Contrast that to someone with high speed who leaves their computer on all the time and keeps the same IP address.

        Reply
  5. I have a 2 MBps broadband connection which uses a dialer to connect to the internet. Now, when I check whether or not DHCP is enabled through ipconfig, it shows “no” sometimes and “yes” sometimes. What could be a possible reason?

    Reply
      • Thanks for the question. I’m already handicapped with a static ipv4 address from a different State. Ergo Geo-location. (Confusing the compilers of data for ad companies. Also creating problems for social networking sites suggesting to members those with that configuration are would be scammers.)

        As such, scanning the Internet for clues and quoting from here:
        http://www.circleid.com/posts/dhcp_for_ipv4_vs_ipv6_what_you_need_to_know/

        “In a v6 world, while there is DHCPv6, there are a number of very systemic changes that will need to be understood by admins (and aspiring geeks) that will alter how you use networking protocols such as DHCP”

        I’m looking to manage my local network in an IPV6 environment. It is coming. Faster for some. If I move to an ISP that is IPV6 enabled (Or my ISP converts) I see a change in all my local configurations. With no more use of non WAN Ipv4 addresses in an ipv6 world. Thinking it be best to have a handle on it ahead of time.

        That may be challenge for some. Might this be a subject for a future AsKkLeo column?

        Reply
  6. Windows 8 OS;
    There are a number of people who are dissatisfied with this new OS as you are probably aware of.
    One complaint from a friend is that when they send out an ‘update’ they change the methods of performing certain tasks. Have you had any individuals complaining about the same problems? Secondly, it appears that certain functions that have been the same for many years Microsoft have omitted from the Windows 8 OS. Would like to hear your comments in one of your future Newsletter; thank you.
    Earl…

    Reply
    • Earl, asking a question here is not the best way to get Leo to answer, especially if the question is off-topic. Go to the home page and look in the section that says “Have a question?” Use that search box. Leo has had several articles about Windows 8 and there has been many discussions about its pros and cons.

      Reply
  7. Cascading is not simple. If you make a maitske with LAN to WAN or LAN-LAn settings, you will not be able to access Internet from the second router. The video is really good.

    Reply

Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.