cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
19094
Views
24
Helpful
10
Replies

SG300-28P DHCP Server cannot be configured

makitproducts
Level 1
Level 1

CSC Folks:

 

I am trying to set up a Cisco SG300-28P (brand new) and every time I try to enable the internal DHCP Server, I get this error message:

L3-Switch(config)#ip dhcp ser
DHCP server cannot be configured. To enable the DHCP server, remove DHCP clients on all interfaces.
L3-Switch(config)#

 

I have factory reset the switch and have tried both in L2 mode and L3 mode and I get the same error message. 

I am running firmware: 

SW version    1.3.7.18 ( date  12-Jan-2014 time  18:02:59 )
Boot version    1.1.0.6 ( date  11-May-2011 time  18:31:00 )
HW version    V02

 

 

Thoughts? I am at a lost here why it's thinking this when I am CLI in to the switch. 

10 Replies 10

makitproducts
Level 1
Level 1

I saw that someone else was having the issue and I have the answer. For the record, I still cannot get the switch to act as a DHCP Server, but at least I can enable the DHCP Server.

 

By default, the switch comes with a Native VLAN (VLAN 1), that VLAN has DHCP enable on it to so when you plug in to the switch (with factory settings) you can get signed in to the switch. So if you do a:

 

1.) sho ip int vlan 1

It should have something like this, except instead of saying "Static" under "Type" it will say "DHCP" and the IP Address (by default) says 0.0.0.0/24

 

   IP Address         I/F             I/F Status           Type        Directed     Precedence   Status
                                                 admin/oper                       Broadcast              
------------------- ---------- ------------- ----------- ---------- ---------- -----------
1.1.1.1/24          vlan 1     DOWN/DOWN     Static      disable                   No         Valid

 

To fix, do the following:

 

1.) config t

2.) int vlan 1

3.) ip address 1.1.1.1 255.255.255.255

       (pick an IP if you're not going to use the management vlan (vlan1)). I picked 1.1.1.1

4.) shutdown

5.) do sh ip int vlan 1 (to make sure it got saved and it shows Type: Static and not DHCP anymore

6.) ip dhcp server

7.) exit

8.) copy running-config startup-config

 

If you wish, you can set up DHCP Now

1.) config t

2.) ip dhcp pool network test (test is the name of your pool)

3.) address low 192.168.2.1 high 192.168.2.199 255.255.255.0

4.) default-router 192.168.2.254 (the IP of your VLAN interface - not VLAN 1)

5.) dns-server 192.168.2.200 (the IP of your DNS Server / router if applicable)

ip dhcp pool network test
address low 192.168.2.1 high 192.168.2.199 255.255.255.0
dns-server 192.168.2.200

 

 

Hope this helps someone if not everyone because I couldn't find information on the web w/o posting on a different forum and having someone else help me. 

 

Thanks.

 

 

 

Many Thanks

makitproducts
Level 1
Level 1

I saw that someone else was having the issue and I have the answer. For the record, I still cannot get the switch to act as a DHCP Server, but at least I can enable the DHCP Server.

 

By default, the switch comes with a Native VLAN (VLAN 1), that VLAN has DHCP enable on it to so when you plug in to the switch (with factory settings) you can get signed in to the switch. So if you do a:

 

1.) sho ip int vlan 1

It should have something like this, except instead of saying "Static" under "Type" it will say "DHCP" and the IP Address (by default) says 0.0.0.0/24

 

   IP Address         I/F             I/F Status           Type        Directed     Precedence   Status
                                                 admin/oper                       Broadcast              
------------------- ---------- ------------- ----------- ---------- ---------- -----------
1.1.1.1/24          vlan 1     DOWN/DOWN     Static      disable                   No         Valid

 

To fix, do the following:

 

1.) config t

2.) int vlan 1

3.) ip address 1.1.1.1 255.255.255.255

       (pick an IP if you're not going to use the management vlan (vlan1)). I picked 1.1.1.1

4.) shutdown

5.) do sh ip int vlan 1 (to make sure it got saved and it shows Type: Static and not DHCP anymore

6.) ip dhcp server

7.) exit

8.) copy running-config startup-config

 

If you wish, you can set up DHCP Now

1.) config t

2.) ip dhcp pool network test (test is the name of your pool)

3.) address low 192.168.2.1 high 192.168.2.199 255.255.255.0

4.) default-router 192.168.2.254 (the IP of your VLAN interface - not VLAN 1)

5.) dns-server 192.168.2.200 (the IP of your DNS Server / router if applicable)

ip dhcp pool network test
address low 192.168.2.1 high 192.168.2.199 255.255.255.0
dns-server 192.168.2.200

 

 

Hope this helps someone if not everyone because I couldn't find information on the web w/o posting on a different forum and having someone else help me. 

 

Thanks.

 

Thanks makitproducts.

 

This help me in our scenario.

 

chrebert
Level 4
Level 4

Hello,

The switch is preventing you from enabling the DHCP server because one of the interfaces on the switch is still configured to use DHCP to obtain an address.  This prevents DHCP from starting so the switch doesn't just hand an address to itself.  By default the switch has an entry for VLAN 1 for DHCP and the default address of 192.168.1.254.  This is a bit more obvious in the GUI.

In order to enable DHCP without all of the extra steps from the idea below simply run the following commands after a default:

L3-Switch(config)#int vlan 1

L3-Switch(config-if)#no ip dhcp

and if you'd like you can set a static address at the same time:

L3-Switch(config-if)# ip address 192.168.1.1 255.255.255.0

Once you do that there are no more DHCP interfaces on the switch, and the ip dhcp server should enable it with no further complaints.

Let me know if that helps at all,

Christopher Ebert - Advanced Network Support Engineer

Cisco Small Business Support Center

Hi Chris,

Sorry for late follow up. i was caught up on another urgent project in last couple of weeks.

 

I have managed to get dhcp server working on my sg300 -p10. But now I have a strange issue.

 

What i have is 4 vlans, vlan 2, vlan 10,  vlan 20 and vlan 30. vlan 2 is connected to netgear ADSL modem/router with an static ip address of 192.168.0.10/24. For vlan2 netgear ADSL modem/Router acts as DHCP server. For vlans 10, 20, 30 I have configured sg300-p10 as dhcp server with correct scope in 172.30.10.0/24, 172.30.20.0/24 and 172.30.30.0/24. 

For a while meaning 3-4 hours everything works fine. But strangely enough some of the hosts in vlan 2 i.e 192.168.0.0/24 for which our ISP netgear ADSL modem/router acts as dhcp, get IP address from vlan 30 i.e 172.30.30.0/24 which puzzles me as it why happens? At this stage I am trying to avoid turning off our ISP's netgear ADSL modem/router  dhcp service for vlan 192.168.0.0/24 since I don't understand why what I have does not work? Remind you vlan 30 is for a WLAN and I have connected another netgear access point to it which also acts as dhcp server for wireless clients. The range of IP address this access points gives out are excluded in dhcp configuration for vlan 30 in SG300-p10.

 

Can you shed some lights as what I doing wrong here?

 

Best Regards

Salim

 

Salim:

 

Chris is probably going to give you the same answer I am about to give you. 

 

1.) You can't have two DHCP Servers on the same network (regardless of the VLAN) unless you remove the default gateway on the second DHCP Network so it doesn't have access back to the other networks (not suggest). 

 

2.) You cannot have DHCP Server & DHCP Relay turned on at the same time on a Cisco SG300 or SG500. So, could you post your configuration?

 

Thanks.

I am not sure if I understand your point 1 correctly. 

My first DHCP server(netgear ADSL modem is in VLAN 2 with scope of addresses from 192.168.0.0/24

My Second DHCP server is in VLAN 30, SG300 -p10, with scope of 172.30.30.0/24. From this address range I have excluded 100 addresses given to another netgear AP for wireless clients. Of course the default -gateways in each case are different. In case of 192.168.0.0/24 it is 192.168.0.1/24 the netgear modem/router connected to ISP which does the NAT for internet access. For vlan 30, the gateway is 172.30.30.1/24. This is the SVI (vlan 30) on SG300 p10. As usual on I got SG300 running as L3 and doing inter-vlan routing. The netgear modem/router giving us internet access, has static route to 172.30.0.0/16 using 192.168.0.10 as the next hop which is the SVI for vlan 2 on SG300.

As you can see the gateways are different but vlans each gateway is connected to, are routeable via SG300 L3 inter-vlan communication.

Now saying all this, are not VLANs meant to segment broadcast domain? Are not dhcp discover and request are broadcast ? If the answer is yes on both cases, why on earth then a wired client on vlan 2 (192.168.0.0/24) get an IP address from vlan 30 (172.30.30.0/24). Strangely enough from the range of addresses given to netgear AP.  

 

Regards

Salim

 

 

upgrade to the latest firmware. At least for me this fixed this issue.

It's super old, but I have this same problem... Did you ever get a resolution?