Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

DHCP: How and Where?

  1. Sep 14, 2011 #1
    Hey everyone, I turn to you guys for this one. The DHCP protocol... where does this protocol come from? It provides you and the computers on your network an IP address, subnet mask, DNS exchange, but where is this help coming from? Is it a server that you connect to from your ISP, like Verizon, or Comcast?

    Can you possibily run a DHCP server from your house?
  2. jcsd
  3. Sep 14, 2011 #2
    Most likely the router you have in your home is an DHCP server.
    Think about it, every time you add a computer to your home network do you really need to manually assign an IP to it?
  4. Sep 14, 2011 #3
    Where it comes from depends on the network.

    Like, if you plug into a cable modem, the DHCP server is either in the Modem or on your ISP's network.

    If you plug into a home router, the DHCP server is built into the router.

    If you plug into a corporate network, the setup may be much more complicated.
  5. Sep 14, 2011 #4
    Oh....I never thought about the home router being the DHCP provider... then whats this business with the DNS? Where do names of web sites get translated into IP? Surely your humble router can't know every IP address of web sites?
  6. Sep 14, 2011 #5
    The home router may assign itself as the DNS server or it may simply pass along the DNS configuration it uses. If it assigns its own IP as the DNS server, then it will pass along DNS information to the computers on the network. It is usually recommended that you do not use a home router as a DNS sever, as it adds unnecessary overhead.
  7. Sep 14, 2011 #6
    No he doesn't know, this why DNS servers are "spread out all over the internet"...
    When you type www.somesite.com what happens is that you are looking for a DNS server who know to translate it to the necessary IP address.

    Actually most of the web sites you know have several IP addresses because they are behind load balancer you can confim this by running command prompt and type "ping www.google.com" each time you will get different ip.

    Also, you can "teach" your computer to recognize some IP addresses:
    Search for file named "hosts" and type into it something like this: www.verycoolsite.com
    Every time you will enter www.verycoolsite.com your browser will go to that IP.
    Last edited: Sep 14, 2011
  8. Sep 14, 2011 #7
    So there's literally DNS servers setup around the world? I'm assuming your ISP controls them? Anyway you can find out where a DNS server your contacting is located?
  9. Sep 14, 2011 #8
    When you go to "www.google.com" behind the scenes you use "a lot of" DNS servers, only the first couple are controlled by your ISP.

    You can see it by running command prompt and typing "tracert www.google.com" [if you use microsoft windows]
  10. Sep 15, 2011 #9
    That will give you the route that IP packets follow, but that has nothing to do with dns.
  11. Sep 15, 2011 #10
    Indeed this is what it gives, and this is illustrates traffic between DNS servers, or do you think packets wandering whiteout any aim?
  12. Sep 15, 2011 #11

    I like Serena

    User Avatar
    Homework Helper

    Try "nslookup".
    It's standard available in Windows and Linux.
    It gives you direct access to the DNS servers.
  13. Sep 16, 2011 #12
    Of course If you give traceroute a domain name it will start with looking up the IP adres in DNS. The purpose of traceroute however, is to find out how IP packets get to their destination, and all the intermediate servers that you see are not DNS servers, but servers that route ip packets.
    Once you've got an IP address, you can make a tcp connection and send and receive packets without dns beinig used on the source, destination or any intermediate router or server.
  14. Sep 16, 2011 #13
    @Newtons Apple: i'll try to give you a basic explanation of the process and layout of the key resources that make the internet what it is. The systems all deal with each other with IP addresses, you can think of this as analogous to your physical address. Each computer that connects must be individually identifiable by the device communicating with it.

    A DHCP (Dynamic Host Configuration Protocol) server is what decides what your system's IP address will be. This is usually controlled by your service provider. They will have a DHCP server on their end. For security and wireless internet access, many users use a wireless router. This device also as an integrated DHCP server, but it is very simplistic compared to an actual DHCP server. It acts as the first point contact with the internet and gives all your computers an internal IP address which the internet cannot see. As far as the internet is concerned, there is only 1 device at your home and its your router and its the thing thats asking the internet for stuff. The router then handles all the information that goes in and out of your home network.

    There are routers on the internet as well but they are very different from the ones you use at home. These devices actually decide where stuff goes, as one of the pervious examples, when you type in www.google.com, your computer gets the IP address for the website from a DNS server (will get to that in a sec) and then a series of routers on the internet send information to and fro from your system to target system(s). Without routers, there'd be no way for your computer to know to which of the millions of comptuers on the internet to go to for the information you want.

    The idea of the DNS (Domain Name System) is to make stuff easy for us. google.com is a LOT easier to remember than Thats the IP address of the google website. You can think of it like a phone book, know the person's fullname and you can find out the information you need to call them and talk. DNS servers take the host/domain names that we use to identify systems and convert them to IP addresses which the computer and routers can use to actually find the target sytem we want to communicate with.

    No single DNS has ALL the data for everything connected to the internet. There are a whole bunch of them all over the internet. When you type in a website address and if the first DNS you are connected to does not know the IP address of the website in question, it will then forward the request to other DNS servers it knows about. Eventually, the request will reach a DNS that does have the IP and this will get sent back along the chain to your system. From that point your system uses the IP address it has now got to find the actual target system.

    I forgot to mention this earlier but as soon as you connect to the network and the DHCP assigns you an IP, it lets its DNS know about you. Your computer has a hostname as well and this information does get exchanged with the DHCP during the assignment of an IP. Thats why there is always going to be some DNS server somehwere in the world that will know about the system you are looking for. If its connected to the internet, it has its own 1st DNS server.

    With regards to your question, some of the other users already have given you the correct answer. If you have a wireless router at home, then you do infact have your own DNS/DHCP server. They are extremely simplistic and you cannot really do much with them but you do infact have your own at home. If you are wondering about the possibility to have a full blown DHCP server at home, you absolutely can! This will involve having to buy a new computer system with atleast two network ports(1 to connect to the internet and 1 to connect to your home network), it must be running a server operating system like windows server 2003/2008 so you have the ability to host a DHCP service and then the appropriate number of switches. Your DHCP server connects to the switch and you will need to have enough switches to provide sufficient connections for all the computers at home to connect to. For example: if you have 10 comptuers on your network + 1 DHCP server, you will need a 12 port switch. If you have a 40 computers, you may need several.

    There is a LOT more that goes into actually setting one up but in principle you can do this if you want.

    Here's a link to a microsoft technet article that deals with setting up an enterprise level network with your own DHCP & DNS servers among other things.
    To download the document so you can see whats involved:
    http://go.microsoft.com/fwlink/?LinkId=105231 [Broken]

    I doubt you will find any "home" guides cuz there is really no good reason to ever want to have a home DNS/DHCP other than as an exercise to learn about it and even then you will need to spend money as it will involve buying atleast some new hardware or software.
    Last edited by a moderator: May 5, 2017
  15. Sep 17, 2011 #14

    Thanks for the explanation!! You basically cleared up everything
    Last edited by a moderator: May 5, 2017
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Similar Threads for DHCP Where
Where to find app data on sd card (Android)?