cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
471
Views
10
Helpful
2
Replies

DHCP for VLAN enabled switch

kumar.law
Level 1
Level 1

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 2

Martin Parry
Level 3
Level 3

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

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

Thanks,

Law

Review Cisco Networking products for a $25 gift card