10-24-2012 02:00 AM - edited 03-04-2019 05:56 PM
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!
Solved! Go to Solution.
10-24-2012 05:45 AM
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
10-24-2012 02:05 AM
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.
11-11-2012 11:52 PM
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
10-24-2012 02:08 AM
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
11-11-2012 11:49 PM
That's a nice document there. Thanks for sharing. =)
10-24-2012 05:45 AM
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
11-11-2012 11:48 PM
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
11-12-2012 12:10 AM
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.
11-12-2012 01:13 AM
okay. it makes sense. thanks. =)
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide