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. And see here for current known issues.

New Member

DHCP for VLAN enabled switch

Hi,

I am using 3560 switch on which I have created 3 VLANs. I have also enabled Inter-VLAN routing on the switch.

VLAN 1 - 192.168.1.0

VLAN 2 - 192.168.2.0

VLAN 3 - 192.168.3.0

Now I am able to browse internet on PC's in all 3 VLAN's but I have to provide IP manually in all the PC's.

I want to provide IP dynamically to all the PC's in all 3 VLANs connected to switch. Is it possible to run DHCP services on switch? If yes then what is the command line?

Thanks in advance.

Regards,

Law

2 REPLIES

Re: DHCP for VLAN enabled switch

Hi

You will need to enable the dhcp service, then configure the pools.

conf t

!

service dhcp

!

ip dhcp pool VLAN1

network 192.168.1.0 255.255.255.0

default-router

dns-server

lease

!

ip dhcp pool VLAN2

network 192.168.2.0 255.255.255.0

default-router

dns-server

lease

!

ip dhcp pool VLAN3

network 192.168.3.0 255.255.255.0

default-router

dns-server

lease

!

This is just an basic example, and you may wish to add additional options. Please see the following url for detail config guide:

http://www.cisco.com/en/US/docs/ios/12_4/ip_addr/configuration/guide/hipdhprm.html

Hope this helps

Martin

New Member

Re: DHCP for VLAN enabled switch

Thanks a lot Martin. Your suggestion really helped to solve my problem.

Thanks,

Law

126
Views
10
Helpful
2
Replies
CreatePlease login to create content