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. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

Turning on DHCP on a Catalyst 3560 PoE-8

I have a Catalyst 3560 PoE-8. I need to turn on DHCP so that when I plug in a computer the switch will give it an IP address.

How do I turn this on?

I don't need to have any VLANs or anything, I just have a few computers that need to talk to each other. None of them are connected to the internet either. There is no other device on the network, such as a router, only simple PCs that are wanting IP addresses.

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: Turning on DHCP on a Catalyst 3560 PoE-8

Hello,

If the switch is not connected to internet, then you do not need to worry

about default gateway for the switch.

Regards,

NT

9 REPLIES
Cisco Employee

Re: Turning on DHCP on a Catalyst 3560 PoE-8

Hello,

Here is a sample configuration:

ip dhcp pool test

Network 192.68.1.0 255.255.255.0

Default-router 192.168.1.1

Exit

interface vlan 1

ip address 192.168.1.1 255.255.255.0

No shut

exit

service dhcp

http://www.cisco.com/en/US/docs/ios/12_2/ip/configuration/guide/1cfdhcp.html#wp1010670

Hope this helps.

Regards,

NT

Re: Turning on DHCP on a Catalyst 3560 PoE-8

Thank you for your reply. I have read the document you linked to. I have consoled in to the switch and typed the following:

enable

configure terminal

no ip dhcp conflict logging

ip dhcp pool newPool

network 10.100.0.0 255.255.255.0

lease infinite

exit

service dhcp

exit

copy running-config startup-config

startup-config

disable

logout

The switch is configured with an IP of 10.100.0.10 and a netmask of 255.255.255.0.

Two PCs I conncected to the switch after doing the above did get an IP address of 10.100.0.1 and .2 but it took them several minutes to get it. It should only take seconds. Also, one embedded PC will not get an IP - somehow it has 192.9.200.162.

Any suggestions of how to make this work better?

Thanks.

Cisco Employee

Re: Turning on DHCP on a Catalyst 3560 PoE-8

Hello,

Did you have a L3 interface configured on the switch? Also, I did not see

you configuring "default-router" in the DHCP pool. Typically, the DHCP pool

will be tied to the "default-router" ip address and will intercept any dhcp

requests.

Regards,

NT

Re: Turning on DHCP on a Catalyst 3560 PoE-8

I see. There will not be a router connected to this switch. Only a few PCs that need to talk to each other. Should I just set the default-router to the IP of the switch?

I also don't know what this part of your example code is meant to do:

interface vlan 1

ip address 192.168.1.1 255.255.255.0

No shut

Is this what is meant by having an L3 interface configured?

Cisco Employee

Re: Turning on DHCP on a Catalyst 3560 PoE-8

Hello,

Yes, you tie the "default-router" to the IP of the switch. The "interface

VLAN 1" in the example configuration was actually representing the IP of the

switch.

Regards,

NT

Re: Turning on DHCP on a Catalyst 3560 PoE-8

What should I specify as the default gateway on the switch?

Cisco Employee

Re: Turning on DHCP on a Catalyst 3560 PoE-8

Hello,

If the switch is not connected to internet, then you do not need to worry

about default gateway for the switch.

Regards,

NT

Re: Turning on DHCP on a Catalyst 3560 PoE-8

Great, thanks for all your help. Here is my final configuration I am using:

enable

configure terminal

no ip dhcp conflict logging

ip dhcp pool newPool

network 10.100.0.0 255.255.255.0

default-router 10.100.0.10

lease infinite

exit

interface vlan 1

ip address 10.100.0.10 255.255.255.0

no shutdown

exit

service dhcp

exit

copy running-config startup-config

startup-config

disable

logout

It seems to be working well like this. Unless you see anything wrong with what is above, this is what I will use from now on.

Thank you for all your assistance.

Cisco Employee

Re: Turning on DHCP on a Catalyst 3560 PoE-8

Hello,

The config looks good.

Regards,

NT

859
Views
20
Helpful
9
Replies