DHCP server on Cisco Switch

My Cisco switch has configured with different VLANs. How can I configure the switch to provide DHCP services for two VLANs, eg. VLAN 5 & VLAN 6.

Tks
AXISHKAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Iamthecreator OMIT Admin/EE Solution GuideCommented:
You should be able to do it by creating a scope for each VLAN.
AXISHKAuthor Commented:
Any example ? Tks
Iamthecreator OMIT Admin/EE Solution GuideCommented:
conft# interface fa0/0
 
conft# ip address 200.1.1.2 255.255.255.0
conft# no shutdown
 
 
(config)# ip dhcp excluded-address 172.16.1.1 172.16.1.9
(config)# ip dhcp excluded-address 172.16.2.1 172.16.2.9
 
(config)# ip dhcp pool DATA
(dhcp-config)# network 172.16.2.0 255.255.255.0
(dhcp-config)# default-router 172.16.2.1
(dhcp-config)# dns-server 4.2.2.2
(dhcp-config)# exit
 
(config)# ip dhcp pool VOICE
(dhcp-config)# network 172.16.1.0 255.255.255.0
(dhcp-config)# default-router 172.16.1.1
(dhcp-config)# option 150 ip 172.16.1.1
(dhcp-config)# exit
 
(config)# ip route 172.16.1.0 255.255.255.0 200.1.1.1
(config)# ip route 172.16.2.0 255.255.255.0 200.1.1.1
 
here every time while creating dhcp pool we aslo configuring the pool with "default router " command so the router knows to which from which it is getting the request and it assigns ips from that particular pool


https://learningnetwork.cisco.com/thread/33375

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AXISHKAuthor Commented:
Tks
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
DHCP

From novice to tech pro — start learning today.