cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
23130
Views
10
Helpful
9
Replies

Take too much time to get an IP over a cisco switch

hyjeon
Level 1
Level 1

Hi,

I purchased a cisco switch which supports giga bit, SG220. However, after I replace an old switch with it, all computers in my office get an IP from a router very slowly, approximately take a minute.

Router(dhcp)---SG220---Computers

Before chaging it, the computers get an ip right after booting-up.

I heard this may cause from enabling Spaning tree. is this true? if so, How do I disable it? there're only about 20 machines so I don't think I need that function.

please advise.

2 Accepted Solutions

Accepted Solutions

Peter Paluch
Cisco Employee
Cisco Employee

Hi Alex,

Indeed, the delay may be caused by STP keeping every port blocked for 30 seconds before it becomes operable. During this time, clients will either give up getting their IP settings from a DHCP server, or their DHCP clients will slow down sending repeated inquiries to the server.

You do not want to deactivate STP because you absolutely want to be protected against bridging loops, even those inadvertently caused by someone connecting the same Ethernet cable to two wall sockets (it's so easy to think that a dangling cable has been disconnected from the socket while it already is connected to a different socket). However, what you want to tell your switch is that the ports toward PCs can become Forwarding ports immediately after they come online because PCs themselves cannot cause bridging loops.

This is accomplished by configuring each port that goes to a PC by the spanning-tree portfast command, e.g.:

interface gi11
 spanning-tree portfast

Try this out and let us know if this worked.

Best regards,
Peter

View solution in original post

Disclaimer

The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.

Liability Disclaimer

In no event shall Author be liable for any damages wha2tsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.

Posting

I haven't worked on an SG switch, but other Catalyst switches often support setting portfast globally.  You can disable it, per port, if needed.

Besides portfast, you might want to insure your switch is running rapid-STP, and often paired with portfast, also either at the interface or globally, is enabling BPDU guard.

View solution in original post

9 Replies 9

Peter Paluch
Cisco Employee
Cisco Employee

Hi Alex,

Indeed, the delay may be caused by STP keeping every port blocked for 30 seconds before it becomes operable. During this time, clients will either give up getting their IP settings from a DHCP server, or their DHCP clients will slow down sending repeated inquiries to the server.

You do not want to deactivate STP because you absolutely want to be protected against bridging loops, even those inadvertently caused by someone connecting the same Ethernet cable to two wall sockets (it's so easy to think that a dangling cable has been disconnected from the socket while it already is connected to a different socket). However, what you want to tell your switch is that the ports toward PCs can become Forwarding ports immediately after they come online because PCs themselves cannot cause bridging loops.

This is accomplished by configuring each port that goes to a PC by the spanning-tree portfast command, e.g.:

interface gi11
 spanning-tree portfast

Try this out and let us know if this worked.

Best regards,
Peter

Hi Peter,

I appreciate your advice. In fact, I installed the device at a small hospital a few months ago.I knew that computers gets an IP a bit slow. But I thought it would happen only when they boot up the computers in the morning. So I thought it wasn't a big deal.

However, they called me today that it frequently happens during business hours.

Come to think of it, it makes sense that the issue can be occurred when they come back from lunch(they might wake the PC from sleep mode.)

I was thinking about disabling the STP to make sure, but after I read your advice, I don't need to give up the function. I will go to the doctor's office tomorrow early morning before business hours and will configure all ports as spanning-tree portfast.

The switch is configured like this.

Default VLAN 

GI 1 - 20

VLAN 100

GI 21 - 24

What I am going to do tomorrow is:

en

conf t

interface range gi0/1 - 24

spanning-tree portfast

end

copy running-config startup-config

Hope this works. Thanks again and I will let you know the result.

Best regards,

Disclaimer

The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.

Liability Disclaimer

In no event shall Author be liable for any damages wha2tsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.

Posting

I haven't worked on an SG switch, but other Catalyst switches often support setting portfast globally.  You can disable it, per port, if needed.

Besides portfast, you might want to insure your switch is running rapid-STP, and often paired with portfast, also either at the interface or globally, is enabling BPDU guard.

Hi Joseph,

I had to disable the STP because the rapid-STP didn't work. computers get IP immediately from DHCP server after disabling the STP.

Thanks so much for your help.

I have a question. Because I focus on small local businesses, I haven't had chance to think of buying catalyst series switches. as you know that the prices of the switches are at least double. So far, I couldn't find a reasonable reason to buy that the switches.

So I was wondering why corporations prefer to use the catalyst series such as 2960s, 2960g than SG series.

Oh, and I heard that the configuration commands are different between the two series.

Disclaimer

The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.

Liability Disclaimer

In no event shall Author be liable for any damages wha2tsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.

Posting

Sorry, if I confused you.  Rapid-STP will still delay edge ports, and for that reason, you would still want to use portfast (and usually BPDU guard).  That said, generally rapid-STP is a much better choice than STP for many other reasons.

Catalyst switches I would often expect have features that might not be found on SG switches.  For example some features might be: SNMP management, port authentication, advanced QoS, different "flavors" of STP, or etc.

I've never used a SG switch, so cannot comment on command line differences, but often Catalyst switches are configured at the command line whereas you might more likely configure a SG switch via a GUI interface.

My English isn't that good so I should have read your reply more closely.

Anyway, thanks for your explanation. I feel that I should learn a lot more about the network..

Thank you,

Hi Peter,

I went into the office today. I could simply configure the device via web browser.

I remember there was three options to choose and I checked "rapid STP(??)" on the global setting.

However, it didn't make any difference. I wanted to look and see, but I had no time to stay there.

So I checked "disable" and it worked immediately. I hope I could change some settings but unfortunately, several patients started to come.

I have one more question, As I looked at the screen of port configuration. some ports was shown as 1000mbps, 100mbps and 10mbps.

I was confused. the 1000mpbs makes sense if lan card of a computer support gigabit.. and the 100mbps also make sense. because they also have some old PCs.

But I don't really understand why some ports are connected as 10Mbps. they have no pentium 2, 3  processor computers.

Is there anyway I could set the all ports at least 100mbps?

Please advise.

Hello Alex,

I am sorry to be responding somewhat late, I had a busy day.

Joseph has guided you very correctly (Joe, thanks!) to run Rapid STP and to mark all ports toward servers, hosts, even routers (but not to other switches!) as edge ports using the spanning-tree portfast command. Not running STP, regardless of what version, is not an option - it is very dangerous, and it is calling for trouble. I had a brief look into the configuration guide for your switch but I did not find the global-level spanning-tree portfast default command so I suppose that it is not available, and you need to configure every port individually.

But I don't really understand why some ports are connected as 10Mbps. they have no pentium 2, 3 processor computers.

The 10 Mbps is not really about the CPU type - it always refers to the capabilities of the network card installed into the PC. However, I believe that what you saw were computers that were shutdown. Today's computers power their network cards even when shut down to allow for Wake-on-LAN functionality. However, to save power, a sleeping computer puts the network card to the lowest supported speed which is 10 Mbps. It is probable that this is what you saw.

Best regards,
Peter

Hi Peter,

Thank you so much for spending time regarding my question.

As for the STP settings, I might be wrong. Surely, I should check it for another day.

During posting this issue, I learned a lot from both You and Joseph.

I thank you a lot for the time!!

Thanks,