cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3016
Views
13
Helpful
8
Replies

Enabling DHCP Server on a router

haji_akhundov
Level 1
Level 1

Hi everyone!

I have 4 subinterfaces on FastEthernet 0/0, listed below.

How can I make such that each of them has a DHCP server enabled?

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

interface FastEthernet0/0.4

description VLAN20-Management

encapsulation dot1Q 20

ip address 10.0.0.1 255.255.255.0           < -- DHCP for this one

!

interface FastEthernet0/0.5

description VLAN40-VoIP

encapsulation dot1Q 40

ip address 10.0.1.1 255.255.255.0           < -- DHCP for this one

!

interface FastEthernet0/0.6

description VLAN60-VIP_Users

encapsulation dot1Q 60

ip address 10.0.2.1 255.255.255.0            < -- DHCP for this one

!

interface FastEthernet0/0.7

description VLAN80-Hosts

encapsulation dot1Q 80

ip address 10.0.3.1 255.255.255.0            < -- DHCP for this one


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


Thanks! Hope to get some good advice!

1 Accepted Solution

Accepted Solutions

AhmedSonba
Level 1
Level 1

Hello Haji,

You can do it for example like the following :

ip dhcp excluded-address 10.0.3.1

ip dhcp excluded-address 10.0.2.1

ip dhcp excluded-address 10.0.1.1

ip dhcp excluded-address 10.0.0.1

ip dhcp pool Management

network  10.0.0.1 /24

domain-name Management .com

default-router  10.0.0.1

ip dhcp pool VOIP

Network 10.0.1.1 /24         

domain-name VOIP.com

default-router  10.0.1.1

ip dhcp pool VIP

network 10.0.2.1/24

domain-name Vip.com

default-router  10.0.2.1

ip dhcp pool Hosts

network  10.0.3.1/24

domain-name hosts.com

default-router  10.0.3.1

Hope it will help

Ahmed Sonba

View solution in original post

8 Replies 8

cadet alain
VIP Alumni
VIP Alumni

Hi,

the dhcp service is listening on every interface but you need to configure a pool for each subnet you want to lease out addresses.

Regards.

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

Dear alain,

Thanks for the reply.

I tried what Ahmed suggested and what you actually suggested also. I still have a theoretical question in mind:

How does the router know which pool to use on which interface?

Regards

p.mcgowan
Level 3
Level 3

you can create a separate dhcp pool for each of the subnets you require.

the following doc shows a good example

http://www.cisco.com/en/US/docs/ios/12_0t/12_0t1/feature/guide/Easyip2.html#wp25541

please rate helpful posts

That's a nice document there. Thanks for sharing. =)

AhmedSonba
Level 1
Level 1

Hello Haji,

You can do it for example like the following :

ip dhcp excluded-address 10.0.3.1

ip dhcp excluded-address 10.0.2.1

ip dhcp excluded-address 10.0.1.1

ip dhcp excluded-address 10.0.0.1

ip dhcp pool Management

network  10.0.0.1 /24

domain-name Management .com

default-router  10.0.0.1

ip dhcp pool VOIP

Network 10.0.1.1 /24         

domain-name VOIP.com

default-router  10.0.1.1

ip dhcp pool VIP

network 10.0.2.1/24

domain-name Vip.com

default-router  10.0.2.1

ip dhcp pool Hosts

network  10.0.3.1/24

domain-name hosts.com

default-router  10.0.3.1

Hope it will help

Ahmed Sonba

Thank you Ahmed.

This did help actually. I tried it on packet tracer and it works fine. But I'm still wondering how does the router know which pool to use on which interface, have any clue?

Regards

Hi Haji,

As mentioned by Alain, the router will listening the DHCP request from each of these interface, let say if one request if heard from FastEthernet0/0.5, router will accordingly allocate ip address based the interface ip, in this case, 10.0.1.0/24.

Hope this helps.

okay. it makes sense. thanks. =)

Review Cisco Networking products for a $25 gift card