DHCP for VLAN enabled switch

Unanswered Question
Apr 25th, 2008

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

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.

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

kumar.law Sun, 04/27/2008 - 21:27

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

Thanks,

Law

Actions

This Discussion