Exploring DHCP: Origins, Function, and Home Setup

  • Thread starter Newtons Apple
  • Start date
In summary: Provides DHCP services to your devices on the network, and many routers also provide DNS and WINS services. In summary, DHCP provides an IP address, subnet mask, DNS exchange, and translates domain names into IP addresses.
  • #1
Newtons Apple
57
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?
 
Computer science news on Phys.org
  • #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?
 
  • #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.
 
  • #4
Oh...I never thought about the home router being the DHCP provider... then what's 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?
 
  • #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.
 
  • #6
Newtons Apple said:
Oh...I never thought about the home router being the DHCP provider... then what's 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?

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:
123.123.123.123 www.verycoolsite.com
Every time you will enter www.verycoolsite.com your browser will go to that IP.
 
Last edited:
  • #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?
 
  • #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]
 
  • #9
estro said:
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]

That will give you the route that IP packets follow, but that has nothing to do with dns.
 
  • #10
willem2 said:
That will give you the route that IP packets follow, but that has nothing to do with dns.

Indeed this is what it gives, and this is illustrates traffic between DNS servers, or do you think packets wandering whiteout any aim?
 
  • #11
Try "nslookup".
It's standard available in Windows and Linux.
It gives you direct access to the DNS servers.
 
  • #12
estro said:
Indeed this is what it gives, and this is illustrates traffic between DNS servers, or do you think packets wandering whiteout any aim?

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.
 
  • #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 that's 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 74.125.226.19 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 system 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 let's 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.

Edit:
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.
http://technet.microsoft.com/en-us/library/cc771066(WS.10).aspx
To download the document so you can see what's involved:
http://go.microsoft.com/fwlink/?LinkId=105231

I doubt you will find any "home" guides because 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:
  • #14
Routaran said:
@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 that's 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 74.125.226.19 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 system 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 let's 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.

Edit:
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.
http://technet.microsoft.com/en-us/library/cc771066(WS.10).aspx
To download the document so you can see what's involved:
http://go.microsoft.com/fwlink/?LinkId=105231

I doubt you will find any "home" guides because 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.


Thanks for the explanation! You basically cleared up everything
 
Last edited by a moderator:

1. What is DHCP?

DHCP stands for Dynamic Host Configuration Protocol. It is a network management protocol used to assign IP addresses and other network configuration parameters to devices on a network.

2. How does DHCP work?

DHCP works by using a client-server model. When a device (client) connects to a network, it sends a request to a DHCP server for an IP address. The server then assigns a unique IP address to the client, along with other network configuration parameters such as subnet mask, default gateway, and DNS server.

3. Where is DHCP used?

DHCP is commonly used in local area networks (LANs) such as homes, offices, and schools. It can also be used in larger networks such as corporate networks and internet service provider (ISP) networks.

4. What are the benefits of using DHCP?

Using DHCP can greatly simplify network management by automatically assigning IP addresses and other network configuration parameters. It also allows for more efficient use of IP addresses by reusing them when devices are disconnected from the network.

5. Can DHCP be configured or customized?

Yes, DHCP can be configured and customized to fit the needs of a specific network. This includes setting a range of available IP addresses, setting lease times for IP addresses, and configuring options such as DNS servers and domain names.

Similar threads

  • Computing and Technology
Replies
10
Views
2K
Replies
13
Views
1K
  • Programming and Computer Science
Replies
1
Views
768
  • Computing and Technology
Replies
4
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
623
  • Computing and Technology
Replies
5
Views
3K
  • Computing and Technology
Replies
2
Views
4K
  • Computing and Technology
Replies
6
Views
61K
  • Computing and Technology
Replies
4
Views
3K
Replies
4
Views
2K
Back
Top