Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

router dhcp lease

I have a network with a few different vlans, and a dhcp server setup on the router. The L3 switch is the default gateway for all vlans with interface vlans. with th eip helpder address assigned to them. All host computers are assigned to their respective vlans. Computers do receive ip addresses from the router, but hewre is the problem:

On the router when I created the dhcp pool it seems I can only create one ip range for the network. When I do this only that ip range gets the ip leases. I have these networks internally:

10.1.10.0, 10.1.20.0, 10.1.30.0, 10.1.40.0 and10.1.99.0: is the vlan between the L3 switch and router.

So I though that if I assign the network to 10.1.0.0 255.255.0.0 that would cover all the networs, but then clients get a lease of 10.1.0.X.

how can I configure it to where each vlan gets its own respective ip address? Even if I have a computer in vlan 10, it gets assigned an ip address of 10.1.40.x. Thanks.

ip dhcp excluded-address 10.1.10.1 10.1.10.50

ip dhcp excluded-address 10.1.20.1 10.1.20.50

ip dhcp excluded-address 10.1.30.1 10.1.30.50

ip dhcp excluded-address 10.1.40.1 10.1.40.50

!

ip dhcp pool DHCP_POOL

network 10.1.0.0 255.255.0.0

default-router 10.1.99.2

Everyone's tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions

Re: router dhcp lease

You'll need to create a separate pool for each interface that you have.

So create your pools like the following:

ip dhcp pool VLAN10

network 10.1.10.0 255.255.255.0

etc.

ip dhcp pool VLAN20

network 10.1.20.0 255.255.255.0

etc.

etc.

etc.

The reason for this is that when you have multiple vlans and are using a single dhcp for all of those vlans, the helper address packages the broadcast up and sends it as a unicast packet directly to your configured dhcp server. The dhcp server sees the request come in sourced from the L3 svi as a relay agent, so for example if you had a dhcp server on 10.1.10.50, and you had a host that needed an address on the vlan 20 subnet, your dhcp server would see a dhcp request come from 10.1.20.1 assuming the .1 is your vlan 20 svi's address. The dhcp server looks for a pool that matches 10.1.20.0/24 and pulls the next address from that pool. The way that you've got it configured now will allow for 10.1.0.0/16 on the native vlan only - or the vlan that the dhcp server is on. I don't believe it's going to match on every subnet in that range.

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***
3 REPLIES

Re: router dhcp lease

You'll need to create a separate pool for each interface that you have.

So create your pools like the following:

ip dhcp pool VLAN10

network 10.1.10.0 255.255.255.0

etc.

ip dhcp pool VLAN20

network 10.1.20.0 255.255.255.0

etc.

etc.

etc.

The reason for this is that when you have multiple vlans and are using a single dhcp for all of those vlans, the helper address packages the broadcast up and sends it as a unicast packet directly to your configured dhcp server. The dhcp server sees the request come in sourced from the L3 svi as a relay agent, so for example if you had a dhcp server on 10.1.10.50, and you had a host that needed an address on the vlan 20 subnet, your dhcp server would see a dhcp request come from 10.1.20.1 assuming the .1 is your vlan 20 svi's address. The dhcp server looks for a pool that matches 10.1.20.0/24 and pulls the next address from that pool. The way that you've got it configured now will allow for 10.1.0.0/16 on the native vlan only - or the vlan that the dhcp server is on. I don't believe it's going to match on every subnet in that range.

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***

Re: router dhcp lease

Hi,

create a pool for every network you want to supply DHCP service:

ip dhcp pool POOL-10

network 10.1.10.0 /24

(...)

ip dhcp pool POOL-20

network 10.1.20.0 /24

(...)

The IP relay agent's (ip helper-address) address will ensure that the correct pool is used.

HTH

Rolf

[EDIT]: Sorry for the redundant posting. John and I answered virtually at the same time.

This is a very informative page about the Cisco IOS DHCP server, I hope you'll like it too:

http://mars.tekkom.dk/mediawiki/index.php/DHCP_Cisco_IOS

router dhcp lease

That did it, thanks guys.

348
Views
5
Helpful
3
Replies