dhcp ( & cisco related ) question
ken at hoverclub.net
Tue Aug 8 20:19:04 UTC 2006
On Tue, 2006-08-08 at 15:00, Petre Bandac wrote:
> On Tue, 08 Aug 2006 14:46:32 -0500 Anno Domini, the honourable Ken
> Roberts wrote using one of his keyboards:
> > On Tue, 2006-08-08 at 14:36, Petre Bandac wrote:
> > > > The pertinent configuration for the Cisco gear (assuming a 3550
> > > > layer 3 switch) is:
> > > > ip dhcp relay information option
> > > > no ip dhcp relay information check
> > > >
> > > > and then, for each VLAN:
> > > > ip helper-address 192.168.3.12
> > > > ip helper-address 192.168.3.13
> > > >
> > > > For your dhcp configuration, create your subnets the way you would
> > > > think. The router will send along enough information so that
> > > > dhcpd can figure out which subnet you're on.
> > >
> > > ok here too, with the observation that the 3560 router will act as a
> > > gateway with the ip put on the vlan; however, this observation
> > > becomes a nonsense if the interface which relays does not have to
> > > be "unnumbered"
> > I don't understand what you're saying here. I'm not an expert, but I
> > did get my Cisco gear to work with dhcpd. You're suggesting a DHCP
> > request for which there is no defined network information? Assuming
> > your router is configured, how would that even work?
> > My 3550 stack acts as the router for each VLAN. The way I understand
> > it, for each VLAN where the switch acts as a router, the router must
> > have at least one IP address on that VLAN.
> yes, that is my configuration too; and can I avoid the dhcp linux box
> behind the cisco to have one ip from all vlans it serves ?
> > Is this a correct statement? Or maybe I completely missed what you're
> > trying to say?
> sorry for my ambiguous english ;)
OK, I think I'm starting to figure it out. I thought you were telling
me something I didn't know about. Instead it was a language issue.
I'll try to be more clear.
Yes, you can have a DHCP server which has only one IP address.
Configure the Linux box normally, as though it were just a host on a
network. One address, say 192.168.3.12, 255.255.255.0. Then set up
your subnets in dhcpd.conf so that you have one subnet for each VLAN.
The router needs an IP address in each VLAN, and that VLAN needs to be
configured with the "ip helper-address ...." statement. If you have a
backup dhcp server, the helper-address can be used more than once in the
The magic happens on the router. When the router receives a DHCP
request, it looks at the ip helper-address lines for that VLAN. The
packet is forwarded to all the hosts which should handle DHCP for that
VLAN. The router sends along enough information to tell dhcpd that it
came from a VLAN whose router is 192.168.7.1 (for example) and dhcpd
knows then that it belongs to the subnet 192.168.7.0.
So what happens is that the DHCP server needs only one IP address, but
the router needs one per VLAN.
I hope this helps.
More information about the dhcp-users