DHCP

J

Jeigh

I'm confused.


Heres my situation...

I have 1 DHCP Server with two scopes.
The dhcp server is 192.168.1.2.

The first scope handles 192.168.1.x
The second scope handles 192.168.2.x

The subnets are connected through a router that passes bootp through it....
In a seperate implementation, there may be a dhcp relay agent, but since
there are no significant configuration options set when installing a dhcp
relay agent, I don't think that changes the answer to this quesiton so lets
pretend that the router passes bootp traffic to the subnet with the DHCP
server.

How does the DHCP server determine which subnet a dhcp client is on, prior
to the server giving the client its new IP. In a routed network, where
there are multiple scopes, different dhcp options must be set up for each
individual scope, and each scope is used to set options for all dhcp clients
on a given subnet... but how does DHCP know which subnet a specific client
is coming from unless it already has an IP address?

I've read documentation stating that in a multihomed DHCP server setup, the
DHCP server actually needs to have a seperate nic to be associated with each
individual scope... but I cant believe that that is the case in this
situation because if that were true, then DHCP Relay agent would have a very
limited purpose, and bootp would never be routed.

any ideas?

-- Jason
 
I

Irwin Utama

Hi Jeigh,

DHCP uses broadcast to send its packet. So it is only limited to its own
subnet, that's why we need to set up dhcp relay agent on other subnet to
pass the packet to the DHCP server. DHCP relay agent will forward packet
from client to the DHCP server that listed on it. DHCP will assign IP
address to the client based on subnet of its dhcp relay agent.
If you use dhcp relay agent, you donot need to pass bootp packets on your
router.

regards,
irwin
 
J

Jeigh

Thanks for the response, irwiin...

I understand what you mean, but go one step further.

Does the router change the contents of the DHCPDiscover packet, inserting
the subnet information into the bootp packet, when it passes it through the
router (when bootp is routed)?

dhcpdiscover packets don't know what subnet they are on.... so how does
the dhcp server know with which scope the server should lease the new IP
from?
 
J

Jeigh

I'm using the courier new font in this diagram, so the ascii art might not
look right unless you switch your font to a fixed width font.

heres a diagram of what I am trying to illustrate:



|--------------------------------
| subnet b (192.168.2.x)
|---------|
| bootp |
-------------------------| enabled |
subnet a (192.168.1.x) | router |
|---------|
|
|---------------------------------
subnet c (192.168.3.x



if a box on [subnet a] has dhcp server installed on it, how does it know not
to assign 192.168.2.x IPs to the computers on [subnet c]?
 
G

Guest

The DHCP Relay agent / bootp relay will insert something like:

Relay agent IP address: 192.168.x.x

into the DHCP frame.

Jeigh said:
I'm using the courier new font in this diagram, so the ascii art might not
look right unless you switch your font to a fixed width font.

heres a diagram of what I am trying to illustrate:



|--------------------------------
| subnet b (192.168.2.x)
|---------|
| bootp |
-------------------------| enabled |
subnet a (192.168.1.x) | router |
|---------|
|
|---------------------------------
subnet c (192.168.3.x



if a box on [subnet a] has dhcp server installed on it, how does it know not
to assign 192.168.2.x IPs to the computers on [subnet c]?





Irwin Utama said:
Hi Jeigh,

DHCP uses broadcast to send its packet. So it is only limited to its own
subnet, that's why we need to set up dhcp relay agent on other subnet to
pass the packet to the DHCP server. DHCP relay agent will forward packet
from client to the DHCP server that listed on it. DHCP will assign IP
address to the client based on subnet of its dhcp relay agent.
If you use dhcp relay agent, you donot need to pass bootp packets on your
router.

regards,
irwin
 
P

Phillip Windell

Jeigh said:
How does the DHCP server determine which subnet a dhcp client is on, prior
to the server giving the client its new IP.

The router includes information in the relayed packet to determine that. It
is automatic, you don't have to do anything to make sure that part happens.
 
P

Phillip Windell

Jeigh said:
Does the router change the contents of the DHCPDiscover packet, inserting
the subnet information into the bootp packet, when it passes it through the
router (when bootp is routed)?

Yes. That is how the DHCP knows what segment the request originated from.
 
I

Irwin, MCSE,MCDBA,MCT

Hi Jeigh,




Jeigh said:
Thanks for the response, irwiin...

I understand what you mean, but go one step further.

Does the router change the contents of the DHCPDiscover packet, inserting
the subnet information into the bootp packet, when it passes it through the
router (when bootp is routed)?

That's right. Router will add its IP address to that packet. For more detail
you can read this article:
http://www.microsoft.com/windows200.../techinfo/reskit/en-us/cnet/cncb_dhc_qvjs.asp
dhcpdiscover packets don't know what subnet they are on.... so how does
the dhcp server know with which scope the server should lease the new IP
from?

based on the subnet's router that forward the packet.


regards,
Irwin
 
I

Irwin, MCSE,MCDBA,MCT

Hi Jeigh,

router will add its IP address to that packet. We already implement the
scenario that you described for more than 100 subnets and there is no
problem, every computer receives IP address according to its subnet. You can
read the documentation that posted before.

regards,
irwin


Jeigh said:
I'm using the courier new font in this diagram, so the ascii art might not
look right unless you switch your font to a fixed width font.

heres a diagram of what I am trying to illustrate:



|--------------------------------
| subnet b (192.168.2.x)
|---------|
| bootp |
-------------------------| enabled |
subnet a (192.168.1.x) | router |
|---------|
|
|---------------------------------
subnet c (192.168.3.x



if a box on [subnet a] has dhcp server installed on it, how does it know not
to assign 192.168.2.x IPs to the computers on [subnet c]?





Irwin Utama said:
Hi Jeigh,

DHCP uses broadcast to send its packet. So it is only limited to its own
subnet, that's why we need to set up dhcp relay agent on other subnet to
pass the packet to the DHCP server. DHCP relay agent will forward packet
from client to the DHCP server that listed on it. DHCP will assign IP
address to the client based on subnet of its dhcp relay agent.
If you use dhcp relay agent, you donot need to pass bootp packets on your
router.

regards,
irwin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top