Configure 3560 switch as DHCP Server

Unanswered Question
Apr 14th, 2009

Dear All,

I want to configure my Cisco Switch 3560 as DHCP server so that my users in different vlans (configured) can assign IPs automatically,

I am using this configuration,

ip dhcp pool Marketing

network 192.168.2.0 255.255.255.0

default-router 192.168.2.1

dns-server 192.168.1.17

what else i need to configure on my layer 3 switch to work properly..

In this case, when i connect a PC to a port assigned in Vlan 2, its not getting Ip address automatically,,

Please write Sample configuration...

Regards,

Junaid

I have this problem too.
1 vote
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
thotsaphon Tue, 04/14/2009 - 03:13

Junaid,

That should work.

!

ip dhcp excluded-address 192.168.2.1

!

ip dhcp pool Marketing

network 192.168.2.0 255.255.255.0

default-router 192.168.2.1

dns-server 192.168.1.1

!

service dhcp

!

ip routing

!

int vla 2

ip address 192.168.2.1 255.255.255.0

!

Please let me know how things work out

Toshi

junshah22 Tue, 04/14/2009 - 19:27

Dear Toshi,

I applied your configuration but it is not working,

Please check my configuration,

ip subnet-zero

ip routing

ip dhcp excluded-address 192.168.2.1

ip dhcp excluded-address 192.168.2.1 192.168.2.20

ip dhcp pool D_MKT

network 192.168.2.0 255.255.255.0

default-router 192.168.2.1

dns-server 192.168.1.17

domain-name 192.168.1.17

lease 8

ip dhcp-server 192.168.2.1

vlan 2

name MKT

interface FastEthernet0/8

switchport access vlan 2

switchport mode access

interface Vlan2

ip address 192.168.2.1 255.255.255.0

ip access-group 110 out

ip classless

access-list 110 permit ip 192.168.1.0 0.0.0.255 any

I applied ACL to permit different vlan users to get access on servers vlans...

Please HELP!

Regards,

Junaid

Leo Laohoo Tue, 04/14/2009 - 19:34

I applied ACL to permit different vlan users to get access on servers vlans... < --- And there's an explicit DENY ANY ANY at the end of the line.

thotsaphon Tue, 04/14/2009 - 20:45

Junaid ,

Let's modify things.

access-list 110 permit ip 192.168.1.0 0.0.0.255 any

access-list 110 permit udp any eq bootpc any

access-list 110 permit udp any eq bootps any

HTH,

Toshi

junshah22 Tue, 04/14/2009 - 21:14

Dear Toshi,

Congratss!!

previous configuration started working,

Actually, the machine which i was using for testing, (its DHCP service was blocked),,

When i tried it with another Computer, it is getting Ip address and other information,

THANKS AGAIN..

Junaid

thotsaphon Tue, 04/14/2009 - 21:26

Junaid,

You're right. I got confused because the router generating traffic would not be blocked by outbound ACL.

Good job,

Toshi

Actions

This Discussion