04-25-2008 04:13 AM - edited 03-05-2019 10:36 PM
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
04-25-2008 04:39 AM
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
04-27-2008 09:27 PM
Thanks a lot Martin. Your suggestion really helped to solve my problem.
Thanks,
Law
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