Hi Mike,

Responses inline:

> I understand the logic of tying the secondary scopes to the primary at ehe
> DHCP side, however if the giaddr always reflects the primary subnet, how
the
> the DHCP server ever know to hand out addrs from the other secondary
scopes?

On the DHCP server, one configures the S1, S2, and S3 scopes to be
"related"
to the P scope.  The DHCP server then knows there are four different
subnets
on this interface are related through P.  When the DHCP server receives
a DHCP
DISCOVER with P as the giaddr, the above linkage indicates to the DHCP
server that
four subnets are on the same router interface.

Without any additional logic, the DHCP server could randonly pick a free
IP address
from any of these four scopes, and send the selected IP in the DHCP
OFFER.  Note,
that the DHCP server will send the DHCP OFFER (and ACK) to the giaddr IP
(P).  The
router receives the DHCP packet, knows what interface it's asociated
with (P),
and forwards out the inteface accordingly.  

Also note that the DHCP server will likely also return other DHCP
information in the OFFER
including default gateway, subnet mask, DNS server IPs and domain
information.  
The default gateway and subnet mask will be specific to the scope from
which the
IP was selected.  

Now, one could configure extra smarts into the DHCP server so that based
on the device making the DHCP request, the DHCP server could assign the
device an address out of one specific scope.   Some devices will use
DHCP
Option 60 to inform the DHCP server of its device type.   The DHCP
server can be configured to use this information to help it select which
of the scopes on the interface are applicable for this device.  There
are other
mechanisms that can also be used by the DHCP server to help determine
how to select
which scope the DHCP request should be mapped to (device MAC address or
OUI,
DHCP Option 82, etc.)


> This "feature" you describe sounds pretty worthless.  If the giaddr is
> always from P, and rotates through S1, S2, S3, etc when the DHCP server
> doesn't respond, then unless your DHCP server is down or all IPs have been
> allotted for subnet P, then the DHCP request will always result in an IP
> from the scope for P.

I think the idea for this cycling feature is as follows:  If one wanted
to
assign multiple subnets onto an interface and these subnets are
configured
to have their IPs assigned via DHCP, then you have the problem discussed
in
this thread.  I expect that there are some off-the-shelf DHCP servers
which
didn't have the ability to logically associate multiple subnets
together.
That is, the DHCP server had the limitation that each scope had to
appear
as if it was on its own interface.  In this sort of environment, the
only
way for the DHCP server to match any of the secondary subnets was if it
saw
a giaddr from one of these secondary subnets.   If the router only ever 
inserted the P address in the giaddr, none of the other scopes would
ever
be matched.  This cycling approach causes the giaddr to change and
rotate through
all the subnets on the interface.

As mentioned before, cisco now has a command which allows one to specify
the
DHCP relay behavior (ie always use the primary address or cycle through
all
subnets on the interface).  This command is called "ip dhcp
smart-relay".

http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122sup/122csum/csum1/122csip1/1sfdhcp.htm#xtocid1563023

So in answer to the original poster's question, this command could be
used
to solve his/her problem.  Of course, one needs to be running the right
IOS
rev and this approach will take 10s of seconds or minutes for the device
to come online (as the DHCP cycling happens).   Configuring the
interaces
to be related on the DHCP server is really that way to go (IMO).




Message Posted at:
http://www.groupstudy.com/form/read.php?f=7&i=35626&t=35539
--------------------------------------------------
FAQ, list archives, and subscription info: http://www.groupstudy.com/list/cisco.html
Report misconduct and Nondisclosure violations to [EMAIL PROTECTED]

Reply via email to