08-23-2010 12:03 PM - edited 03-06-2019 12:36 PM
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!
Solved! Go to Solution.
08-24-2010 10:41 AM
Hello,
If the switch is not connected to internet, then you do not need to worry
about default gateway for the switch.
Regards,
NT
08-23-2010 12:16 PM
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
08-24-2010 08:45 AM
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.
08-24-2010 09:54 AM
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
08-24-2010 10:17 AM
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?
08-24-2010 10:20 AM
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
08-24-2010 10:38 AM
What should I specify as the default gateway on the switch?
08-24-2010 10:41 AM
Hello,
If the switch is not connected to internet, then you do not need to worry
about default gateway for the switch.
Regards,
NT
08-24-2010 11:38 AM
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
logoutIt 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.
08-24-2010 11:46 AM
Hello,
The config looks good.
Regards,
NT
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