Turning on DHCP on a Catalyst 3560 PoE-8

Answered Question
Aug 23rd, 2010

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!

I have this problem too.
0 votes
Correct Answer by Nagaraja Thanthry about 6 years 3 months ago

Hello,

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

about default gateway for the switch.

Regards,

NT

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (5 ratings)
Loading.
douglas.ctr.williams Tue, 08/24/2010 - 08:45

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.

Nagaraja Thanthry Tue, 08/24/2010 - 09:54

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

douglas.ctr.williams Tue, 08/24/2010 - 10:17

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?

Nagaraja Thanthry Tue, 08/24/2010 - 10:20

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

Correct Answer
Nagaraja Thanthry Tue, 08/24/2010 - 10:41

Hello,

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

about default gateway for the switch.

Regards,

NT

douglas.ctr.williams Tue, 08/24/2010 - 11:38

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

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;}

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.

Actions

This Discussion